diff --git a/types/google.maps/google.maps-tests.ts b/types/google.maps/google.maps-tests.ts index 65f2b4c7d07ed1..426125d67a46f0 100644 --- a/types/google.maps/google.maps-tests.ts +++ b/types/google.maps/google.maps-tests.ts @@ -1,3 +1,3 @@ // No tests required for generated types -// Synced from: https://github.com/googlemaps/js-types/commit/fa57a845465c0c1453869efa318dceebe4995181 +// Synced from: https://github.com/googlemaps/js-types/commit/5bb0d929a218930283b73cfe3830f85e1e8132ef google.maps.Map; diff --git a/types/google.maps/index.d.ts b/types/google.maps/index.d.ts index 6c611a098f3c09..879ff71ec53017 100644 --- a/types/google.maps/index.d.ts +++ b/types/google.maps/index.d.ts @@ -3415,7 +3415,12 @@ declare namespace google.maps { * Adds a usage attribution ID to the initializer, which helps Google understand which libraries and samples are helpful to developers, such as usage of a marker clustering library. To opt out of sending the usage attribution ID, it is safe to delete this property or replace the value with an empty string. Only unique values will be sent. Changes to this value after instantiation may be ignored. * @defaultValue null */ - internalUsageAttributionIds: Iterable | null; + get internalUsageAttributionIds(): string[] | null; + /** + * Adds a usage attribution ID to the initializer, which helps Google understand which libraries and samples are helpful to developers, such as usage of a marker clustering library. To opt out of sending the usage attribution ID, it is safe to delete this property or replace the value with an empty string. Only unique values will be sent. Changes to this value after instantiation may be ignored. + * @defaultValue null + */ + set internalUsageAttributionIds(value: Iterable | null | undefined); /** * The map ID of the map. This parameter cannot be set or changed after a map is instantiated. {@link google.maps.Map.DEMO_MAP_ID} can be used to try out features that require a map ID but which do not require cloud enablement. */ @@ -6341,139 +6346,6 @@ declare namespace google.maps.geometry.encoding { export function encodePath(path: (google.maps.LatLng | google.maps.LatLngLiteral)[] | google.maps.MVCArray): string; } -declare namespace google.maps.drawing { - /** - * The properties of an overlaycomplete event on a DrawingManager. - */ - export interface OverlayCompleteEvent { - /** - * The completed overlay. - */ - overlay: google.maps.Marker | google.maps.Polygon | google.maps.Polyline | google.maps.Rectangle | google.maps.Circle; - /** - * The completed overlay's type. - */ - type: google.maps.drawing.OverlayTypeString; - } - /** - * Options for the rendering of the drawing control. - */ - export interface DrawingControlOptions { - /** - * The drawing modes to display in the drawing control, in the order in which they are to be displayed. The hand icon (which corresponds to the null drawing mode) is always available and is not to be specified in this array. - * @defaultValue [{@link google.maps.drawing.OverlayType.MARKER}, {@link google.maps.drawing.OverlayType.POLYLINE}, {@link google.maps.drawing.OverlayType.RECTANGLE}, {@link google.maps.drawing.OverlayType.CIRCLE}, {@link google.maps.drawing.OverlayType.POLYGON}] - */ - drawingModes?: google.maps.drawing.OverlayTypeString[] | null; - /** - * Position id. Used to specify the position of the control on the map. - * @defaultValue {@link google.maps.ControlPosition.TOP_LEFT} - */ - position?: google.maps.ControlPosition | null; - } - /** - * Options for the drawing manager. - */ - export interface DrawingManagerOptions { - /** - * Options to apply to any new circles created with this DrawingManager. The center and radius properties are ignored, and the map property of a new circle is always set to the DrawingManager's map. - */ - circleOptions?: google.maps.CircleOptions | null; - /** - * The enabled/disabled state of the drawing control. - * @defaultValue true - */ - drawingControl?: boolean | null; - /** - * The display options for the drawing control. - */ - drawingControlOptions?: google.maps.drawing.DrawingControlOptions | null; - /** - * The DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted values are 'marker', 'polygon', 'polyline', 'rectangle', 'circle', or null. A drawing mode of null means that the user can interact with the map as normal, and clicks do not draw anything. - */ - drawingMode?: google.maps.drawing.OverlayTypeString | null; - /** - * The Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed. - */ - map?: google.maps.Map | null; - /** - * Options to apply to any new markers created with this DrawingManager. The position property is ignored, and the map property of a new marker is always set to the DrawingManager's map. - */ - markerOptions?: google.maps.MarkerOptions | null; - /** - * Options to apply to any new polygons created with this DrawingManager. The paths property is ignored, and the map property of a new polygon is always set to the DrawingManager's map. - */ - polygonOptions?: google.maps.PolygonOptions | null; - /** - * Options to apply to any new polylines created with this DrawingManager. The path property is ignored, and the map property of a new polyline is always set to the DrawingManager's map. - */ - polylineOptions?: google.maps.PolylineOptions | null; - /** - * Options to apply to any new rectangles created with this DrawingManager. The bounds property is ignored, and the map property of a new rectangle is always set to the DrawingManager's map. - */ - rectangleOptions?: google.maps.RectangleOptions | null; - } - /** - * Allows users to draw markers, polygons, polylines, rectangles, and circles on the map. The DrawingManager's drawing mode defines the type of overlay that will be created by the user. Adds a control to the map, allowing the user to switch drawing mode. - * Access by calling `const {DrawingManager} = await google.maps.importLibrary("drawing");`. See https://developers.google.com/maps/documentation/javascript/libraries. - * @deprecated Drawing library functionality in the Maps JavaScript API is deprecated. This API was deprecated in August 2025 and will be made unavailable in a later version of the Maps JavaScript API, releasing in May 2026. For more info, see https://developers.google.com/maps/deprecations - */ - export class DrawingManager extends google.maps.MVCObject { - /** - * Creates a DrawingManager that allows users to draw overlays on the map, and switch between the type of overlay to be drawn with a drawing control. - * @param options - */ - constructor(options?: google.maps.drawing.DrawingManagerOptions | null); - /** - * Returns the DrawingManager's drawing mode. - */ - getDrawingMode(): google.maps.drawing.OverlayTypeString | null; - /** - * Returns the Map to which the DrawingManager is attached, which is the Map on which the overlays created will be placed. - */ - getMap(): google.maps.Map | null; - /** - * Changes the DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted values are 'marker', 'polygon', 'polyline', 'rectangle', 'circle', or null. A drawing mode of null means that the user can interact with the map as normal, and clicks do not draw anything. - */ - setDrawingMode(drawingMode: google.maps.drawing.OverlayTypeString | null): void; - /** - * Attaches the DrawingManager object to the specified Map. - */ - setMap(map: google.maps.Map | null): void; - /** - * Sets the DrawingManager's options. - */ - setOptions(options: google.maps.drawing.DrawingManagerOptions | null): void; - } - /** - * The types of overlay that may be created by the DrawingManager. Specify these by value, or by using the constant's name. For example, 'polygon' or google.maps.drawing.OverlayType.POLYGON. - * - * Access by calling `const {OverlayType} = await google.maps.importLibrary("drawing");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export enum OverlayType { - /** - * Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete event is a circle. - */ - CIRCLE = 'circle', - /** - * Specifies that the DrawingManager creates markers, and that the overlay given in the overlaycomplete event is a marker. - */ - MARKER = 'marker', - /** - * Specifies that the DrawingManager creates polygons, and that the overlay given in the overlaycomplete event is a polygon. - */ - POLYGON = 'polygon', - /** - * Specifies that the DrawingManager creates polylines, and that the overlay given in the overlaycomplete event is a polyline. - */ - POLYLINE = 'polyline', - /** - * Specifies that the DrawingManager creates rectangles, and that the overlay given in the overlaycomplete event is a rectangle. - */ - RECTANGLE = 'rectangle', - } - export type OverlayTypeString = `${google.maps.drawing.OverlayType}`; -} - declare namespace google.maps.journeySharing { /** * Automatic viewport mode. @@ -9324,6 +9196,26 @@ declare namespace google.maps.places { */ toJSON(key?: string): unknown; } + /** + * Defines the spatial relationship between the target location and the area. + * + * Access by calling `const {Containment} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export enum Containment { + /** + * The target location is outside the area region, but close by. + */ + NEAR = 'NEAR', + /** + * The target location is within the area region, close to the edge. + */ + OUTSKIRTS = 'OUTSKIRTS', + /** + * The target location is within the area region, close to the center. + */ + WITHIN = 'WITHIN', + } + export type ContainmentString = `${google.maps.places.Containment}`; /** * Area information and the area's relationship with the target location. * Access by calling `const {Area} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. @@ -9342,6 +9234,42 @@ declare namespace google.maps.places { */ toJSON(key?: string): unknown; } + /** + * Defines the spatial relationship between the target location and the landmark + * + * Access by calling `const {SpatialRelationship} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export enum SpatialRelationship { + /** + * The target is directly opposite the landmark on the other side of the road. + */ + ACROSS_THE_ROAD = 'ACROSS_THE_ROAD', + /** + * Not on the same route as the landmark but a single turn away. + */ + AROUND_THE_CORNER = 'AROUND_THE_CORNER', + /** + * Close to the landmark's structure but further away from its street entrances. + */ + BEHIND = 'BEHIND', + /** + * The target is directly adjacent to the landmark. + */ + BESIDE = 'BESIDE', + /** + * On the same route as the landmark but not besides or across. + */ + DOWN_THE_ROAD = 'DOWN_THE_ROAD', + /** + * The default relationship when nothing more specific below applies. + */ + NEAR = 'NEAR', + /** + * The landmark has a spatial geometry and the target is within its bounds. + */ + WITHIN = 'WITHIN', + } + export type SpatialRelationshipString = `${google.maps.places.SpatialRelationship}`; /** * Basic landmark information and the landmark's relationship with the target location. Landmarks are prominent places that can be used to describe a location. * Access by calling `const {Landmark} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. @@ -9449,25 +9377,65 @@ declare namespace google.maps.places { get title(): string | null; } /** - * Defines the spatial relationship between the target location and the area. - * - * Access by calling `const {Containment} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * ContentBlock describes the content of a summary and where it came from. + * Access by calling `const {ContentBlock} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export enum Containment { + export class ContentBlock { /** - * The target location is outside the area region, but close by. + * Content related to the topic. */ - NEAR = 'NEAR', + get content(): string | null; /** - * The target location is within the area region, close to the edge. + * Language code of the content. */ - OUTSKIRTS = 'OUTSKIRTS', + get contentLanguageCode(): string | null; /** - * The target location is within the area region, close to the center. + * A list of {@link google.maps.places.Place}s referenced. When first retrieved, each Place only contains a place ID in the id field. */ - WITHIN = 'WITHIN', + get referencedPlaces(): google.maps.places.Place[]; + /** + * Converts to a plain object. + */ + toJSON(key?: string): unknown; + } + /** + * AI-generated summary of amenities near the EV charging station. This only applies to places with type electric_vehicle_charging_station. + * Access by calling `const {EVChargeAmenitySummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export class EVChargeAmenitySummary { + /** + * A summary of the nearby coffee options. + */ + get coffee(): google.maps.places.ContentBlock | null; + /** + * The text for the disclosure relating to this summary. + */ + get disclosureText(): string | null; + /** + * The language code of the disclosure text. + */ + get disclosureTextLanguageCode(): string | null; + /** + * A URI to report a problem with the summary. + */ + get flagContentURI(): string | null; + /** + * An overview of the available amenities. + */ + get overview(): google.maps.places.ContentBlock | null; + /** + * A summary of the nearby restaurants. + */ + get restaurant(): google.maps.places.ContentBlock | null; + /** + * A summary of nearby stores. + */ + get store(): google.maps.places.ContentBlock | null; + /** + * Converts to a plain object. + */ + toJSON(key?: string): unknown; } - export type ContainmentString = `${google.maps.places.Containment}`; /** * EV charging connector types. * @@ -9517,47 +9485,95 @@ declare namespace google.maps.places { } export type EVConnectorTypeString = `${google.maps.places.EVConnectorType}`; /** - * A representation of an amount of money with its currency type. - * Access by calling `const {Money} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Information about the EV charging station hosted in the place. + * Access by calling `const {EVChargeOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class Money { - /** - * The three-letter currency code, defined in ISO 4217. - */ - get currencyCode(): string; - /** - * Number of nano (10^-9) units of the amount. - */ - get nanos(): number; + export class EVChargeOptions { /** - * The whole units of the amount. For example, if {@link google.maps.places.Money.currencyCode} is "USD", then 1 unit is 1 US dollar. + * A list of EV charging connector aggregations that contain connectors of the same type and same charge rate. */ - get units(): number; + get connectorAggregations(): google.maps.places.ConnectorAggregation[]; /** - * Returns a human-readable representation of the amount of money with its currency symbol. + * Number of connectors at this station. Because some ports can have multiple connectors but only be able to charge one car at a time, the number of connectors may be greater than the total number of cars which can charge simultaneously. */ - toString(): string; + get connectorCount(): number; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * The most recent information about fuel options in a gas station. This information is updated regularly. - * Access by calling `const {FuelOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * EV charging information, aggregated for connectors of the same type and the same charge rate. + * Access by calling `const {ConnectorAggregation} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class FuelOptions { + export class ConnectorAggregation { /** - * A list of fuel prices for each type of fuel this station has, one entry per fuel type. + * The time when the connector availability information in this aggregation was last updated. */ - get fuelPrices(): google.maps.places.FuelPrice[]; + get availabilityLastUpdateTime(): Date | null; /** - * Converts to a plain object. + * Number of connectors in this aggregation that are currently available. */ - toJSON(key?: string): unknown; - } - /** - * Fuel price information for a given type of fuel. + get availableCount(): number | null; + /** + * Number of connectors in this aggregation. + */ + get count(): number; + /** + * The static max charging rate in kw of each connector of the aggregation. + */ + get maxChargeRateKw(): number; + /** + * Number of connectors in this aggregation that are currently out of service. + */ + get outOfServiceCount(): number | null; + /** + * The connector type of this aggregation. + */ + get type(): google.maps.places.EVConnectorTypeString | null; + } + /** + * A representation of an amount of money with its currency type. + * Access by calling `const {Money} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export class Money { + /** + * The three-letter currency code, defined in ISO 4217. + */ + get currencyCode(): string; + /** + * Number of nano (10^-9) units of the amount. + */ + get nanos(): number; + /** + * The whole units of the amount. For example, if {@link google.maps.places.Money.currencyCode} is "USD", then 1 unit is 1 US dollar. + */ + get units(): number; + /** + * Returns a human-readable representation of the amount of money with its currency symbol. + */ + toString(): string; + /** + * Converts to a plain object. + */ + toJSON(key?: string): unknown; + } + /** + * The most recent information about fuel options in a gas station. This information is updated regularly. + * Access by calling `const {FuelOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export class FuelOptions { + /** + * A list of fuel prices for each type of fuel this station has, one entry per fuel type. + */ + get fuelPrices(): google.maps.places.FuelPrice[]; + /** + * Converts to a plain object. + */ + toJSON(key?: string): unknown; + } + /** + * Fuel price information for a given type of fuel. * Access by calling `const {FuelPrice} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ export class FuelPrice { @@ -9663,488 +9679,364 @@ declare namespace google.maps.places { } export type FuelTypeString = `${google.maps.places.FuelType}`; /** - * Price level for a Place. - * - * Access by calling `const {PriceLevel} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export enum PriceLevel { - - EXPENSIVE = 'EXPENSIVE', - - FREE = 'FREE', - - INEXPENSIVE = 'INEXPENSIVE', - - MODERATE = 'MODERATE', - - VERY_EXPENSIVE = 'VERY_EXPENSIVE', - } - export type PriceLevelString = `${google.maps.places.PriceLevel}`; - /** - * Defines the spatial relationship between the target location and the landmark - * - * Access by calling `const {SpatialRelationship} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * AI-generated summary of the place. + * Access by calling `const {GenerativeSummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export enum SpatialRelationship { - /** - * The target is directly opposite the landmark on the other side of the road. - */ - ACROSS_THE_ROAD = 'ACROSS_THE_ROAD', + export class GenerativeSummary { /** - * Not on the same route as the landmark but a single turn away. + * The text for the disclosure relating to this summary. */ - AROUND_THE_CORNER = 'AROUND_THE_CORNER', + get disclosureText(): string | null; /** - * Close to the landmark's structure but further away from its street entrances. + * The language code of the disclosure text. */ - BEHIND = 'BEHIND', + get disclosureTextLanguageCode(): string | null; /** - * The target is directly adjacent to the landmark. + * A URI to report a problem with the summary. */ - BESIDE = 'BESIDE', + get flagContentURI(): string | null; /** - * On the same route as the landmark but not besides or across. + * The overview of the place. */ - DOWN_THE_ROAD = 'DOWN_THE_ROAD', + get overview(): string | null; /** - * The default relationship when nothing more specific below applies. + * The language code of the overview. */ - NEAR = 'NEAR', + get overviewLanguageCode(): string | null; /** - * The landmark has a spatial geometry and the target is within its bounds. + * Converts to a plain object. */ - WITHIN = 'WITHIN', + toJSON(key?: string): unknown; } - export type SpatialRelationshipString = `${google.maps.places.SpatialRelationship}`; /** - * Represents a transit agency. - * Access by calling `const {TransitAgency} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Links to trigger different Google Maps actions. + * Access by calling `const {GoogleMapsLinks} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class TransitAgency { - /** - * The name of the agency in the requested language. - */ - displayName: string | null; + export class GoogleMapsLinks { /** - * The agency name text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * A link to show the directions to the place on Google Maps. The link only populates the destination location and uses the default travel mode DRIVE. */ - displayNameLanguageCode: string | null; + get directionsURI(): string | null; /** - * The URL of the agency's fare details page. + * A link to show the photos for the place on Google Maps. */ - fareURL: URL | null; + get photosURI(): string | null; /** - * A localized branded icon of a transit system. + * A link to show the place on Google Maps. */ - icon: google.maps.places.TransitIcon | null; + get placeURI(): string | null; /** - * The transit lines that are served by this agency. + * A link to show the reviews for the place on Google Maps. */ - lines: google.maps.places.TransitLine[]; + get reviewsURI(): string | null; /** - * The URL of the agency's homepage. + * A link to write a review for the place on Google Maps. */ - url: URL | null; + get writeAReviewURI(): string | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * Represents a transit icon. - * Access by calling `const {TransitIcon} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * AI-generated summary of points of interest near the place. + * Access by calling `const {NeighborhoodSummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class TransitIcon { + export class NeighborhoodSummary { /** - * Whether the name is contained in the icon and there is no need to display it next to the icon. + * A detailed description of the neighborhood. */ - nameIncluded: boolean | null; + get description(): google.maps.places.ContentBlock | null; /** - * The URL of the icon. + * The text for the disclosure relating to this summary. */ - url: URL | null; + get disclosureText(): string | null; + /** + * The language code of the disclosure text. + */ + get disclosureTextLanguageCode(): string | null; + /** + * A URI to report a problem with the summary. + */ + get flagContentURI(): string | null; + /** + * An overview of the neighborhood. + */ + get overview(): google.maps.places.ContentBlock | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * Represents a transit line. - * Access by calling `const {TransitLine} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * A point where the Place changes its opening status. + * Access by calling `const {OpeningHoursPoint} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class TransitLine { - /** - * The background color of the labels for this transit line in hexadecimal format (e.g., "#909CE1"). This color can also be used for drawing shapes for this transit line. - */ - backgroundColor: string | null; + export class OpeningHoursPoint { /** - * The full name of this transit line (e.g., "Sunnydale local"). + * The day of the week, as a number in the range [0, 6], starting on Sunday. For example, 2 means Tuesday. */ - displayName: string | null; + get day(): number; /** - * The transit line full name text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * The hour of the OpeningHoursPoint.time as a number, in the range [0, 23]. This will be reported in the Place’s time zone. */ - displayNameLanguageCode: string | null; + get hour(): number; /** - * Icon for this particular line. + * The minute of the OpeningHoursPoint.time as a number, in the range [0, 59]. This will be reported in the Place’s time zone. */ - icon: google.maps.places.TransitIcon | null; + get minute(): number; /** - * The id of the transit line that can be used to uniquely identify the line among other transit lines in the same transit station. This identifier is not guaranteed to be stable across different responses. + * Converts to a plain object. */ - id: string | null; + toJSON(key?: string): unknown; + } + /** + * A period where the Place is open. + * Access by calling `const {OpeningHoursPeriod} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export class OpeningHoursPeriod { /** - * The short name of this transit line (e.g., "S2"). + * The closing time for the Place. */ - shortDisplayName: string | null; + get close(): google.maps.places.OpeningHoursPoint | null; /** - * The transit line short name text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * The opening time for the Place. */ - shortDisplayNameLanguageCode: string | null; + get open(): google.maps.places.OpeningHoursPoint; /** - * The text color of labels for this transit line in hexadecimal format (e.g., "#909CE1"). + * Converts to a plain object. */ - textColor: string | null; + toJSON(key?: string): unknown; + } + /** + * Information about business hours of a Place. + * Access by calling `const {OpeningHours} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export class OpeningHours { /** - * The URL of a webpage with details about this line. + * Opening periods covering each day of the week, starting from Sunday, in chronological order. Does not include days where the Place is not open. */ - url: URL | null; + get periods(): google.maps.places.OpeningHoursPeriod[]; /** - * Icon for this particular vehicle type. + * An array of dates representing special days that fall within the current period. Special days impact the business hours of a place, e.g. Christmas day or one off closures. Set for currentOpeningHours and currentSecondaryOpeningHours if there are exceptional hours. */ - vehicleIcon: google.maps.places.TransitIcon | null; + get specialDays(): Date[]; /** - * The type of vehicle used. + * An array of seven strings representing the formatted opening hours for each day of the week. The Places Service will format and localize the opening hours appropriately for the current language. The ordering of the elements in this array depends on the language. Some languages start the week on Monday, while others start on Sunday. */ - vehicleType: google.maps.places.TransitVehicleTypeString | null; + get weekdayDescriptions(): string[]; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * Represents a transit stop. - * Access by calling `const {TransitStop} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Access by calling `const {ParkingOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class TransitStop { + export class ParkingOptions { /** - * The name of the stop in the requested language. + * Whether a place offers free garage parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - displayName: string | null; + get hasFreeGarageParking(): boolean | null; /** - * The name of the stop in the requested language's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * Whether a place offers free parking lots. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - displayNameLanguageCode: string | null; + get hasFreeParkingLot(): boolean | null; /** - * This field indicates whether there is an accessible path from outside the station to the stop. It does not indicate whether it is possible to board a vehicle from the stop. + * Whether a place offers free street parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - hasWheelchairAccessibleEntrance: boolean | null; + get hasFreeStreetParking(): boolean | null; /** - * The id of the transit stop that can be used to uniquely identify the stop among other transit stops in the same transit station. This identifier is not guaranteed to be stable across different responses. + * Whether a place offers paid garage parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - id: string | null; + get hasPaidGarageParking(): boolean | null; /** - * The stop's location. + * Whether a place offers paid parking lots. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - location: google.maps.LatLngAltitude | null; - /** - * The platform code represented by this stop. It can be formatted in any way (e.g., "2", "Platform 2", "2-4", or "1x"). - */ - platformCode: string | null; - /** - * The platform code text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - platformCodeLanguageCode: string | null; - /** - * The verbatim text written on the signboard for this platform (e.g., "Towards Central" or "East side & Brooklyn"). When platformCode is absent, this field is potentially the only identifier for the platform. However, both platformCode and signageText may be set simultaneously. - */ - signageText: string | null; - /** - * The signage text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - signageTextLanguageCode: string | null; - /** - * Human readable identifier of the stop, used by transit agencies to distinguish stops with the same name. - */ - stopCode: string | null; + get hasPaidParkingLot(): boolean | null; /** - * The stop code text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * Whether a place offers paid street parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - stopCodeLanguageCode: string | null; + get hasPaidStreetParking(): boolean | null; /** - * Converts to a plain object. + * Whether a place offers valet parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - toJSON(key?: string): unknown; + get hasValetParking(): boolean | null; } /** - * The type of a transit vehicle. - * - * Access by calling `const {TransitVehicleType} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Access by calling `const {PaymentOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export enum TransitVehicleType { - /** - * Airplane. - */ - AIRPLANE = 'AIRPLANE', - /** - * Bus. - */ - BUS = 'BUS', - /** - * Cable car. - */ - CABLE_CAR = 'CABLE_CAR', - /** - * Coach. - */ - COACH = 'COACH', - /** - * Commuter train. - */ - COMMUTER_TRAIN = 'COMMUTER_TRAIN', - /** - * Ferry. - */ - FERRY = 'FERRY', - /** - * Funicular. - */ - FUNICULAR = 'FUNICULAR', - /** - * Gondola lift. - */ - GONDOLA_LIFT = 'GONDOLA_LIFT', - /** - * Heavy rail. - */ - HEAVY_RAIL = 'HEAVY_RAIL', - /** - * High speed train. - */ - HIGH_SPEED_TRAIN = 'HIGH_SPEED_TRAIN', - /** - * Horse carriage. - */ - HORSE_CARRIAGE = 'HORSE_CARRIAGE', - /** - * Intercity bus. - */ - INTERCITY_BUS = 'INTERCITY_BUS', - /** - * Long distance train. - */ - LONG_DISTANCE_TRAIN = 'LONG_DISTANCE_TRAIN', - /** - * Metro rail. - */ - METRO_RAIL = 'METRO_RAIL', - /** - * Monorail. - */ - MONORAIL = 'MONORAIL', - /** - * Rail. - */ - RAIL = 'RAIL', - /** - * Share taxi. - */ - SHARE_TAXI = 'SHARE_TAXI', + export class PaymentOptions { /** - * Special. + * Whether a place only accepts payment via cash. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - SPECIAL = 'SPECIAL', + get acceptsCashOnly(): boolean | null; /** - * Subway. + * Whether a place accepts payment via credit card. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - SUBWAY = 'SUBWAY', + get acceptsCreditCards(): boolean | null; /** - * Tram. + * Whether a place accepts payment via debit card. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - TRAM = 'TRAM', + get acceptsDebitCards(): boolean | null; /** - * Trolleybus. + * Whether a place accepts payment via NFC. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. */ - TROLLEYBUS = 'TROLLEYBUS', + get acceptsNFC(): boolean | null; } - export type TransitVehicleTypeString = `${google.maps.places.TransitVehicleType}`; /** - * ContentBlock describes the content of a summary and where it came from. - * Access by calling `const {ContentBlock} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Information about the author of user-generated content. + * Access by calling `const {AuthorAttribution} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class ContentBlock { + export class AuthorAttribution { /** - * Content related to the topic. + * Author's name for this result. */ - get content(): string | null; + get displayName(): string; /** - * Language code of the content. + * Author's photo URI for this result. This may not always be available. */ - get contentLanguageCode(): string | null; + get photoURI(): string | null; /** - * A list of {@link google.maps.places.Place}s referenced. When first retrieved, each Place only contains a place ID in the id field. + * Author's profile URI for this result. */ - get referencedPlaces(): google.maps.places.Place[]; + get uri(): string | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * AI-generated summary of amenities near the EV charging station. This only applies to places with type electric_vehicle_charging_station. - * Access by calling `const {EVChargeAmenitySummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Information about a photo of a Place. + * Access by calling `const {Photo} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class EVChargeAmenitySummary { - /** - * A summary of the nearby coffee options. - */ - get coffee(): google.maps.places.ContentBlock | null; + export class Photo { /** - * The text for the disclosure relating to this summary. + * Attribution text to be displayed for this photo. */ - get disclosureText(): string | null; + get authorAttributions(): google.maps.places.AuthorAttribution[]; /** - * The language code of the disclosure text. + * A link where user can flag a problem with the photo. */ - get disclosureTextLanguageCode(): string | null; + get flagContentURI(): string | null; /** - * A URI to report a problem with the summary. + * A link to show the photo on Google Maps. */ - get flagContentURI(): string | null; + get googleMapsURI(): string | null; /** - * An overview of the available amenities. + * The height of the photo in pixels. */ - get overview(): google.maps.places.ContentBlock | null; + get heightPx(): number; /** - * A summary of the nearby restaurants. + * The width of the photo in pixels. */ - get restaurant(): google.maps.places.ContentBlock | null; + get widthPx(): number; /** - * A summary of nearby stores. + * Returns the image URL corresponding to the specified options. */ - get store(): google.maps.places.ContentBlock | null; + getURI(options?: google.maps.places.PhotoOptions): string; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * Information about the EV charging station hosted in the place. - * Access by calling `const {EVChargeOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Price level for a Place. + * + * Access by calling `const {PriceLevel} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class EVChargeOptions { - /** - * A list of EV charging connector aggregations that contain connectors of the same type and same charge rate. - */ - get connectorAggregations(): google.maps.places.ConnectorAggregation[]; - /** - * Number of connectors at this station. Because some ports can have multiple connectors but only be able to charge one car at a time, the number of connectors may be greater than the total number of cars which can charge simultaneously. - */ - get connectorCount(): number; - /** - * Converts to a plain object. - */ - toJSON(key?: string): unknown; + export enum PriceLevel { + + EXPENSIVE = 'EXPENSIVE', + + FREE = 'FREE', + + INEXPENSIVE = 'INEXPENSIVE', + + MODERATE = 'MODERATE', + + VERY_EXPENSIVE = 'VERY_EXPENSIVE', } + export type PriceLevelString = `${google.maps.places.PriceLevel}`; /** - * EV charging information, aggregated for connectors of the same type and the same charge rate. - * Access by calling `const {ConnectorAggregation} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * The price range associated with a Place. endPrice could be unset, which indicates a range without upper bound (e.g. "More than $100"). + * Access by calling `const {PriceRange} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class ConnectorAggregation { - /** - * The time when the connector availability information in this aggregation was last updated. - */ - get availabilityLastUpdateTime(): Date | null; - /** - * Number of connectors in this aggregation that are currently available. - */ - get availableCount(): number | null; - /** - * Number of connectors in this aggregation. - */ - get count(): number; + export class PriceRange { /** - * The static max charging rate in kw of each connector of the aggregation. + * The upper end of the price range (inclusive). Price should be lower than this amount. */ - get maxChargeRateKw(): number; + get endPrice(): google.maps.places.Money | null; /** - * Number of connectors in this aggregation that are currently out of service. + * The low end of the price range (inclusive). Price should be at or above this amount. */ - get outOfServiceCount(): number | null; + get startPrice(): google.maps.places.Money; /** - * The connector type of this aggregation. + * Converts to a plain object. */ - get type(): google.maps.places.EVConnectorTypeString | null; + toJSON(key?: string): unknown; } /** - * AI-generated summary of the place. - * Access by calling `const {GenerativeSummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Information about a review of a Place. + * Access by calling `const {Review} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class GenerativeSummary { + export class Review { /** - * The text for the disclosure relating to this summary. + * The reviewer. */ - get disclosureText(): string | null; + get authorAttribution(): google.maps.places.AuthorAttribution | null; /** - * The language code of the disclosure text. + * A link where user can flag a problem with the review. */ - get disclosureTextLanguageCode(): string | null; + get flagContentURI(): string | null; /** - * A URI to report a problem with the summary. + * A link to show the review on Google Maps. */ - get flagContentURI(): string | null; + get googleMapsURI(): string | null; /** - * The overview of the place. + * The review text in its original language. */ - get overview(): string | null; + get originalText(): string | null; /** - * The language code of the overview. + * An IETF language code indicating the original language of the review. */ - get overviewLanguageCode(): string | null; + get originalTextLanguageCode(): string | null; + + get publishTime(): Date | null; /** - * Converts to a plain object. + * The rating of this review, a number between 1.0 and 5.0 (inclusive). */ - toJSON(key?: string): unknown; - } - /** - * Links to trigger different Google Maps actions. - * Access by calling `const {GoogleMapsLinks} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class GoogleMapsLinks { + get rating(): number | null; /** - * A link to show the directions to the place on Google Maps. The link only populates the destination location and uses the default travel mode DRIVE. + * A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. For example `"a month ago"'. */ - get directionsURI(): string | null; + get relativePublishTimeDescription(): string | null; /** - * A link to show the photos for the place on Google Maps. + * The localized text of the review. */ - get photosURI(): string | null; + get text(): string | null; /** - * A link to show the place on Google Maps. + * An IETF language code indicating the localized language of the review. */ - get placeURI(): string | null; + get textLanguageCode(): string | null; /** - * A link to show the reviews for the place on Google Maps. + * The month of the date when the review author visited the place. This field is 0-based; 0 is January, and 11 is December. */ - get reviewsURI(): string | null; + get visitDateMonth(): number | null; /** - * A link to write a review for the place on Google Maps. + * The year of the date when the review author visited the place. */ - get writeAReviewURI(): string | null; + get visitDateYear(): number | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * AI-generated summary of points of interest near the place. - * Access by calling `const {NeighborhoodSummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * AI-generated summary of the place user reviews. + * Access by calling `const {ReviewSummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class NeighborhoodSummary { - /** - * A detailed description of the neighborhood. - */ - get description(): google.maps.places.ContentBlock | null; + export class ReviewSummary { /** * The text for the disclosure relating to this summary. */ @@ -10158,321 +10050,301 @@ declare namespace google.maps.places { */ get flagContentURI(): string | null; /** - * An overview of the neighborhood. + * A URI to show reviews of this place on Google Maps. */ - get overview(): google.maps.places.ContentBlock | null; + get reviewsURI(): string | null; + /** + * The summary of user reviews. + */ + get text(): string | null; + /** + * The language code of the summary of user reviews. + */ + get textLanguageCode(): string | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * A point where the Place changes its opening status. - * Access by calling `const {OpeningHoursPoint} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Information about secondary business hours of a Place. + * Access by calling `const {SecondaryOpeningHours} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class OpeningHoursPoint { - /** - * The day of the week, as a number in the range [0, 6], starting on Sunday. For example, 2 means Tuesday. - */ - get day(): number; - /** - * The hour of the OpeningHoursPoint.time as a number, in the range [0, 23]. This will be reported in the Place’s time zone. - */ - get hour(): number; + export class SecondaryOpeningHours extends google.maps.places.OpeningHours { /** - * The minute of the OpeningHoursPoint.time as a number, in the range [0, 59]. This will be reported in the Place’s time zone. + * The type of secondary opening hours. This refers to what the secondary hours apply to like takeout, delivery, or pickup. See SecondaryHoursType for a list of valid values. */ - get minute(): number; + get type(): string | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * A period where the Place is open. - * Access by calling `const {OpeningHoursPeriod} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Represents a time zone from the IANA Time Zone Database https://www.iana.org/time-zones. + * Access by calling `const {TimeZone} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class OpeningHoursPeriod { + export class TimeZone { /** - * The closing time for the Place. + * IANA Time Zone Database time zone. For example "America/New_York". */ - get close(): google.maps.places.OpeningHoursPoint | null; + get id(): string | null; /** - * The opening time for the Place. + * IANA Time Zone Database version number. For example "2019a". */ - get open(): google.maps.places.OpeningHoursPoint; + get version(): string | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * Information about business hours of a Place. - * Access by calling `const {OpeningHours} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Represents a transit icon. + * Access by calling `const {TransitIcon} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class OpeningHours { - /** - * Opening periods covering each day of the week, starting from Sunday, in chronological order. Does not include days where the Place is not open. - */ - get periods(): google.maps.places.OpeningHoursPeriod[]; + export class TransitIcon { /** - * An array of dates representing special days that fall within the current period. Special days impact the business hours of a place, e.g. Christmas day or one off closures. Set for currentOpeningHours and currentSecondaryOpeningHours if there are exceptional hours. + * Whether the name is contained in the icon and there is no need to display it next to the icon. */ - get specialDays(): Date[]; + nameIncluded: boolean | null; /** - * An array of seven strings representing the formatted opening hours for each day of the week. The Places Service will format and localize the opening hours appropriately for the current language. The ordering of the elements in this array depends on the language. Some languages start the week on Monday, while others start on Sunday. + * The URL of the icon. */ - get weekdayDescriptions(): string[]; + url: URL | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * Access by calling `const {ParkingOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * The type of a transit vehicle. + * + * Access by calling `const {TransitVehicleType} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class ParkingOptions { - /** - * Whether a place offers free garage parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. - */ - get hasFreeGarageParking(): boolean | null; + export enum TransitVehicleType { /** - * Whether a place offers free parking lots. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Airplane. */ - get hasFreeParkingLot(): boolean | null; + AIRPLANE = 'AIRPLANE', /** - * Whether a place offers free street parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Bus. */ - get hasFreeStreetParking(): boolean | null; + BUS = 'BUS', /** - * Whether a place offers paid garage parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Cable car. */ - get hasPaidGarageParking(): boolean | null; + CABLE_CAR = 'CABLE_CAR', /** - * Whether a place offers paid parking lots. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Coach. */ - get hasPaidParkingLot(): boolean | null; + COACH = 'COACH', /** - * Whether a place offers paid street parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Commuter train. */ - get hasPaidStreetParking(): boolean | null; + COMMUTER_TRAIN = 'COMMUTER_TRAIN', /** - * Whether a place offers valet parking. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Ferry. */ - get hasValetParking(): boolean | null; - } - /** - * Access by calling `const {PaymentOptions} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class PaymentOptions { + FERRY = 'FERRY', /** - * Whether a place only accepts payment via cash. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Funicular. */ - get acceptsCashOnly(): boolean | null; + FUNICULAR = 'FUNICULAR', /** - * Whether a place accepts payment via credit card. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Gondola lift. */ - get acceptsCreditCards(): boolean | null; + GONDOLA_LIFT = 'GONDOLA_LIFT', /** - * Whether a place accepts payment via debit card. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * Heavy rail. */ - get acceptsDebitCards(): boolean | null; + HEAVY_RAIL = 'HEAVY_RAIL', /** - * Whether a place accepts payment via NFC. Returns 'true' or 'false' if the value is known. Returns 'null' if the value is unknown. + * High speed train. */ - get acceptsNFC(): boolean | null; - } - /** - * Information about the author of user-generated content. - * Access by calling `const {AuthorAttribution} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class AuthorAttribution { + HIGH_SPEED_TRAIN = 'HIGH_SPEED_TRAIN', /** - * Author's name for this result. + * Horse carriage. */ - get displayName(): string; + HORSE_CARRIAGE = 'HORSE_CARRIAGE', /** - * Author's photo URI for this result. This may not always be available. + * Intercity bus. */ - get photoURI(): string | null; + INTERCITY_BUS = 'INTERCITY_BUS', /** - * Author's profile URI for this result. + * Long distance train. */ - get uri(): string | null; + LONG_DISTANCE_TRAIN = 'LONG_DISTANCE_TRAIN', /** - * Converts to a plain object. + * Metro rail. */ - toJSON(key?: string): unknown; - } - /** - * Information about a photo of a Place. - * Access by calling `const {Photo} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class Photo { + METRO_RAIL = 'METRO_RAIL', /** - * Attribution text to be displayed for this photo. + * Monorail. */ - get authorAttributions(): google.maps.places.AuthorAttribution[]; + MONORAIL = 'MONORAIL', /** - * A link where user can flag a problem with the photo. + * Rail. */ - get flagContentURI(): string | null; + RAIL = 'RAIL', /** - * A link to show the photo on Google Maps. + * Share taxi. */ - get googleMapsURI(): string | null; + SHARE_TAXI = 'SHARE_TAXI', /** - * The height of the photo in pixels. + * Special. */ - get heightPx(): number; + SPECIAL = 'SPECIAL', /** - * The width of the photo in pixels. + * Subway. */ - get widthPx(): number; + SUBWAY = 'SUBWAY', /** - * Returns the image URL corresponding to the specified options. + * Tram. */ - getURI(options?: google.maps.places.PhotoOptions): string; + TRAM = 'TRAM', /** - * Converts to a plain object. + * Trolleybus. */ - toJSON(key?: string): unknown; + TROLLEYBUS = 'TROLLEYBUS', } + export type TransitVehicleTypeString = `${google.maps.places.TransitVehicleType}`; /** - * The price range associated with a Place. endPrice could be unset, which indicates a range without upper bound (e.g. "More than $100"). - * Access by calling `const {PriceRange} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Represents a transit line. + * Access by calling `const {TransitLine} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class PriceRange { + export class TransitLine { /** - * The upper end of the price range (inclusive). Price should be lower than this amount. + * The background color of the labels for this transit line in hexadecimal format (e.g., "#909CE1"). This color can also be used for drawing shapes for this transit line. */ - get endPrice(): google.maps.places.Money | null; + backgroundColor: string | null; /** - * The low end of the price range (inclusive). Price should be at or above this amount. + * The full name of this transit line (e.g., "Sunnydale local"). */ - get startPrice(): google.maps.places.Money; + displayName: string | null; /** - * Converts to a plain object. + * The transit line full name text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ - toJSON(key?: string): unknown; - } - /** - * Information about a review of a Place. - * Access by calling `const {Review} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class Review { + displayNameLanguageCode: string | null; /** - * The reviewer. + * Icon for this particular line. */ - get authorAttribution(): google.maps.places.AuthorAttribution | null; + icon: google.maps.places.TransitIcon | null; + /** + * The id of the transit line that can be used to uniquely identify the line among other transit lines in the same transit station. This identifier is not guaranteed to be stable across different responses. + */ + id: string | null; + /** + * The short name of this transit line (e.g., "S2"). + */ + shortDisplayName: string | null; + /** + * The transit line short name text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + */ + shortDisplayNameLanguageCode: string | null; + /** + * The text color of labels for this transit line in hexadecimal format (e.g., "#909CE1"). + */ + textColor: string | null; /** - * A link where user can flag a problem with the review. + * The URL of a webpage with details about this line. */ - get flagContentURI(): string | null; + url: URL | null; /** - * A link to show the review on Google Maps. + * Icon for this particular vehicle type. */ - get googleMapsURI(): string | null; + vehicleIcon: google.maps.places.TransitIcon | null; /** - * The review text in its original language. + * The type of vehicle used. */ - get originalText(): string | null; + vehicleType: google.maps.places.TransitVehicleTypeString | null; /** - * An IETF language code indicating the original language of the review. + * Converts to a plain object. */ - get originalTextLanguageCode(): string | null; - - get publishTime(): Date | null; + toJSON(key?: string): unknown; + } + /** + * Represents a transit agency. + * Access by calling `const {TransitAgency} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export class TransitAgency { /** - * The rating of this review, a number between 1.0 and 5.0 (inclusive). + * The name of the agency in the requested language. */ - get rating(): number | null; + displayName: string | null; /** - * A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country. For example `"a month ago"'. + * The agency name text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ - get relativePublishTimeDescription(): string | null; + displayNameLanguageCode: string | null; /** - * The localized text of the review. + * The URL of the agency's fare details page. */ - get text(): string | null; + fareURL: URL | null; /** - * An IETF language code indicating the localized language of the review. + * A localized branded icon of a transit system. */ - get textLanguageCode(): string | null; + icon: google.maps.places.TransitIcon | null; /** - * The month of the date when the review author visited the place. This field is 0-based; 0 is January, and 11 is December. + * The transit lines that are served by this agency. */ - get visitDateMonth(): number | null; + lines: google.maps.places.TransitLine[]; /** - * The year of the date when the review author visited the place. + * The URL of the agency's homepage. */ - get visitDateYear(): number | null; + url: URL | null; /** * Converts to a plain object. */ toJSON(key?: string): unknown; } /** - * AI-generated summary of the place user reviews. - * Access by calling `const {ReviewSummary} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * Represents a transit stop. + * Access by calling `const {TransitStop} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. */ - export class ReviewSummary { + export class TransitStop { /** - * The text for the disclosure relating to this summary. + * The name of the stop in the requested language. */ - get disclosureText(): string | null; + displayName: string | null; /** - * The language code of the disclosure text. + * The name of the stop in the requested language's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ - get disclosureTextLanguageCode(): string | null; + displayNameLanguageCode: string | null; /** - * A URI to report a problem with the summary. + * This field indicates whether there is an accessible path from outside the station to the stop. It does not indicate whether it is possible to board a vehicle from the stop. */ - get flagContentURI(): string | null; + hasWheelchairAccessibleEntrance: boolean | null; /** - * A URI to show reviews of this place on Google Maps. + * The id of the transit stop that can be used to uniquely identify the stop among other transit stops in the same transit station. This identifier is not guaranteed to be stable across different responses. */ - get reviewsURI(): string | null; + id: string | null; /** - * The summary of user reviews. + * The stop's location. */ - get text(): string | null; + location: google.maps.LatLngAltitude | null; /** - * The language code of the summary of user reviews. + * The platform code represented by this stop. It can be formatted in any way (e.g., "2", "Platform 2", "2-4", or "1x"). */ - get textLanguageCode(): string | null; + platformCode: string | null; /** - * Converts to a plain object. + * The platform code text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ - toJSON(key?: string): unknown; - } - /** - * Information about secondary business hours of a Place. - * Access by calling `const {SecondaryOpeningHours} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class SecondaryOpeningHours extends google.maps.places.OpeningHours { + platformCodeLanguageCode: string | null; /** - * The type of secondary opening hours. This refers to what the secondary hours apply to like takeout, delivery, or pickup. See SecondaryHoursType for a list of valid values. + * The verbatim text written on the signboard for this platform (e.g., "Towards Central" or "East side & Brooklyn"). When platformCode is absent, this field is potentially the only identifier for the platform. However, both platformCode and signageText may be set simultaneously. */ - get type(): string | null; + signageText: string | null; /** - * Converts to a plain object. + * The signage text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ - toJSON(key?: string): unknown; - } - /** - * Represents a time zone from the IANA Time Zone Database https://www.iana.org/time-zones. - * Access by calling `const {TimeZone} = await google.maps.importLibrary("places");`. See https://developers.google.com/maps/documentation/javascript/libraries. - */ - export class TimeZone { + signageTextLanguageCode: string | null; /** - * IANA Time Zone Database time zone. For example "America/New_York". + * Human readable identifier of the stop, used by transit agencies to distinguish stops with the same name. */ - get id(): string | null; + stopCode: string | null; /** - * IANA Time Zone Database version number. For example "2019a". + * The stop code text's BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */ - get version(): string | null; + stopCodeLanguageCode: string | null; /** * Converts to a plain object. */ @@ -10881,7 +10753,11 @@ declare namespace google.maps.places { /** * List of fields to be fetched. */ - fields: string[]; + fields: Iterable; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; } /** * Options for constructing a Place. @@ -10940,6 +10816,10 @@ declare namespace google.maps.places { * The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. Only one included type is supported. See {@link google.maps.places.SearchByTextRequest.useStrictTypeFiltering} */ includedType?: string; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; /** * Used to restrict the search to places that are currently open. * @defaultValue false @@ -11058,6 +10938,10 @@ declare namespace google.maps.places { * Included place types. See the full list of types supported. A place can have many different place types. Up to 50 types may be specified. If you specify the same type in both included and excluded lists, an INVALID_ARGUMENT error is returned. */ includedTypes?: string[]; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; /** * Place details will be displayed with the preferred language if available. Will default to the browser's language preference. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport. */ @@ -11210,7 +11094,7 @@ declare namespace google.maps.places { /** * The unique place id. */ - id: string; + get id(): string; /** * The Place’s phone number in international format. International format includes the country code, and is prefixed with the plus (+) sign. */ @@ -11300,7 +11184,7 @@ declare namespace google.maps.places { /** * The unique place resource name. */ - resourceName: string; + get resourceName(): string; /** * A list of reviews for this Place. */ @@ -11454,6 +11338,10 @@ declare namespace google.maps.places { * Options for PlaceDetailsCompactElement. */ export interface PlaceDetailsCompactElementOptions { + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; /** * See {@link google.maps.places.PlaceDetailsCompactElement.orientation}. */ @@ -11473,6 +11361,14 @@ declare namespace google.maps.places { * @param options */ constructor(options?: google.maps.places.PlaceDetailsCompactElementOptions); + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + get internalUsageAttributionIds(): string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + set internalUsageAttributionIds(value: Iterable | null | undefined); /** * The orientation variant (vertical or horizontal) of the element. * @defaultValue PlaceDetailsOrientation.VERTICAL @@ -11503,6 +11399,10 @@ declare namespace google.maps.places { * Options for PlaceDetailsElement. */ export interface PlaceDetailsElementOptions { + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; } /** * Displays details for a place in a full layout. Append either a {@link google.maps.places.PlaceDetailsPlaceRequestElement} or {@link google.maps.places.PlaceDetailsLocationRequestElement} to specify the place to be rendered. Append a {@link google.maps.places.PlaceContentConfigElement}, {@link google.maps.places.PlaceStandardContentElement}, or {@link google.maps.places.PlaceAllContentElement} to specify which content to render.

