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

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.
Files changed (208) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/LICENSE +4 -4
  3. package/README.md +80 -90
  4. package/dist/browser/MapsSearch.d.ts +53 -0
  5. package/dist/browser/MapsSearch.d.ts.map +1 -0
  6. package/{dist-esm/src → dist/browser}/MapsSearch.js +1 -1
  7. package/dist/browser/MapsSearch.js.map +1 -0
  8. package/dist/browser/generated/clientDefinitions.d.ts +137 -0
  9. package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
  10. package/dist/browser/generated/clientDefinitions.js +4 -0
  11. package/dist/browser/generated/clientDefinitions.js.map +1 -0
  12. package/dist/browser/generated/index.d.ts +10 -0
  13. package/dist/browser/generated/index.d.ts.map +1 -0
  14. package/dist/browser/generated/index.js +12 -0
  15. package/dist/browser/generated/index.js.map +1 -0
  16. package/dist/browser/generated/isUnexpected.d.ts +7 -0
  17. package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
  18. package/dist/browser/generated/isUnexpected.js +74 -0
  19. package/dist/browser/generated/isUnexpected.js.map +1 -0
  20. package/dist/browser/generated/logger.d.ts +2 -0
  21. package/dist/browser/generated/logger.d.ts.map +1 -0
  22. package/dist/browser/generated/logger.js.map +1 -0
  23. package/dist/browser/generated/mapsSearchClient.d.ts +15 -0
  24. package/dist/browser/generated/mapsSearchClient.d.ts.map +1 -0
  25. package/dist/browser/generated/mapsSearchClient.js +44 -0
  26. package/dist/browser/generated/mapsSearchClient.js.map +1 -0
  27. package/dist/browser/generated/models.d.ts +97 -0
  28. package/dist/browser/generated/models.d.ts.map +1 -0
  29. package/dist/browser/generated/models.js +4 -0
  30. package/dist/browser/generated/models.js.map +1 -0
  31. package/dist/browser/generated/outputModels.d.ts +298 -0
  32. package/dist/browser/generated/outputModels.d.ts.map +1 -0
  33. package/dist/browser/generated/outputModels.js +4 -0
  34. package/dist/browser/generated/outputModels.js.map +1 -0
  35. package/dist/browser/generated/parameters.d.ts +135 -0
  36. package/dist/browser/generated/parameters.d.ts.map +1 -0
  37. package/dist/browser/generated/parameters.js +4 -0
  38. package/dist/browser/generated/parameters.js.map +1 -0
  39. package/dist/browser/generated/responses.d.ts +255 -0
  40. package/dist/browser/generated/responses.d.ts.map +1 -0
  41. package/dist/browser/generated/responses.js +4 -0
  42. package/dist/browser/generated/responses.js.map +1 -0
  43. package/dist/browser/index.d.ts +4 -0
  44. package/dist/browser/index.d.ts.map +1 -0
  45. package/dist/browser/index.js +6 -0
  46. package/dist/browser/index.js.map +1 -0
  47. package/dist/browser/logger.d.ts +2 -0
  48. package/dist/browser/logger.d.ts.map +1 -0
  49. package/dist/browser/logger.js +5 -0
  50. package/dist/browser/package.json +3 -0
  51. package/dist/commonjs/MapsSearch.d.ts +53 -0
  52. package/dist/commonjs/MapsSearch.d.ts.map +1 -0
  53. package/dist/commonjs/MapsSearch.js +44 -0
  54. package/dist/commonjs/MapsSearch.js.map +1 -0
  55. package/dist/commonjs/generated/clientDefinitions.d.ts +137 -0
  56. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  57. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  58. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  59. package/dist/commonjs/generated/index.d.ts +10 -0
  60. package/dist/commonjs/generated/index.d.ts.map +1 -0
  61. package/dist/commonjs/generated/index.js +15 -0
  62. package/dist/commonjs/generated/index.js.map +1 -0
  63. package/dist/commonjs/generated/isUnexpected.d.ts +7 -0
  64. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  65. package/dist/commonjs/generated/isUnexpected.js +77 -0
  66. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  67. package/dist/commonjs/generated/logger.d.ts +2 -0
  68. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  69. package/dist/commonjs/generated/logger.js +8 -0
  70. package/dist/commonjs/generated/logger.js.map +1 -0
  71. package/dist/commonjs/generated/mapsSearchClient.d.ts +15 -0
  72. package/dist/commonjs/generated/mapsSearchClient.d.ts.map +1 -0
  73. package/dist/commonjs/generated/mapsSearchClient.js +47 -0
  74. package/dist/commonjs/generated/mapsSearchClient.js.map +1 -0
  75. package/dist/commonjs/generated/models.d.ts +97 -0
  76. package/dist/commonjs/generated/models.d.ts.map +1 -0
  77. package/dist/commonjs/generated/models.js +5 -0
  78. package/dist/commonjs/generated/models.js.map +1 -0
  79. package/dist/commonjs/generated/outputModels.d.ts +298 -0
  80. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  81. package/dist/commonjs/generated/outputModels.js +5 -0
  82. package/dist/commonjs/generated/outputModels.js.map +1 -0
  83. package/dist/commonjs/generated/parameters.d.ts +135 -0
  84. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  85. package/dist/commonjs/generated/parameters.js +5 -0
  86. package/dist/commonjs/generated/parameters.js.map +1 -0
  87. package/dist/commonjs/generated/responses.d.ts +255 -0
  88. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  89. package/dist/commonjs/generated/responses.js +5 -0
  90. package/dist/commonjs/generated/responses.js.map +1 -0
  91. package/dist/commonjs/index.d.ts +4 -0
  92. package/dist/commonjs/index.d.ts.map +1 -0
  93. package/dist/commonjs/index.js +9 -0
  94. package/dist/commonjs/index.js.map +1 -0
  95. package/dist/commonjs/logger.d.ts +2 -0
  96. package/dist/commonjs/logger.d.ts.map +1 -0
  97. package/dist/commonjs/logger.js +8 -0
  98. package/dist/commonjs/logger.js.map +1 -0
  99. package/dist/commonjs/package.json +3 -0
  100. package/dist/commonjs/tsdoc-metadata.json +11 -0
  101. package/dist/esm/MapsSearch.d.ts +53 -0
  102. package/dist/esm/MapsSearch.d.ts.map +1 -0
  103. package/dist/esm/MapsSearch.js +40 -0
  104. package/dist/esm/MapsSearch.js.map +1 -0
  105. package/dist/esm/generated/clientDefinitions.d.ts +137 -0
  106. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  107. package/dist/esm/generated/clientDefinitions.js +4 -0
  108. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  109. package/dist/esm/generated/index.d.ts +10 -0
  110. package/dist/esm/generated/index.d.ts.map +1 -0
  111. package/dist/esm/generated/index.js +12 -0
  112. package/dist/esm/generated/index.js.map +1 -0
  113. package/dist/esm/generated/isUnexpected.d.ts +7 -0
  114. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  115. package/dist/esm/generated/isUnexpected.js +74 -0
  116. package/dist/esm/generated/isUnexpected.js.map +1 -0
  117. package/dist/esm/generated/logger.d.ts +2 -0
  118. package/dist/esm/generated/logger.d.ts.map +1 -0
  119. package/dist/esm/generated/logger.js +5 -0
  120. package/dist/esm/generated/logger.js.map +1 -0
  121. package/dist/esm/generated/mapsSearchClient.d.ts +15 -0
  122. package/dist/esm/generated/mapsSearchClient.d.ts.map +1 -0
  123. package/dist/esm/generated/mapsSearchClient.js +44 -0
  124. package/dist/esm/generated/mapsSearchClient.js.map +1 -0
  125. package/dist/esm/generated/models.d.ts +97 -0
  126. package/dist/esm/generated/models.d.ts.map +1 -0
  127. package/dist/esm/generated/models.js +4 -0
  128. package/dist/esm/generated/models.js.map +1 -0
  129. package/dist/esm/generated/outputModels.d.ts +298 -0
  130. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  131. package/dist/esm/generated/outputModels.js +4 -0
  132. package/dist/esm/generated/outputModels.js.map +1 -0
  133. package/dist/esm/generated/parameters.d.ts +135 -0
  134. package/dist/esm/generated/parameters.d.ts.map +1 -0
  135. package/dist/esm/generated/parameters.js +4 -0
  136. package/dist/esm/generated/parameters.js.map +1 -0
  137. package/dist/esm/generated/responses.d.ts +255 -0
  138. package/dist/esm/generated/responses.d.ts.map +1 -0
  139. package/dist/esm/generated/responses.js +4 -0
  140. package/dist/esm/generated/responses.js.map +1 -0
  141. package/dist/esm/index.d.ts +4 -0
  142. package/dist/esm/index.d.ts.map +1 -0
  143. package/dist/esm/index.js +6 -0
  144. package/dist/esm/index.js.map +1 -0
  145. package/dist/esm/logger.d.ts +2 -0
  146. package/dist/esm/logger.d.ts.map +1 -0
  147. package/dist/esm/logger.js +5 -0
  148. package/dist/esm/logger.js.map +1 -0
  149. package/dist/esm/package.json +3 -0
  150. package/dist/react-native/MapsSearch.d.ts +53 -0
  151. package/dist/react-native/MapsSearch.d.ts.map +1 -0
  152. package/dist/react-native/MapsSearch.js +40 -0
  153. package/dist/react-native/MapsSearch.js.map +1 -0
  154. package/dist/react-native/generated/clientDefinitions.d.ts +137 -0
  155. package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
  156. package/dist/react-native/generated/clientDefinitions.js +4 -0
  157. package/dist/react-native/generated/clientDefinitions.js.map +1 -0
  158. package/dist/react-native/generated/index.d.ts +10 -0
  159. package/dist/react-native/generated/index.d.ts.map +1 -0
  160. package/dist/react-native/generated/index.js +12 -0
  161. package/dist/react-native/generated/index.js.map +1 -0
  162. package/dist/react-native/generated/isUnexpected.d.ts +7 -0
  163. package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
  164. package/dist/react-native/generated/isUnexpected.js +74 -0
  165. package/dist/react-native/generated/isUnexpected.js.map +1 -0
  166. package/dist/react-native/generated/logger.d.ts +2 -0
  167. package/dist/react-native/generated/logger.d.ts.map +1 -0
  168. package/dist/react-native/generated/logger.js +5 -0
  169. package/dist/react-native/generated/logger.js.map +1 -0
  170. package/dist/react-native/generated/mapsSearchClient.d.ts +15 -0
  171. package/dist/react-native/generated/mapsSearchClient.d.ts.map +1 -0
  172. package/dist/react-native/generated/mapsSearchClient.js +44 -0
  173. package/dist/react-native/generated/mapsSearchClient.js.map +1 -0
  174. package/dist/react-native/generated/models.d.ts +97 -0
  175. package/dist/react-native/generated/models.d.ts.map +1 -0
  176. package/dist/react-native/generated/models.js +4 -0
  177. package/dist/react-native/generated/models.js.map +1 -0
  178. package/dist/react-native/generated/outputModels.d.ts +298 -0
  179. package/dist/react-native/generated/outputModels.d.ts.map +1 -0
  180. package/dist/react-native/generated/outputModels.js +4 -0
  181. package/dist/react-native/generated/outputModels.js.map +1 -0
  182. package/dist/react-native/generated/parameters.d.ts +135 -0
  183. package/dist/react-native/generated/parameters.d.ts.map +1 -0
  184. package/dist/react-native/generated/parameters.js +4 -0
  185. package/dist/react-native/generated/parameters.js.map +1 -0
  186. package/dist/react-native/generated/responses.d.ts +255 -0
  187. package/dist/react-native/generated/responses.d.ts.map +1 -0
  188. package/dist/react-native/generated/responses.js +4 -0
  189. package/dist/react-native/generated/responses.js.map +1 -0
  190. package/dist/react-native/index.d.ts +4 -0
  191. package/dist/react-native/index.d.ts.map +1 -0
  192. package/dist/react-native/index.js +6 -0
  193. package/dist/react-native/index.js.map +1 -0
  194. package/dist/react-native/logger.d.ts +2 -0
  195. package/dist/react-native/logger.d.ts.map +1 -0
  196. package/dist/react-native/logger.js +5 -0
  197. package/dist/react-native/logger.js.map +1 -0
  198. package/dist/react-native/package.json +3 -0
  199. package/package.json +88 -74
  200. package/dist/index.js +0 -171
  201. package/dist/index.js.map +0 -1
  202. package/dist-esm/src/MapsSearch.js.map +0 -1
  203. package/dist-esm/src/index.js +0 -6
  204. package/dist-esm/src/index.js.map +0 -1
  205. package/types/maps-search-rest.d.ts +0 -1066
  206. /package/{dist-esm/src → dist/browser/generated}/logger.js +0 -0
  207. /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
  208. /package/review/{maps-search.api.md → maps-search-node.api.md} +0 -0
