@hadoku/jobplatform-worker 2.32.35 → 2.32.36

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/geo.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Where a posting is — the places named in its free-text `location` — and
3
+ * which places lie within a radius of somewhere, for the feed's `near=` filter.
4
+ *
5
+ * Postings say where they are in every way there is: "San Francisco, CA |
6
+ * New York City, NY", "US-CA-Menlo Park", "Sao Paulo, Sao Paulo, Brasil",
7
+ * "Massachusetts - Boston" (sampled from the live corpus 2026-11-06). So this
8
+ * finds EVERY known place a string names rather than parsing one: a phrase
9
+ * match on folded text (lower case, accents stripped, punctuation as spaces).
10
+ *
11
+ * A name more than one place has (Cambridge MA / UK, Arlington VA / TX) is
12
+ * settled by region evidence in the same string — a state code in UPPER case
13
+ * ("CA", never the words "or" / "in" / "me"), a state or country name — and
14
+ * otherwise goes to the place declared first. A place whose name is also a
15
+ * US state ("Washington") needs that evidence outright, or "Seattle,
16
+ * Washington" would put a posting in DC.
17
+ *
18
+ * The US table is JobPulse's US_CITY_COORDINATES (152 metros, hubs and
19
+ * suburbs), ported 2026-11-06; the rest was added for the corpus's
20
+ * international postings. Coordinates are city centres to ~0.01°, which is
21
+ * far finer than any radius anyone asks for.
22
+ */
23
+ export interface Place {
24
+ /** Stable id, `<name-slug>-<region>`; what jobs.geo_keys stores. */
25
+ key: string;
26
+ name: string;
27
+ /** US state code, or ISO country code for anywhere else. */
28
+ region: string;
29
+ lat: number;
30
+ lng: number;
31
+ }
32
+ /** Every known place a location string names, each once, in the order found. */
33
+ export declare function findPlaces(location: string): Place[];
34
+ /** What jobs.geo_keys stores: `|key|key|`, or '' when no known place is named. */
35
+ export declare function geoKeys(location: string): string;
36
+ export declare function milesBetween(a: Place, b: Place): number;
37
+ /** A place by its key, or the first place a free-text query names. */
38
+ export declare function resolvePlace(q: string): Place | null;
39
+ /** Every known place within `miles` of `center`, nearest first (the center included). */
40
+ export declare function placesWithin(center: Place, miles: number): Place[];
41
+ /** Places whose name starts with (or contains) the query, for a picker. */
42
+ export declare function searchPlaces(q: string, limit?: number): Place[];
43
+ //# sourceMappingURL=geo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo.d.ts","sourceRoot":"","sources":["../src/geo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,KAAK;IACrB,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACZ;AA8eD,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,EAAE,CAOpD;AAED,kFAAkF;AAClF,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD;AAID,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAOvD;AAED,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAEpD;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,CAKlE;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,KAAK,EAAE,CAM3D"}