@weekendgoals/weekendgoals-common 1.1663.15582699783 → 1.1668.16401202063

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.
@@ -8,7 +8,6 @@ export declare const LeagueSchema: mongoose.Schema<any, mongoose.Model<any, any,
8
8
  name?: string;
9
9
  country?: string;
10
10
  rank?: number;
11
- soccerwaySlug?: string;
12
11
  logo?: string;
13
12
  externalId?: string;
14
13
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
@@ -18,7 +17,6 @@ export declare const LeagueSchema: mongoose.Schema<any, mongoose.Model<any, any,
18
17
  name?: string;
19
18
  country?: string;
20
19
  rank?: number;
21
- soccerwaySlug?: string;
22
20
  logo?: string;
23
21
  externalId?: string;
24
22
  }>> & mongoose.FlatRecord<{
@@ -28,7 +26,6 @@ export declare const LeagueSchema: mongoose.Schema<any, mongoose.Model<any, any,
28
26
  name?: string;
29
27
  country?: string;
30
28
  rank?: number;
31
- soccerwaySlug?: string;
32
29
  logo?: string;
33
30
  externalId?: string;
34
31
  }> & {
@@ -41,7 +38,6 @@ export declare const LeagueModel: mongoose.Model<{
41
38
  name?: string;
42
39
  country?: string;
43
40
  rank?: number;
44
- soccerwaySlug?: string;
45
41
  logo?: string;
46
42
  externalId?: string;
47
43
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
@@ -51,7 +47,6 @@ export declare const LeagueModel: mongoose.Model<{
51
47
  name?: string;
52
48
  country?: string;
53
49
  rank?: number;
54
- soccerwaySlug?: string;
55
50
  logo?: string;
56
51
  externalId?: string;
57
52
  }> & {
@@ -61,7 +56,6 @@ export declare const LeagueModel: mongoose.Model<{
61
56
  name?: string;
62
57
  country?: string;
63
58
  rank?: number;
64
- soccerwaySlug?: string;
65
59
  logo?: string;
66
60
  externalId?: string;
67
61
  } & {
@@ -75,7 +69,6 @@ export declare const LeagueModel: mongoose.Model<{
75
69
  name?: string;
76
70
  country?: string;
77
71
  rank?: number;
78
- soccerwaySlug?: string;
79
72
  logo?: string;
80
73
  externalId?: string;
81
74
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
@@ -85,7 +78,6 @@ export declare const LeagueModel: mongoose.Model<{
85
78
  name?: string;
86
79
  country?: string;
87
80
  rank?: number;
88
- soccerwaySlug?: string;
89
81
  logo?: string;
90
82
  externalId?: string;
91
83
  }>> & mongoose.FlatRecord<{
@@ -95,7 +87,6 @@ export declare const LeagueModel: mongoose.Model<{
95
87
  name?: string;
96
88
  country?: string;
97
89
  rank?: number;
98
- soccerwaySlug?: string;
99
90
  logo?: string;
100
91
  externalId?: string;
101
92
  }> & {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/leagues/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUyB,CAAC;AAEnD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAoD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/leagues/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASyB,CAAC;AAEnD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAoD,CAAC"}
@@ -6,7 +6,6 @@ exports.LeagueSchema = new mongoose.Schema({
6
6
  country: String,
7
7
  name: String,
8
8
  rank: Number,
9
- soccerwaySlug: String,
10
9
  externalId: { type: String, sparse: true },
11
10
  logo: String,
12
11
  }, { timestamps: true }).index({ country: 1, name: 1 }, { unique: true });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/leagues/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACxB,QAAA,YAAY,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC7C;IACE,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,MAAM;IACrB,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC1C,IAAI,EAAE,MAAM;CACb,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAEtC,QAAA,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/leagues/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACxB,QAAA,YAAY,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC7C;IACE,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC1C,IAAI,EAAE,MAAM;CACb,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAEtC,QAAA,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"}
@@ -7,17 +7,18 @@ export declare const MatchSchema: mongoose.Schema<any, mongoose.Model<any, any,
7
7
  updatedAt: NativeDate;
8
8
  } & {
9
9
  venueId?: string;
10
- hash?: string;
11
10
  location?: {
12
11
  type: "Point";
13
12
  coordinates: number[];
14
13
  };
14
+ externalId?: string;
15
15
  competitionId?: string;
16
16
  competitionName?: string;
17
17
  homeTeamId?: string;
18
- homeTeamHash?: string;
18
+ homeTeamExternalId?: string;
19
19
  awayTeamId?: string;
20
- awayTeamHash?: string;
20
+ awayTeamExternalId?: string;
21
+ venueExternalId?: string;
21
22
  venueNotCertain?: boolean;
22
23
  kickoff?: NativeDate;
23
24
  status?: string;
@@ -30,17 +31,18 @@ export declare const MatchSchema: mongoose.Schema<any, mongoose.Model<any, any,
30
31
  updatedAt: NativeDate;
31
32
  } & {
32
33
  venueId?: string;
33
- hash?: string;
34
34
  location?: {
35
35
  type: "Point";
36
36
  coordinates: number[];
37
37
  };
38
+ externalId?: string;
38
39
  competitionId?: string;
39
40
  competitionName?: string;
40
41
  homeTeamId?: string;
41
- homeTeamHash?: string;
42
+ homeTeamExternalId?: string;
42
43
  awayTeamId?: string;
43
- awayTeamHash?: string;
44
+ awayTeamExternalId?: string;
45
+ venueExternalId?: string;
44
46
  venueNotCertain?: boolean;
45
47
  kickoff?: NativeDate;
46
48
  status?: string;
@@ -53,17 +55,18 @@ export declare const MatchSchema: mongoose.Schema<any, mongoose.Model<any, any,
53
55
  updatedAt: NativeDate;
54
56
  } & {
55
57
  venueId?: string;
56
- hash?: string;
57
58
  location?: {
58
59
  type: "Point";
59
60
  coordinates: number[];
60
61
  };
62
+ externalId?: string;
61
63
  competitionId?: string;
62
64
  competitionName?: string;
63
65
  homeTeamId?: string;
64
- homeTeamHash?: string;
66
+ homeTeamExternalId?: string;
65
67
  awayTeamId?: string;
66
- awayTeamHash?: string;
68
+ awayTeamExternalId?: string;
69
+ venueExternalId?: string;
67
70
  venueNotCertain?: boolean;
68
71
  kickoff?: NativeDate;
69
72
  status?: string;
@@ -79,17 +82,18 @@ export declare const MatchModel: mongoose.Model<{
79
82
  updatedAt: NativeDate;
80
83
  } & {
81
84
  venueId?: string;
82
- hash?: string;
83
85
  location?: {
84
86
  type: "Point";
85
87
  coordinates: number[];
86
88
  };
89
+ externalId?: string;
87
90
  competitionId?: string;
88
91
  competitionName?: string;
89
92
  homeTeamId?: string;
90
- homeTeamHash?: string;
93
+ homeTeamExternalId?: string;
91
94
  awayTeamId?: string;
92
- awayTeamHash?: string;
95
+ awayTeamExternalId?: string;
96
+ venueExternalId?: string;
93
97
  venueNotCertain?: boolean;
94
98
  kickoff?: NativeDate;
95
99
  status?: string;
@@ -102,17 +106,18 @@ export declare const MatchModel: mongoose.Model<{
102
106
  updatedAt: NativeDate;
103
107
  } & {
104
108
  venueId?: string;
105
- hash?: string;
106
109
  location?: {
107
110
  type: "Point";
108
111
  coordinates: number[];
109
112
  };
113
+ externalId?: string;
110
114
  competitionId?: string;
111
115
  competitionName?: string;
112
116
  homeTeamId?: string;
113
- homeTeamHash?: string;
117
+ homeTeamExternalId?: string;
114
118
  awayTeamId?: string;
115
- awayTeamHash?: string;
119
+ awayTeamExternalId?: string;
120
+ venueExternalId?: string;
116
121
  venueNotCertain?: boolean;
117
122
  kickoff?: NativeDate;
118
123
  status?: string;
@@ -125,17 +130,18 @@ export declare const MatchModel: mongoose.Model<{
125
130
  updatedAt: NativeDate;
126
131
  } & {
127
132
  venueId?: string;
128
- hash?: string;
129
133
  location?: {
130
134
  type: "Point";
131
135
  coordinates: number[];
132
136
  };
137
+ externalId?: string;
133
138
  competitionId?: string;
134
139
  competitionName?: string;
135
140
  homeTeamId?: string;
136
- homeTeamHash?: string;
141
+ homeTeamExternalId?: string;
137
142
  awayTeamId?: string;
138
- awayTeamHash?: string;
143
+ awayTeamExternalId?: string;
144
+ venueExternalId?: string;
139
145
  venueNotCertain?: boolean;
140
146
  kickoff?: NativeDate;
141
147
  status?: string;
@@ -153,17 +159,18 @@ export declare const MatchModel: mongoose.Model<{
153
159
  updatedAt: NativeDate;
154
160
  } & {
155
161
  venueId?: string;
156
- hash?: string;
157
162
  location?: {
158
163
  type: "Point";
159
164
  coordinates: number[];
160
165
  };
166
+ externalId?: string;
161
167
  competitionId?: string;
162
168
  competitionName?: string;
163
169
  homeTeamId?: string;
164
- homeTeamHash?: string;
170
+ homeTeamExternalId?: string;
165
171
  awayTeamId?: string;
166
- awayTeamHash?: string;
172
+ awayTeamExternalId?: string;
173
+ venueExternalId?: string;
167
174
  venueNotCertain?: boolean;
168
175
  kickoff?: NativeDate;
169
176
  status?: string;
@@ -176,17 +183,18 @@ export declare const MatchModel: mongoose.Model<{
176
183
  updatedAt: NativeDate;
177
184
  } & {
178
185
  venueId?: string;
179
- hash?: string;
180
186
  location?: {
181
187
  type: "Point";
182
188
  coordinates: number[];
183
189
  };
190
+ externalId?: string;
184
191
  competitionId?: string;
185
192
  competitionName?: string;
186
193
  homeTeamId?: string;
187
- homeTeamHash?: string;
194
+ homeTeamExternalId?: string;
188
195
  awayTeamId?: string;
189
- awayTeamHash?: string;
196
+ awayTeamExternalId?: string;
197
+ venueExternalId?: string;
190
198
  venueNotCertain?: boolean;
191
199
  kickoff?: NativeDate;
192
200
  status?: string;
@@ -199,17 +207,18 @@ export declare const MatchModel: mongoose.Model<{
199
207
  updatedAt: NativeDate;
200
208
  } & {
201
209
  venueId?: string;
202
- hash?: string;
203
210
  location?: {
204
211
  type: "Point";
205
212
  coordinates: number[];
206
213
  };
214
+ externalId?: string;
207
215
  competitionId?: string;
208
216
  competitionName?: string;
209
217
  homeTeamId?: string;
210
- homeTeamHash?: string;
218
+ homeTeamExternalId?: string;
211
219
  awayTeamId?: string;
212
- awayTeamHash?: string;
220
+ awayTeamExternalId?: string;
221
+ venueExternalId?: string;
213
222
  venueNotCertain?: boolean;
214
223
  kickoff?: NativeDate;
215
224
  status?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAkD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/matches/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAkD,CAAC"}
@@ -6,10 +6,11 @@ exports.MatchSchema = new mongoose.Schema({
6
6
  competitionId: String,
7
7
  competitionName: String,
8
8
  homeTeamId: String,
9
- homeTeamHash: String,
9
+ homeTeamExternalId: String, // New: reference teams by externalId
10
10
  awayTeamId: String,
11
- awayTeamHash: String,
11
+ awayTeamExternalId: String, // New: reference teams by externalId
12
12
  venueId: String,
13
+ venueExternalId: String, // New: reference venues by externalId
13
14
  venueNotCertain: Boolean,
14
15
  location: {
15
16
  $type: {
@@ -26,13 +27,13 @@ exports.MatchSchema = new mongoose.Schema({
26
27
  required: false,
27
28
  _id: false,
28
29
  },
29
- hash: { $type: String, unique: true },
30
30
  kickoff: Date,
31
31
  status: String,
32
32
  localTimeKickoff: Date,
33
33
  hasTickets: Boolean,
34
34
  ticketPrice: Number,
35
35
  ticketCurrency: String,
36
+ externalId: String, // New: match external ID from API-Football
36
37
  }, { timestamps: true, typeKey: "$type" });
37
38
  exports.MatchModel = mongoose.model("Match", exports.MatchSchema, "Matches");
38
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/matches/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAExB,QAAA,WAAW,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC5C;IACE,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,MAAM;IACvB,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,MAAM;IACpB,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,OAAO;IACxB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;aAC3C;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,CAAC,MAAM,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,+BAA+B,CAAC;aAClD;SACF;QACD,QAAQ,EAAE,KAAK;QACf,GAAG,EAAE,KAAK;KACX;IACD,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACrC,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,IAAI;IACtB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,MAAM;IACnB,cAAc,EAAE,MAAM;CACvB,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CACvC,CAAC;AAEW,QAAA,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAW,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/matches/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAExB,QAAA,WAAW,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC5C;IACE,aAAa,EAAE,MAAM;IACrB,eAAe,EAAE,MAAM;IACvB,UAAU,EAAE,MAAM;IAClB,kBAAkB,EAAE,MAAM,EAAE,qCAAqC;IACjE,UAAU,EAAE,MAAM;IAClB,kBAAkB,EAAE,MAAM,EAAE,qCAAqC;IACjE,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,MAAM,EAAE,sCAAsC;IAC/D,eAAe,EAAE,OAAO;IACxB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;aAC3C;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,CAAC,MAAM,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,+BAA+B,CAAC;aAClD;SACF;QACD,QAAQ,EAAE,KAAK;QACf,GAAG,EAAE,KAAK;KACX;IACD,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,IAAI;IACtB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,MAAM;IACnB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM,EAAE,2CAA2C;CAChE,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CACvC,CAAC;AAEW,QAAA,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAW,EAAE,SAAS,CAAC,CAAC"}
@@ -7,51 +7,60 @@ export declare const TeamsSchema: mongoose.Schema<any, mongoose.Model<any, any,
7
7
  } & {
8
8
  name?: string;
9
9
  venueId?: string;
10
- hash?: string;
11
10
  country?: string;
12
11
  metadata?: {
12
+ logoUrl?: string;
13
+ iconUrl?: string;
13
14
  instagramUrl?: string;
14
15
  websiteUrl?: string;
15
16
  ticketsUrl?: string;
17
+ founded?: number;
18
+ national?: boolean;
19
+ code?: string;
16
20
  };
17
- soccerwaySlug?: string;
18
21
  externalId?: string;
22
+ venueExternalId?: string;
19
23
  leagueId?: string;
20
- venueHash?: string;
21
24
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
22
25
  createdAt: NativeDate;
23
26
  updatedAt: NativeDate;
24
27
  } & {
25
28
  name?: string;
26
29
  venueId?: string;
27
- hash?: string;
28
30
  country?: string;
29
31
  metadata?: {
32
+ logoUrl?: string;
33
+ iconUrl?: string;
30
34
  instagramUrl?: string;
31
35
  websiteUrl?: string;
32
36
  ticketsUrl?: string;
37
+ founded?: number;
38
+ national?: boolean;
39
+ code?: string;
33
40
  };
34
- soccerwaySlug?: string;
35
41
  externalId?: string;
42
+ venueExternalId?: string;
36
43
  leagueId?: string;
37
- venueHash?: string;
38
44
  }>> & mongoose.FlatRecord<{
39
45
  createdAt: NativeDate;
40
46
  updatedAt: NativeDate;
41
47
  } & {
42
48
  name?: string;
43
49
  venueId?: string;
44
- hash?: string;
45
50
  country?: string;
46
51
  metadata?: {
52
+ logoUrl?: string;
53
+ iconUrl?: string;
47
54
  instagramUrl?: string;
48
55
  websiteUrl?: string;
49
56
  ticketsUrl?: string;
57
+ founded?: number;
58
+ national?: boolean;
59
+ code?: string;
50
60
  };
51
- soccerwaySlug?: string;
52
61
  externalId?: string;
62
+ venueExternalId?: string;
53
63
  leagueId?: string;
54
- venueHash?: string;
55
64
  }> & {
56
65
  _id: mongoose.Types.ObjectId;
57
66
  }>;
@@ -61,51 +70,60 @@ export declare const TeamModel: mongoose.Model<{
61
70
  } & {
62
71
  name?: string;
63
72
  venueId?: string;
64
- hash?: string;
65
73
  country?: string;
66
74
  metadata?: {
75
+ logoUrl?: string;
76
+ iconUrl?: string;
67
77
  instagramUrl?: string;
68
78
  websiteUrl?: string;
69
79
  ticketsUrl?: string;
80
+ founded?: number;
81
+ national?: boolean;
82
+ code?: string;
70
83
  };
71
- soccerwaySlug?: string;
72
84
  externalId?: string;
85
+ venueExternalId?: string;
73
86
  leagueId?: string;
74
- venueHash?: string;
75
87
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
76
88
  createdAt: NativeDate;
77
89
  updatedAt: NativeDate;
78
90
  } & {
79
91
  name?: string;
80
92
  venueId?: string;
81
- hash?: string;
82
93
  country?: string;
83
94
  metadata?: {
95
+ logoUrl?: string;
96
+ iconUrl?: string;
84
97
  instagramUrl?: string;
85
98
  websiteUrl?: string;
86
99
  ticketsUrl?: string;
100
+ founded?: number;
101
+ national?: boolean;
102
+ code?: string;
87
103
  };
88
- soccerwaySlug?: string;
89
104
  externalId?: string;
105
+ venueExternalId?: string;
90
106
  leagueId?: string;
91
- venueHash?: string;
92
107
  }> & {
93
108
  createdAt: NativeDate;
94
109
  updatedAt: NativeDate;
95
110
  } & {
96
111
  name?: string;
97
112
  venueId?: string;
98
- hash?: string;
99
113
  country?: string;
100
114
  metadata?: {
115
+ logoUrl?: string;
116
+ iconUrl?: string;
101
117
  instagramUrl?: string;
102
118
  websiteUrl?: string;
103
119
  ticketsUrl?: string;
120
+ founded?: number;
121
+ national?: boolean;
122
+ code?: string;
104
123
  };
105
- soccerwaySlug?: string;
106
124
  externalId?: string;
125
+ venueExternalId?: string;
107
126
  leagueId?: string;
108
- venueHash?: string;
109
127
  } & {
110
128
  _id: mongoose.Types.ObjectId;
111
129
  }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
@@ -116,51 +134,60 @@ export declare const TeamModel: mongoose.Model<{
116
134
  } & {
117
135
  name?: string;
118
136
  venueId?: string;
119
- hash?: string;
120
137
  country?: string;
121
138
  metadata?: {
139
+ logoUrl?: string;
140
+ iconUrl?: string;
122
141
  instagramUrl?: string;
123
142
  websiteUrl?: string;
124
143
  ticketsUrl?: string;
144
+ founded?: number;
145
+ national?: boolean;
146
+ code?: string;
125
147
  };
126
- soccerwaySlug?: string;
127
148
  externalId?: string;
149
+ venueExternalId?: string;
128
150
  leagueId?: string;
129
- venueHash?: string;
130
151
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
131
152
  createdAt: NativeDate;
132
153
  updatedAt: NativeDate;
133
154
  } & {
134
155
  name?: string;
135
156
  venueId?: string;
136
- hash?: string;
137
157
  country?: string;
138
158
  metadata?: {
159
+ logoUrl?: string;
160
+ iconUrl?: string;
139
161
  instagramUrl?: string;
140
162
  websiteUrl?: string;
141
163
  ticketsUrl?: string;
164
+ founded?: number;
165
+ national?: boolean;
166
+ code?: string;
142
167
  };
143
- soccerwaySlug?: string;
144
168
  externalId?: string;
169
+ venueExternalId?: string;
145
170
  leagueId?: string;
146
- venueHash?: string;
147
171
  }>> & mongoose.FlatRecord<{
148
172
  createdAt: NativeDate;
149
173
  updatedAt: NativeDate;
150
174
  } & {
151
175
  name?: string;
152
176
  venueId?: string;
153
- hash?: string;
154
177
  country?: string;
155
178
  metadata?: {
179
+ logoUrl?: string;
180
+ iconUrl?: string;
156
181
  instagramUrl?: string;
157
182
  websiteUrl?: string;
158
183
  ticketsUrl?: string;
184
+ founded?: number;
185
+ national?: boolean;
186
+ code?: string;
159
187
  };
160
- soccerwaySlug?: string;
161
188
  externalId?: string;
189
+ venueExternalId?: string;
162
190
  leagueId?: string;
163
- venueHash?: string;
164
191
  }> & {
165
192
  _id: mongoose.Types.ObjectId;
166
193
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/teams/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/teams/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBvB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC"}
@@ -6,16 +6,19 @@ exports.TeamsSchema = new mongoose.Schema({
6
6
  name: String,
7
7
  leagueId: String,
8
8
  venueId: String,
9
- venueHash: String,
10
- hash: { type: String, unique: true },
11
- externalId: { type: String, sparse: true },
9
+ venueExternalId: String, // New: reference venues by externalId
10
+ externalId: { type: String, unique: true },
12
11
  country: String,
13
12
  metadata: {
13
+ logoUrl: String,
14
+ iconUrl: String,
14
15
  instagramUrl: String,
15
16
  websiteUrl: String,
16
17
  ticketsUrl: String,
18
+ founded: Number,
19
+ national: Boolean,
20
+ code: String,
17
21
  },
18
- soccerwaySlug: String,
19
22
  }, { timestamps: true });
20
23
  exports.TeamModel = mongoose.model("Team", exports.TeamsSchema, "Teams");
21
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/teams/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACxB,QAAA,WAAW,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC5C;IACE,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACpC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC1C,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,MAAM;KACnB;IACD,aAAa,EAAE,MAAM;CACtB,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAC;AAEW,QAAA,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,mBAAW,EAAE,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/teams/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACxB,QAAA,WAAW,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC5C;IACE,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,MAAM,EAAE,sCAAsC;IAC/D,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC1C,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,MAAM;KACb;CACF,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAC;AAEW,QAAA,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,mBAAW,EAAE,OAAO,CAAC,CAAC"}
@@ -7,12 +7,11 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
7
7
  updatedAt: NativeDate;
8
8
  } & {
9
9
  name?: string;
10
- hash?: string;
11
10
  location?: {
12
11
  type: "Point";
13
12
  coordinates: number[];
14
13
  };
15
- area?: string;
14
+ address?: string;
16
15
  city?: string;
17
16
  country?: string;
18
17
  externalId?: string;
@@ -22,17 +21,17 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
22
21
  hasCustomImage?: boolean;
23
22
  rating?: number;
24
23
  googlePlaceId?: string;
24
+ capacity?: number;
25
25
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
26
26
  createdAt: NativeDate;
27
27
  updatedAt: NativeDate;
28
28
  } & {
29
29
  name?: string;
30
- hash?: string;
31
30
  location?: {
32
31
  type: "Point";
33
32
  coordinates: number[];
34
33
  };
35
- area?: string;
34
+ address?: string;
36
35
  city?: string;
37
36
  country?: string;
38
37
  externalId?: string;
@@ -42,17 +41,17 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
42
41
  hasCustomImage?: boolean;
43
42
  rating?: number;
44
43
  googlePlaceId?: string;
44
+ capacity?: number;
45
45
  }>> & mongoose.FlatRecord<{
46
46
  createdAt: NativeDate;
47
47
  updatedAt: NativeDate;
48
48
  } & {
49
49
  name?: string;
50
- hash?: string;
51
50
  location?: {
52
51
  type: "Point";
53
52
  coordinates: number[];
54
53
  };
55
- area?: string;
54
+ address?: string;
56
55
  city?: string;
57
56
  country?: string;
58
57
  externalId?: string;
@@ -62,6 +61,7 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
62
61
  hasCustomImage?: boolean;
63
62
  rating?: number;
64
63
  googlePlaceId?: string;
64
+ capacity?: number;
65
65
  }> & {
66
66
  _id: mongoose.Types.ObjectId;
67
67
  }>;
@@ -70,12 +70,11 @@ export declare const VenueModel: mongoose.Model<{
70
70
  updatedAt: NativeDate;
71
71
  } & {
72
72
  name?: string;
73
- hash?: string;
74
73
  location?: {
75
74
  type: "Point";
76
75
  coordinates: number[];
77
76
  };
78
- area?: string;
77
+ address?: string;
79
78
  city?: string;
80
79
  country?: string;
81
80
  externalId?: string;
@@ -85,17 +84,17 @@ export declare const VenueModel: mongoose.Model<{
85
84
  hasCustomImage?: boolean;
86
85
  rating?: number;
87
86
  googlePlaceId?: string;
87
+ capacity?: number;
88
88
  }, {}, {}, {}, mongoose.Document<unknown, {}, {
89
89
  createdAt: NativeDate;
90
90
  updatedAt: NativeDate;
91
91
  } & {
92
92
  name?: string;
93
- hash?: string;
94
93
  location?: {
95
94
  type: "Point";
96
95
  coordinates: number[];
97
96
  };
98
- area?: string;
97
+ address?: string;
99
98
  city?: string;
100
99
  country?: string;
101
100
  externalId?: string;
@@ -105,17 +104,17 @@ export declare const VenueModel: mongoose.Model<{
105
104
  hasCustomImage?: boolean;
106
105
  rating?: number;
107
106
  googlePlaceId?: string;
107
+ capacity?: number;
108
108
  }> & {
109
109
  createdAt: NativeDate;
110
110
  updatedAt: NativeDate;
111
111
  } & {
112
112
  name?: string;
113
- hash?: string;
114
113
  location?: {
115
114
  type: "Point";
116
115
  coordinates: number[];
117
116
  };
118
- area?: string;
117
+ address?: string;
119
118
  city?: string;
120
119
  country?: string;
121
120
  externalId?: string;
@@ -125,6 +124,7 @@ export declare const VenueModel: mongoose.Model<{
125
124
  hasCustomImage?: boolean;
126
125
  rating?: number;
127
126
  googlePlaceId?: string;
127
+ capacity?: number;
128
128
  } & {
129
129
  _id: mongoose.Types.ObjectId;
130
130
  }, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
@@ -135,12 +135,11 @@ export declare const VenueModel: mongoose.Model<{
135
135
  updatedAt: NativeDate;
136
136
  } & {
137
137
  name?: string;
138
- hash?: string;
139
138
  location?: {
140
139
  type: "Point";
141
140
  coordinates: number[];
142
141
  };
143
- area?: string;
142
+ address?: string;
144
143
  city?: string;
145
144
  country?: string;
146
145
  externalId?: string;
@@ -150,17 +149,17 @@ export declare const VenueModel: mongoose.Model<{
150
149
  hasCustomImage?: boolean;
151
150
  rating?: number;
152
151
  googlePlaceId?: string;
152
+ capacity?: number;
153
153
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
154
154
  createdAt: NativeDate;
155
155
  updatedAt: NativeDate;
156
156
  } & {
157
157
  name?: string;
158
- hash?: string;
159
158
  location?: {
160
159
  type: "Point";
161
160
  coordinates: number[];
162
161
  };
163
- area?: string;
162
+ address?: string;
164
163
  city?: string;
165
164
  country?: string;
166
165
  externalId?: string;
@@ -170,17 +169,17 @@ export declare const VenueModel: mongoose.Model<{
170
169
  hasCustomImage?: boolean;
171
170
  rating?: number;
172
171
  googlePlaceId?: string;
172
+ capacity?: number;
173
173
  }>> & mongoose.FlatRecord<{
174
174
  createdAt: NativeDate;
175
175
  updatedAt: NativeDate;
176
176
  } & {
177
177
  name?: string;
178
- hash?: string;
179
178
  location?: {
180
179
  type: "Point";
181
180
  coordinates: number[];
182
181
  };
183
- area?: string;
182
+ address?: string;
184
183
  city?: string;
185
184
  country?: string;
186
185
  externalId?: string;
@@ -190,6 +189,7 @@ export declare const VenueModel: mongoose.Model<{
190
189
  hasCustomImage?: boolean;
191
190
  rating?: number;
192
191
  googlePlaceId?: string;
192
+ capacity?: number;
193
193
  }> & {
194
194
  _id: mongoose.Types.ObjectId;
195
195
  }>>;
@@ -4,8 +4,7 @@ exports.VenueModel = exports.VenueSchema = void 0;
4
4
  const mongoose = require("mongoose");
5
5
  exports.VenueSchema = new mongoose.Schema({
6
6
  name: String,
7
- hash: { $type: String, unique: true },
8
- externalId: { $type: String, sparse: true },
7
+ externalId: { $type: String, unique: true },
9
8
  timezone: String,
10
9
  location: {
11
10
  $type: {
@@ -25,11 +24,12 @@ exports.VenueSchema = new mongoose.Schema({
25
24
  imageUrl: String,
26
25
  imageAttribution: String,
27
26
  hasCustomImage: Boolean,
28
- area: String,
27
+ address: String,
29
28
  city: String,
30
29
  country: String,
31
30
  rating: Number,
32
31
  googlePlaceId: String,
32
+ capacity: Number,
33
33
  }, { timestamps: true, typeKey: "$type" });
34
34
  exports.VenueModel = mongoose.model("Venue", exports.VenueSchema, "Venues");
35
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/venues/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAExB,QAAA,WAAW,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC5C;IACE,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IACrC,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC3C,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;aAC3C;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,CAAC,MAAM,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,+BAA+B,CAAC;aAClD;SACF;QACD,QAAQ,EAAE,KAAK;QACf,GAAG,EAAE,KAAK;KACX;IAED,QAAQ,EAAE,MAAM;IAChB,gBAAgB,EAAE,MAAM;IACxB,cAAc,EAAE,OAAO;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,aAAa,EAAE,MAAM;CACtB,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CACvC,CAAC;AAEW,QAAA,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/venues/index.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAExB,QAAA,WAAW,GAAG,IAAI,QAAQ,CAAC,MAAM,CAC5C;IACE,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAC3C,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;aAC3C;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,CAAC,MAAM,CAAC;gBACf,QAAQ,EAAE,CAAC,IAAI,EAAE,+BAA+B,CAAC;aAClD;SACF;QACD,QAAQ,EAAE,KAAK;QACf,GAAG,EAAE,KAAK;KACX;IAED,QAAQ,EAAE,MAAM;IAChB,gBAAgB,EAAE,MAAM;IACxB,cAAc,EAAE,OAAO;IACvB,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,aAAa,EAAE,MAAM;IACrB,QAAQ,EAAE,MAAM;CACjB,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CACvC,CAAC;AAEW,QAAA,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weekendgoals/weekendgoals-common",
3
- "version": "1.1663.15582699783",
3
+ "version": "1.1668.16401202063",
4
4
  "description": "Weekend Goals Common",
5
5
  "private": false,
6
6
  "files": [