@azure-rest/maps-search 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** This object is returned from a successful Geocoding call */\nexport interface GeocodingResponseOutput {\n /** The type of a FeatureCollection object must be FeatureCollection. */\n type?: \"FeatureCollection\";\n features?: Array<FeaturesItemOutput>;\n /** The is the link to the next page of the features returned. If it's the last page, no this field. */\n nextLink?: string;\n}\n\nexport interface FeaturesItemOutput {\n /** The type of a feature must be Feature. */\n type?: \"Feature\";\n /** ID for feature returned */\n id?: string;\n properties?: FeaturesItemPropertiesOutput;\n /** A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details. */\n geometry: GeoJsonPointOutput;\n /** Bounding box. Projection used - EPSG:3857. Please refer to [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946#section-5) for details. */\n bbox?: Array<number>;\n}\n\nexport interface FeaturesItemPropertiesOutput {\n /**\n * One of:\n * * Address\n * * RoadBlock\n * * RoadIntersection\n * * Neighborhood\n * * PopulatedPlace\n * * Postcode1\n * * AdminDivision1\n * * AdminDivision2\n * * CountryRegion\n */\n type?: string;\n /**\n * The level of confidence that the geocoded location result is a match. Use this value with the match code to determine for more complete information about the match.\n *\n * The confidence of a geocoded location is based on many factors including the relative importance of the geocoded location and the user’s location, if specified.\n */\n confidence?: \"High\" | \"Medium\" | \"Low\";\n /**\n * One or more match code values that represent the geocoding level for each location in the response.\n *\n * For example, a geocoded location with match codes of `Good` and `Ambiguous` means that more than one geocode location was found for the location information and that the geocode service did not have search up-hierarchy to find a match.\n *\n * Similarly, a geocoded location with match codes of `Ambiguous` and `UpHierarchy` implies that a geocode location could not be found that matched all the provided location information, so the geocode service had to search up-hierarchy and found multiple matches at that level. An example of up an `Ambiguous` and `UpHierarchy` result is when you provide complete address information, but the geocode service cannot locate a match for the street address and instead returns information for more than one RoadBlock value.\n *\n * The possible values are:\n *\n * `Good`: The location has only one match or all returned matches are considered strong matches. For example, a query for New York returns several Good matches.\n *\n * `Ambiguous`: The location is one of a set of possible matches. For example, when you query for the street address 128 Main St., the response may return two locations for 128 North Main St. and 128 South Main St. because there is not enough information to determine which option to choose.\n *\n * `UpHierarchy`: The location represents a move up the geographic hierarchy. This occurs when a match for the location request was not found, so a less precise result is returned. For example, if a match for the requested address cannot be found, then a match code of `UpHierarchy` with a RoadBlock entity type may be returned.\n */\n matchCodes?: Array<\"Good\" | \"Ambiguous\" | \"UpHierarchy\">;\n /** The address of the result */\n address?: AddressOutput;\n /** A collection of geocode points that differ in how they were calculated and their suggested use. */\n geocodePoints?: Array<GeocodePointsItemOutput>;\n}\n\n/** The address of the result */\nexport interface AddressOutput {\n /** AddressLine that includes Street Name and Number */\n addressLine?: string;\n /** locality property */\n locality?: string;\n /** neighborhood property */\n neighborhood?: string;\n /** The subdivision name in the country or region for an address. This element is typically treated as the first order administrative subdivision, but in some cases it also contains the second, third, or fourth order subdivision in a country, dependency, or region. */\n adminDistricts?: Array<AddressAdminDistrictsItemOutput>;\n /** Postal Code property */\n postalCode?: string;\n countryRegion?: AddressCountryRegionOutput;\n /** Formatted Address property */\n formattedAddress?: string;\n /** The address of the result. */\n intersection?: IntersectionOutput;\n}\n\nexport interface AddressAdminDistrictsItemOutput {\n /**\n * The name for the corresponding adminDistrict field,\n * For adminDistrict[0], this could be full name of state such as Washington,\n * For adminDistrict[1], this could be the full name of the county\n */\n name?: string;\n /**\n * The short name for the corresponding adminDistrict field,\n * For adminDistrict[0], this could be short name of state such as WA,\n * For adminDistrict[1], this could be the short name of the county\n */\n shortName?: string;\n}\n\nexport interface AddressCountryRegionOutput {\n /** ISO of country/region */\n ISO?: string;\n /** name of country/region */\n name?: string;\n}\n\n/** The address of the result. */\nexport interface IntersectionOutput {\n /** Primary street for the location. */\n baseStreet?: string;\n /** The first intersecting street. */\n secondaryStreet1?: string;\n /** If any, the second intersecting street. */\n secondaryStreet2?: string;\n /** Type of intersection. */\n intersectionType?: string;\n /** Complete name of the intersection. */\n displayName?: string;\n}\n\nexport interface GeocodePointsItemOutput {\n /** A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details. */\n geometry?: GeoJsonPointOutput;\n /** The method that was used to compute the geocode point. */\n calculationMethod?:\n | \"Interpolation\"\n | \"InterpolationOffset\"\n | \"Parcel\"\n | \"Rooftop\";\n /**\n * The best use for the geocode point.\n * Each geocode point is defined as a `Route` point, a `Display` point or both.\n * Use `Route` points if you are creating a route to the location. Use `Display` points if you are showing the location on a map. For example, if the location is a park, a `Route` point may specify an entrance to the park where you can enter with a car, and a `Display` point may be a point that specifies the center of the park.\n */\n usageTypes?: Array<\"Display\" | \"Route\">;\n}\n\n/** A valid `GeoJSON Point` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.2) for details. */\nexport interface GeoJsonPointOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonPointDataOutput {\n type: \"Point\";\n}\n\n/** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\nexport interface GeoJsonGeometryOutputParent extends GeoJsonObjectOutputParent {\n type:\n | \"GeoJsonGeometry\"\n | \"Point\"\n | \"MultiPoint\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"MultiPolygon\"\n | \"GeometryCollection\";\n}\n\n/** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */\nexport interface GeoJsonObjectOutputParent {\n /** Bounding box. Projection used - EPSG:3857. Please refer to [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946#section-5) for details. */\n bbox?: Array<number>;\n type:\n | \"GeoJsonObject\"\n | \"GeoJsonGeometry\"\n | \"Point\"\n | \"Feature\"\n | \"Boundary\"\n | \"MultiPoint\"\n | \"LineString\"\n | \"MultiLineString\"\n | \"Polygon\"\n | \"MultiPolygon\"\n | \"GeometryCollection\"\n | \"FeatureCollection\";\n}\n\n/** Data contained by a `GeoJson Point`. */\nexport interface GeoJsonPointDataOutput {\n /** A `Position` is an array of numbers with two or more elements. The first two elements are _longitude_ and _latitude_, precisely in that order. _Altitude/Elevation_ is an optional third element. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.1) for details. */\n coordinates: Array<number>;\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */\nexport interface ErrorResponseOutput {\n /** The error object. */\n error?: ErrorDetailOutput;\n}\n\n/** The error detail. */\nexport interface ErrorDetailOutput {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: Array<ErrorDetailOutput>;\n /** The error additional info. */\n readonly additionalInfo?: Array<ErrorAdditionalInfoOutput>;\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfoOutput {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: Record<string, unknown>;\n}\n\n/** This object is returned from a successful Geocoding Batch service call. */\nexport interface GeocodingBatchResponseOutput {\n /** Summary for the batch request */\n summary?: GeocodingBatchResponseSummaryOutput;\n /** Array containing the batch results. */\n batchItems?: Array<GeocodingBatchResponseItemOutput>;\n /** The is the link to the next page of the features returned. If it's the last page, no this field. */\n nextLink?: string;\n}\n\n/** Summary for the batch request */\nexport interface GeocodingBatchResponseSummaryOutput {\n /** Number of successful requests in the batch */\n successfulRequests?: number;\n /** Total number of requests in the batch */\n totalRequests?: number;\n}\n\nexport interface GeocodingBatchResponseItemOutput {\n /** id of the batchItem which would be the same as the id in the request */\n optionalId?: string;\n /** The type of a FeatureCollection object must be FeatureCollection. */\n type?: \"FeatureCollection\";\n features?: Array<FeaturesItemOutput>;\n /** The is the link to the next page of the features returned. If it's the last page, no this field. */\n nextLink?: string;\n /** The error detail. */\n error?: ErrorDetailOutput;\n}\n\n/**\n * `GeoJSON GeocodingFeature` object that describe the boundaries of a geographical area. Geometry of the feature is described with `GeoJSON GeometryCollection`.\n *\n * Please note, the service typically returns a GeometryCollection with Polygon or MultiPolygon sub-types.\n */\nexport interface BoundaryOutput\n extends GeoJsonFeatureOutputParent,\n BoundaryPropertiesOutput {\n type: \"Boundary\";\n}\n\n/** A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details. */\nexport interface GeoJsonFeatureOutputParent\n extends GeoJsonObjectOutputParent,\n GeoJsonFeatureDataOutput {\n type: \"Feature\" | \"Boundary\";\n}\n\nexport interface GeoJsonFeatureDataOutput {\n /** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\n geometry: GeoJsonGeometryOutput;\n /** Properties can contain any additional metadata about the `Feature`. Value can be any JSON object or a JSON null value */\n properties?: Record<string, unknown>;\n /** Identifier for the feature. */\n id?: string;\n /** The type of the feature. The value depends on the data model the current feature is part of. Some data models may have an empty value. */\n featureType?: string;\n}\n\n/** Properties of a Boundary object. */\nexport interface BoundaryPropertiesOutput {\n /** The name associated with the geographical area. */\n name?: string;\n /** The copyright string. */\n copyright?: string;\n /** A URL that lists many of the data providers for Azure Maps and their related copyright information. */\n copyrightURL?: string;\n /** A collection of copyright information for each geometry of the Boundary object in the same order they appear. */\n geometriesCopyright?: Array<GeometryCopyrightOutput>;\n}\n\n/** Copyright information of a geometry of a Boundary object. */\nexport interface GeometryCopyrightOutput {\n /** The name of the data provider */\n sourceName?: string;\n /** The copyright string for the data provider */\n copyright?: string;\n}\n\n/** A valid `GeoJSON MultiPoint` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.3) for details. */\nexport interface GeoJsonMultiPointOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonMultiPointDataOutput {\n type: \"MultiPoint\";\n}\n\n/** Data contained by a `GeoJson MultiPoint`. */\nexport interface GeoJsonMultiPointDataOutput {\n /** Coordinates for the `GeoJson MultiPoint` geometry. */\n coordinates: Array<Array<number>>;\n}\n\n/** A valid `GeoJSON LineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.4) for details. */\nexport interface GeoJsonLineStringOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonLineStringDataOutput {\n type: \"LineString\";\n}\n\nexport interface GeoJsonLineStringDataOutput {\n /** Coordinates for the `GeoJson LineString` geometry. */\n coordinates: Array<Array<number>>;\n}\n\n/** A valid `GeoJSON MultiLineString` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.5) for details. */\nexport interface GeoJsonMultiLineStringOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonMultiLineStringDataOutput {\n type: \"MultiLineString\";\n}\n\nexport interface GeoJsonMultiLineStringDataOutput {\n /** Coordinates for the `GeoJson MultiLineString` geometry. */\n coordinates: Array<Array<Array<number>>>;\n}\n\n/** A valid `GeoJSON Polygon` geometry type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6) for details. */\nexport interface GeoJsonPolygonOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonPolygonDataOutput {\n type: \"Polygon\";\n}\n\nexport interface GeoJsonPolygonDataOutput {\n /** Coordinates for the `GeoJson Polygon` geometry type. */\n coordinates: Array<Array<Array<number>>>;\n}\n\n/** A valid `GeoJSON MultiPolygon` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.7) for details. */\nexport interface GeoJsonMultiPolygonOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonMultiPolygonDataOutput {\n type: \"MultiPolygon\";\n}\n\nexport interface GeoJsonMultiPolygonDataOutput {\n /** Contains a list of valid `GeoJSON Polygon` objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */\n coordinates: Array<Array<Array<Array<number>>>>;\n}\n\n/** A valid `GeoJSON GeometryCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.8) for details. */\nexport interface GeoJsonGeometryCollectionOutput\n extends GeoJsonGeometryOutputParent,\n GeoJsonGeometryCollectionDataOutput {\n type: \"GeometryCollection\";\n}\n\nexport interface GeoJsonGeometryCollectionDataOutput {\n /** Contains a list of valid `GeoJSON` geometry objects. **Note** that coordinates in GeoJSON are in x, y order (longitude, latitude). */\n geometries: Array<GeoJsonGeometryOutput>;\n}\n\n/** A valid `GeoJSON FeatureCollection` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) for details. */\nexport interface GeoJsonFeatureCollectionOutput\n extends GeoJsonObjectOutputParent,\n GeoJsonFeatureCollectionDataOutput {\n type: \"FeatureCollection\";\n}\n\nexport interface GeoJsonFeatureCollectionDataOutput {\n /** Contains a list of valid `GeoJSON Feature` objects. */\n features: Array<GeoJsonFeatureOutput>;\n}\n\n/** A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details. */\nexport type GeoJsonGeometryOutput =\n | GeoJsonGeometryOutputParent\n | GeoJsonPointOutput\n | GeoJsonMultiPointOutput\n | GeoJsonLineStringOutput\n | GeoJsonMultiLineStringOutput\n | GeoJsonPolygonOutput\n | GeoJsonMultiPolygonOutput\n | GeoJsonGeometryCollectionOutput;\n/** A valid `GeoJSON` object. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3) for details. */\nexport type GeoJsonObjectOutput =\n | GeoJsonGeometryOutput\n | GeoJsonPointOutput\n | GeoJsonFeatureOutput\n | BoundaryOutput\n | GeoJsonMultiPointOutput\n | GeoJsonLineStringOutput\n | GeoJsonMultiLineStringOutput\n | GeoJsonPolygonOutput\n | GeoJsonMultiPolygonOutput\n | GeoJsonGeometryCollectionOutput\n | GeoJsonFeatureCollectionOutput;\n/** A valid `GeoJSON Feature` object type. Please refer to [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.2) for details. */\nexport type GeoJsonFeatureOutput = GeoJsonFeatureOutputParent | BoundaryOutput;\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=parameters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/generated/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n GeocodingBatchRequestBody,\n ReverseGeocodingBatchRequestBody\n} from \"./models\";\n\nexport interface SearchGetGeocodingQueryParamProperties {\n /** Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20. */\n top?: number;\n /** A string that contains information about a location, such as an address or landmark name. */\n query?: string;\n /**\n * The official street line of an address relative to the area, as specified by the locality, or postalCode, properties. Typical use of this element would be to provide a street address or any official address.\n *\n * **If query is given, should not use this parameter.**\n */\n addressLine?: string;\n /**\n * Restrict the geocoding result to an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) that is specified e.g. FR. This will limit the search to the specified region.\n *\n * **If query is given, should not use this parameter.**\n */\n countryRegion?: string;\n /**\n * A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n *\n * Example: lon1,lat1,lon2,lat2\n */\n bbox?: Array<number>;\n /**\n * A string that represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region. By default, the View parameter is set to “Auto” even if you haven’t defined it in the request.\n *\n * Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.\n */\n view?: string;\n /** A point on the earth specified as a longitude and latitude. When you specify this parameter, the user’s location is taken into account and the results returned may be more relevant to the user. Example: &coordinates=lon,lat */\n coordinates?: Array<number>;\n /**\n * The country subdivision portion of an address, such as WA.\n *\n * **If query is given, should not use this parameter.**\n */\n adminDistrict?: string;\n /**\n * The county for the structured address, such as King.\n *\n * **If query is given, should not use this parameter.**\n */\n adminDistrict2?: string;\n /**\n * The named area for the structured address.\n *\n * **If query is given, should not use this parameter.**\n */\n adminDistrict3?: string;\n /**\n * The locality portion of an address, such as Seattle.\n *\n * **If query is given, should not use this parameter.**\n */\n locality?: string;\n /**\n * The postal code portion of an address.\n *\n * **If query is given, should not use this parameter.**\n */\n postalCode?: string;\n}\n\nexport interface SearchGetGeocodingQueryParam {\n queryParameters?: SearchGetGeocodingQueryParamProperties;\n}\n\nexport type SearchGetGeocodingParameters = SearchGetGeocodingQueryParam &\n RequestParameters;\n\nexport interface SearchGetGeocodingBatchBodyParam {\n /** The list of address geocoding queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query. */\n body: GeocodingBatchRequestBody;\n}\n\nexport interface SearchGetGeocodingBatchMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type SearchGetGeocodingBatchParameters = SearchGetGeocodingBatchMediaTypesParam &\n SearchGetGeocodingBatchBodyParam &\n RequestParameters;\n\nexport interface SearchGetPolygonQueryParamProperties {\n /** A point on the earth specified as a longitude and latitude. Example: &coordinates=lon,lat */\n coordinates: Array<number>;\n /**\n * A string that represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region. By default, the View parameter is set to “Auto” even if you haven’t defined it in the request.\n *\n * Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.\n */\n view?: string;\n /** The geopolitical concept to return a boundary for. */\n resultType?:\n | \"countryRegion\"\n | \"adminDistrict\"\n | \"adminDistrict2\"\n | \"postalCode\"\n | \"postalCode2\"\n | \"postalCode3\"\n | \"postalCode4\"\n | \"neighborhood\"\n | \"locality\";\n /** Resolution determines the amount of points to send back. */\n resolution?: \"small\" | \"medium\" | \"large\" | \"huge\";\n}\n\nexport interface SearchGetPolygonQueryParam {\n queryParameters: SearchGetPolygonQueryParamProperties;\n}\n\nexport type SearchGetPolygonParameters = SearchGetPolygonQueryParam &\n RequestParameters;\n\nexport interface SearchGetReverseGeocodingQueryParamProperties {\n /** The coordinates of the location that you want to reverse geocode. Example: &coordinates=lon,lat */\n coordinates: Array<number>;\n /**\n * Specify entity types that you want in the response. Only the types you specify will be returned. If the point cannot be mapped to the entity types you specify, no location information is returned in the response.\n * Default value is all possible entities.\n * A comma separated list of entity types selected from the following options.\n *\n * - Address\n * - Neighborhood\n * - PopulatedPlace\n * - Postcode1\n * - AdminDivision1\n * - AdminDivision2\n * - CountryRegion\n *\n * These entity types are ordered from the most specific entity to the least specific entity. When entities of more than one entity type are found, only the most specific entity is returned. For example, if you specify Address and AdminDistrict1 as entity types and entities were found for both types, only the Address entity information is returned in the response.\n */\n resultTypes?: Array<\n | \"Address\"\n | \"Neighborhood\"\n | \"PopulatedPlace\"\n | \"Postcode1\"\n | \"AdminDivision1\"\n | \"AdminDivision2\"\n | \"CountryRegion\"\n >;\n /**\n * A string that represents an [ISO 3166-1 Alpha-2 region/country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will alter Geopolitical disputed borders and labels to align with the specified user region. By default, the View parameter is set to “Auto” even if you haven’t defined it in the request.\n *\n * Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views.\n */\n view?: string;\n}\n\nexport interface SearchGetReverseGeocodingQueryParam {\n queryParameters: SearchGetReverseGeocodingQueryParamProperties;\n}\n\nexport type SearchGetReverseGeocodingParameters = SearchGetReverseGeocodingQueryParam &\n RequestParameters;\n\nexport interface SearchGetReverseGeocodingBatchBodyParam {\n /** The list of reverse geocoding queries/requests to process. The list can contain a max of 100 queries and must contain at least 1 query. */\n body: ReverseGeocodingBatchRequestBody;\n}\n\nexport interface SearchGetReverseGeocodingBatchMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type SearchGetReverseGeocodingBatchParameters = SearchGetReverseGeocodingBatchMediaTypesParam &\n SearchGetReverseGeocodingBatchBodyParam &\n RequestParameters;\n"]}
@@ -1,55 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { LroEngine } from "@azure/core-lro";
4
- /**
5
- * Helper function that builds a Poller object to help polling a long running operation.
6
- * @param client - Client to use for sending the request to get additional pages.
7
- * @param initialResponse - The initial response.
8
- * @param options - Options to set a resume state or custom polling interval.
9
- * @returns - A poller object to poll for operation state updates and eventually get the final response.
10
- */
11
- export function getLongRunningPoller(client, initialResponse, options = {}) {
12
- const poller = {
13
- requestMethod: initialResponse.request.method,
14
- requestPath: initialResponse.request.url,
15
- sendInitialRequest: async () => {
16
- // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
17
- // we are not triggering the initial request here, just extracting the information from the
18
- // response we were provided.
19
- return getLroResponse(initialResponse);
20
- },
21
- sendPollRequest: async (path) => {
22
- // This is the callback that is going to be called to poll the service
23
- // to get the latest status. We use the client provided and the polling path
24
- // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
25
- // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
26
- const response = await client
27
- .pathUnchecked(path ?? initialResponse.request.url)
28
- .get();
29
- const lroResponse = getLroResponse(response);
30
- lroResponse.rawResponse.headers["x-ms-original-url"] =
31
- initialResponse.request.url;
32
- return lroResponse;
33
- }
34
- };
35
- return new LroEngine(poller, options);
36
- }
37
- /**
38
- * Converts a Rest Client response to a response that the LRO engine knows about
39
- * @param response - a rest client http response
40
- * @returns - An LRO response that the LRO engine can work with
41
- */
42
- function getLroResponse(response) {
43
- if (Number.isNaN(response.status)) {
44
- throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
45
- }
46
- return {
47
- flatResponse: response,
48
- rawResponse: {
49
- ...response,
50
- statusCode: Number.parseInt(response.status),
51
- body: response.body
52
- }
53
- };
54
- }
55
- //# sourceMappingURL=pollingHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../../src/generated/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,SAAS,EAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,eAAwB,EACxB,UAAkE,EAAE;IAEpE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM;iBAC1B,aAAa,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;iBAClD,GAAG,EAAE,CAAC;YACT,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBAClD,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YAC9B,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,IAAI,SAAS,CACjB,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CACzE,CAAC;KACH;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,EAAE;YACX,GAAG,QAAQ;YACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n LongRunningOperation,\n LroEngine,\n LroEngineOptions,\n LroResponse,\n PollerLike,\n PollOperationState\n} from \"@azure/core-lro\";\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: LroEngineOptions<TResult, PollOperationState<TResult>> = {}\n): PollerLike<PollOperationState<TResult>, TResult> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] =\n initialResponse.request.url;\n return lroResponse;\n }\n };\n\n return new LroEngine(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO engine knows about\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO engine can work with\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult\n): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(\n `Status code of the response is not a number. Value: ${response.status}`\n );\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body\n }\n };\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=responses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n GeocodingResponseOutput,\n ErrorResponseOutput,\n GeocodingBatchResponseOutput,\n BoundaryOutput\n} from \"./outputModels\";\n\nexport interface SearchGetGeocoding200Headers {\n /** request id. */\n \"x-ms-request-id\"?: string;\n}\n\n/**\n * **Geocoding**\n *\n * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * In many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocoding endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No Point of Interest (POIs) will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.\n */\nexport interface SearchGetGeocoding200Response extends HttpResponse {\n status: \"200\";\n body: GeocodingResponseOutput;\n headers: RawHttpHeaders & SearchGetGeocoding200Headers;\n}\n\n/**\n * **Geocoding**\n *\n * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * In many cases, the complete search service might be too much, for instance if you are only interested in traditional geocoding. Search can also be accessed for address look up exclusively. The geocoding is performed by hitting the geocoding endpoint with just the address or partial address in question. The geocoding search index will be queried for everything above the street level data. No Point of Interest (POIs) will be returned. Note that the geocoder is very tolerant of typos and incomplete addresses. It will also handle everything from exact street addresses or street or intersections as well as higher level geographies such as city centers, counties, states etc.\n */\nexport interface SearchGetGeocodingDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n * **Geocoding Batch API**\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n *\n * The Geocoding Batch API sends batches of queries to [Geocoding API](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding) using just a single API call. The API allows caller to batch up to **100** queries.\n *\n * ### Submit Synchronous Batch Request\n * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n * ```\n * POST https://atlas.microsoft.com/geocode:batch?api-version=2023-06-01\n * ```\n * ### POST Body for Batch Request\n * To send the _geocoding_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _geocoding_ queries:\n *\n *\n * ```\n * {\n * \"batchItems\": [\n * {\n * \"addressLine\": \"One, Microsoft Way, Redmond, WA 98052\",\n * \"top\": 2\n * },\n * {\n * \"addressLine\": \"Pike Pl\",\n * \"adminDistrict\": \"WA\",\n * \"locality\": \"Seattle\",\n * \"top\": 3\n * }\n * ]\n * }\n * ```\n *\n * A _geocoding_ batchItem object can accept any of the supported _geocoding_ [URI parameters](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding#uri-parameters).\n *\n *\n * The batch should contain at least **1** query.\n *\n *\n * ### Batch Response Model\n * The batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n *\n * - [`GeocodingResponse`](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding#geocodingresponse) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n *\n */\nexport interface SearchGetGeocodingBatch200Response extends HttpResponse {\n status: \"200\";\n body: GeocodingBatchResponseOutput;\n}\n\n/**\n * **Geocoding Batch API**\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n *\n * The Geocoding Batch API sends batches of queries to [Geocoding API](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding) using just a single API call. The API allows caller to batch up to **100** queries.\n *\n * ### Submit Synchronous Batch Request\n * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n * ```\n * POST https://atlas.microsoft.com/geocode:batch?api-version=2023-06-01\n * ```\n * ### POST Body for Batch Request\n * To send the _geocoding_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _geocoding_ queries:\n *\n *\n * ```\n * {\n * \"batchItems\": [\n * {\n * \"addressLine\": \"One, Microsoft Way, Redmond, WA 98052\",\n * \"top\": 2\n * },\n * {\n * \"addressLine\": \"Pike Pl\",\n * \"adminDistrict\": \"WA\",\n * \"locality\": \"Seattle\",\n * \"top\": 3\n * }\n * ]\n * }\n * ```\n *\n * A _geocoding_ batchItem object can accept any of the supported _geocoding_ [URI parameters](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding#uri-parameters).\n *\n *\n * The batch should contain at least **1** query.\n *\n *\n * ### Batch Response Model\n * The batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n *\n * - [`GeocodingResponse`](https://docs.microsoft.com/rest/api/maps/search-v2/get-geocoding#geocodingresponse) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n *\n */\nexport interface SearchGetGeocodingBatchDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n * **Get Polygon**\n *\n * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * Supplies polygon data of a geographical area outline such as a city or a country region.\n */\nexport interface SearchGetPolygon200Response extends HttpResponse {\n status: \"200\";\n body: BoundaryOutput;\n}\n\n/**\n * **Get Polygon**\n *\n * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * Supplies polygon data of a geographical area outline such as a city or a country region.\n */\nexport interface SearchGetPolygonDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n * **Reverse Geocoding**\n *\n * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * Translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the coordinate is located. This endpoint will return address information for a given coordinate.\n */\nexport interface SearchGetReverseGeocoding200Response extends HttpResponse {\n status: \"200\";\n body: GeocodingResponseOutput;\n}\n\n/**\n * **Reverse Geocoding**\n *\n * **Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n * Translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Most often this is needed in tracking applications where you receive a GPS feed from the device or asset and wish to know what address where the coordinate is located. This endpoint will return address information for a given coordinate.\n */\nexport interface SearchGetReverseGeocodingDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n * **Reverse Geocoding Batch API**\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n *\n * The Reverse Geocoding Batch API sends batches of queries to [Reverse Geocoding API](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding) using just a single API call. The API allows caller to batch up to **100** queries.\n *\n * ### Submit Synchronous Batch Request\n * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n * ```\n * POST https://atlas.microsoft.com/reverseGeocode:batch?api-version=2023-06-01\n * ```\n * ### POST Body for Batch Request\n * To send the _reverse geocoding_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _reverse geocoding_ queries:\n *\n *\n * ```\n * {\n * \"batchItems\": [\n * {\n * \"coordinates\": [-122.128275, 47.639429],\n * \"resultTypes\": [\"Address\", \"PopulatedPlace\"]\n * },\n * {\n * \"coordinates\": [-122.341979399674, 47.6095253501216]\n * }\n * ]\n * }\n * ```\n *\n * A _reverse geocoding_ batchItem object can accept any of the supported _reverse geocoding_ [URI parameters](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding#uri-parameters).\n *\n *\n * The batch should contain at least **1** query.\n *\n *\n * ### Batch Response Model\n * The batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n *\n * - [`GeocodingResponse`](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding#geocodingresponse) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n *\n */\nexport interface SearchGetReverseGeocodingBatch200Response\n extends HttpResponse {\n status: \"200\";\n body: GeocodingBatchResponseOutput;\n}\n\n/**\n * **Reverse Geocoding Batch API**\n *\n *\n * **Applies to**: see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n *\n *\n *\n * The Reverse Geocoding Batch API sends batches of queries to [Reverse Geocoding API](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding) using just a single API call. The API allows caller to batch up to **100** queries.\n *\n * ### Submit Synchronous Batch Request\n * The Synchronous API is recommended for lightweight batch requests. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later. The Synchronous API will return a timeout error (a 408 response) if the request takes longer than 60 seconds. The number of batch items is limited to **100** for this API.\n * ```\n * POST https://atlas.microsoft.com/reverseGeocode:batch?api-version=2023-06-01\n * ```\n * ### POST Body for Batch Request\n * To send the _reverse geocoding_ queries you will use a `POST` request where the request body will contain the `batchItems` array in `json` format and the `Content-Type` header will be set to `application/json`. Here's a sample request body containing 2 _reverse geocoding_ queries:\n *\n *\n * ```\n * {\n * \"batchItems\": [\n * {\n * \"coordinates\": [-122.128275, 47.639429],\n * \"resultTypes\": [\"Address\", \"PopulatedPlace\"]\n * },\n * {\n * \"coordinates\": [-122.341979399674, 47.6095253501216]\n * }\n * ]\n * }\n * ```\n *\n * A _reverse geocoding_ batchItem object can accept any of the supported _reverse geocoding_ [URI parameters](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding#uri-parameters).\n *\n *\n * The batch should contain at least **1** query.\n *\n *\n * ### Batch Response Model\n * The batch response contains a `summary` component that indicates the `totalRequests` that were part of the original batch request and `successfulRequests` i.e. queries which were executed successfully. The batch response also includes a `batchItems` array which contains a response for each and every query in the batch request. The `batchItems` will contain the results in the exact same order the original queries were sent in the batch request. Each item is of one of the following types:\n *\n * - [`GeocodingResponse`](https://docs.microsoft.com/rest/api/maps/search-v2/get-reverse-geocoding#geocodingresponse) - If the query completed successfully.\n *\n * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.\n *\n *\n *\n */\nexport interface SearchGetReverseGeocodingBatchDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}