Example:
 <gmp-place-details>
  <gmp-place-details-place-request
    place="PLACE_ID"
  ></gmp-place-details-place-request>
  <gmp-place-content-config>
    <gmp-place-media lightbox-preferred></gmp-place-media>
  </gmp-place-content-config>
</gmp-place-details>

To use this element, enable the Places UI Kit API for your project in the Google Cloud console. @@ -11514,6 +11414,14 @@ declare namespace google.maps.places { * @param options */ constructor(options?: google.maps.places.PlaceDetailsElementOptions); + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + get internalUsageAttributionIds(): string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + set internalUsageAttributionIds(value: Iterable | null | undefined); /** * Read only. Place object containing the ID, location, and viewport of the currently rendered place. */ @@ -11565,6 +11473,10 @@ declare namespace google.maps.places { * See {@link google.maps.places.PlaceSearchElement.attributionPosition}. */ attributionPosition?: google.maps.places.PlaceSearchAttributionPositionString | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; /** * See {@link google.maps.places.PlaceSearchElement.orientation}. */ @@ -11938,6 +11850,14 @@ declare namespace google.maps.places { * @defaultValue PlaceSearchAttributionPosition.TOP */ set attributionPosition(value: google.maps.places.PlaceSearchAttributionPositionString | null | undefined); + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + get internalUsageAttributionIds(): string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + set internalUsageAttributionIds(value: Iterable | null | undefined); /** * The orientation variant (vertical or horizontal) of the element. * @defaultValue PlaceSearchOrientation.VERTICAL @@ -12004,6 +11924,10 @@ declare namespace google.maps.places { * A zero-based Unicode character offset of input indicating the cursor position in input. The cursor position may influence what predictions are returned. If not specified, defaults to the length of input. */ inputOffset?: number; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + internalUsageAttributionIds?: Iterable | null; /** * The language in which to return results. Will default to the browser's language preference. The results may be in mixed languages if the language used in input is different from language, or if the returned Place does not have a translation from the local language to language. */ @@ -12152,6 +12076,14 @@ declare namespace google.maps.places { * Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both locationRestriction and includedRegionCodes are set, the results will be located in the area of intersection. */ includedRegionCodes: string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + get internalUsageAttributionIds(): string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + set internalUsageAttributionIds(value: Iterable | null | undefined); /** * A soft boundary or hint to use when searching for places. */ @@ -12248,6 +12180,8 @@ declare namespace google.maps.places { includedRegionCodes?: string[] | null; + internalUsageAttributionIds?: Iterable | null; + locationBias?: google.maps.places.LocationBias | null; locationRestriction?: google.maps.places.LocationRestriction | null; @@ -12417,6 +12351,14 @@ declare namespace google.maps.places { * Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both locationRestriction and includedRegionCodes are set, the results will be located in the area of intersection. */ includedRegionCodes: string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + get internalUsageAttributionIds(): string[] | null; + /** + * Identifiers used to attribute calls to specific packages or OSS libraries. + */ + set internalUsageAttributionIds(value: Iterable | null | undefined); /** * A soft boundary or hint to use when searching for places. */ @@ -12521,6 +12463,8 @@ declare namespace google.maps.places { includedRegionCodes?: string[] | null; + internalUsageAttributionIds?: Iterable | null; + locationBias?: google.maps.places.LocationBias | null; locationRestriction?: google.maps.places.LocationRestriction | null; @@ -13108,6 +13052,44 @@ declare namespace google.maps.airQuality { } } +declare namespace google.maps.drawing { + /** + * Allows users to draw markers, polygons, polylines, rectangles, and circles on the map. The DrawingManager's drawing mode defines the type of overlay that will be created by the user. Adds a control to the map, allowing the user to switch drawing mode. + * Access by calling `const {DrawingManager} = await google.maps.importLibrary("drawing");`. See https://developers.google.com/maps/documentation/javascript/libraries. + * @deprecated The DrawingManager functionality in the Maps JavaScript API is no longer available in the Maps JavaScript API as of version 3.65. For more info, see https://developers.google.com/maps/deprecations. + */ + export class DrawingManager extends google.maps.MVCObject { + } + /** + * The types of overlay that may be created by the DrawingManager. Specify these by value, or by using the constant's name. For example, 'polygon' or google.maps.drawing.OverlayType.POLYGON. + * + * Access by calling `const {OverlayType} = await google.maps.importLibrary("drawing");`. See https://developers.google.com/maps/documentation/javascript/libraries. + */ + export enum OverlayType { + /** + * Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete event is a circle. + */ + CIRCLE = 'circle', + /** + * Specifies that the DrawingManager creates markers, and that the overlay given in the overlaycomplete event is a marker. + */ + MARKER = 'marker', + /** + * Specifies that the DrawingManager creates polygons, and that the overlay given in the overlaycomplete event is a polygon. + */ + POLYGON = 'polygon', + /** + * Specifies that the DrawingManager creates polylines, and that the overlay given in the overlaycomplete event is a polyline. + */ + POLYLINE = 'polyline', + /** + * Specifies that the DrawingManager creates rectangles, and that the overlay given in the overlaycomplete event is a rectangle. + */ + RECTANGLE = 'rectangle', + } + export type OverlayTypeString = `${google.maps.drawing.OverlayType}`; +} + declare namespace google.maps.marker { /** * Options for creating a {@link google.maps.marker.PinElement}. @@ -16133,7 +16115,7 @@ declare namespace google.maps.routes { /** * See {@link google.maps.routes.Route3DElement.destination}. */ - destination: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; + destination?: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; /** * Identifiers used to attribute calls to specific packages or OSS libraries. */ @@ -16141,7 +16123,7 @@ declare namespace google.maps.routes { /** * See {@link google.maps.routes.Route3DElement.origin}. */ - origin: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; + origin?: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; /** * See {@link google.maps.routes.Route3DElement.routingPreference}. */ @@ -16166,15 +16148,36 @@ declare namespace google.maps.routes { * If provided, the specified route will be made visible within the map viewport, alongside any other elements that have opted in. * @defaultValue false */ - autofitsCamera?: boolean | null; + get autofitsCamera(): boolean; + /** + * If provided, the specified route will be made visible within the map viewport, alongside any other elements that have opted in. + * @defaultValue false + */ + set autofitsCamera(value: boolean | null | undefined); /** * If provided, the route will be computed with the specified departure time. When specifying via HTML attribute, use the ISO 8601 format for reliable results across browsers. For information on usage requirements, see {@link google.maps.routes.ComputeRoutesRequest.departureTime}. */ - departureTime?: Date | null; + get departureTime(): Date | null; + /** + * If provided, the route will be computed with the specified departure time. When specifying via HTML attribute, use the ISO 8601 format for reliable results across browsers. For information on usage requirements, see {@link google.maps.routes.ComputeRoutesRequest.departureTime}. + */ + set departureTime(value: Date | null | undefined); + /** + * The destination of the route. + */ + get destination(): string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; /** * The destination of the route. */ - destination: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; + set destination(value: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null | undefined); + /** + * Fallback info for the computed routes. + */ + get fallbackInfo(): google.maps.routes.FallbackInfo | null; + /** + * Geocoding results for the origin and destination. + */ + get geocodingResults(): google.maps.routes.GeocodingResults | null; /** * Identifiers used to attribute calls to specific packages or OSS libraries. */ @@ -16186,15 +16189,31 @@ declare namespace google.maps.routes { /** * The origin of the route. */ - origin: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; + get origin(): string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null; + /** + * The origin of the route. + */ + set origin(value: string | google.maps.LatLng | google.maps.LatLngLiteral | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral | google.maps.places.Place | null | undefined); + /** + * The primary route along with optional alternate routes, computed from the Routes API. + */ + get routes(): google.maps.routes.Route[] | null; /** * If provided, the route will be computed with traffic information along the route that's based on the {@link google.maps.routes.RoutingPreference} specified, and use traffic-specific coloring. */ - routingPreference?: google.maps.routes.RoutingPreferenceString | null; + get routingPreference(): google.maps.routes.RoutingPreferenceString | null; + /** + * If provided, the route will be computed with traffic information along the route that's based on the {@link google.maps.routes.RoutingPreference} specified, and use traffic-specific coloring. + */ + set routingPreference(value: google.maps.routes.RoutingPreferenceString | null | undefined); /** * If provided, the polyline is based on the specified travel mode. */ - travelMode?: google.maps.TravelModeString | null; + get travelMode(): google.maps.TravelModeString | null; + /** + * If provided, the polyline is based on the specified travel mode. + */ + set travelMode(value: google.maps.TravelModeString | null | undefined); addEventListener(type: K, listener: (this: Route3DElement, ev: Route3DElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; } diff --git a/types/mdx/package.json b/types/mdx/package.json index b05483727c4828..b92fd11a11bb5a 100644 --- a/types/mdx/package.json +++ b/types/mdx/package.json @@ -8,6 +8,11 @@ "https://github.com/mdx-js/mdx" ], "tsconfigs": ["tsconfig.preact.json", "tsconfig.react.json"], + "exports": { + ".": "./index.d.ts", + "./types": "./types.d.ts", + "./types.js": "./types.d.ts" + }, "devDependencies": { "@types/mdx": "workspace:.", "@types/react": "^18",