@tileflow/search 0.1.0-alpha.4 → 0.1.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,14 +11,43 @@ selected-place resolution. It uses `fetch` and has no renderer or global interac
11
11
  npm install @tileflow/search@alpha
12
12
  ```
13
13
 
14
- Use Node.js 22 or another runtime with `fetch`. Live requests require enabled Tileflow Search and a
15
- Team credential with `geocoding:read`. Keep privileged credentials on your application server.
16
- Browser and mobile interfaces call their own authorized server endpoint.
14
+ Use Node.js 22, a browser or another runtime with `fetch`. Live requests require enabled Tileflow
15
+ Search and a Team credential with `geocoding:read`: a publishable credential in websites and apps,
16
+ or a server credential on your server.
17
17
 
18
- Managed operations require paid Starter or a separate, finite Search evaluation grant. A Starter
19
- trial or complimentary assignment alone does not authorize Search. Free Teams can read categories.
18
+ Free Teams, Starter trials and complimentary access run Search within their period's API units, up
19
+ to 100,000 Search units, while Search without payment is open; a finite evaluation grant can extend
20
+ them. Paid Starter runs Search within its shared API allowance and excess.
20
21
  Installing this package does not enable the service or grant access.
21
22
 
23
+ ## Call Search from a browser or app
24
+
25
+ A publishable credential (`tf_public_…`) is meant to be visible in client code. It grants Search
26
+ only, works only from the websites and native apps listed for it, and always carries per-minute and
27
+ per-day quotas. A Team Admin creates one under **Credentials** in the Tileflow dashboard.
28
+
29
+ ```ts
30
+ import {autocomplete} from '@tileflow/search';
31
+
32
+ const options = {apiKey: 'tf_public_…'};
33
+ const page = await autocomplete({query: 'Hospital La Paz', proximity: [-3.7, 40.42]}, options);
34
+ ```
35
+
36
+ Browsers send the page's origin, which must match one of the credential's websites exactly: scheme,
37
+ host and port. Native apps send no origin, so name the app instead. The SDK then sends its bundle ID
38
+ or package name and, on Android, the SHA-256 fingerprint of its signing certificate:
39
+
40
+ ```ts
41
+ const options = {
42
+ apiKey: 'tf_public_…',
43
+ app: {id: 'com.example.store', certificateSha256: '14:6D:E9:…'},
44
+ };
45
+ ```
46
+
47
+ Anyone can read a publishable credential and imitate an origin or app outside a browser, so these
48
+ restrictions limit casual reuse rather than prove identity. Its quotas and the Team's spending limit
49
+ bound what a copied credential can consume. Keep server credentials (`tf_live_…`) on your server.
50
+
22
51
  ## Find nearby places
23
52
 
24
53
  Run this example on your server with `TILEFLOW_API_KEY` set securely. It lists the current categories,
@@ -63,7 +92,7 @@ are temporary. Do not build a permanent place catalog, cache results, or persist
63
92
 
64
93
  Save the original request in the current interaction. Another page repeats that request with the
65
94
  returned `nextCursor`; no page is fetched automatically. A successful empty page can have a cursor.
66
- Each explicit page costs 25 API units. There is no total-count or snapshot-consistency promise.
95
+ Each explicit page costs 10 API units. There is no total-count or snapshot-consistency promise.
67
96
 
68
97
  <!-- docs:check -->
69
98
 
@@ -116,7 +145,7 @@ suggestion. Reverse results are candidates in provider order, without containmen
116
145
  precision, routability, deliverability or address-validation guarantees.
117
146
 
118
147
  To show positions, distances and categories while someone types, ask for each suggestion's place.
119
- A completed request then uses 25 units instead of 10, and choosing a suggestion needs no further
148
+ A completed request then uses 10 units instead of 4, and choosing a suggestion needs no further
120
149
  resolution:
121
150
 
122
151
  <!-- docs:check -->
@@ -186,7 +215,8 @@ describes the moment of the request. Like every result, details are for temporar
186
215
 
187
216
  Forward/autocomplete text accepts 1–200 characters. Their limit defaults to 5 and accepts 1–10;
188
217
  reverse defaults to 1 and accepts 1–10. Reverse kinds are an OR of `address`, `street`, `locality`
189
- and `place`. Forward/autocomplete `bounds` and `proximity` are mutually exclusive.
218
+ and `place`. Forward/autocomplete `proximity` biases ranking and `bounds` restricts results; they
219
+ are mutually exclusive.
190
220
 
191
221
  Nearby requires `position`, defaults to 20 results and accepts 1–100. Optional `radiusMeters` accepts
192
222
  1–21,000,000. A bbox is `[west, south, east, north]`, with west < east and south < north; wrapping
@@ -211,28 +241,34 @@ retention, Advanced features and caller-selected provider options are rejected b
211
241
  | Completed operation | Shared API units | With `include` |
212
242
  | ------------------------------------- | ---------------: | -------------: |
213
243
  | Category discovery | 0 | — |
214
- | Autocomplete | 10 | 25 |
215
- | Forward, reverse, explicit resolution | 25 | 75 |
216
- | Each Nearby page | 25 | 75 |
244
+ | Autocomplete | 4 | 10 |
245
+ | Forward, reverse, explicit resolution | 10 | 30 |
246
+ | Each Nearby page | 10 | 30 |
217
247
 
218
248
  `searchOperationUnits(operation, include)` returns the same weights. Valid empty responses consume
219
- the same units. Three autocomplete calls and one resolution consume 55 units. These are part of Starter's shared API allowance, with no separate Search credits or
249
+ the same units. Three autocomplete calls and one resolution consume 22 units. These are part of Starter's shared API allowance, with no separate Search credits or
220
250
  commercial search session. Hovering, displaying results and moving a map do not call Search.
221
251
 
222
252
  `GeocodingError` exposes `status`, nullable `code`, nullable `requestId` and nullable bounded
223
253
  `retryAfterSeconds`. The client never retries, including after throttling. Use `signal` for
224
254
  cancellation. Network failures can leave server completion uncertain.
225
255
 
226
- | Code | Action |
227
- | ---------------------------------------------------------------- | ------------------------------------------------------------------- |
228
- | `GEOCODING_PLAN_UNAVAILABLE` | Use paid Starter or request an eligible evaluation. |
229
- | `GEOCODING_EVALUATION_REQUIRED` / `GEOCODING_EVALUATION_EXPIRED` | Ask the Team's operator to review evaluation access. |
230
- | `GEOCODING_EVALUATION_EXHAUSTED` | Stop requests; review evaluation limits. |
231
- | `GEOCODING_PICK_LIMIT_EXCEEDED` / `GEOCODING_UPSTREAM_THROTTLED` | Respect `retryAfterSeconds`; retry only deliberately. |
232
- | `GEOCODING_INVALID_CURSOR` / `GEOCODING_INVALID_SUGGESTION` | Check the Team and original query; start a fresh search explicitly. |
233
- | `GEOCODING_CURSOR_EXPIRED` / `GEOCODING_SUGGESTION_EXPIRED` | Request fresh results explicitly. |
234
- | `GEOCODING_USAGE_UNCONFIRMED` | Completion may already be charged. Inspect usage before repeating. |
235
- | `GEOCODING_DISABLED` | Search is disabled; installation does not activate it. |
256
+ | Code | Action |
257
+ | ---------------------------------------------------------------- | --------------------------------------------------------------------- |
258
+ | `GEOCODING_PLAN_UNAVAILABLE` | Use paid Starter or request an eligible evaluation. |
259
+ | `GEOCODING_EVALUATION_REQUIRED` / `GEOCODING_EVALUATION_EXPIRED` | Ask the Team's operator to review evaluation access. |
260
+ | `GEOCODING_EVALUATION_EXHAUSTED` | Stop requests; review evaluation limits. |
261
+ | `GEOCODING_UNPAID_LIMIT_REACHED` | Search without payment reached its period limit; upgrade to Starter. |
262
+ | `GEOCODING_UNPAID_BUDGET_EXHAUSTED` | Search without payment is paused; retry after `retryAfterSeconds`. |
263
+ | `GEOCODING_SUSPENDED` | Search is suspended for the Team; contact support. |
264
+ | `GEOCODING_SPENDING_LIMIT_REACHED` | The Team reached its spending limit; raise it or wait for the period. |
265
+ | `GEOCODING_CREDENTIAL_QUOTA_EXCEEDED` | The credential reached its quota; respect `retryAfterSeconds`. |
266
+ | `GEOCODING_ORIGIN_NOT_ALLOWED` | Add this website or app to the publishable credential. |
267
+ | `GEOCODING_PICK_LIMIT_EXCEEDED` / `GEOCODING_UPSTREAM_THROTTLED` | Respect `retryAfterSeconds`; retry only deliberately. |
268
+ | `GEOCODING_INVALID_CURSOR` / `GEOCODING_INVALID_SUGGESTION` | Check the Team and original query; start a fresh search explicitly. |
269
+ | `GEOCODING_CURSOR_EXPIRED` / `GEOCODING_SUGGESTION_EXPIRED` | Request fresh results explicitly. |
270
+ | `GEOCODING_USAGE_UNCONFIRMED` | Completion may already be charged. Inspect usage before repeating. |
271
+ | `GEOCODING_DISABLED` | Search is disabled; installation does not activate it. |
236
272
 
237
273
  Rejected or failed operations do not return a completed usage record. Never translate an unconfirmed
238
274
  completion into zero units. Confirmed server completion is not undone by a later disconnection.
@@ -252,10 +288,16 @@ touch/click explicitly selects it, and Escape dismisses it. Give the input a lab
252
288
  and active-option semantics, and announce loading, empty results and errors through a polite status
253
289
  region. Preserve attribution beside displayed results. Do not resolve on hover or focus changes.
254
290
 
291
+ Text search over a map should favor the view without being confined to it. Send the map's centre as
292
+ `proximity` while it shows a city or closer, and omit it at country or world scale; nearer matches
293
+ then rank first, and a better match elsewhere, such as the city of Madrid typed over Lisbon, still
294
+ appears. `bounds` excludes everything outside the box, so do not derive it from the view for typed
295
+ search.
296
+
255
297
  An explicit category action can call Nearby. Moving a map offers a “Search this area” button; only
256
298
  pressing it submits the new bounds. A late reply must not move the camera after a newer selection or
257
299
  view change. Keep independent generations for independent widgets. The SDK's tests demonstrate
258
- cancellation and stale-suggestion handling; it does not supply a UI component or client credentials.
300
+ cancellation and stale-suggestion handling; it does not supply a UI component.
259
301
 
260
302
  For a published package, its installed README and declarations describe that release; a link to
261
303
  GitHub `main` can describe newer source.
@@ -13,7 +13,7 @@ import {
13
13
  searchCategoriesResponseSchema,
14
14
  searchContactDetails,
15
15
  searchOperationUnits
16
- } from "./chunk-W66J2DAS.js";
16
+ } from "./chunk-W7IIJLOI.js";
17
17
 
18
18
  // src/client.ts
19
19
  import { z } from "zod";
@@ -29,11 +29,17 @@ var GEOCODING_ERROR_CODES = [
29
29
  "GEOCODING_DISABLED",
30
30
  "GEOCODING_INVALID_REQUEST",
31
31
  "GEOCODING_INVALID_SUGGESTION",
32
+ "GEOCODING_ORIGIN_NOT_ALLOWED",
32
33
  "GEOCODING_PICK_LIMIT_EXCEEDED",
33
34
  "GEOCODING_QUOTA_EXCEEDED",
34
35
  "GEOCODING_REQUEST_TOO_LARGE",
36
+ "GEOCODING_SPENDING_LIMIT_REACHED",
37
+ "GEOCODING_CREDENTIAL_QUOTA_EXCEEDED",
35
38
  "GEOCODING_SUGGESTION_EXPIRED",
39
+ "GEOCODING_SUSPENDED",
36
40
  "GEOCODING_UNAVAILABLE",
41
+ "GEOCODING_UNPAID_BUDGET_EXHAUSTED",
42
+ "GEOCODING_UNPAID_LIMIT_REACHED",
37
43
  "GEOCODING_UPSTREAM_INVALID",
38
44
  "GEOCODING_UPSTREAM_THROTTLED",
39
45
  "GEOCODING_UPSTREAM_TIMEOUT",
@@ -52,11 +58,17 @@ var geocodingErrorStatuses = {
52
58
  GEOCODING_DISABLED: 503,
53
59
  GEOCODING_INVALID_REQUEST: 400,
54
60
  GEOCODING_INVALID_SUGGESTION: 400,
61
+ GEOCODING_ORIGIN_NOT_ALLOWED: 403,
55
62
  GEOCODING_PICK_LIMIT_EXCEEDED: 429,
56
63
  GEOCODING_QUOTA_EXCEEDED: 429,
57
64
  GEOCODING_REQUEST_TOO_LARGE: 413,
65
+ GEOCODING_SPENDING_LIMIT_REACHED: 429,
66
+ GEOCODING_CREDENTIAL_QUOTA_EXCEEDED: 429,
58
67
  GEOCODING_SUGGESTION_EXPIRED: 410,
68
+ GEOCODING_SUSPENDED: 403,
59
69
  GEOCODING_UNAVAILABLE: 503,
70
+ GEOCODING_UNPAID_BUDGET_EXHAUSTED: 429,
71
+ GEOCODING_UNPAID_LIMIT_REACHED: 429,
60
72
  GEOCODING_UPSTREAM_INVALID: 502,
61
73
  GEOCODING_UPSTREAM_THROTTLED: 429,
62
74
  GEOCODING_UPSTREAM_TIMEOUT: 504,
@@ -183,6 +195,7 @@ async function requestGeocoding(path, request, options, responseSchema, isExpect
183
195
  if (bodyText && new TextEncoder().encode(bodyText).byteLength > maximumRequestBytes)
184
196
  throw new Error("Tileflow Search request is too large");
185
197
  const apiKey = normalizeApiKey(options.apiKey);
198
+ const app = normalizeApp(options.app);
186
199
  const apiUrl = normalizeApiUrl(options.apiUrl ?? "https://api.tileflow.dev");
187
200
  const fetcher = options.fetch ?? fetch;
188
201
  let response;
@@ -192,7 +205,9 @@ async function requestGeocoding(path, request, options, responseSchema, isExpect
192
205
  headers: {
193
206
  Accept: "application/json",
194
207
  Authorization: `Bearer ${apiKey}`,
195
- "Content-Type": "application/json"
208
+ "Content-Type": "application/json",
209
+ ...app ? { "X-Tileflow-App": app.id } : {},
210
+ ...app?.certificateSha256 ? { "X-Tileflow-App-Certificate": app.certificateSha256 } : {}
196
211
  },
197
212
  method: request === void 0 ? "GET" : "POST",
198
213
  redirect: "error",
@@ -239,6 +254,14 @@ function containsOnlyKinds(response, allowedKinds) {
239
254
  const kindFilter = new Set(allowedKinds);
240
255
  return response.results.every(({ kind }) => kindFilter.has(kind));
241
256
  }
257
+ function normalizeApp(value) {
258
+ if (value === void 0) return null;
259
+ const certificate = value?.certificateSha256?.replaceAll(":", "").toLowerCase();
260
+ if (typeof value?.id !== "string" || value.id.length > 255 || !/^[A-Za-z][A-Za-z0-9_-]*(\.[A-Za-z0-9_-]+)+$/u.test(value.id) || certificate !== void 0 && !/^[0-9a-f]{64}$/u.test(certificate)) {
261
+ throw new Error("Invalid Tileflow app identity");
262
+ }
263
+ return { id: value.id, certificateSha256: certificate };
264
+ }
242
265
  function normalizeApiKey(value) {
243
266
  if (typeof value !== "string" || value.length < 1 || value.length > 4096 || value !== value.trim() || /\p{Cc}/u.test(value)) {
244
267
  throw new Error("Invalid Tileflow API key");
@@ -158,7 +158,7 @@ var geocodingAttributionSchema = z.object({
158
158
  message: "Expected an HTTPS URL without credentials"
159
159
  }).optional()
160
160
  }).strict();
161
- var placeOperationUnitsSchema = z.union([z.literal(25), z.literal(75)]);
161
+ var placeOperationUnitsSchema = z.union([z.literal(10), z.literal(30)]);
162
162
  var geocodingForwardResponseSchema = z.object({
163
163
  attribution: z.array(geocodingAttributionSchema).min(1).max(geocodingLimits.maximumAttributionEntries),
164
164
  queryId: z.string().regex(queryIdPattern),
@@ -180,7 +180,7 @@ var autocompleteResponseSchema = z.object({
180
180
  schemaVersion: z.literal(1),
181
181
  source: geocodingSourceSchema,
182
182
  suggestions: z.array(geocodingSuggestionSchema).max(geocodingLimits.maximumLimit),
183
- usage: z.object({ units: z.union([z.literal(10), z.literal(25)]) }).strict()
183
+ usage: z.object({ units: z.union([z.literal(4), z.literal(10)]) }).strict()
184
184
  }).strict();
185
185
  var resolveSuggestionRequestSchema = z.object({
186
186
  include: searchPlaceDetailsSchema.optional(),
@@ -256,8 +256,8 @@ var resolvePlaceResponseSchema = resolveSuggestionResponseSchema;
256
256
  var searchContactDetails = ["contacts", "openingHours"];
257
257
  function searchOperationUnits(operation, include) {
258
258
  if (operation === "categories") return 0;
259
- if (operation === "autocomplete") return include?.length ? 25 : 10;
260
- return include?.length ? 75 : 25;
259
+ if (operation === "autocomplete") return include?.length ? 10 : 4;
260
+ return include?.length ? 30 : 10;
261
261
  }
262
262
 
263
263
  export {
package/dist/client.d.ts CHANGED
@@ -1,11 +1,19 @@
1
1
  import { AutocompleteRequest, AutocompleteResponse, GeocodingForwardRequest, GeocodingForwardResponse, GeocodingReverseRequest, GeocodingReverseResponse, SearchCategoriesResponse, ResolveSuggestionRequest, ResolveSuggestionResponse, NearbyRequest, NearbyResponse } from './contract.js';
2
2
  import 'zod';
3
3
 
4
- declare const GEOCODING_ERROR_CODES: readonly ["GEOCODING_FILTER_UNSUPPORTED", "GEOCODING_PLAN_UNAVAILABLE", "GEOCODING_EVALUATION_REQUIRED", "GEOCODING_EVALUATION_EXPIRED", "GEOCODING_EVALUATION_EXHAUSTED", "GEOCODING_INVALID_CURSOR", "GEOCODING_CURSOR_EXPIRED", "GEOCODING_ABORTED", "GEOCODING_DISABLED", "GEOCODING_INVALID_REQUEST", "GEOCODING_INVALID_SUGGESTION", "GEOCODING_PICK_LIMIT_EXCEEDED", "GEOCODING_QUOTA_EXCEEDED", "GEOCODING_REQUEST_TOO_LARGE", "GEOCODING_SUGGESTION_EXPIRED", "GEOCODING_UNAVAILABLE", "GEOCODING_UPSTREAM_INVALID", "GEOCODING_UPSTREAM_THROTTLED", "GEOCODING_UPSTREAM_TIMEOUT", "GEOCODING_UPSTREAM_UNAVAILABLE", "GEOCODING_USAGE_UNCONFIRMED"];
4
+ declare const GEOCODING_ERROR_CODES: readonly ["GEOCODING_FILTER_UNSUPPORTED", "GEOCODING_PLAN_UNAVAILABLE", "GEOCODING_EVALUATION_REQUIRED", "GEOCODING_EVALUATION_EXPIRED", "GEOCODING_EVALUATION_EXHAUSTED", "GEOCODING_INVALID_CURSOR", "GEOCODING_CURSOR_EXPIRED", "GEOCODING_ABORTED", "GEOCODING_DISABLED", "GEOCODING_INVALID_REQUEST", "GEOCODING_INVALID_SUGGESTION", "GEOCODING_ORIGIN_NOT_ALLOWED", "GEOCODING_PICK_LIMIT_EXCEEDED", "GEOCODING_QUOTA_EXCEEDED", "GEOCODING_REQUEST_TOO_LARGE", "GEOCODING_SPENDING_LIMIT_REACHED", "GEOCODING_CREDENTIAL_QUOTA_EXCEEDED", "GEOCODING_SUGGESTION_EXPIRED", "GEOCODING_SUSPENDED", "GEOCODING_UNAVAILABLE", "GEOCODING_UNPAID_BUDGET_EXHAUSTED", "GEOCODING_UNPAID_LIMIT_REACHED", "GEOCODING_UPSTREAM_INVALID", "GEOCODING_UPSTREAM_THROTTLED", "GEOCODING_UPSTREAM_TIMEOUT", "GEOCODING_UPSTREAM_UNAVAILABLE", "GEOCODING_USAGE_UNCONFIRMED"];
5
5
  type GeocodingErrorCode = (typeof GEOCODING_ERROR_CODES)[number];
6
6
  type GeocodeOptions = Readonly<{
7
7
  apiKey: string;
8
8
  apiUrl?: string;
9
+ /**
10
+ * The native app a publishable credential admits: its iOS bundle ID, or its Android package name
11
+ * with the SHA-256 fingerprint of its signing certificate. Browsers send their origin instead.
12
+ */
13
+ app?: Readonly<{
14
+ id: string;
15
+ certificateSha256?: string;
16
+ }>;
9
17
  fetch?: typeof fetch;
10
18
  signal?: AbortSignal;
11
19
  }>;
package/dist/client.js CHANGED
@@ -8,8 +8,8 @@ import {
8
8
  resolvePlace,
9
9
  resolveSuggestion,
10
10
  searchNearby
11
- } from "./chunk-QDEMNVJD.js";
12
- import "./chunk-W66J2DAS.js";
11
+ } from "./chunk-7PHOZFMS.js";
12
+ import "./chunk-W7IIJLOI.js";
13
13
  export {
14
14
  GEOCODING_ERROR_CODES,
15
15
  GeocodingError,
@@ -183,6 +183,49 @@ declare const searchPlaceDetailFields: {
183
183
  }, z.core.$strict>>>;
184
184
  };
185
185
  declare const geocodingResultSchema: z.ZodObject<{
186
+ name: z.ZodOptional<z.ZodString>;
187
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
188
+ id: z.ZodString;
189
+ name: z.ZodString;
190
+ localizedName: z.ZodOptional<z.ZodString>;
191
+ primary: z.ZodOptional<z.ZodBoolean>;
192
+ }, z.core.$strict>>>;
193
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
194
+ id: z.ZodString;
195
+ name: z.ZodString;
196
+ localizedName: z.ZodOptional<z.ZodString>;
197
+ primary: z.ZodOptional<z.ZodBoolean>;
198
+ }, z.core.$strict>>>;
199
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
200
+ id: z.ZodString;
201
+ name: z.ZodString;
202
+ }, z.core.$strict>>>;
203
+ distanceMeters: z.ZodOptional<z.ZodNumber>;
204
+ contacts: z.ZodOptional<z.ZodObject<{
205
+ phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
+ value: z.ZodString;
207
+ label: z.ZodOptional<z.ZodString>;
208
+ }, z.core.$strict>>>;
209
+ websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
210
+ value: z.ZodString;
211
+ label: z.ZodOptional<z.ZodString>;
212
+ }, z.core.$strict>>>;
213
+ emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
214
+ value: z.ZodString;
215
+ label: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strict>>>;
217
+ }, z.core.$strict>>;
218
+ openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
219
+ display: z.ZodOptional<z.ZodArray<z.ZodString>>;
220
+ openNow: z.ZodOptional<z.ZodBoolean>;
221
+ }, z.core.$strict>>>;
222
+ timeZone: z.ZodOptional<z.ZodObject<{
223
+ name: z.ZodString;
224
+ utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
225
+ }, z.core.$strict>>;
226
+ accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
227
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
228
+ }, z.core.$strict>>>;
186
229
  address: z.ZodObject<{
187
230
  city: z.ZodOptional<z.ZodString>;
188
231
  country: z.ZodOptional<z.ZodString>;
@@ -211,49 +254,6 @@ declare const geocodingResultSchema: z.ZodObject<{
211
254
  label: z.ZodString;
212
255
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
213
256
  sourceRef: z.ZodOptional<z.ZodString>;
214
- distanceMeters: z.ZodOptional<z.ZodNumber>;
215
- contacts: z.ZodOptional<z.ZodObject<{
216
- phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
217
- value: z.ZodString;
218
- label: z.ZodOptional<z.ZodString>;
219
- }, z.core.$strict>>>;
220
- websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
221
- value: z.ZodString;
222
- label: z.ZodOptional<z.ZodString>;
223
- }, z.core.$strict>>>;
224
- emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
- value: z.ZodString;
226
- label: z.ZodOptional<z.ZodString>;
227
- }, z.core.$strict>>>;
228
- }, z.core.$strict>>;
229
- openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
230
- display: z.ZodOptional<z.ZodArray<z.ZodString>>;
231
- openNow: z.ZodOptional<z.ZodBoolean>;
232
- }, z.core.$strict>>>;
233
- timeZone: z.ZodOptional<z.ZodObject<{
234
- name: z.ZodString;
235
- utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
236
- }, z.core.$strict>>;
237
- accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
238
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
239
- }, z.core.$strict>>>;
240
- name: z.ZodOptional<z.ZodString>;
241
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
242
- id: z.ZodString;
243
- name: z.ZodString;
244
- localizedName: z.ZodOptional<z.ZodString>;
245
- primary: z.ZodOptional<z.ZodBoolean>;
246
- }, z.core.$strict>>>;
247
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
248
- id: z.ZodString;
249
- name: z.ZodString;
250
- localizedName: z.ZodOptional<z.ZodString>;
251
- primary: z.ZodOptional<z.ZodBoolean>;
252
- }, z.core.$strict>>>;
253
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
254
- id: z.ZodString;
255
- name: z.ZodString;
256
- }, z.core.$strict>>>;
257
257
  }, z.core.$strict>;
258
258
  declare const geocodingSourceSchema: z.ZodObject<{
259
259
  id: z.ZodString;
@@ -270,6 +270,49 @@ declare const geocodingForwardResponseSchema: z.ZodObject<{
270
270
  }, z.core.$strict>>;
271
271
  queryId: z.ZodString;
272
272
  results: z.ZodArray<z.ZodObject<{
273
+ name: z.ZodOptional<z.ZodString>;
274
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
275
+ id: z.ZodString;
276
+ name: z.ZodString;
277
+ localizedName: z.ZodOptional<z.ZodString>;
278
+ primary: z.ZodOptional<z.ZodBoolean>;
279
+ }, z.core.$strict>>>;
280
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
281
+ id: z.ZodString;
282
+ name: z.ZodString;
283
+ localizedName: z.ZodOptional<z.ZodString>;
284
+ primary: z.ZodOptional<z.ZodBoolean>;
285
+ }, z.core.$strict>>>;
286
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
287
+ id: z.ZodString;
288
+ name: z.ZodString;
289
+ }, z.core.$strict>>>;
290
+ distanceMeters: z.ZodOptional<z.ZodNumber>;
291
+ contacts: z.ZodOptional<z.ZodObject<{
292
+ phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
293
+ value: z.ZodString;
294
+ label: z.ZodOptional<z.ZodString>;
295
+ }, z.core.$strict>>>;
296
+ websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
297
+ value: z.ZodString;
298
+ label: z.ZodOptional<z.ZodString>;
299
+ }, z.core.$strict>>>;
300
+ emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
+ value: z.ZodString;
302
+ label: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strict>>>;
304
+ }, z.core.$strict>>;
305
+ openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
306
+ display: z.ZodOptional<z.ZodArray<z.ZodString>>;
307
+ openNow: z.ZodOptional<z.ZodBoolean>;
308
+ }, z.core.$strict>>>;
309
+ timeZone: z.ZodOptional<z.ZodObject<{
310
+ name: z.ZodString;
311
+ utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
312
+ }, z.core.$strict>>;
313
+ accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
314
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
315
+ }, z.core.$strict>>>;
273
316
  address: z.ZodObject<{
274
317
  city: z.ZodOptional<z.ZodString>;
275
318
  country: z.ZodOptional<z.ZodString>;
@@ -298,6 +341,40 @@ declare const geocodingForwardResponseSchema: z.ZodObject<{
298
341
  label: z.ZodString;
299
342
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
300
343
  sourceRef: z.ZodOptional<z.ZodString>;
344
+ }, z.core.$strict>>;
345
+ schemaVersion: z.ZodLiteral<1>;
346
+ source: z.ZodObject<{
347
+ id: z.ZodString;
348
+ revision: z.ZodNullable<z.ZodString>;
349
+ }, z.core.$strict>;
350
+ usage: z.ZodObject<{
351
+ units: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<30>]>;
352
+ }, z.core.$strict>;
353
+ }, z.core.$strict>;
354
+ declare const geocodingReverseResponseSchema: z.ZodObject<{
355
+ attribution: z.ZodArray<z.ZodObject<{
356
+ text: z.ZodString;
357
+ url: z.ZodOptional<z.ZodString>;
358
+ }, z.core.$strict>>;
359
+ queryId: z.ZodString;
360
+ results: z.ZodArray<z.ZodObject<{
361
+ name: z.ZodOptional<z.ZodString>;
362
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
363
+ id: z.ZodString;
364
+ name: z.ZodString;
365
+ localizedName: z.ZodOptional<z.ZodString>;
366
+ primary: z.ZodOptional<z.ZodBoolean>;
367
+ }, z.core.$strict>>>;
368
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
369
+ id: z.ZodString;
370
+ name: z.ZodString;
371
+ localizedName: z.ZodOptional<z.ZodString>;
372
+ primary: z.ZodOptional<z.ZodBoolean>;
373
+ }, z.core.$strict>>>;
374
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
375
+ id: z.ZodString;
376
+ name: z.ZodString;
377
+ }, z.core.$strict>>>;
301
378
  distanceMeters: z.ZodOptional<z.ZodNumber>;
302
379
  contacts: z.ZodOptional<z.ZodObject<{
303
380
  phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -324,40 +401,6 @@ declare const geocodingForwardResponseSchema: z.ZodObject<{
324
401
  accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
325
402
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
326
403
  }, z.core.$strict>>>;
327
- name: z.ZodOptional<z.ZodString>;
328
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
- id: z.ZodString;
330
- name: z.ZodString;
331
- localizedName: z.ZodOptional<z.ZodString>;
332
- primary: z.ZodOptional<z.ZodBoolean>;
333
- }, z.core.$strict>>>;
334
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
335
- id: z.ZodString;
336
- name: z.ZodString;
337
- localizedName: z.ZodOptional<z.ZodString>;
338
- primary: z.ZodOptional<z.ZodBoolean>;
339
- }, z.core.$strict>>>;
340
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
341
- id: z.ZodString;
342
- name: z.ZodString;
343
- }, z.core.$strict>>>;
344
- }, z.core.$strict>>;
345
- schemaVersion: z.ZodLiteral<1>;
346
- source: z.ZodObject<{
347
- id: z.ZodString;
348
- revision: z.ZodNullable<z.ZodString>;
349
- }, z.core.$strict>;
350
- usage: z.ZodObject<{
351
- units: z.ZodUnion<readonly [z.ZodLiteral<25>, z.ZodLiteral<75>]>;
352
- }, z.core.$strict>;
353
- }, z.core.$strict>;
354
- declare const geocodingReverseResponseSchema: z.ZodObject<{
355
- attribution: z.ZodArray<z.ZodObject<{
356
- text: z.ZodString;
357
- url: z.ZodOptional<z.ZodString>;
358
- }, z.core.$strict>>;
359
- queryId: z.ZodString;
360
- results: z.ZodArray<z.ZodObject<{
361
404
  address: z.ZodObject<{
362
405
  city: z.ZodOptional<z.ZodString>;
363
406
  country: z.ZodOptional<z.ZodString>;
@@ -386,6 +429,48 @@ declare const geocodingReverseResponseSchema: z.ZodObject<{
386
429
  label: z.ZodString;
387
430
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
388
431
  sourceRef: z.ZodOptional<z.ZodString>;
432
+ }, z.core.$strict>>;
433
+ schemaVersion: z.ZodLiteral<1>;
434
+ source: z.ZodObject<{
435
+ id: z.ZodString;
436
+ revision: z.ZodNullable<z.ZodString>;
437
+ }, z.core.$strict>;
438
+ usage: z.ZodObject<{
439
+ units: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<30>]>;
440
+ }, z.core.$strict>;
441
+ }, z.core.$strict>;
442
+ declare const geocodingSuggestionSchema: z.ZodObject<{
443
+ kind: z.ZodEnum<{
444
+ address: "address";
445
+ country: "country";
446
+ county: "county";
447
+ district: "district";
448
+ locality: "locality";
449
+ place: "place";
450
+ region: "region";
451
+ street: "street";
452
+ unknown: "unknown";
453
+ }>;
454
+ label: z.ZodString;
455
+ addressLabel: z.ZodOptional<z.ZodString>;
456
+ place: z.ZodOptional<z.ZodObject<{
457
+ name: z.ZodOptional<z.ZodString>;
458
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
+ id: z.ZodString;
460
+ name: z.ZodString;
461
+ localizedName: z.ZodOptional<z.ZodString>;
462
+ primary: z.ZodOptional<z.ZodBoolean>;
463
+ }, z.core.$strict>>>;
464
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
465
+ id: z.ZodString;
466
+ name: z.ZodString;
467
+ localizedName: z.ZodOptional<z.ZodString>;
468
+ primary: z.ZodOptional<z.ZodBoolean>;
469
+ }, z.core.$strict>>>;
470
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
471
+ id: z.ZodString;
472
+ name: z.ZodString;
473
+ }, z.core.$strict>>>;
389
474
  distanceMeters: z.ZodOptional<z.ZodNumber>;
390
475
  contacts: z.ZodOptional<z.ZodObject<{
391
476
  phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -412,48 +497,6 @@ declare const geocodingReverseResponseSchema: z.ZodObject<{
412
497
  accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
413
498
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
414
499
  }, z.core.$strict>>>;
415
- name: z.ZodOptional<z.ZodString>;
416
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
417
- id: z.ZodString;
418
- name: z.ZodString;
419
- localizedName: z.ZodOptional<z.ZodString>;
420
- primary: z.ZodOptional<z.ZodBoolean>;
421
- }, z.core.$strict>>>;
422
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
423
- id: z.ZodString;
424
- name: z.ZodString;
425
- localizedName: z.ZodOptional<z.ZodString>;
426
- primary: z.ZodOptional<z.ZodBoolean>;
427
- }, z.core.$strict>>>;
428
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
429
- id: z.ZodString;
430
- name: z.ZodString;
431
- }, z.core.$strict>>>;
432
- }, z.core.$strict>>;
433
- schemaVersion: z.ZodLiteral<1>;
434
- source: z.ZodObject<{
435
- id: z.ZodString;
436
- revision: z.ZodNullable<z.ZodString>;
437
- }, z.core.$strict>;
438
- usage: z.ZodObject<{
439
- units: z.ZodUnion<readonly [z.ZodLiteral<25>, z.ZodLiteral<75>]>;
440
- }, z.core.$strict>;
441
- }, z.core.$strict>;
442
- declare const geocodingSuggestionSchema: z.ZodObject<{
443
- kind: z.ZodEnum<{
444
- address: "address";
445
- country: "country";
446
- county: "county";
447
- district: "district";
448
- locality: "locality";
449
- place: "place";
450
- region: "region";
451
- street: "street";
452
- unknown: "unknown";
453
- }>;
454
- label: z.ZodString;
455
- addressLabel: z.ZodOptional<z.ZodString>;
456
- place: z.ZodOptional<z.ZodObject<{
457
500
  address: z.ZodObject<{
458
501
  city: z.ZodOptional<z.ZodString>;
459
502
  country: z.ZodOptional<z.ZodString>;
@@ -482,49 +525,6 @@ declare const geocodingSuggestionSchema: z.ZodObject<{
482
525
  label: z.ZodString;
483
526
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
484
527
  sourceRef: z.ZodOptional<z.ZodString>;
485
- distanceMeters: z.ZodOptional<z.ZodNumber>;
486
- contacts: z.ZodOptional<z.ZodObject<{
487
- phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
488
- value: z.ZodString;
489
- label: z.ZodOptional<z.ZodString>;
490
- }, z.core.$strict>>>;
491
- websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
492
- value: z.ZodString;
493
- label: z.ZodOptional<z.ZodString>;
494
- }, z.core.$strict>>>;
495
- emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
496
- value: z.ZodString;
497
- label: z.ZodOptional<z.ZodString>;
498
- }, z.core.$strict>>>;
499
- }, z.core.$strict>>;
500
- openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
501
- display: z.ZodOptional<z.ZodArray<z.ZodString>>;
502
- openNow: z.ZodOptional<z.ZodBoolean>;
503
- }, z.core.$strict>>>;
504
- timeZone: z.ZodOptional<z.ZodObject<{
505
- name: z.ZodString;
506
- utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
507
- }, z.core.$strict>>;
508
- accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
509
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
510
- }, z.core.$strict>>>;
511
- name: z.ZodOptional<z.ZodString>;
512
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
513
- id: z.ZodString;
514
- name: z.ZodString;
515
- localizedName: z.ZodOptional<z.ZodString>;
516
- primary: z.ZodOptional<z.ZodBoolean>;
517
- }, z.core.$strict>>>;
518
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
519
- id: z.ZodString;
520
- name: z.ZodString;
521
- localizedName: z.ZodOptional<z.ZodString>;
522
- primary: z.ZodOptional<z.ZodBoolean>;
523
- }, z.core.$strict>>>;
524
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
525
- id: z.ZodString;
526
- name: z.ZodString;
527
- }, z.core.$strict>>>;
528
528
  }, z.core.$strict>>;
529
529
  token: z.ZodString;
530
530
  }, z.core.$strict>;
@@ -553,34 +553,23 @@ declare const autocompleteResponseSchema: z.ZodObject<{
553
553
  label: z.ZodString;
554
554
  addressLabel: z.ZodOptional<z.ZodString>;
555
555
  place: z.ZodOptional<z.ZodObject<{
556
- address: z.ZodObject<{
557
- city: z.ZodOptional<z.ZodString>;
558
- country: z.ZodOptional<z.ZodString>;
559
- countryCode: z.ZodOptional<z.ZodString>;
560
- county: z.ZodOptional<z.ZodString>;
561
- district: z.ZodOptional<z.ZodString>;
562
- houseNumber: z.ZodOptional<z.ZodString>;
563
- locality: z.ZodOptional<z.ZodString>;
564
- name: z.ZodOptional<z.ZodString>;
565
- postalCode: z.ZodOptional<z.ZodString>;
566
- region: z.ZodOptional<z.ZodString>;
567
- street: z.ZodOptional<z.ZodString>;
568
- }, z.core.$strict>;
569
- bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
570
- kind: z.ZodEnum<{
571
- address: "address";
572
- country: "country";
573
- county: "county";
574
- district: "district";
575
- locality: "locality";
576
- place: "place";
577
- region: "region";
578
- street: "street";
579
- unknown: "unknown";
580
- }>;
581
- label: z.ZodString;
582
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
583
- sourceRef: z.ZodOptional<z.ZodString>;
556
+ name: z.ZodOptional<z.ZodString>;
557
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
558
+ id: z.ZodString;
559
+ name: z.ZodString;
560
+ localizedName: z.ZodOptional<z.ZodString>;
561
+ primary: z.ZodOptional<z.ZodBoolean>;
562
+ }, z.core.$strict>>>;
563
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
564
+ id: z.ZodString;
565
+ name: z.ZodString;
566
+ localizedName: z.ZodOptional<z.ZodString>;
567
+ primary: z.ZodOptional<z.ZodBoolean>;
568
+ }, z.core.$strict>>>;
569
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
570
+ id: z.ZodString;
571
+ name: z.ZodString;
572
+ }, z.core.$strict>>>;
584
573
  distanceMeters: z.ZodOptional<z.ZodNumber>;
585
574
  contacts: z.ZodOptional<z.ZodObject<{
586
575
  phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -607,28 +596,39 @@ declare const autocompleteResponseSchema: z.ZodObject<{
607
596
  accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
608
597
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
609
598
  }, z.core.$strict>>>;
610
- name: z.ZodOptional<z.ZodString>;
611
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
612
- id: z.ZodString;
613
- name: z.ZodString;
614
- localizedName: z.ZodOptional<z.ZodString>;
615
- primary: z.ZodOptional<z.ZodBoolean>;
616
- }, z.core.$strict>>>;
617
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
618
- id: z.ZodString;
619
- name: z.ZodString;
620
- localizedName: z.ZodOptional<z.ZodString>;
621
- primary: z.ZodOptional<z.ZodBoolean>;
622
- }, z.core.$strict>>>;
623
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
624
- id: z.ZodString;
625
- name: z.ZodString;
626
- }, z.core.$strict>>>;
599
+ address: z.ZodObject<{
600
+ city: z.ZodOptional<z.ZodString>;
601
+ country: z.ZodOptional<z.ZodString>;
602
+ countryCode: z.ZodOptional<z.ZodString>;
603
+ county: z.ZodOptional<z.ZodString>;
604
+ district: z.ZodOptional<z.ZodString>;
605
+ houseNumber: z.ZodOptional<z.ZodString>;
606
+ locality: z.ZodOptional<z.ZodString>;
607
+ name: z.ZodOptional<z.ZodString>;
608
+ postalCode: z.ZodOptional<z.ZodString>;
609
+ region: z.ZodOptional<z.ZodString>;
610
+ street: z.ZodOptional<z.ZodString>;
611
+ }, z.core.$strict>;
612
+ bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
613
+ kind: z.ZodEnum<{
614
+ address: "address";
615
+ country: "country";
616
+ county: "county";
617
+ district: "district";
618
+ locality: "locality";
619
+ place: "place";
620
+ region: "region";
621
+ street: "street";
622
+ unknown: "unknown";
623
+ }>;
624
+ label: z.ZodString;
625
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
626
+ sourceRef: z.ZodOptional<z.ZodString>;
627
627
  }, z.core.$strict>>;
628
628
  token: z.ZodString;
629
629
  }, z.core.$strict>>;
630
630
  usage: z.ZodObject<{
631
- units: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<25>]>;
631
+ units: z.ZodUnion<readonly [z.ZodLiteral<4>, z.ZodLiteral<10>]>;
632
632
  }, z.core.$strict>;
633
633
  }, z.core.$strict>;
634
634
  declare const resolveSuggestionRequestSchema: z.ZodObject<{
@@ -649,6 +649,49 @@ declare const resolveSuggestionResponseSchema: z.ZodObject<{
649
649
  url: z.ZodOptional<z.ZodString>;
650
650
  }, z.core.$strict>>;
651
651
  result: z.ZodObject<{
652
+ name: z.ZodOptional<z.ZodString>;
653
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
654
+ id: z.ZodString;
655
+ name: z.ZodString;
656
+ localizedName: z.ZodOptional<z.ZodString>;
657
+ primary: z.ZodOptional<z.ZodBoolean>;
658
+ }, z.core.$strict>>>;
659
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
660
+ id: z.ZodString;
661
+ name: z.ZodString;
662
+ localizedName: z.ZodOptional<z.ZodString>;
663
+ primary: z.ZodOptional<z.ZodBoolean>;
664
+ }, z.core.$strict>>>;
665
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
666
+ id: z.ZodString;
667
+ name: z.ZodString;
668
+ }, z.core.$strict>>>;
669
+ distanceMeters: z.ZodOptional<z.ZodNumber>;
670
+ contacts: z.ZodOptional<z.ZodObject<{
671
+ phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
672
+ value: z.ZodString;
673
+ label: z.ZodOptional<z.ZodString>;
674
+ }, z.core.$strict>>>;
675
+ websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
676
+ value: z.ZodString;
677
+ label: z.ZodOptional<z.ZodString>;
678
+ }, z.core.$strict>>>;
679
+ emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
680
+ value: z.ZodString;
681
+ label: z.ZodOptional<z.ZodString>;
682
+ }, z.core.$strict>>>;
683
+ }, z.core.$strict>>;
684
+ openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
685
+ display: z.ZodOptional<z.ZodArray<z.ZodString>>;
686
+ openNow: z.ZodOptional<z.ZodBoolean>;
687
+ }, z.core.$strict>>>;
688
+ timeZone: z.ZodOptional<z.ZodObject<{
689
+ name: z.ZodString;
690
+ utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
691
+ }, z.core.$strict>>;
692
+ accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
693
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
694
+ }, z.core.$strict>>>;
652
695
  address: z.ZodObject<{
653
696
  city: z.ZodOptional<z.ZodString>;
654
697
  country: z.ZodOptional<z.ZodString>;
@@ -677,49 +720,6 @@ declare const resolveSuggestionResponseSchema: z.ZodObject<{
677
720
  label: z.ZodString;
678
721
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
679
722
  sourceRef: z.ZodOptional<z.ZodString>;
680
- distanceMeters: z.ZodOptional<z.ZodNumber>;
681
- contacts: z.ZodOptional<z.ZodObject<{
682
- phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
683
- value: z.ZodString;
684
- label: z.ZodOptional<z.ZodString>;
685
- }, z.core.$strict>>>;
686
- websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
687
- value: z.ZodString;
688
- label: z.ZodOptional<z.ZodString>;
689
- }, z.core.$strict>>>;
690
- emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
691
- value: z.ZodString;
692
- label: z.ZodOptional<z.ZodString>;
693
- }, z.core.$strict>>>;
694
- }, z.core.$strict>>;
695
- openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
696
- display: z.ZodOptional<z.ZodArray<z.ZodString>>;
697
- openNow: z.ZodOptional<z.ZodBoolean>;
698
- }, z.core.$strict>>>;
699
- timeZone: z.ZodOptional<z.ZodObject<{
700
- name: z.ZodString;
701
- utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
702
- }, z.core.$strict>>;
703
- accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
704
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
705
- }, z.core.$strict>>>;
706
- name: z.ZodOptional<z.ZodString>;
707
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
708
- id: z.ZodString;
709
- name: z.ZodString;
710
- localizedName: z.ZodOptional<z.ZodString>;
711
- primary: z.ZodOptional<z.ZodBoolean>;
712
- }, z.core.$strict>>>;
713
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
714
- id: z.ZodString;
715
- name: z.ZodString;
716
- localizedName: z.ZodOptional<z.ZodString>;
717
- primary: z.ZodOptional<z.ZodBoolean>;
718
- }, z.core.$strict>>>;
719
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
720
- id: z.ZodString;
721
- name: z.ZodString;
722
- }, z.core.$strict>>>;
723
723
  }, z.core.$strict>;
724
724
  schemaVersion: z.ZodLiteral<1>;
725
725
  source: z.ZodObject<{
@@ -727,7 +727,7 @@ declare const resolveSuggestionResponseSchema: z.ZodObject<{
727
727
  revision: z.ZodNullable<z.ZodString>;
728
728
  }, z.core.$strict>;
729
729
  usage: z.ZodObject<{
730
- units: z.ZodUnion<readonly [z.ZodLiteral<25>, z.ZodLiteral<75>]>;
730
+ units: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<30>]>;
731
731
  }, z.core.$strict>;
732
732
  }, z.core.$strict>;
733
733
  type GeocodingForwardRequest = z.input<typeof geocodingForwardRequestSchema>;
@@ -779,7 +779,24 @@ declare const nearbyRequestSchema: z.ZodObject<{
779
779
  cursor: z.ZodOptional<z.ZodString>;
780
780
  }, z.core.$strict>;
781
781
  declare const nearbyPlaceSchema: z.ZodObject<{
782
- bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
782
+ name: z.ZodOptional<z.ZodString>;
783
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
784
+ id: z.ZodString;
785
+ name: z.ZodString;
786
+ localizedName: z.ZodOptional<z.ZodString>;
787
+ primary: z.ZodOptional<z.ZodBoolean>;
788
+ }, z.core.$strict>>>;
789
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
790
+ id: z.ZodString;
791
+ name: z.ZodString;
792
+ localizedName: z.ZodOptional<z.ZodString>;
793
+ primary: z.ZodOptional<z.ZodBoolean>;
794
+ }, z.core.$strict>>>;
795
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
796
+ id: z.ZodString;
797
+ name: z.ZodString;
798
+ }, z.core.$strict>>>;
799
+ distanceMeters: z.ZodOptional<z.ZodNumber>;
783
800
  contacts: z.ZodOptional<z.ZodObject<{
784
801
  phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
785
802
  value: z.ZodString;
@@ -818,26 +835,9 @@ declare const nearbyPlaceSchema: z.ZodObject<{
818
835
  region: z.ZodOptional<z.ZodString>;
819
836
  street: z.ZodOptional<z.ZodString>;
820
837
  }, z.core.$strict>;
821
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
822
- name: z.ZodOptional<z.ZodString>;
838
+ bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
823
839
  label: z.ZodString;
824
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
825
- id: z.ZodString;
826
- name: z.ZodString;
827
- localizedName: z.ZodOptional<z.ZodString>;
828
- primary: z.ZodOptional<z.ZodBoolean>;
829
- }, z.core.$strict>>>;
830
- distanceMeters: z.ZodOptional<z.ZodNumber>;
831
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
832
- id: z.ZodString;
833
- name: z.ZodString;
834
- localizedName: z.ZodOptional<z.ZodString>;
835
- primary: z.ZodOptional<z.ZodBoolean>;
836
- }, z.core.$strict>>>;
837
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
838
- id: z.ZodString;
839
- name: z.ZodString;
840
- }, z.core.$strict>>>;
840
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
841
841
  kind: z.ZodLiteral<"place">;
842
842
  token: z.ZodOptional<z.ZodString>;
843
843
  }, z.core.$strict>;
@@ -845,7 +845,24 @@ declare const nearbyResponseSchema: z.ZodObject<{
845
845
  schemaVersion: z.ZodLiteral<1>;
846
846
  provider: z.ZodLiteral<"aws">;
847
847
  results: z.ZodArray<z.ZodObject<{
848
- bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
848
+ name: z.ZodOptional<z.ZodString>;
849
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
850
+ id: z.ZodString;
851
+ name: z.ZodString;
852
+ localizedName: z.ZodOptional<z.ZodString>;
853
+ primary: z.ZodOptional<z.ZodBoolean>;
854
+ }, z.core.$strict>>>;
855
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
856
+ id: z.ZodString;
857
+ name: z.ZodString;
858
+ localizedName: z.ZodOptional<z.ZodString>;
859
+ primary: z.ZodOptional<z.ZodBoolean>;
860
+ }, z.core.$strict>>>;
861
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
862
+ id: z.ZodString;
863
+ name: z.ZodString;
864
+ }, z.core.$strict>>>;
865
+ distanceMeters: z.ZodOptional<z.ZodNumber>;
849
866
  contacts: z.ZodOptional<z.ZodObject<{
850
867
  phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
851
868
  value: z.ZodString;
@@ -884,26 +901,9 @@ declare const nearbyResponseSchema: z.ZodObject<{
884
901
  region: z.ZodOptional<z.ZodString>;
885
902
  street: z.ZodOptional<z.ZodString>;
886
903
  }, z.core.$strict>;
887
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
888
- name: z.ZodOptional<z.ZodString>;
904
+ bounds: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
889
905
  label: z.ZodString;
890
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
891
- id: z.ZodString;
892
- name: z.ZodString;
893
- localizedName: z.ZodOptional<z.ZodString>;
894
- primary: z.ZodOptional<z.ZodBoolean>;
895
- }, z.core.$strict>>>;
896
- distanceMeters: z.ZodOptional<z.ZodNumber>;
897
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
898
- id: z.ZodString;
899
- name: z.ZodString;
900
- localizedName: z.ZodOptional<z.ZodString>;
901
- primary: z.ZodOptional<z.ZodBoolean>;
902
- }, z.core.$strict>>>;
903
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
904
- id: z.ZodString;
905
- name: z.ZodString;
906
- }, z.core.$strict>>>;
906
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
907
907
  kind: z.ZodLiteral<"place">;
908
908
  token: z.ZodOptional<z.ZodString>;
909
909
  }, z.core.$strict>>;
@@ -917,7 +917,7 @@ declare const nearbyResponseSchema: z.ZodObject<{
917
917
  url: z.ZodOptional<z.ZodString>;
918
918
  }, z.core.$strict>>;
919
919
  usage: z.ZodObject<{
920
- units: z.ZodUnion<readonly [z.ZodLiteral<25>, z.ZodLiteral<75>]>;
920
+ units: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<30>]>;
921
921
  }, z.core.$strict>;
922
922
  }, z.core.$strict>;
923
923
  declare const searchCategoriesResponseSchema: z.ZodObject<{
@@ -959,6 +959,49 @@ declare const resolvePlaceResponseSchema: z.ZodObject<{
959
959
  url: z.ZodOptional<z.ZodString>;
960
960
  }, z.core.$strict>>;
961
961
  result: z.ZodObject<{
962
+ name: z.ZodOptional<z.ZodString>;
963
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
964
+ id: z.ZodString;
965
+ name: z.ZodString;
966
+ localizedName: z.ZodOptional<z.ZodString>;
967
+ primary: z.ZodOptional<z.ZodBoolean>;
968
+ }, z.core.$strict>>>;
969
+ foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
970
+ id: z.ZodString;
971
+ name: z.ZodString;
972
+ localizedName: z.ZodOptional<z.ZodString>;
973
+ primary: z.ZodOptional<z.ZodBoolean>;
974
+ }, z.core.$strict>>>;
975
+ businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
976
+ id: z.ZodString;
977
+ name: z.ZodString;
978
+ }, z.core.$strict>>>;
979
+ distanceMeters: z.ZodOptional<z.ZodNumber>;
980
+ contacts: z.ZodOptional<z.ZodObject<{
981
+ phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
982
+ value: z.ZodString;
983
+ label: z.ZodOptional<z.ZodString>;
984
+ }, z.core.$strict>>>;
985
+ websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
986
+ value: z.ZodString;
987
+ label: z.ZodOptional<z.ZodString>;
988
+ }, z.core.$strict>>>;
989
+ emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
990
+ value: z.ZodString;
991
+ label: z.ZodOptional<z.ZodString>;
992
+ }, z.core.$strict>>>;
993
+ }, z.core.$strict>>;
994
+ openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
995
+ display: z.ZodOptional<z.ZodArray<z.ZodString>>;
996
+ openNow: z.ZodOptional<z.ZodBoolean>;
997
+ }, z.core.$strict>>>;
998
+ timeZone: z.ZodOptional<z.ZodObject<{
999
+ name: z.ZodString;
1000
+ utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
1001
+ }, z.core.$strict>>;
1002
+ accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
1003
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
1004
+ }, z.core.$strict>>>;
962
1005
  address: z.ZodObject<{
963
1006
  city: z.ZodOptional<z.ZodString>;
964
1007
  country: z.ZodOptional<z.ZodString>;
@@ -987,49 +1030,6 @@ declare const resolvePlaceResponseSchema: z.ZodObject<{
987
1030
  label: z.ZodString;
988
1031
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
989
1032
  sourceRef: z.ZodOptional<z.ZodString>;
990
- distanceMeters: z.ZodOptional<z.ZodNumber>;
991
- contacts: z.ZodOptional<z.ZodObject<{
992
- phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
993
- value: z.ZodString;
994
- label: z.ZodOptional<z.ZodString>;
995
- }, z.core.$strict>>>;
996
- websites: z.ZodOptional<z.ZodArray<z.ZodObject<{
997
- value: z.ZodString;
998
- label: z.ZodOptional<z.ZodString>;
999
- }, z.core.$strict>>>;
1000
- emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
1001
- value: z.ZodString;
1002
- label: z.ZodOptional<z.ZodString>;
1003
- }, z.core.$strict>>>;
1004
- }, z.core.$strict>>;
1005
- openingHours: z.ZodOptional<z.ZodArray<z.ZodObject<{
1006
- display: z.ZodOptional<z.ZodArray<z.ZodString>>;
1007
- openNow: z.ZodOptional<z.ZodBoolean>;
1008
- }, z.core.$strict>>>;
1009
- timeZone: z.ZodOptional<z.ZodObject<{
1010
- name: z.ZodString;
1011
- utcOffsetSeconds: z.ZodOptional<z.ZodNumber>;
1012
- }, z.core.$strict>>;
1013
- accessPoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
1014
- position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
1015
- }, z.core.$strict>>>;
1016
- name: z.ZodOptional<z.ZodString>;
1017
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
1018
- id: z.ZodString;
1019
- name: z.ZodString;
1020
- localizedName: z.ZodOptional<z.ZodString>;
1021
- primary: z.ZodOptional<z.ZodBoolean>;
1022
- }, z.core.$strict>>>;
1023
- foodTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1024
- id: z.ZodString;
1025
- name: z.ZodString;
1026
- localizedName: z.ZodOptional<z.ZodString>;
1027
- primary: z.ZodOptional<z.ZodBoolean>;
1028
- }, z.core.$strict>>>;
1029
- businessChains: z.ZodOptional<z.ZodArray<z.ZodObject<{
1030
- id: z.ZodString;
1031
- name: z.ZodString;
1032
- }, z.core.$strict>>>;
1033
1033
  }, z.core.$strict>;
1034
1034
  schemaVersion: z.ZodLiteral<1>;
1035
1035
  source: z.ZodObject<{
@@ -1037,7 +1037,7 @@ declare const resolvePlaceResponseSchema: z.ZodObject<{
1037
1037
  revision: z.ZodNullable<z.ZodString>;
1038
1038
  }, z.core.$strict>;
1039
1039
  usage: z.ZodObject<{
1040
- units: z.ZodUnion<readonly [z.ZodLiteral<25>, z.ZodLiteral<75>]>;
1040
+ units: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<30>]>;
1041
1041
  }, z.core.$strict>;
1042
1042
  }, z.core.$strict>;
1043
1043
  type NearbyRequest = z.input<typeof nearbyRequestSchema>;
@@ -1051,10 +1051,10 @@ type ResolvePlaceResponse = ResolveSuggestionResponse;
1051
1051
  /** Place details that need a provider text search or a selected place: not geocoding. */
1052
1052
  declare const searchContactDetails: readonly SearchPlaceDetail[];
1053
1053
  /**
1054
- * The shared API units a completed Search operation consumes. Autocomplete uses 10, or 25 with
1055
- * its places; every other place operation uses 25, or 75 with any place detail. Category
1054
+ * The shared API units a completed Search operation consumes. Autocomplete uses 4, or 10 with
1055
+ * its places; every other place operation uses 10, or 30 with any place detail. Category
1056
1056
  * discovery uses none.
1057
1057
  */
1058
- declare function searchOperationUnits(operation: 'autocomplete' | 'forward' | 'reverse' | 'resolve' | 'nearby' | 'categories', include?: readonly string[]): 0 | 10 | 25 | 75;
1058
+ declare function searchOperationUnits(operation: 'autocomplete' | 'forward' | 'reverse' | 'resolve' | 'nearby' | 'categories', include?: readonly string[]): 0 | 4 | 10 | 30;
1059
1059
 
1060
1060
  export { type AutocompleteRequest, type AutocompleteResponse, type GeocodingForwardRequest, type GeocodingForwardResponse, type GeocodingResult, type GeocodingReverseRequest, type GeocodingReverseResponse, type GeocodingSuggestion, type NearbyPlace, type NearbyRequest, type NearbyResponse, type NormalizedAutocompleteRequest, type NormalizedGeocodingForwardRequest, type NormalizedGeocodingReverseRequest, type NormalizedNearbyRequest, type NormalizedResolveSuggestionRequest, type ResolvePlaceRequest, type ResolvePlaceResponse, type ResolveSuggestionRequest, type ResolveSuggestionResponse, type ReverseGeocodingKind, type SearchCategoriesResponse, type SearchCategory, type SearchContacts, type SearchOpeningHours, type SearchPlaceDetail, type SearchTimeZone, autocompleteIncludeSchema, autocompleteRequestSchema, autocompleteResponseSchema, geocodingAddressSchema, geocodingAttributionSchema, geocodingBoundsSchema, geocodingForwardRequestSchema, geocodingForwardResponseSchema, geocodingLimits, geocodingPositionSchema, geocodingResultKinds, geocodingResultSchema, geocodingRetentionModes, geocodingReverseRequestSchema, geocodingReverseResponseSchema, geocodingSourceSchema, geocodingSuggestionSchema, nearbyCursorSchema, nearbyLimits, nearbyPlaceSchema, nearbyRequestSchema, nearbyResponseSchema, resolvePlaceRequestSchema, resolvePlaceResponseSchema, resolveSuggestionRequestSchema, resolveSuggestionResponseSchema, reverseGeocodingKindSchema, searchCategoriesResponseSchema, searchCategoryIdSchema, searchCategorySchema, searchContactDetails, searchContactsSchema, searchLiteralText, searchOpeningHoursSchema, searchOperationUnits, searchPlaceDetailFields, searchPlaceDetailSchema, searchPlaceDetails, searchPlaceDetailsSchema, searchPlaceMetadata, searchTimeZoneSchema };
package/dist/contract.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  searchPlaceDetailsSchema,
41
41
  searchPlaceMetadata,
42
42
  searchTimeZoneSchema
43
- } from "./chunk-W66J2DAS.js";
43
+ } from "./chunk-W7IIJLOI.js";
44
44
  export {
45
45
  autocompleteIncludeSchema,
46
46
  autocompleteRequestSchema,
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  resolvePlace,
9
9
  resolveSuggestion,
10
10
  searchNearby
11
- } from "./chunk-QDEMNVJD.js";
11
+ } from "./chunk-7PHOZFMS.js";
12
12
  import {
13
13
  autocompleteIncludeSchema,
14
14
  autocompleteRequestSchema,
@@ -51,7 +51,7 @@ import {
51
51
  searchPlaceDetailsSchema,
52
52
  searchPlaceMetadata,
53
53
  searchTimeZoneSchema
54
- } from "./chunk-W66J2DAS.js";
54
+ } from "./chunk-W7IIJLOI.js";
55
55
  export {
56
56
  GEOCODING_ERROR_CODES,
57
57
  GeocodingError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/search",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.5",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Headless geocoding and location selection client and wire contracts for Tileflow.",
6
6
  "type": "module",