@weekendgoals/weekendgoals-common 1.2282.32182805437 → 1.2283.32404009206
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.
|
@@ -30,7 +30,7 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
|
|
|
30
30
|
hasCustomImage?: boolean;
|
|
31
31
|
googlePlaceId?: string;
|
|
32
32
|
capacity?: number;
|
|
33
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
33
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
34
34
|
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
35
35
|
alternateNames: string[];
|
|
36
36
|
searchNames: string[];
|
|
@@ -59,7 +59,7 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
|
|
|
59
59
|
hasCustomImage?: boolean;
|
|
60
60
|
googlePlaceId?: string;
|
|
61
61
|
capacity?: number;
|
|
62
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
62
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
63
63
|
} & mongoose.DefaultTimestampProps>, {}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
64
64
|
timestamps: true;
|
|
65
65
|
typeKey: "$type";
|
|
@@ -91,7 +91,7 @@ export declare const VenueSchema: mongoose.Schema<any, mongoose.Model<any, any,
|
|
|
91
91
|
hasCustomImage?: boolean;
|
|
92
92
|
googlePlaceId?: string;
|
|
93
93
|
capacity?: number;
|
|
94
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
94
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
95
95
|
} & mongoose.DefaultTimestampProps> & {
|
|
96
96
|
_id: mongoose.Types.ObjectId;
|
|
97
97
|
} & {
|
|
@@ -125,7 +125,7 @@ export declare const VenueModel: mongoose.Model<{
|
|
|
125
125
|
hasCustomImage?: boolean;
|
|
126
126
|
googlePlaceId?: string;
|
|
127
127
|
capacity?: number;
|
|
128
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
128
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
129
129
|
} & mongoose.DefaultTimestampProps, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
130
130
|
alternateNames: string[];
|
|
131
131
|
searchNames: string[];
|
|
@@ -154,7 +154,7 @@ export declare const VenueModel: mongoose.Model<{
|
|
|
154
154
|
hasCustomImage?: boolean;
|
|
155
155
|
googlePlaceId?: string;
|
|
156
156
|
capacity?: number;
|
|
157
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
157
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
158
158
|
} & mongoose.DefaultTimestampProps, {}, {
|
|
159
159
|
timestamps: true;
|
|
160
160
|
typeKey: "$type";
|
|
@@ -186,7 +186,7 @@ export declare const VenueModel: mongoose.Model<{
|
|
|
186
186
|
hasCustomImage?: boolean;
|
|
187
187
|
googlePlaceId?: string;
|
|
188
188
|
capacity?: number;
|
|
189
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
189
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
190
190
|
} & mongoose.DefaultTimestampProps & {
|
|
191
191
|
_id: mongoose.Types.ObjectId;
|
|
192
192
|
} & {
|
|
@@ -222,7 +222,7 @@ export declare const VenueModel: mongoose.Model<{
|
|
|
222
222
|
hasCustomImage?: boolean;
|
|
223
223
|
googlePlaceId?: string;
|
|
224
224
|
capacity?: number;
|
|
225
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
225
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
226
226
|
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
227
227
|
alternateNames: string[];
|
|
228
228
|
searchNames: string[];
|
|
@@ -251,7 +251,7 @@ export declare const VenueModel: mongoose.Model<{
|
|
|
251
251
|
hasCustomImage?: boolean;
|
|
252
252
|
googlePlaceId?: string;
|
|
253
253
|
capacity?: number;
|
|
254
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
254
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
255
255
|
} & mongoose.DefaultTimestampProps>, {}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
256
256
|
timestamps: true;
|
|
257
257
|
typeKey: "$type";
|
|
@@ -283,7 +283,7 @@ export declare const VenueModel: mongoose.Model<{
|
|
|
283
283
|
hasCustomImage?: boolean;
|
|
284
284
|
googlePlaceId?: string;
|
|
285
285
|
capacity?: number;
|
|
286
|
-
cityMatchedVia?: "name" | "name+geo" | "geo";
|
|
286
|
+
cityMatchedVia?: "name" | "name+geo" | "geo" | "manual";
|
|
287
287
|
} & mongoose.DefaultTimestampProps> & {
|
|
288
288
|
_id: mongoose.Types.ObjectId;
|
|
289
289
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/venues/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/venues/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuHvB,CAAC;AAUF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiD,CAAC"}
|
|
@@ -32,39 +32,31 @@ exports.VenueSchema = new mongoose.Schema({
|
|
|
32
32
|
imageAttribution: String,
|
|
33
33
|
hasCustomImage: Boolean,
|
|
34
34
|
address: String,
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
35
|
+
// Display names, denormalized from `cityId` / `countryId` (decision
|
|
36
|
+
// 2026-08-20). They carry `City.name` and `Country.name` verbatim so the
|
|
37
|
+
// venue payload can be rendered — and published to schema.org as
|
|
38
|
+
// `addressLocality` / `addressCountry` — without a join, including in list
|
|
39
|
+
// and map contexts where a per-venue lookup would be N queries.
|
|
38
40
|
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
// corrected, and a venue parked on a Philippines centroid will reject a
|
|
43
|
-
// correct Maltese answer. `country` can judge it, and is what the
|
|
44
|
-
// 2026-08-17 repair anchored on. The team-locations work documents the same
|
|
45
|
-
// circularity defeating four other discriminators.
|
|
41
|
+
// They USED to be the supplier's raw strings, and two things died with
|
|
42
|
+
// that. Recorded here because neither is recoverable by looking at the
|
|
43
|
+
// data afterwards:
|
|
46
44
|
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
45
|
+
// - `country` was the only field independent of `location`. That is what
|
|
46
|
+
// let it arbitrate the 2026-08-17 coordinate repair and catch the five
|
|
47
|
+
// venues whose string named a different country than their coordinates
|
|
48
|
+
// (Estadio Nacional in Santiago said "Australia"). "Country disagrees
|
|
49
|
+
// with coordinates" now returns 0 by construction, not by cleanliness.
|
|
50
|
+
// - `city` was the name half of the city match: 12,394 of 13,767 links
|
|
51
|
+
// are `name+geo` because of it.
|
|
52
52
|
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
// `
|
|
56
|
-
//
|
|
57
|
-
// Estadio Nacional in Santiago currently emits `addressCountry:
|
|
58
|
-
// "Australia"`. Those readers belong on `cityId`/`countryId`, whose names
|
|
59
|
-
// the venue payload does not carry yet. Until then, do not add readers.
|
|
53
|
+
// **So `scripts/link-venues-to-cities.ts` must not be run against
|
|
54
|
+
// production until the new venue matcher lands.** It would match the name
|
|
55
|
+
// it just wrote, promoting every `geo` link to `name+geo` — a silent
|
|
56
|
+
// upgrade of 1,370 guesses into apparent certainties.
|
|
60
57
|
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
// in the repo implements one and weekendgoals-scraper/CLAUDE.md says so
|
|
64
|
-
// outright. The nearest thing is a one-time diff against
|
|
65
|
-
// `GET /venues?id=`, and that endpoint is not trustworthy: it answers 566
|
|
66
|
-
// with Wembley Stadium while `/venues?search=City Ground` answers 566 with
|
|
67
|
-
// The City Ground, and its capacities lost to Wikidata 0-506.
|
|
58
|
+
// Write them ONLY in the same `$set` as the id they mirror. A copy that is
|
|
59
|
+
// refreshed separately is how `Match.location` went stale on 11,304 rows.
|
|
68
60
|
city: String,
|
|
69
61
|
country: String,
|
|
70
62
|
// Where the venue actually is. Resolved from the venue's own coordinates
|
|
@@ -73,8 +65,17 @@ exports.VenueSchema = new mongoose.Schema({
|
|
|
73
65
|
// never filled with a guess.
|
|
74
66
|
cityId: { $type: mongoose.Schema.Types.ObjectId, ref: "City" },
|
|
75
67
|
countryId: { $type: mongoose.Schema.Types.ObjectId, ref: "Country" },
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
// How cityId was established; see matching/city-matcher.ts for the three
|
|
69
|
+
// derived tiers. `manual` is the fourth and is not one of them: it marks a
|
|
70
|
+
// link a human made that the matcher cannot reproduce, and
|
|
71
|
+
// scripts/link-venues-to-cities.ts leaves those rows alone rather than
|
|
72
|
+
// clearing them as stale. It exists because a venue can sit outside the
|
|
73
|
+
// matcher's deliberate 30km radius and still be in the city — King Abdullah
|
|
74
|
+
// Sports City is 30.5km from Jeddah's centroid and is in Jeddah.
|
|
75
|
+
cityMatchedVia: {
|
|
76
|
+
$type: String,
|
|
77
|
+
enum: ["name+geo", "name", "geo", "manual"],
|
|
78
|
+
},
|
|
78
79
|
// Other API-Football ids that turned out to be this same stadium. A ground
|
|
79
80
|
// acquires them because the supplier issues a second id (Parken is 5806 and
|
|
80
81
|
// 11600) or a temporary tournament alias (Euro 2024 renamed every German
|
|
@@ -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,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,0EAA0E;IAC1E,0EAA0E;IAC1E,uEAAuE;IACvE,2EAA2E;IAC3E,0EAA0E;IAC1E,0DAA0D;IAC1D,aAAa,EAAE,MAAM;IACrB,gBAAgB,EAAE,MAAM;IACxB,cAAc,EAAE,OAAO;IACvB,OAAO,EAAE,MAAM;IAEf,
|
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