From 7f473f32c0bbc41c1f4161b23bd996de193cb080 Mon Sep 17 00:00:00 2001 From: wgsadmin Date: Sun, 21 Dec 2025 20:06:10 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74195=20chore:?= =?UTF-8?q?=20update=20woosmap.map=20by=20@wgsadmin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: manz --- types/woosmap.map/index.d.ts | 227 ++++++++++++++++++++----- types/woosmap.map/woosmap.map-tests.ts | 15 ++ 2 files changed, 204 insertions(+), 38 deletions(-) diff --git a/types/woosmap.map/index.d.ts b/types/woosmap.map/index.d.ts index d84fbac2b8524e..7a0d74eb675b49 100644 --- a/types/woosmap.map/index.d.ts +++ b/types/woosmap.map/index.d.ts @@ -1198,6 +1198,16 @@ declare namespace woosmap.map { * Contains methods related to retrieving autocomplete predictions, geocoding for localities and retrieving details */ class LocalitiesService { + /** + * To better track autocomplete sessions and get more accurate and performant results, provide a common uuid to all + * autocomplete session requests and the details request. sessionId must be reset when autocomplete input is emptied + * and when a details is successful. + */ + _sessionId: string; + /** + * Public getter to allow reading the value + */ + sessionId: string; /** * Contains methods related to retrieving autocomplete predictions, geocoding for localities and retrieving details */ @@ -1233,9 +1243,6 @@ declare namespace woosmap.map { request: woosmap.map.localities.LocalitiesNearbyRequest, ): Promise; - /** - * Search results based on a text-based input. - */ search( request: woosmap.map.localities.LocalitiesSearchRequest, ): Promise; @@ -2957,6 +2964,11 @@ declare namespace woosmap.map.localities { * To open suggestions to worldwide postal codes in addition to postal codes for Western Europe. */ data?: woosmap.map.localities.LocalitiesRequestData; + /** + * The types of suggestion to exclude. Multiple types can be passed using the pipe character (|) as a separator. + * Example: excluded_types=`suburb|quarter|neighbourhood` + */ + excluded_types?: string | string[]; /** * If set, this parameter allows a refined search over locality names that bears the same postal code. * possible value is `extended=postal_code` @@ -2988,8 +3000,8 @@ declare namespace woosmap.map.localities { /** * The types of predictions to be returned. * By default, suggestions return types `locality` and `postal_code`. - * can be either a single type or a list of `LocalitiesTypes` - * see [https://developers.woosmap.com/products/localities/autocomplete/#types](https://developers.woosmap.com/products/localities/autocomplete/#types) + * can be either a single type or a list of `LocalitiesTypes|LocalitiesTypesPoi|LocalitiesTypesPoiAlias` + * see [https://developers.woosmap.com/products/localities/concepts/locality-types/](https://developers.woosmap.com/products/localities/concepts/locality-types/) */ types?: string | string[]; } @@ -3018,6 +3030,11 @@ declare namespace woosmap.map.localities { * Whether to retrieve suggestions to worldwide postal codes in addition to postal codes for Western Europe. */ data?: woosmap.map.localities.LocalitiesRequestData; + /** + * The types of suggestion to exclude. Multiple types can be passed using the pipe character (|) as a separator. + * Example: excluded_types=`suburb|quarter|neighbourhood` + */ + excluded_types?: string | string[]; /** * If set, it will limit the content of responses to the specified fields. * This parameter can be any combination of geometry, address_components or shape (defaults to geometry|address_components). @@ -3041,8 +3058,8 @@ declare namespace woosmap.map.localities { /** * The types of geocoding responses to be returned. * By default, suggestions return types `locality`, `postal_code` and `address` - * can be either a single type or a list of `LocalitiesTypes` - * see [https://developers.woosmap.com/products/localities/geocode/#types](https://developers.woosmap.com/products/localities/geocode/#types) + * can be either a single type or a list of `LocalitiesTypes|LocalitiesTypesPoi|LocalitiesTypesPoiAlias` + * see [https://developers.woosmap.com/products/localities/concepts/locality-types/](https://developers.woosmap.com/products/localities/concepts/locality-types/) */ types?: string | string[]; } @@ -3082,10 +3099,10 @@ declare namespace woosmap.map.localities { interface LocalitiesNearbyRequest { categories?: string | string[]; /** - * The language code, using ISO 3166-1 Alpha-2 country codes, - * indicating in which language the results should be returned, if possible. - * If language is not supplied, the Localities service will use english as default language. + * POI types to exclude from results + * Example: `business.food_and_drinks.fast_food|business.food_and_drinks.pub` */ + excluded_types?: string | string[]; language?: string; /** * Limit of results per page. (Default is 10, max is 30) @@ -3105,16 +3122,14 @@ declare namespace woosmap.map.localities { */ radius?: number; /** - * Types of targeted items. - * The only available value for now is `point_of_interest`. + * POI types to include (pipe-separated). + * Example: `business.shop|medical.pharmacy|bank`. + * To check common POI types refer [https://developers.woosmap.com/products/localities/features/nearby/#common-poi-types](https://developers.woosmap.com/products/localities/features/nearby/#common-poi-types) */ - types?: string | string[]; + types: string | string[]; } } declare namespace woosmap.map.localities { - /** - * A Localities Search request to be sent to `LocalitiesService.search` - */ interface LocalitiesSearchRequest { /** * The categories of points of interest to return. Multiple categories can be passed as an array of comma separated strings. @@ -3232,9 +3247,9 @@ declare namespace woosmap.map.localities { */ address_components?: woosmap.map.localities.AddressComponents[]; /** - * An array containing the categories of the result, only for points of interests. + * Only available for admin_level suggestions, this contains the local english name of the administration level ("department" for France or "federal_state" for Germany). */ - categories?: string[]; + administrative_area_label?: string; /** * Contains the readable text description of the result. */ @@ -3259,7 +3274,11 @@ declare namespace woosmap.map.localities { /** * available localities types */ - types: woosmap.map.localities.LocalitiesTypes[]; + types: Array< + | woosmap.map.localities.LocalitiesTypes + | woosmap.map.localities.LocalitiesTypesPoi + | woosmap.map.localities.LocalitiesTypesPoiAlias + >; } } declare namespace woosmap.map.localities { @@ -3291,6 +3310,16 @@ declare namespace woosmap.map.localities { public_id: string; } } +declare namespace woosmap.map.localities { + /** + * For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result. + */ + interface LocalitiesScoresPerComponent { + locality: number; + postal_code: number; + street_name: number; + } +} declare namespace woosmap.map.localities { /** * Represents a single locality prediction @@ -3321,10 +3350,15 @@ declare namespace woosmap.map.localities { * Contains the related information for the prediction. */ related?: woosmap.map.localities.LocalitiesRelated; + type?: woosmap.map.localities.LocalitiesTypes; /** - * Contains the type of the Localities prediction. + * An array containing the types of the result. */ - type?: woosmap.map.localities.LocalitiesTypes; + types?: Array< + | woosmap.map.localities.LocalitiesTypes + | woosmap.map.localities.LocalitiesTypesPoi + | woosmap.map.localities.LocalitiesTypesPoiAlias + >; } } declare namespace woosmap.map.localities { @@ -3336,6 +3370,14 @@ declare namespace woosmap.map.localities { * An array containing Address Components with additional information */ address_components?: woosmap.map.localities.AddressComponents[]; + /** + * Only available for admin_level suggestions, this contains the local english name of the administration level ("department" for France or "federal_state" for Germany). + */ + administrative_area_label?: string; + /** + * When reverse geocoding, this field represents the distance (in meters) to the requested latlng + */ + distance?: number; /** * Contains the readable text description of the result. */ @@ -3349,6 +3391,10 @@ declare namespace woosmap.map.localities { * Contains a unique ID for geocoded locality. */ public_id: string; + /** + * For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result. + */ + scores_per_components?: woosmap.map.localities.LocalitiesScoresPerComponent; /** * This optional field is only available for UK addresses referenced as not yey built. */ @@ -3360,9 +3406,25 @@ declare namespace woosmap.map.localities { /** * available localities types */ - types: woosmap.map.localities.LocalitiesTypes[]; + types: + | woosmap.map.localities.LocalitiesTypes[] + | woosmap.map.localities.LocalitiesTypesPoi[] + | woosmap.map.localities.LocalitiesTypesPoiAlias[]; } } +declare namespace woosmap.map.localities { + type DeprecatedLocalitiesTypes = + | "airport" + | "amusement_park" + | "art_gallery" + | "metro_station" + | "museum" + | "shopping" + | "tourist_attraction" + | "train_station" + | "zoo" + | "point_of_interest"; +} declare namespace woosmap.map.localities { /** * The types of suggestion to return. @@ -3370,21 +3432,116 @@ declare namespace woosmap.map.localities { * Check [full list of supported types](https://developers.woosmap.com/products/localities/autocomplete/#types) */ type LocalitiesTypes = + | woosmap.map.localities.DeprecatedLocalitiesTypes + | "country" + | "admin_level" + | "postal_code" | "address" + | "route" | "locality" - | "admin_level" + | "city" + | "town" + | "village" + | "hamlet" + | "borough" + | "suburb" + | "quarter" + | "neighbourhood"; +} +declare namespace woosmap.map.localities { + /** + * Categories of points of interest (POI) supported for detailed classification in geographic data queries. + * Refer [supported POI types][https://developers.woosmap.com/products/localities/concepts/locality-types/#point-of-interest-types](https://developers.woosmap.com/products/localities/concepts/locality-types/#point-of-interest-types) + */ + type LocalitiesTypesPoi = + | "point_of_interest" + | "transit.station" + | "transit.station.airport" + | "transit.station.rail" + | "beach" + | "business" + | "business.car_repair" + | "business.car_rental" + | "business.cinema" + | "business.conference_centre" + | "business.exhibition_centre" + | "business.theatre" + | "business.nightclub" + | "business.finance" + | "business.finance.bank" + | "business.fuel" + | "business.parking" + | "business.mall" + | "business.food_and_drinks" + | "business.food_and_drinks.bar" + | "business.food_and_drinks.biergarten" + | "business.food_and_drinks.cafe" + | "business.food_and_drinks.fast_food" + | "business.food_and_drinks.pub" + | "business.food_and_drinks.restaurant" + | "business.food_and_drinks.food_court" + | "business.shop" + | "business.shop.mall" + | "business.shop.bakery" + | "business.shop.butcher" + | "business.shop.library" + | "business.shop.grocery" + | "business.shop.sports" + | "business.shop.toys" + | "business.shop.clothes" + | "business.shop.furniture" + | "business.shop.electronics" + | "business.shop.doityourself" + | "business.shop.craft" + | "education" + | "education.school" + | "education.kindergarten" + | "education.university" + | "education.college" + | "education.library" + | "hospitality" + | "hospitality.hotel" + | "hospitality.hostel" + | "hospitality.guest_house" + | "hospitality.bed_and_breakfast" + | "hospitality.motel" + | "medical" + | "medical.hospital" + | "medical.pharmacy" + | "medical.clinic" + | "tourism" + | "tourism.attraction" + | "tourism.attraction.amusement_park" + | "tourism.attraction.zoo" + | "tourism.attraction.aquarium" + | "tourism.monument" + | "tourism.monument.castle" + | "tourism.museum" + | "government" + | "park" + | "park.national" + | "place_of_worship" + | "police" + | "post_office" + | "sports" + | "sports.golf" + | "sports.winter"; +} +declare namespace woosmap.map.localities { + /** + * POI aliases + */ + type LocalitiesTypesPoiAlias = | "airport" - | "amusement_park" - | "art_gallery" - | "country" + | "train_station" + | "transit.station" | "metro_station" - | "museum" - | "postal_code" | "shopping" - | "tourist_attraction" - | "train_station" + | "museum" | "zoo" - | "point_of_interest"; + | "amusement_park" + | "art_gallery" + | "tourist_attraction"; } declare namespace woosmap.map.localities { /** @@ -3459,9 +3616,6 @@ declare namespace woosmap.map.localities { } } declare namespace woosmap.map.localities { - /** - * The types of result returned by nearby search. - */ type LocalitiesNearbyTypes = "point_of_interest"; } declare namespace woosmap.map.localities { @@ -3473,9 +3627,6 @@ declare namespace woosmap.map.localities { * An array containing Address Components with additional information */ address_components: woosmap.map.localities.AddressComponents[]; - /** - * An array containing the categories of the result. - */ categories: string[]; /** * The location of the result, in latitude and longitude, eventually associated with a Viewport. @@ -3492,7 +3643,7 @@ declare namespace woosmap.map.localities { /** * An array containing the types of the result. */ - types: woosmap.map.localities.LocalitiesNearbyTypes[]; + types: Array; } } declare namespace woosmap.map.localities { diff --git a/types/woosmap.map/woosmap.map-tests.ts b/types/woosmap.map/woosmap.map-tests.ts index 34c3b9db81477d..557a5220b77ac1 100644 --- a/types/woosmap.map/woosmap.map-tests.ts +++ b/types/woosmap.map/woosmap.map-tests.ts @@ -533,6 +533,7 @@ const localitiesAutocompleteRequest = expectType({ customDescription: "name,admin_1,admin_0", radius: 500000, location: { lat: 51.5007, lng: -0.1246 }, + excluded_types: ["village", "hamlet"], }) as woosmap.map.localities.LocalitiesAutocompleteRequest; let localitiesService; @@ -563,6 +564,20 @@ promiseLocalitiesGeocode.then((result) => { // $ExpectType LocalitiesGeocodeResponse result; }); +const localitiesNearbyRequest = expectType({ + input: "royal al", + types: ["point_of_interest", "tourism", "hospitality"], + components: { country: ["GB", "FR"] }, + radius: 5000000, + location: { lat: 51.5007, lng: -0.1246 }, + excluded_types: ["education", "government"], +}) as woosmap.map.localities.LocalitiesNearbyRequest; + +const promiseLocalitiesNearby = localitiesService.nearby(localitiesNearbyRequest); +promiseLocalitiesNearby.then((result) => { + // $ExpectType LocalitiesNearbyResponse + result; +}); const localitiesSearchRequest = expectType({ input: "royal al", types: ["point_of_interest", "address"], From 9306283d3e79b9dc92443117eef0e3d2040ef0dd Mon Sep 17 00:00:00 2001 From: Trim21 Date: Mon, 22 Dec 2025 03:10:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74251=20bump?= =?UTF-8?q?=20create-torrent=20to=206.1=20by=20@trim21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/create-torrent/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/create-torrent/package.json b/types/create-torrent/package.json index 6f7586341d7097..ea31f07e671a5c 100644 --- a/types/create-torrent/package.json +++ b/types/create-torrent/package.json @@ -2,7 +2,7 @@ "private": true, "name": "@types/create-torrent", "type": "module", - "version": "6.0.9999", + "version": "6.1.9999", "projects": [ "https://github.com/webtorrent/create-torrent#readme" ],