@ideal-postcodes/sdk 0.1.0

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.
@@ -0,0 +1,794 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { InfiniteData, UseMutationOptions } from '@tanstack/react-query';
3
+ import { cl as PostcodesData, bN as PostcodeResponse, cn as PostcodesError, cq as KeyAvailabilityData, bH as ApiKeyResponse, f as ErrorResponse, cv as KeyDetailsData, bx as ApiKeyDetailsResponse, cA as UpdateKeyDetailsData, cE as UpdateKeyDetailsResponse, cC as UpdateKeyDetailsError, cF as KeyUsageData, bu as ApiKeyUsageResponse, bM as BadRequestResponse, cK as KeyLogsData, cP as AddressCleanseData, cT as AddressCleanseResponse, cR as AddressCleanseError, cU as FindAddressData, bl as AutocompleteResponse, cZ as ResolveAddressData, bj as GbrResolveAddressResponse, d2 as FindPlaceData, u as PlaceResponse, d7 as ResolvePlaceData, R as ResolvePlaceResponse, dc as ListLicenseesData, m as LicenseesResponse, dh as CreateLicenseeData, dl as CreateLicenseeResponse, dj as CreateLicenseeError, dm as DeleteLicenseeData, dr as DeleteLicenseeResponse, dp as DeleteLicenseeError, ds as RetrieveLicenseeData, L as LicenseeResponse, dx as UpdateLicenseeData, dB as UpdateLicenseeResponse, dz as UpdateLicenseeError, dC as ListConfigsData, j as ConfigsResponse, dE as ListConfigsError, dH as CreateConfigData, dL as CreateConfigResponse, dJ as CreateConfigError, dM as DeleteConfigData, dQ as DeleteConfigResponse, dO as DeleteConfigError, dR as RetrieveConfigData, g as ConfigResponse, dT as RetrieveConfigError, dW as UpdateConfigData, d_ as UpdateConfigResponse, dY as UpdateConfigError, d$ as EmailValidationData, E as EmailResponse, e1 as EmailValidationError, e4 as PhoneNumberValidationData, P as PhoneNumberResponse, e6 as PhoneNumberValidationError } from './types.gen-l7tYP1ZJ.js';
4
+ import { O as Options } from './sdk.gen-_z1PNdoT.js';
5
+
6
+ type QueryKey<TOptions extends Options> = [
7
+ Pick<TOptions, "baseUrl" | "body" | "headers" | "path" | "query"> & {
8
+ _id: string;
9
+ _infinite?: boolean;
10
+ tags?: ReadonlyArray<string>;
11
+ }
12
+ ];
13
+ declare const postcodesQueryKey: (options: Options<PostcodesData>) => [Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
14
+ _id: string;
15
+ _infinite?: boolean;
16
+ tags?: ReadonlyArray<string>;
17
+ }];
18
+ /**
19
+ * Lookup Postcode
20
+ *
21
+ * Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.
22
+ *
23
+ * The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like [Postcode Lookup](/docs/postcode-lookup/).
24
+ *
25
+ * ## Postcode Not Found
26
+ *
27
+ * Lookup balance is unaffected by invalid postcodes. The API returns a `404` response with response body:
28
+ *
29
+ * ```json
30
+ * {
31
+ * "code": 4040,
32
+ * "message": "Postcode not found",
33
+ * "suggestions": ["SW1A 0AA"]
34
+ * }
35
+ * ```
36
+ *
37
+ * ### Suggestions
38
+ *
39
+ * If a postcode cannot be found, the API will provide up to 5 closest matching postcodes. Common errors will be corrected first (e.g. mixing up `O` and `0` or `I` and `1`).
40
+ *
41
+ * If the suggestion list is small (fewer than 3), there is a high probability the correct postcode is there. You may notify the user or immediately trigger new searches.
42
+ *
43
+ * The suggestion list will be empty if the postcode has deviated too far from a valid postcode format.
44
+ *
45
+ * ## Multiple Residence
46
+ *
47
+ * A small number of postcodes will return more than 100 premises. These may require pagination. Use `page` to paginate the result set.
48
+ *
49
+ */
50
+ declare const postcodesOptions: (options: Options<PostcodesData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<PostcodeResponse, PostcodesError, PostcodeResponse, [Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
51
+ _id: string;
52
+ _infinite?: boolean;
53
+ tags?: ReadonlyArray<string>;
54
+ }]>, "queryFn"> & {
55
+ queryFn?: _tanstack_react_query.QueryFunction<PostcodeResponse, [Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
56
+ _id: string;
57
+ _infinite?: boolean;
58
+ tags?: ReadonlyArray<string>;
59
+ }], never> | undefined;
60
+ } & {
61
+ queryKey: [Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
62
+ _id: string;
63
+ _infinite?: boolean;
64
+ tags?: ReadonlyArray<string>;
65
+ }] & {
66
+ [dataTagSymbol]: PostcodeResponse;
67
+ [dataTagErrorSymbol]: PostcodesError;
68
+ };
69
+ };
70
+ declare const postcodesInfiniteQueryKey: (options: Options<PostcodesData>) => QueryKey<Options<PostcodesData>>;
71
+ /**
72
+ * Lookup Postcode
73
+ *
74
+ * Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.
75
+ *
76
+ * The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like [Postcode Lookup](/docs/postcode-lookup/).
77
+ *
78
+ * ## Postcode Not Found
79
+ *
80
+ * Lookup balance is unaffected by invalid postcodes. The API returns a `404` response with response body:
81
+ *
82
+ * ```json
83
+ * {
84
+ * "code": 4040,
85
+ * "message": "Postcode not found",
86
+ * "suggestions": ["SW1A 0AA"]
87
+ * }
88
+ * ```
89
+ *
90
+ * ### Suggestions
91
+ *
92
+ * If a postcode cannot be found, the API will provide up to 5 closest matching postcodes. Common errors will be corrected first (e.g. mixing up `O` and `0` or `I` and `1`).
93
+ *
94
+ * If the suggestion list is small (fewer than 3), there is a high probability the correct postcode is there. You may notify the user or immediately trigger new searches.
95
+ *
96
+ * The suggestion list will be empty if the postcode has deviated too far from a valid postcode format.
97
+ *
98
+ * ## Multiple Residence
99
+ *
100
+ * A small number of postcodes will return more than 100 premises. These may require pagination. Use `page` to paginate the result set.
101
+ *
102
+ */
103
+ declare const postcodesInfiniteOptions: (options: Options<PostcodesData>) => _tanstack_react_query.UseInfiniteQueryOptions<PostcodeResponse, PostcodesError, InfiniteData<PostcodeResponse, unknown>, QueryKey<Options<PostcodesData>>, number | Pick<Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
104
+ _id: string;
105
+ _infinite?: boolean;
106
+ tags?: ReadonlyArray<string>;
107
+ }, "query" | "body" | "headers" | "path">> & {
108
+ initialData: InfiniteData<PostcodeResponse, number | Pick<Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
109
+ _id: string;
110
+ _infinite?: boolean;
111
+ tags?: ReadonlyArray<string>;
112
+ }, "query" | "body" | "headers" | "path">> | (() => InfiniteData<PostcodeResponse, number | Pick<Pick<Options<PostcodesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
113
+ _id: string;
114
+ _infinite?: boolean;
115
+ tags?: ReadonlyArray<string>;
116
+ }, "query" | "body" | "headers" | "path">>) | undefined;
117
+ } & {
118
+ queryKey: QueryKey<Options<PostcodesData>> & {
119
+ [dataTagSymbol]: InfiniteData<PostcodeResponse, unknown>;
120
+ [dataTagErrorSymbol]: PostcodesError;
121
+ };
122
+ };
123
+ declare const keyAvailabilityQueryKey: (options: Options<KeyAvailabilityData>) => [Pick<Options<KeyAvailabilityData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
124
+ _id: string;
125
+ _infinite?: boolean;
126
+ tags?: ReadonlyArray<string>;
127
+ }];
128
+ /**
129
+ * Availability
130
+ *
131
+ * Returns public information on your API Key.
132
+ *
133
+ * This endpoint can be used for the following:
134
+ * - Determine if the key is currently usable via the `available` property
135
+ * - Determine available contexts for an API Key
136
+ * - Identify the currently likely context of a user given their location
137
+ *
138
+ * You may pass both API Keys (beginning `ak_`) and Sub-licensed Keys (beginning `sl_`).
139
+ *
140
+ */
141
+ declare const keyAvailabilityOptions: (options: Options<KeyAvailabilityData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ApiKeyResponse, ErrorResponse, ApiKeyResponse, [Pick<Options<KeyAvailabilityData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
142
+ _id: string;
143
+ _infinite?: boolean;
144
+ tags?: ReadonlyArray<string>;
145
+ }]>, "queryFn"> & {
146
+ queryFn?: _tanstack_react_query.QueryFunction<ApiKeyResponse, [Pick<Options<KeyAvailabilityData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
147
+ _id: string;
148
+ _infinite?: boolean;
149
+ tags?: ReadonlyArray<string>;
150
+ }], never> | undefined;
151
+ } & {
152
+ queryKey: [Pick<Options<KeyAvailabilityData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
153
+ _id: string;
154
+ _infinite?: boolean;
155
+ tags?: ReadonlyArray<string>;
156
+ }] & {
157
+ [dataTagSymbol]: ApiKeyResponse;
158
+ [dataTagErrorSymbol]: ErrorResponse;
159
+ };
160
+ };
161
+ declare const keyDetailsQueryKey: (options: Options<KeyDetailsData>) => [Pick<Options<KeyDetailsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
162
+ _id: string;
163
+ _infinite?: boolean;
164
+ tags?: ReadonlyArray<string>;
165
+ }];
166
+ /**
167
+ * Details
168
+ *
169
+ * Returns private data on the key including remaining lookups, available datasets and usage limits.
170
+ *
171
+ */
172
+ declare const keyDetailsOptions: (options: Options<KeyDetailsData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ApiKeyDetailsResponse, ErrorResponse, ApiKeyDetailsResponse, [Pick<Options<KeyDetailsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
173
+ _id: string;
174
+ _infinite?: boolean;
175
+ tags?: ReadonlyArray<string>;
176
+ }]>, "queryFn"> & {
177
+ queryFn?: _tanstack_react_query.QueryFunction<ApiKeyDetailsResponse, [Pick<Options<KeyDetailsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
178
+ _id: string;
179
+ _infinite?: boolean;
180
+ tags?: ReadonlyArray<string>;
181
+ }], never> | undefined;
182
+ } & {
183
+ queryKey: [Pick<Options<KeyDetailsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
184
+ _id: string;
185
+ _infinite?: boolean;
186
+ tags?: ReadonlyArray<string>;
187
+ }] & {
188
+ [dataTagSymbol]: ApiKeyDetailsResponse;
189
+ [dataTagErrorSymbol]: ErrorResponse;
190
+ };
191
+ };
192
+ /**
193
+ * Update Details
194
+ *
195
+ * Update API Key Details
196
+ */
197
+ declare const updateKeyDetailsMutation: (options?: Partial<Options<UpdateKeyDetailsData>>) => UseMutationOptions<UpdateKeyDetailsResponse, UpdateKeyDetailsError, Options<UpdateKeyDetailsData>>;
198
+ declare const keyUsageQueryKey: (options: Options<KeyUsageData>) => [Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
199
+ _id: string;
200
+ _infinite?: boolean;
201
+ tags?: ReadonlyArray<string>;
202
+ }];
203
+ /**
204
+ * Usage Stats
205
+ *
206
+ * Reports the number of lookups consumed on a key for a range of days.
207
+ *
208
+ * A maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.
209
+ *
210
+ * If no `start` time is provided, the start time will be set to 21 days prior to the current time.
211
+ *
212
+ * If no `end` time is provided, the current time will be used.
213
+ *
214
+ * Append `tags` to scope the number of lookups to those with matching tag values. E.g. `tags=foo,bar` will only count transactions that match `foo` and `bar`.
215
+ *
216
+ */
217
+ declare const keyUsageOptions: (options: Options<KeyUsageData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ApiKeyUsageResponse, BadRequestResponse, ApiKeyUsageResponse, [Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
218
+ _id: string;
219
+ _infinite?: boolean;
220
+ tags?: ReadonlyArray<string>;
221
+ }]>, "queryFn"> & {
222
+ queryFn?: _tanstack_react_query.QueryFunction<ApiKeyUsageResponse, [Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
223
+ _id: string;
224
+ _infinite?: boolean;
225
+ tags?: ReadonlyArray<string>;
226
+ }], never> | undefined;
227
+ } & {
228
+ queryKey: [Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
229
+ _id: string;
230
+ _infinite?: boolean;
231
+ tags?: ReadonlyArray<string>;
232
+ }] & {
233
+ [dataTagSymbol]: ApiKeyUsageResponse;
234
+ [dataTagErrorSymbol]: BadRequestResponse;
235
+ };
236
+ };
237
+ declare const keyUsageInfiniteQueryKey: (options: Options<KeyUsageData>) => QueryKey<Options<KeyUsageData>>;
238
+ /**
239
+ * Usage Stats
240
+ *
241
+ * Reports the number of lookups consumed on a key for a range of days.
242
+ *
243
+ * A maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.
244
+ *
245
+ * If no `start` time is provided, the start time will be set to 21 days prior to the current time.
246
+ *
247
+ * If no `end` time is provided, the current time will be used.
248
+ *
249
+ * Append `tags` to scope the number of lookups to those with matching tag values. E.g. `tags=foo,bar` will only count transactions that match `foo` and `bar`.
250
+ *
251
+ */
252
+ declare const keyUsageInfiniteOptions: (options: Options<KeyUsageData>) => _tanstack_react_query.UseInfiniteQueryOptions<ApiKeyUsageResponse, BadRequestResponse, InfiniteData<ApiKeyUsageResponse, unknown>, QueryKey<Options<KeyUsageData>>, number | Pick<Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
253
+ _id: string;
254
+ _infinite?: boolean;
255
+ tags?: ReadonlyArray<string>;
256
+ }, "query" | "body" | "headers" | "path">> & {
257
+ initialData: InfiniteData<ApiKeyUsageResponse, number | Pick<Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
258
+ _id: string;
259
+ _infinite?: boolean;
260
+ tags?: ReadonlyArray<string>;
261
+ }, "query" | "body" | "headers" | "path">> | (() => InfiniteData<ApiKeyUsageResponse, number | Pick<Pick<Options<KeyUsageData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
262
+ _id: string;
263
+ _infinite?: boolean;
264
+ tags?: ReadonlyArray<string>;
265
+ }, "query" | "body" | "headers" | "path">>) | undefined;
266
+ } & {
267
+ queryKey: QueryKey<Options<KeyUsageData>> & {
268
+ [dataTagSymbol]: InfiniteData<ApiKeyUsageResponse, unknown>;
269
+ [dataTagErrorSymbol]: BadRequestResponse;
270
+ };
271
+ };
272
+ declare const keyLogsQueryKey: (options: Options<KeyLogsData>) => [Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
273
+ _id: string;
274
+ _infinite?: boolean;
275
+ tags?: ReadonlyArray<string>;
276
+ }];
277
+ /**
278
+ * Logs (CSV)
279
+ *
280
+ * Reports lookup information on a key for paid lookups.
281
+ *
282
+ * This method requires a `user_token`, which can be found on your [accounts page](https://ideal-postcodes.co.uk/account).
283
+ *
284
+ * A maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.
285
+ *
286
+ * ## Download Usage History (CSV)
287
+ *
288
+ * `GET /keys/:key/lookups`
289
+ *
290
+ * Returns a CSV download of lookups performed and associated information.
291
+ *
292
+ * Note that the Content-Type returned will be CSV (text/csv). For a non 200 response, the `Content-Type` will revert to JSON with the error code and message embedded.
293
+ *
294
+ * ## Data Redaction
295
+ *
296
+ * Personally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.
297
+ *
298
+ * By default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.
299
+ *
300
+ * You may prevent PII collection altogether by setting the interval to `0` days.
301
+ *
302
+ */
303
+ declare const keyLogsOptions: (options: Options<KeyLogsData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<string, BadRequestResponse, string, [Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
304
+ _id: string;
305
+ _infinite?: boolean;
306
+ tags?: ReadonlyArray<string>;
307
+ }]>, "queryFn"> & {
308
+ queryFn?: _tanstack_react_query.QueryFunction<string, [Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
309
+ _id: string;
310
+ _infinite?: boolean;
311
+ tags?: ReadonlyArray<string>;
312
+ }], never> | undefined;
313
+ } & {
314
+ queryKey: [Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
315
+ _id: string;
316
+ _infinite?: boolean;
317
+ tags?: ReadonlyArray<string>;
318
+ }] & {
319
+ [dataTagSymbol]: string;
320
+ [dataTagErrorSymbol]: BadRequestResponse;
321
+ };
322
+ };
323
+ declare const keyLogsInfiniteQueryKey: (options: Options<KeyLogsData>) => QueryKey<Options<KeyLogsData>>;
324
+ /**
325
+ * Logs (CSV)
326
+ *
327
+ * Reports lookup information on a key for paid lookups.
328
+ *
329
+ * This method requires a `user_token`, which can be found on your [accounts page](https://ideal-postcodes.co.uk/account).
330
+ *
331
+ * A maximum interval of 90 days can be provided for analysis. If no start or end date is provided, the last 21 days will be used as the default interval.
332
+ *
333
+ * ## Download Usage History (CSV)
334
+ *
335
+ * `GET /keys/:key/lookups`
336
+ *
337
+ * Returns a CSV download of lookups performed and associated information.
338
+ *
339
+ * Note that the Content-Type returned will be CSV (text/csv). For a non 200 response, the `Content-Type` will revert to JSON with the error code and message embedded.
340
+ *
341
+ * ## Data Redaction
342
+ *
343
+ * Personally Identifiable Data (PII) caught in this your usage log (including IP, search term and URL data) will be redacted on a weekly basis.
344
+ *
345
+ * By default, PII will be redacted if it is older than 21 days. This timeframe can be configured from your dashboard.
346
+ *
347
+ * You may prevent PII collection altogether by setting the interval to `0` days.
348
+ *
349
+ */
350
+ declare const keyLogsInfiniteOptions: (options: Options<KeyLogsData>) => _tanstack_react_query.UseInfiniteQueryOptions<string, BadRequestResponse, InfiniteData<string, unknown>, QueryKey<Options<KeyLogsData>>, number | Pick<Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
351
+ _id: string;
352
+ _infinite?: boolean;
353
+ tags?: ReadonlyArray<string>;
354
+ }, "query" | "body" | "headers" | "path">> & {
355
+ initialData: InfiniteData<string, number | Pick<Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
356
+ _id: string;
357
+ _infinite?: boolean;
358
+ tags?: ReadonlyArray<string>;
359
+ }, "query" | "body" | "headers" | "path">> | (() => InfiniteData<string, number | Pick<Pick<Options<KeyLogsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
360
+ _id: string;
361
+ _infinite?: boolean;
362
+ tags?: ReadonlyArray<string>;
363
+ }, "query" | "body" | "headers" | "path">>) | undefined;
364
+ } & {
365
+ queryKey: QueryKey<Options<KeyLogsData>> & {
366
+ [dataTagSymbol]: InfiniteData<string, unknown>;
367
+ [dataTagErrorSymbol]: BadRequestResponse;
368
+ };
369
+ };
370
+ /**
371
+ * Cleanse Address
372
+ *
373
+ * The address cleanse API attempts to return the closest matching address for any given address inputs. We also return a number of Match Level indicators that describe the degree to which the suggested address matches the input address. The more impaired the input address, the harder it is to cleanse.
374
+ *
375
+ * ## Confidence Score
376
+ *
377
+ * The confidence score is a number ranging between 0 and 1. Where 1 implies a full match and 0 implies no major elements completely match. Each incorrect, missing or misspelled element will subtract from the overall confidence score.
378
+ *
379
+ * ### Deciding on an Acceptable Confidence Score Threshold
380
+ *
381
+ * Different address cleanse projects can have radically different inputs. However, within each project, the inputs tend to repeat the same errors. For instance, some input datasets may be exclusively inputted manually and be prone to typos. Others may have a persistently missing datapoint such as organisation name or postcode. For this reason, it is important to understand that there is no absolute Confidence Score threshold. Instead, the acceptable confidence score must be determined on a project by project basis based on systematic errors present in the data and business goals.
382
+ *
383
+ * When determining an acceptable Confidence Score threshold you should load a subset of the dataset into a spreadsheet application like Excel and sort on the score. Scrolling from top-to-bottom you will be able to observe matches from best to worst. As you start to hit the lower quality searches, you will be able to roughly determine:
384
+ * - Which confidence scores indicate ambiguous matches (i.e. up to building level only)
385
+ * - Which confidence scores indicate a poor or no match (i.e. the nearest matching address is too far from the input address)
386
+ *
387
+ * Depending on your business goals, you can also use the Match Levels to determine an acceptable match. For instance, do you need to match up to the thoroughfare or building name only? Are accurate organisation names an important feature?
388
+ *
389
+ */
390
+ declare const addressCleanseMutation: (options?: Partial<Options<AddressCleanseData>>) => UseMutationOptions<AddressCleanseResponse, AddressCleanseError, Options<AddressCleanseData>>;
391
+ declare const findAddressQueryKey: (options?: Options<FindAddressData>) => [Pick<Options<FindAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
392
+ _id: string;
393
+ _infinite?: boolean;
394
+ tags?: ReadonlyArray<string>;
395
+ }];
396
+ /**
397
+ * Find Address
398
+ *
399
+ * The Address Autocomplete API delivers address suggestions in order of relevance based on a provided query. It aids real-time address autofill implementations.
400
+ *
401
+ * Consider using our Address Autocomplete JavaScript libraries to add address lookup to a form in moments rather than interacting with this API directly.
402
+ *
403
+ * ## API Usage
404
+ *
405
+ * Implementing our Address Autocomplete API involves:
406
+ *
407
+ * 1. Fetch address suggestions with `/autocomplete/addresses`
408
+ * 2. Acquire the complete address using the ID from the suggestion
409
+ *
410
+ * Step 2 will decrement your lookup balance.
411
+ *
412
+ * Note that step 1 is not a free standalone resource. Integrations that consistently make autocomplete requests without a paid Step 2 request will be rate limited and then suspended.
413
+ *
414
+ * ## Query Filters
415
+ *
416
+ * Refine results by appending filters to your querystring, e.g., `postcode=sw1a2aa` for postcode `SW1A 2AA`. Invalid filters return an empty set without affecting your lookup count.
417
+ *
418
+ * To apply multiple filter terms, use a comma-separated list, e.g., `postcode_outward=e1,e2,e3` combines result sets for E1, E2, and E3. Unless otherwise specified, all filters support multiple terms.
419
+ *
420
+ * Combine filters by `AND` logic, for instance, `su_organisation_indicator=Y&postcode_area=n`. The maximum allowed filter terms is **10**.
421
+ *
422
+ * ## Address Bias
423
+ *
424
+ * Preface bias searches with `bias_` to boost certain address results. Unlike filters, biasing allows unmatched addresses to appear with lower priority.
425
+ *
426
+ * For example, use `bias_postcode_area=SW,SE` to favor addresses in the `SW` and `SE` postcode areas. Invalid bias terms have no effect.
427
+ *
428
+ * Multiple bias terms are allowed unless stated otherwise, with a combined maximum of **5**.
429
+ *
430
+ * ## Suggestion Format
431
+ *
432
+ * The suggestion format is subject to change. We recommend using the suggestion as-is to prevent potential integration issues.
433
+ *
434
+ * ## Rate Limiting and Cost
435
+ *
436
+ * The rate limit for the Autocomplete API is 3000 requests per 5 minutes. HTTP Headers inform about the current rate limit.
437
+ *
438
+ * Autocomplete API usage does not impact your balance, but resolving a suggestion to a full address requires a paid request. Autocomplete requests without subsequent paid requests may result in rate limitation or suspension.
439
+ *
440
+ */
441
+ declare const findAddressOptions: (options?: Options<FindAddressData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<AutocompleteResponse, BadRequestResponse, AutocompleteResponse, [Pick<Options<FindAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
442
+ _id: string;
443
+ _infinite?: boolean;
444
+ tags?: ReadonlyArray<string>;
445
+ }]>, "queryFn"> & {
446
+ queryFn?: _tanstack_react_query.QueryFunction<AutocompleteResponse, [Pick<Options<FindAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
447
+ _id: string;
448
+ _infinite?: boolean;
449
+ tags?: ReadonlyArray<string>;
450
+ }], never> | undefined;
451
+ } & {
452
+ queryKey: [Pick<Options<FindAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
453
+ _id: string;
454
+ _infinite?: boolean;
455
+ tags?: ReadonlyArray<string>;
456
+ }] & {
457
+ [dataTagSymbol]: AutocompleteResponse;
458
+ [dataTagErrorSymbol]: BadRequestResponse;
459
+ };
460
+ };
461
+ declare const resolveAddressQueryKey: (options: Options<ResolveAddressData>) => [Pick<Options<ResolveAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
462
+ _id: string;
463
+ _infinite?: boolean;
464
+ tags?: ReadonlyArray<string>;
465
+ }];
466
+ /**
467
+ * Resolve Address
468
+ *
469
+ * Resolves an address autocompletion by its address ID.
470
+ *
471
+ * Resolved addresses (including global addresses) are returned in a UK format (up to 3 address lines) using UK nomenclature (like postcode and county).
472
+ *
473
+ */
474
+ declare const resolveAddressOptions: (options: Options<ResolveAddressData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<GbrResolveAddressResponse, ErrorResponse, GbrResolveAddressResponse, [Pick<Options<ResolveAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
475
+ _id: string;
476
+ _infinite?: boolean;
477
+ tags?: ReadonlyArray<string>;
478
+ }]>, "queryFn"> & {
479
+ queryFn?: _tanstack_react_query.QueryFunction<GbrResolveAddressResponse, [Pick<Options<ResolveAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
480
+ _id: string;
481
+ _infinite?: boolean;
482
+ tags?: ReadonlyArray<string>;
483
+ }], never> | undefined;
484
+ } & {
485
+ queryKey: [Pick<Options<ResolveAddressData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
486
+ _id: string;
487
+ _infinite?: boolean;
488
+ tags?: ReadonlyArray<string>;
489
+ }] & {
490
+ [dataTagSymbol]: GbrResolveAddressResponse;
491
+ [dataTagErrorSymbol]: ErrorResponse;
492
+ };
493
+ };
494
+ declare const findPlaceQueryKey: (options?: Options<FindPlaceData>) => [Pick<Options<FindPlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
495
+ _id: string;
496
+ _infinite?: boolean;
497
+ tags?: ReadonlyArray<string>;
498
+ }];
499
+ /**
500
+ * Find Place
501
+ *
502
+ * Query for geographical places across countries. Each query will return a list of place suggestions, which consists of a place name, descriptive name and id.
503
+ *
504
+ * This API returns geographical information such as countries, capitals, administrative areas and more. It is ideal for correctly identifying a place along with any other details like geolocation.
505
+ *
506
+ * ## Implementing Place Autocomplete
507
+ *
508
+ * Extracting the full information of a place is a 2 step process:
509
+ *
510
+ * 1. Retrieve place suggestions via /places
511
+ * 2. Retrieve the entire place with the ID provided in the suggestion
512
+ *
513
+ * ## Suggestion Format
514
+ *
515
+ * Each place suggestion contains a descriptive name which you can provide to users to uniquely identify a place.
516
+ *
517
+ * ## Rate Limiting and Cost
518
+ *
519
+ * The rate limit for the Autocomplete API is 3000 requests per 5 minutes. HTTP Headers inform about the current rate limit.
520
+ *
521
+ * Autocomplete API usage does not impact your balance, but resolving a suggestion to a full address requires a paid request. Autocomplete requests without subsequent paid requests may result in rate limitation or suspension.
522
+ *
523
+ */
524
+ declare const findPlaceOptions: (options?: Options<FindPlaceData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<PlaceResponse, BadRequestResponse, PlaceResponse, [Pick<Options<FindPlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
525
+ _id: string;
526
+ _infinite?: boolean;
527
+ tags?: ReadonlyArray<string>;
528
+ }]>, "queryFn"> & {
529
+ queryFn?: _tanstack_react_query.QueryFunction<PlaceResponse, [Pick<Options<FindPlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
530
+ _id: string;
531
+ _infinite?: boolean;
532
+ tags?: ReadonlyArray<string>;
533
+ }], never> | undefined;
534
+ } & {
535
+ queryKey: [Pick<Options<FindPlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
536
+ _id: string;
537
+ _infinite?: boolean;
538
+ tags?: ReadonlyArray<string>;
539
+ }] & {
540
+ [dataTagSymbol]: PlaceResponse;
541
+ [dataTagErrorSymbol]: BadRequestResponse;
542
+ };
543
+ };
544
+ declare const resolvePlaceQueryKey: (options: Options<ResolvePlaceData>) => [Pick<Options<ResolvePlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
545
+ _id: string;
546
+ _infinite?: boolean;
547
+ tags?: ReadonlyArray<string>;
548
+ }];
549
+ /**
550
+ * Resolve Place
551
+ *
552
+ * Resolves a place autocompletion by its place ID.
553
+ *
554
+ */
555
+ declare const resolvePlaceOptions: (options: Options<ResolvePlaceData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ResolvePlaceResponse, ErrorResponse, ResolvePlaceResponse, [Pick<Options<ResolvePlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
556
+ _id: string;
557
+ _infinite?: boolean;
558
+ tags?: ReadonlyArray<string>;
559
+ }]>, "queryFn"> & {
560
+ queryFn?: _tanstack_react_query.QueryFunction<ResolvePlaceResponse, [Pick<Options<ResolvePlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
561
+ _id: string;
562
+ _infinite?: boolean;
563
+ tags?: ReadonlyArray<string>;
564
+ }], never> | undefined;
565
+ } & {
566
+ queryKey: [Pick<Options<ResolvePlaceData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
567
+ _id: string;
568
+ _infinite?: boolean;
569
+ tags?: ReadonlyArray<string>;
570
+ }] & {
571
+ [dataTagSymbol]: ResolvePlaceResponse;
572
+ [dataTagErrorSymbol]: ErrorResponse;
573
+ };
574
+ };
575
+ declare const listLicenseesQueryKey: (options: Options<ListLicenseesData>) => [Pick<Options<ListLicenseesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
576
+ _id: string;
577
+ _infinite?: boolean;
578
+ tags?: ReadonlyArray<string>;
579
+ }];
580
+ /**
581
+ * List
582
+ *
583
+ * Returns a list of licensees for a key.
584
+ */
585
+ declare const listLicenseesOptions: (options: Options<ListLicenseesData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<LicenseesResponse, BadRequestResponse, LicenseesResponse, [Pick<Options<ListLicenseesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
586
+ _id: string;
587
+ _infinite?: boolean;
588
+ tags?: ReadonlyArray<string>;
589
+ }]>, "queryFn"> & {
590
+ queryFn?: _tanstack_react_query.QueryFunction<LicenseesResponse, [Pick<Options<ListLicenseesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
591
+ _id: string;
592
+ _infinite?: boolean;
593
+ tags?: ReadonlyArray<string>;
594
+ }], never> | undefined;
595
+ } & {
596
+ queryKey: [Pick<Options<ListLicenseesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
597
+ _id: string;
598
+ _infinite?: boolean;
599
+ tags?: ReadonlyArray<string>;
600
+ }] & {
601
+ [dataTagSymbol]: LicenseesResponse;
602
+ [dataTagErrorSymbol]: BadRequestResponse;
603
+ };
604
+ };
605
+ /**
606
+ * Create
607
+ *
608
+ * Create a licensee for the specified API Key.
609
+ */
610
+ declare const createLicenseeMutation: (options?: Partial<Options<CreateLicenseeData>>) => UseMutationOptions<CreateLicenseeResponse, CreateLicenseeError, Options<CreateLicenseeData>>;
611
+ /**
612
+ * Cancel
613
+ *
614
+ * Cancels a licensee key. This renders a licensee unusable. This action can be reversed if you get in contact with us.
615
+ */
616
+ declare const deleteLicenseeMutation: (options?: Partial<Options<DeleteLicenseeData>>) => UseMutationOptions<DeleteLicenseeResponse, DeleteLicenseeError, Options<DeleteLicenseeData>>;
617
+ declare const retrieveLicenseeQueryKey: (options: Options<RetrieveLicenseeData>) => [Pick<Options<RetrieveLicenseeData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
618
+ _id: string;
619
+ _infinite?: boolean;
620
+ tags?: ReadonlyArray<string>;
621
+ }];
622
+ /**
623
+ * Retrieve
624
+ *
625
+ * Returns licensee information as identified by the licensee key.
626
+ */
627
+ declare const retrieveLicenseeOptions: (options: Options<RetrieveLicenseeData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<LicenseeResponse, BadRequestResponse, LicenseeResponse, [Pick<Options<RetrieveLicenseeData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
628
+ _id: string;
629
+ _infinite?: boolean;
630
+ tags?: ReadonlyArray<string>;
631
+ }]>, "queryFn"> & {
632
+ queryFn?: _tanstack_react_query.QueryFunction<LicenseeResponse, [Pick<Options<RetrieveLicenseeData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
633
+ _id: string;
634
+ _infinite?: boolean;
635
+ tags?: ReadonlyArray<string>;
636
+ }], never> | undefined;
637
+ } & {
638
+ queryKey: [Pick<Options<RetrieveLicenseeData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
639
+ _id: string;
640
+ _infinite?: boolean;
641
+ tags?: ReadonlyArray<string>;
642
+ }] & {
643
+ [dataTagSymbol]: LicenseeResponse;
644
+ [dataTagErrorSymbol]: BadRequestResponse;
645
+ };
646
+ };
647
+ /**
648
+ * Update
649
+ *
650
+ * Update Licensee
651
+ */
652
+ declare const updateLicenseeMutation: (options?: Partial<Options<UpdateLicenseeData>>) => UseMutationOptions<UpdateLicenseeResponse, UpdateLicenseeError, Options<UpdateLicenseeData>>;
653
+ declare const listConfigsQueryKey: (options: Options<ListConfigsData>) => [Pick<Options<ListConfigsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
654
+ _id: string;
655
+ _infinite?: boolean;
656
+ tags?: ReadonlyArray<string>;
657
+ }];
658
+ /**
659
+ * List
660
+ *
661
+ * Lists configurations associated with a key
662
+ */
663
+ declare const listConfigsOptions: (options: Options<ListConfigsData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ConfigsResponse, ListConfigsError, ConfigsResponse, [Pick<Options<ListConfigsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
664
+ _id: string;
665
+ _infinite?: boolean;
666
+ tags?: ReadonlyArray<string>;
667
+ }]>, "queryFn"> & {
668
+ queryFn?: _tanstack_react_query.QueryFunction<ConfigsResponse, [Pick<Options<ListConfigsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
669
+ _id: string;
670
+ _infinite?: boolean;
671
+ tags?: ReadonlyArray<string>;
672
+ }], never> | undefined;
673
+ } & {
674
+ queryKey: [Pick<Options<ListConfigsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
675
+ _id: string;
676
+ _infinite?: boolean;
677
+ tags?: ReadonlyArray<string>;
678
+ }] & {
679
+ [dataTagSymbol]: ConfigsResponse;
680
+ [dataTagErrorSymbol]: ListConfigsError;
681
+ };
682
+ };
683
+ /**
684
+ * Create
685
+ *
686
+ * Create a configuration
687
+ */
688
+ declare const createConfigMutation: (options?: Partial<Options<CreateConfigData>>) => UseMutationOptions<CreateConfigResponse, CreateConfigError, Options<CreateConfigData>>;
689
+ /**
690
+ * Delete
691
+ *
692
+ * Permanently deletes a configuration object.
693
+ */
694
+ declare const deleteConfigMutation: (options?: Partial<Options<DeleteConfigData>>) => UseMutationOptions<DeleteConfigResponse, DeleteConfigError, Options<DeleteConfigData>>;
695
+ declare const retrieveConfigQueryKey: (options: Options<RetrieveConfigData>) => [Pick<Options<RetrieveConfigData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
696
+ _id: string;
697
+ _infinite?: boolean;
698
+ tags?: ReadonlyArray<string>;
699
+ }];
700
+ /**
701
+ * Retrieve
702
+ *
703
+ * Retrieve configuration object by name
704
+ */
705
+ declare const retrieveConfigOptions: (options: Options<RetrieveConfigData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<ConfigResponse, RetrieveConfigError, ConfigResponse, [Pick<Options<RetrieveConfigData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
706
+ _id: string;
707
+ _infinite?: boolean;
708
+ tags?: ReadonlyArray<string>;
709
+ }]>, "queryFn"> & {
710
+ queryFn?: _tanstack_react_query.QueryFunction<ConfigResponse, [Pick<Options<RetrieveConfigData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
711
+ _id: string;
712
+ _infinite?: boolean;
713
+ tags?: ReadonlyArray<string>;
714
+ }], never> | undefined;
715
+ } & {
716
+ queryKey: [Pick<Options<RetrieveConfigData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
717
+ _id: string;
718
+ _infinite?: boolean;
719
+ tags?: ReadonlyArray<string>;
720
+ }] & {
721
+ [dataTagSymbol]: ConfigResponse;
722
+ [dataTagErrorSymbol]: RetrieveConfigError;
723
+ };
724
+ };
725
+ /**
726
+ * Update
727
+ *
728
+ * Updates configuration object
729
+ */
730
+ declare const updateConfigMutation: (options?: Partial<Options<UpdateConfigData>>) => UseMutationOptions<UpdateConfigResponse, UpdateConfigError, Options<UpdateConfigData>>;
731
+ declare const emailValidationQueryKey: (options: Options<EmailValidationData>) => [Pick<Options<EmailValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
732
+ _id: string;
733
+ _infinite?: boolean;
734
+ tags?: ReadonlyArray<string>;
735
+ }];
736
+ /**
737
+ * Email Validation
738
+ *
739
+ * Query for and validate email addresses.
740
+ *
741
+ */
742
+ declare const emailValidationOptions: (options: Options<EmailValidationData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<EmailResponse, EmailValidationError, EmailResponse, [Pick<Options<EmailValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
743
+ _id: string;
744
+ _infinite?: boolean;
745
+ tags?: ReadonlyArray<string>;
746
+ }]>, "queryFn"> & {
747
+ queryFn?: _tanstack_react_query.QueryFunction<EmailResponse, [Pick<Options<EmailValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
748
+ _id: string;
749
+ _infinite?: boolean;
750
+ tags?: ReadonlyArray<string>;
751
+ }], never> | undefined;
752
+ } & {
753
+ queryKey: [Pick<Options<EmailValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
754
+ _id: string;
755
+ _infinite?: boolean;
756
+ tags?: ReadonlyArray<string>;
757
+ }] & {
758
+ [dataTagSymbol]: EmailResponse;
759
+ [dataTagErrorSymbol]: EmailValidationError;
760
+ };
761
+ };
762
+ declare const phoneNumberValidationQueryKey: (options: Options<PhoneNumberValidationData>) => [Pick<Options<PhoneNumberValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
763
+ _id: string;
764
+ _infinite?: boolean;
765
+ tags?: ReadonlyArray<string>;
766
+ }];
767
+ /**
768
+ * Phone Number Validation
769
+ *
770
+ * Query for and validate phone numbers.
771
+ *
772
+ */
773
+ declare const phoneNumberValidationOptions: (options: Options<PhoneNumberValidationData>) => _tanstack_react_query.OmitKeyof<_tanstack_react_query.UseQueryOptions<PhoneNumberResponse, PhoneNumberValidationError, PhoneNumberResponse, [Pick<Options<PhoneNumberValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
774
+ _id: string;
775
+ _infinite?: boolean;
776
+ tags?: ReadonlyArray<string>;
777
+ }]>, "queryFn"> & {
778
+ queryFn?: _tanstack_react_query.QueryFunction<PhoneNumberResponse, [Pick<Options<PhoneNumberValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
779
+ _id: string;
780
+ _infinite?: boolean;
781
+ tags?: ReadonlyArray<string>;
782
+ }], never> | undefined;
783
+ } & {
784
+ queryKey: [Pick<Options<PhoneNumberValidationData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
785
+ _id: string;
786
+ _infinite?: boolean;
787
+ tags?: ReadonlyArray<string>;
788
+ }] & {
789
+ [dataTagSymbol]: PhoneNumberResponse;
790
+ [dataTagErrorSymbol]: PhoneNumberValidationError;
791
+ };
792
+ };
793
+
794
+ export { type QueryKey, addressCleanseMutation, createConfigMutation, createLicenseeMutation, deleteConfigMutation, deleteLicenseeMutation, emailValidationOptions, emailValidationQueryKey, findAddressOptions, findAddressQueryKey, findPlaceOptions, findPlaceQueryKey, keyAvailabilityOptions, keyAvailabilityQueryKey, keyDetailsOptions, keyDetailsQueryKey, keyLogsInfiniteOptions, keyLogsInfiniteQueryKey, keyLogsOptions, keyLogsQueryKey, keyUsageInfiniteOptions, keyUsageInfiniteQueryKey, keyUsageOptions, keyUsageQueryKey, listConfigsOptions, listConfigsQueryKey, listLicenseesOptions, listLicenseesQueryKey, phoneNumberValidationOptions, phoneNumberValidationQueryKey, postcodesInfiniteOptions, postcodesInfiniteQueryKey, postcodesOptions, postcodesQueryKey, resolveAddressOptions, resolveAddressQueryKey, resolvePlaceOptions, resolvePlaceQueryKey, retrieveConfigOptions, retrieveConfigQueryKey, retrieveLicenseeOptions, retrieveLicenseeQueryKey, updateConfigMutation, updateKeyDetailsMutation, updateLicenseeMutation };