@@ -0,0 +1,137 @@
1
+ import { SearchGetGeocodingParameters, SearchGetGeocodingBatchParameters, SearchGetPolygonParameters, SearchGetReverseGeocodingParameters, SearchGetReverseGeocodingBatchParameters } from "./parameters.js";
2
+ import { SearchGetGeocoding200Response, SearchGetGeocodingDefaultResponse, SearchGetGeocodingBatch200Response, SearchGetGeocodingBatchDefaultResponse, SearchGetPolygon200Response, SearchGetPolygonDefaultResponse, SearchGetReverseGeocoding200Response, SearchGetReverseGeocodingDefaultResponse, SearchGetReverseGeocodingBatch200Response, SearchGetReverseGeocodingBatchDefaultResponse } from "./responses.js";
3
+ import { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface GetGeocoding {
5
+ /**
6
+ *
7
+ * The `Get Geocoding` API is an HTTP `GET` request that returns the longitude and latitude coordinates of the location being searched.
8
+ *
9
+ * 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 and states. The response also returns detailed address properties such as street, postal code, municipality, and country/region information.
10
+ */
11
+ get(options?: SearchGetGeocodingParameters): StreamableMethod<SearchGetGeocoding200Response | SearchGetGeocodingDefaultResponse>;
12
+ }
13
+ export interface GetGeocodingBatch {
14
+ /**
15
+ *
16
+ * The `Get Geocoding Batch` API is an HTTP `POST` request that sends batches of up to **100** queries to the [Geocoding](/rest/api/maps/search/get-geocoding) API in a single request.
17
+ *
18
+ * ### Submit Synchronous Batch Request
19
+ * 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.
20
+ * ```
21
+ * POST https://atlas.microsoft.com/geocode:batch?api-version=2023-06-01
22
+ * ```
23
+ * ### POST Body for Batch Request
24
+ * 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:
25
+ *
26
+ *
27
+ * ```
28
+ * {
29
+ * "batchItems": [
30
+ * {
31
+ * "addressLine": "One, Microsoft Way, Redmond, WA 98052",
32
+ * "top": 2
33
+ * },
34
+ * {
35
+ * "addressLine": "Pike Pl",
36
+ * "adminDistrict": "WA",
37
+ * "locality": "Seattle",
38
+ * "top": 3
39
+ * }
40
+ * ]
41
+ * }
42
+ * ```
43
+ *
44
+ * A _geocoding_ batchItem object can accept any of the supported _geocoding_ [URI parameters](/rest/api/maps/search/get-geocoding#uri-parameters).
45
+ *
46
+ *
47
+ * The batch should contain at least **1** query.
48
+ *
49
+ *
50
+ * ### Batch Response Model
51
+ * 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:
52
+ *
53
+ * - [`GeocodingResponse`](/rest/api/maps/search/get-geocoding#geocodingresponse) - If the query completed successfully.
54
+ *
55
+ * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
56
+ *
57
+ *
58
+ *
59
+ */
60
+ post(options: SearchGetGeocodingBatchParameters): StreamableMethod<SearchGetGeocodingBatch200Response | SearchGetGeocodingBatchDefaultResponse>;
61
+ }
62
+ export interface GetPolygon {
63
+ /**
64
+ *
65
+ * The `Get Polygon` API is an HTTP `GET` request that supplies polygon data of a geographical area outline such as a city or a country region.
66
+ */
67
+ get(options: SearchGetPolygonParameters): StreamableMethod<SearchGetPolygon200Response | SearchGetPolygonDefaultResponse>;
68
+ }
69
+ export interface GetReverseGeocoding {
70
+ /**
71
+ *
72
+ * The `Get Reverse Geocoding` API is an HTTP `GET` request used to translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Useful in tracking applications where you receive a GPS feed from the device or asset and wish to know the address associated with the coordinates. This endpoint will return address information for a given coordinate.
73
+ */
74
+ get(options: SearchGetReverseGeocodingParameters): StreamableMethod<SearchGetReverseGeocoding200Response | SearchGetReverseGeocodingDefaultResponse>;
75
+ }
76
+ export interface GetReverseGeocodingBatch {
77
+ /**
78
+ *
79
+ * The `Get Reverse Geocoding Batch` API is an HTTP `POST` request that sends batches of up to **100** queries to [Reverse Geocoding](/rest/api/maps/search/get-reverse-geocoding) API using a single request.
80
+ *
81
+ * ### Submit Synchronous Batch Request
82
+ * 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.
83
+ * ```
84
+ * POST https://atlas.microsoft.com/reverseGeocode:batch?api-version=2023-06-01
85
+ * ```
86
+ * ### POST Body for Batch Request
87
+ * 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:
88
+ *
89
+ *
90
+ * ```
91
+ * {
92
+ * "batchItems": [
93
+ * {
94
+ * "coordinates": [-122.128275, 47.639429],
95
+ * "resultTypes": ["Address", "PopulatedPlace"]
96
+ * },
97
+ * {
98
+ * "coordinates": [-122.341979399674, 47.6095253501216]
99
+ * }
100
+ * ]
101
+ * }
102
+ * ```
103
+ *
104
+ * A _reverse geocoding_ batchItem object can accept any of the supported _reverse geocoding_ [URI parameters](/rest/api/maps/search/get-reverse-geocoding#uri-parameters).
105
+ *
106
+ *
107
+ * The batch should contain at least **1** query.
108
+ *
109
+ *
110
+ * ### Batch Response Model
111
+ * 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:
112
+ *
113
+ * - [`GeocodingResponse`](/rest/api/maps/search/get-reverse-geocoding#geocodingresponse) - If the query completed successfully.
114
+ *
115
+ * - `Error` - If the query failed. The response will contain a `code` and a `message` in this case.
116
+ *
117
+ *
118
+ *
119
+ */
120
+ post(options: SearchGetReverseGeocodingBatchParameters): StreamableMethod<SearchGetReverseGeocodingBatch200Response | SearchGetReverseGeocodingBatchDefaultResponse>;
121
+ }
122
+ export interface Routes {
123
+ /** Resource for '/geocode' has methods for the following verbs: get */
124
+ (path: "/geocode"): GetGeocoding;
125
+ /** Resource for '/geocode:batch' has methods for the following verbs: post */
126
+ (path: "/geocode:batch"): GetGeocodingBatch;
127
+ /** Resource for '/search/polygon' has methods for the following verbs: get */
128
+ (path: "/search/polygon"): GetPolygon;
129
+ /** Resource for '/reverseGeocode' has methods for the following verbs: get */
130
+ (path: "/reverseGeocode"): GetReverseGeocoding;
131
+ /** Resource for '/reverseGeocode:batch' has methods for the following verbs: post */
132
+ (path: "/reverseGeocode:batch"): GetReverseGeocodingBatch;
133
+ }
134
+ export type MapsSearchClient = Client & {
135
+ path: Routes;
136
+ };
137
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../src/generated/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAC5B,iCAAiC,EACjC,0BAA0B,EAC1B,mCAAmC,EACnC,wCAAwC,EACzC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,EACtC,2BAA2B,EAC3B,+BAA+B,EAC/B,oCAAoC,EACpC,wCAAwC,EACxC,yCAAyC,EACzC,6CAA6C,EAC9C,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,GAAG,CACD,OAAO,CAAC,EAAE,4BAA4B,GACrC,gBAAgB,CACjB,6BAA6B,GAAG,iCAAiC,CAClE,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACH,IAAI,CACF,OAAO,EAAE,iCAAiC,GACzC,gBAAgB,CACjB,kCAAkC,GAAG,sCAAsC,CAC5E,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,GAAG,CACD,OAAO,EAAE,0BAA0B,GAClC,gBAAgB,CACjB,2BAA2B,GAAG,+BAA+B,CAC9D,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,GAAG,CACD,OAAO,EAAE,mCAAmC,GAC3C,gBAAgB,CACf,oCAAoC,GACpC,wCAAwC,CAC3C,CAAC;CACH;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,IAAI,CACF,OAAO,EAAE,wCAAwC,GAChD,gBAAgB,CACf,yCAAyC,GACzC,6CAA6C,CAChD,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB,uEAAuE;IACvE,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC;IACjC,8EAA8E;IAC9E,CAAC,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;IAC5C,8EAA8E;IAC9E,CAAC,IAAI,EAAE,iBAAiB,GAAG,UAAU,CAAC;IACtC,8EAA8E;IAC9E,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;IAC/C,qFAAqF;IACrF,CAAC,IAAI,EAAE,uBAAuB,GAAG,wBAAwB,CAAC;CAC3D;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../src/generated/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n SearchGetGeocodingParameters,\n SearchGetGeocodingBatchParameters,\n SearchGetPolygonParameters,\n SearchGetReverseGeocodingParameters,\n SearchGetReverseGeocodingBatchParameters,\n} from \"./parameters.js\";\nimport {\n SearchGetGeocoding200Response,\n SearchGetGeocodingDefaultResponse,\n SearchGetGeocodingBatch200Response,\n SearchGetGeocodingBatchDefaultResponse,\n SearchGetPolygon200Response,\n SearchGetPolygonDefaultResponse,\n SearchGetReverseGeocoding200Response,\n SearchGetReverseGeocodingDefaultResponse,\n SearchGetReverseGeocodingBatch200Response,\n SearchGetReverseGeocodingBatchDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetGeocoding {\n /**\n *\n * The `Get Geocoding` API is an HTTP `GET` request that returns the longitude and latitude coordinates of the location being searched.\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 and states. The response also returns detailed address properties such as street, postal code, municipality, and country/region information.\n */\n get(\n options?: SearchGetGeocodingParameters,\n ): StreamableMethod<\n SearchGetGeocoding200Response | SearchGetGeocodingDefaultResponse\n >;\n}\n\nexport interface GetGeocodingBatch {\n /**\n *\n * The `Get Geocoding Batch` API is an HTTP `POST` request that sends batches of up to **100** queries to the [Geocoding](/rest/api/maps/search/get-geocoding) API in a single request.\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](/rest/api/maps/search/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`](/rest/api/maps/search/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 */\n post(\n options: SearchGetGeocodingBatchParameters,\n ): StreamableMethod<\n SearchGetGeocodingBatch200Response | SearchGetGeocodingBatchDefaultResponse\n >;\n}\n\nexport interface GetPolygon {\n /**\n *\n * The `Get Polygon` API is an HTTP `GET` request that supplies polygon data of a geographical area outline such as a city or a country region.\n */\n get(\n options: SearchGetPolygonParameters,\n ): StreamableMethod<\n SearchGetPolygon200Response | SearchGetPolygonDefaultResponse\n >;\n}\n\nexport interface GetReverseGeocoding {\n /**\n *\n * The `Get Reverse Geocoding` API is an HTTP `GET` request used to translate a coordinate (example: 37.786505, -122.3862) into a human understandable street address. Useful in tracking applications where you receive a GPS feed from the device or asset and wish to know the address associated with the coordinates. This endpoint will return address information for a given coordinate.\n */\n get(\n options: SearchGetReverseGeocodingParameters,\n ): StreamableMethod<\n | SearchGetReverseGeocoding200Response\n | SearchGetReverseGeocodingDefaultResponse\n >;\n}\n\nexport interface GetReverseGeocodingBatch {\n /**\n *\n * The `Get Reverse Geocoding Batch` API is an HTTP `POST` request that sends batches of up to **100** queries to [Reverse Geocoding](/rest/api/maps/search/get-reverse-geocoding) API using a single request.\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](/rest/api/maps/search/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`](/rest/api/maps/search/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 */\n post(\n options: SearchGetReverseGeocodingBatchParameters,\n ): StreamableMethod<\n | SearchGetReverseGeocodingBatch200Response\n | SearchGetReverseGeocodingBatchDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/geocode' has methods for the following verbs: get */\n (path: \"/geocode\"): GetGeocoding;\n /** Resource for '/geocode:batch' has methods for the following verbs: post */\n (path: \"/geocode:batch\"): GetGeocodingBatch;\n /** Resource for '/search/polygon' has methods for the following verbs: get */\n (path: \"/search/polygon\"): GetPolygon;\n /** Resource for '/reverseGeocode' has methods for the following verbs: get */\n (path: \"/reverseGeocode\"): GetReverseGeocoding;\n /** Resource for '/reverseGeocode:batch' has methods for the following verbs: post */\n (path: \"/reverseGeocode:batch\"): GetReverseGeocodingBatch;\n}\n\nexport type MapsSearchClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import MapsSearchClient from "./mapsSearchClient.js";
2
+ export * from "./mapsSearchClient.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./models.js";
8
+ export * from "./outputModels.js";
9
+ export default MapsSearchClient;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,12 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import MapsSearchClient from "./mapsSearchClient.js";
4
+ export * from "./mapsSearchClient.js";
5
+ export * from "./parameters.js";
6
+ export * from "./responses.js";
7
+ export * from "./clientDefinitions.js";
8
+ export * from "./isUnexpected.js";
9
+ export * from "./models.js";
10
+ export * from "./outputModels.js";
11
+ export default MapsSearchClient;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsSearchClient from \"./mapsSearchClient.js\";\n\nexport * from \"./mapsSearchClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\n\nexport default MapsSearchClient;\n"]}
@@ -0,0 +1,7 @@
1
+ import { SearchGetGeocoding200Response, SearchGetGeocodingDefaultResponse, SearchGetGeocodingBatch200Response, SearchGetGeocodingBatchDefaultResponse, SearchGetPolygon200Response, SearchGetPolygonDefaultResponse, SearchGetReverseGeocoding200Response, SearchGetReverseGeocodingDefaultResponse, SearchGetReverseGeocodingBatch200Response, SearchGetReverseGeocodingBatchDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: SearchGetGeocoding200Response | SearchGetGeocodingDefaultResponse): response is SearchGetGeocodingDefaultResponse;
3
+ export declare function isUnexpected(response: SearchGetGeocodingBatch200Response | SearchGetGeocodingBatchDefaultResponse): response is SearchGetGeocodingBatchDefaultResponse;
4
+ export declare function isUnexpected(response: SearchGetPolygon200Response | SearchGetPolygonDefaultResponse): response is SearchGetPolygonDefaultResponse;
5
+ export declare function isUnexpected(response: SearchGetReverseGeocoding200Response | SearchGetReverseGeocodingDefaultResponse): response is SearchGetReverseGeocodingDefaultResponse;
6
+ export declare function isUnexpected(response: SearchGetReverseGeocodingBatch200Response | SearchGetReverseGeocodingBatchDefaultResponse): response is SearchGetReverseGeocodingBatchDefaultResponse;
7
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,kCAAkC,EAClC,sCAAsC,EACtC,2BAA2B,EAC3B,+BAA+B,EAC/B,oCAAoC,EACpC,wCAAwC,EACxC,yCAAyC,EACzC,6CAA6C,EAC9C,MAAM,gBAAgB,CAAC;AAUxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC;AACjD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,kCAAkC,GAClC,sCAAsC,GACzC,QAAQ,IAAI,sCAAsC,CAAC;AACtD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,2BAA2B,GAAG,+BAA+B,GACtE,QAAQ,IAAI,+BAA+B,CAAC;AAC/C,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,oCAAoC,GACpC,wCAAwC,GAC3C,QAAQ,IAAI,wCAAwC,CAAC;AACxD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,yCAAyC,GACzC,6CAA6C,GAChD,QAAQ,IAAI,6CAA6C,CAAC"}
@@ -0,0 +1,74 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ const responseMap = {
4
+ "GET /geocode": ["200"],
5
+ "POST /geocode:batch": ["200"],
6
+ "GET /search/polygon": ["200"],
7
+ "GET /reverseGeocode": ["200"],
8
+ "POST /reverseGeocode:batch": ["200"],
9
+ };
10
+ export function isUnexpected(response) {
11
+ const lroOriginal = response.headers["x-ms-original-url"];
12
+ const url = new URL(lroOriginal ?? response.request.url);
13
+ const method = response.request.method;
14
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
15
+ if (!pathDetails) {
16
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
17
+ }
18
+ return !pathDetails.includes(response.status);
19
+ }
20
+ function getParametrizedPathSuccess(method, path) {
21
+ const pathParts = path.split("/");
22
+ // Traverse list to match the longest candidate
23
+ // matchedLen: the length of candidate path
24
+ // matchedValue: the matched status code array
25
+ let matchedLen = -1, matchedValue = [];
26
+ // Iterate the responseMap to find a match
27
+ for (const [key, value] of Object.entries(responseMap)) {
28
+ // Extracting the path from the map key which is in format
29
+ // GET /path/foo
30
+ if (!key.startsWith(method)) {
31
+ continue;
32
+ }
33
+ const candidatePath = getPathFromMapKey(key);
34
+ // Get each part of the url path
35
+ const candidateParts = candidatePath.split("/");
36
+ // track if we have found a match to return the values found.
37
+ let found = true;
38
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
39
+ if (candidateParts[i]?.startsWith("{") &&
40
+ candidateParts[i]?.indexOf("}") !== -1) {
41
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
42
+ // If the current part of the candidate is a "template" part
43
+ // Try to use the suffix of pattern to match the path
44
+ // {guid} ==> $
45
+ // {guid}:export ==> :export$
46
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
47
+ if (!isMatched) {
48
+ found = false;
49
+ break;
50
+ }
51
+ continue;
52
+ }
53
+ // If the candidate part is not a template and
54
+ // the parts don't match mark the candidate as not found
55
+ // to move on with the next candidate path.
56
+ if (candidateParts[i] !== pathParts[j]) {
57
+ found = false;
58
+ break;
59
+ }
60
+ }
61
+ // We finished evaluating the current candidate parts
62
+ // Update the matched value if and only if we found the longer pattern
63
+ if (found && candidatePath.length > matchedLen) {
64
+ matchedLen = candidatePath.length;
65
+ matchedValue = value;
66
+ }
67
+ }
68
+ return matchedValue;
69
+ }
70
+ function getPathFromMapKey(mapKey) {
71
+ const pathStart = mapKey.indexOf("/");
72
+ return mapKey.slice(pathStart);
73
+ }
74
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,MAAM,WAAW,GAA6B;IAC5C,cAAc,EAAE,CAAC,KAAK,CAAC;IACvB,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAC9B,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAC9B,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAC9B,4BAA4B,EAAE,CAAC,KAAK,CAAC;CACtC,CAAC;AAuBF,MAAM,UAAU,YAAY,CAC1B,QAUiD;IAOjD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAc,EAAE,IAAY;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,+CAA+C;IAC/C,2CAA2C;IAC3C,8CAA8C;IAC9C,IAAI,UAAU,GAAG,CAAC,CAAC,EACjB,YAAY,GAAa,EAAE,CAAC;IAE9B,0CAA0C;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,0DAA0D;QAC1D,gBAAgB;QAChB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QACD,MAAM,aAAa,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC7C,gCAAgC;QAChC,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEhD,6DAA6D;QAC7D,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,KACE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAC3D,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAChB,CAAC,EAAE,EAAE,CAAC,EAAE,EACR,CAAC;YACD,IACE,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC;gBAClC,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EACtC,CAAC;gBACD,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAC1B,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAC1C,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAE3B,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n SearchGetGeocoding200Response,\n SearchGetGeocodingDefaultResponse,\n SearchGetGeocodingBatch200Response,\n SearchGetGeocodingBatchDefaultResponse,\n SearchGetPolygon200Response,\n SearchGetPolygonDefaultResponse,\n SearchGetReverseGeocoding200Response,\n SearchGetReverseGeocodingDefaultResponse,\n SearchGetReverseGeocodingBatch200Response,\n SearchGetReverseGeocodingBatchDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /geocode\": [\"200\"],\n \"POST /geocode:batch\": [\"200\"],\n \"GET /search/polygon\": [\"200\"],\n \"GET /reverseGeocode\": [\"200\"],\n \"POST /reverseGeocode:batch\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: SearchGetGeocoding200Response | SearchGetGeocodingDefaultResponse,\n): response is SearchGetGeocodingDefaultResponse;\nexport function isUnexpected(\n response:\n | SearchGetGeocodingBatch200Response\n | SearchGetGeocodingBatchDefaultResponse,\n): response is SearchGetGeocodingBatchDefaultResponse;\nexport function isUnexpected(\n response: SearchGetPolygon200Response | SearchGetPolygonDefaultResponse,\n): response is SearchGetPolygonDefaultResponse;\nexport function isUnexpected(\n response:\n | SearchGetReverseGeocoding200Response\n | SearchGetReverseGeocodingDefaultResponse,\n): response is SearchGetReverseGeocodingDefaultResponse;\nexport function isUnexpected(\n response:\n | SearchGetReverseGeocodingBatch200Response\n | SearchGetReverseGeocodingBatchDefaultResponse,\n): response is SearchGetReverseGeocodingBatchDefaultResponse;\nexport function isUnexpected(\n response:\n | SearchGetGeocoding200Response\n | SearchGetGeocodingDefaultResponse\n | SearchGetGeocodingBatch200Response\n | SearchGetGeocodingBatchDefaultResponse\n | SearchGetPolygon200Response\n | SearchGetPolygonDefaultResponse\n | SearchGetReverseGeocoding200Response\n | SearchGetReverseGeocodingDefaultResponse\n | SearchGetReverseGeocodingBatch200Response\n | SearchGetReverseGeocodingBatchDefaultResponse,\n): response is\n | SearchGetGeocodingDefaultResponse\n | SearchGetGeocodingBatchDefaultResponse\n | SearchGetPolygonDefaultResponse\n | SearchGetReverseGeocodingDefaultResponse\n | SearchGetReverseGeocodingBatchDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAoC,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createClientLogger } from "@azure/logger";
4
+ export const logger = createClientLogger("maps-search");
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"maps-search\");\n"]}
@@ -0,0 +1,15 @@
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { KeyCredential } from "@azure/core-auth";
3
+ import { MapsSearchClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface MapsSearchClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `MapsSearchClient`
11
+ * @param credentials - uniquely identify client credential
12
+ * @param options - the parameter for all optional parameters
13
+ */
14
+ export default function createClient(credentials: KeyCredential, { apiVersion, ...options }?: MapsSearchClientOptions): MapsSearchClient;
15
+ //# sourceMappingURL=mapsSearchClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsSearchClient.d.ts","sourceRoot":"","sources":["../../../src/generated/mapsSearchClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,6CAA6C;AAC7C,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAAW,EAAE,aAAa,EAC1B,EAAE,UAAyB,EAAE,GAAG,OAAO,EAAE,GAAE,uBAA4B,GACtE,gBAAgB,CA6ClB"}
@@ -0,0 +1,44 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { getClient } from "@azure-rest/core-client";
4
+ import { logger } from "./logger.js";
5
+ /**
6
+ * Initialize a new instance of `MapsSearchClient`
7
+ * @param credentials - uniquely identify client credential
8
+ * @param options - the parameter for all optional parameters
9
+ */
10
+ export default function createClient(credentials, { apiVersion = "2023-06-01", ...options } = {}) {
11
+ const endpointUrl = options.endpoint ?? options.baseUrl ?? `https://atlas.microsoft.com`;
12
+ const userAgentInfo = `azsdk-js-maps-search-rest/2.0.0-beta.2`;
13
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
14
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
15
+ : `${userAgentInfo}`;
16
+ options = {
17
+ ...options,
18
+ userAgentOptions: {
19
+ userAgentPrefix,
20
+ },
21
+ loggingOptions: {
22
+ logger: options.loggingOptions?.logger ?? logger.info,
23
+ },
24
+ credentials: {
25
+ apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? "subscription-key",
26
+ },
27
+ };
28
+ const client = getClient(endpointUrl, credentials, options);
29
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
30
+ client.pipeline.addPolicy({
31
+ name: "ClientApiVersionPolicy",
32
+ sendRequest: (req, next) => {
33
+ // Use the apiVersion defined in request url directly
34
+ // Append one if there is no apiVersion and we have one at client options
35
+ const url = new URL(req.url);
36
+ if (!url.searchParams.get("api-version") && apiVersion) {
37
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
38
+ }
39
+ return next(req);
40
+ },
41
+ });
42
+ return client;
43
+ }
44
+ //# sourceMappingURL=mapsSearchClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsSearchClient.js","sourceRoot":"","sources":["../../../src/generated/mapsSearchClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAA0B,EAC1B,EAAE,UAAU,GAAG,YAAY,EAAE,GAAG,OAAO,KAA8B,EAAE;IAEvE,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,6BAA6B,CAAC;IACvE,MAAM,aAAa,GAAG,wCAAwC,CAAC;IAC/D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,GAAG;QACR,GAAG,OAAO;QACV,gBAAgB,EAAE;YAChB,eAAe;SAChB;QACD,cAAc,EAAE;YACd,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI;SACtD;QACD,WAAW,EAAE;YACX,gBAAgB,EACd,OAAO,CAAC,WAAW,EAAE,gBAAgB,IAAI,kBAAkB;SAC9D;KACF,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,CACtB,WAAW,EACX,WAAW,EACX,OAAO,CACY,CAAC;IAEtB,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { MapsSearchClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface MapsSearchClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MapsSearchClient`\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n credentials: KeyCredential,\n { apiVersion = \"2023-06-01\", ...options }: MapsSearchClientOptions = {},\n): MapsSearchClient {\n const endpointUrl =\n options.endpoint ?? options.baseUrl ?? `https://atlas.microsoft.com`;\n const userAgentInfo = `azsdk-js-maps-search-rest/2.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"subscription-key\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MapsSearchClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
@@ -0,0 +1,97 @@
1
+ /** 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. */
2
+ export interface GeocodingBatchRequestBody {
3
+ /** The list of queries to process. */
4
+ batchItems?: Array<GeocodingBatchRequestItem>;
5
+ }
6
+ /** Batch Query object */
7
+ export interface GeocodingBatchRequestItem {
8
+ /** id of the request which would show in corresponding batchItem */
9
+ optionalId?: string;
10
+ /** Maximum number of responses that will be returned. Default: 5, minimum: 1 and maximum: 20. */
11
+ top?: number;
12
+ /** A string that contains information about a location, such as an address or landmark name. */
13
+ query?: string;
14
+ /**
15
+ * 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.
16
+ *
17
+ * **If query is given, should not use this parameter.**
18
+ */
19
+ addressLine?: string;
20
+ /**
21
+ * Signal for 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./
22
+ *
23
+ * **If query is given, should not use this parameter.**
24
+ */
25
+ countryRegion?: string;
26
+ /**
27
+ * A rectangular area on the earth defined as a bounding box object. The sides of the rectangles are defined by longitude and latitude values. For more information, see Location and Area Types. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.
28
+ *
29
+ * Example: [lon1, lat1, lon2, lat2]
30
+ */
31
+ bbox?: Array<number>;
32
+ /** A string that specifies 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. */
33
+ view?: string;
34
+ /** 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: [lon, lat] */
35
+ coordinates?: Array<number>;
36
+ /**
37
+ * The country subdivision portion of an address, such as WA.
38
+ *
39
+ * **If query is given, should not use this parameter.**
40
+ */
41
+ adminDistrict?: string;
42
+ /**
43
+ * The county for the structured address, such as King.
44
+ *
45
+ * **If query is given, should not use this parameter.**
46
+ */
47
+ adminDistrict2?: string;
48
+ /**
49
+ * The named area for the structured address.
50
+ *
51
+ * **If query is given, should not use this parameter.**
52
+ */
53
+ adminDistrict3?: string;
54
+ /**
55
+ * The locality portion of an address, such as Seattle.
56
+ *
57
+ * **If query is given, should not use this parameter.**
58
+ */
59
+ locality?: string;
60
+ /**
61
+ * The postal code portion of an address.
62
+ *
63
+ * **If query is given, should not use this parameter.**
64
+ */
65
+ postalCode?: string;
66
+ }
67
+ /** 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. */
68
+ export interface ReverseGeocodingBatchRequestBody {
69
+ /** The list of queries to process. */
70
+ batchItems?: Array<ReverseGeocodingBatchRequestItem>;
71
+ }
72
+ /** Batch Query object */
73
+ export interface ReverseGeocodingBatchRequestItem {
74
+ /** id of the request which would show in corresponding batchItem */
75
+ optionalId?: string;
76
+ /** The coordinates of the location that you want to reverse geocode. Example: [lon,lat] */
77
+ coordinates?: Array<number>;
78
+ /**
79
+ * 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.
80
+ * Default value is all possible entities.
81
+ * A comma separated list of entity types selected from the following options.
82
+ *
83
+ * - Address
84
+ * - Neighborhood
85
+ * - PopulatedPlace
86
+ * - Postcode1
87
+ * - AdminDivision1
88
+ * - AdminDivision2
89
+ * - CountryRegion
90
+ *
91
+ * 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.
92
+ */
93
+ resultTypes?: Array<"Address" | "Neighborhood" | "PopulatedPlace" | "Postcode1" | "AdminDivision1" | "AdminDivision2" | "CountryRegion">;
94
+ /** A string that specifies 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. */
95
+ view?: string;
96
+ }
97
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAGA,8IAA8I;AAC9I,MAAM,WAAW,yBAAyB;IACxC,sCAAsC;IACtC,UAAU,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;CAC/C;AAED,yBAAyB;AACzB,MAAM,WAAW,yBAAyB;IACxC,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iGAAiG;IACjG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,+NAA+N;IAC/N,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4NAA4N;IAC5N,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,8IAA8I;AAC9I,MAAM,WAAW,gCAAgC;IAC/C,sCAAsC;IACtC,UAAU,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;CACtD;AAED,yBAAyB;AACzB,MAAM,WAAW,gCAAgC;IAC/C,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B;;;;;;;;;;;;;;OAcG;IACH,WAAW,CAAC,EAAE,KAAK,CACf,SAAS,GACT,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,CAClB,CAAC;IACF,+NAA+N;IAC/N,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\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. */\nexport interface GeocodingBatchRequestBody {\n /** The list of queries to process. */\n batchItems?: Array<GeocodingBatchRequestItem>;\n}\n\n/** Batch Query object */\nexport interface GeocodingBatchRequestItem {\n /** id of the request which would show in corresponding batchItem */\n optionalId?: string;\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 * Signal for 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./\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. For more information, see Location and Area Types. 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 /** A string that specifies 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. */\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: [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\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. */\nexport interface ReverseGeocodingBatchRequestBody {\n /** The list of queries to process. */\n batchItems?: Array<ReverseGeocodingBatchRequestItem>;\n}\n\n/** Batch Query object */\nexport interface ReverseGeocodingBatchRequestItem {\n /** id of the request which would show in corresponding batchItem */\n optionalId?: string;\n /** The coordinates of the location that you want to reverse geocode. Example: [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 /** A string that specifies 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. */\n view?: string;\n}\n"]}