@parseapi/sdk 0.3.2 → 1.0.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Response types for the ParseAPI public API.
3
- * Shapes are append-only upstream, so these only ever grow.
3
+ * Core answers the common task; optional deep reveals the reviewed detail.
4
4
  * Every field inside a deep object is optional and nullable: the API ships
5
5
  * `deep: {}` when deep was requested but is not unlocked on the plan.
6
6
  */
@@ -8,6 +8,29 @@
8
8
  type Deep<T> = Partial<{
9
9
  [K in keyof T]: T[K] | null;
10
10
  }>;
11
+ interface MeasureChoice {
12
+ unit: string;
13
+ name: string;
14
+ }
15
+ /** A parsed measurement. Amount is a decimal string, preserving the API's precision. */
16
+ interface Measure {
17
+ measure: string;
18
+ valid: boolean;
19
+ type: string | null;
20
+ amount: string | null;
21
+ unit: string | null;
22
+ reason: string | null;
23
+ choices: MeasureChoice[];
24
+ }
25
+ interface MeasureUnit {
26
+ unit: string;
27
+ name: string;
28
+ type: string;
29
+ aliases: string[];
30
+ }
31
+ interface MeasureUnits {
32
+ units: MeasureUnit[];
33
+ }
11
34
  interface IpDeep {
12
35
  state: string;
13
36
  city: string;
@@ -33,6 +56,8 @@ interface Continent {
33
56
  region: string;
34
57
  subregion: string;
35
58
  population: number | null;
59
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
60
+ population_period?: string | null;
36
61
  area: number | null;
37
62
  emoji: string;
38
63
  }
@@ -64,30 +89,18 @@ interface BlocCountries {
64
89
  }
65
90
  interface Country {
66
91
  country: string;
67
- iso3: string;
68
- numeric: number;
69
92
  name: string;
70
- full_name: string | null;
71
- local_name: string | null;
72
- demonym: string | null;
73
- capital: string | null;
74
- capital_lat: number | null;
75
- capital_lon: number | null;
93
+ name_local: string | null;
76
94
  continent: string;
77
- region: string | null;
78
- subregion: string | null;
79
- population: number | null;
80
- area: number | null;
81
95
  currency: string | null;
82
96
  currency_name: string | null;
83
97
  currency_symbol: string | null;
84
- tld: string | null;
85
98
  calling_code: string | null;
86
99
  emoji: string | null;
87
100
  languages: string[];
88
- borders: string[];
89
- /** Bloc memberships (EU, SCHENGEN, NATO, ...). Empty when none. */
90
- blocs: string[];
101
+ deep?: Deep<CountryDeep>;
102
+ /** IANA timezones used by the country. */
103
+ timezones: string[] | null;
91
104
  }
92
105
  interface CountryStateItem {
93
106
  state: string;
@@ -101,28 +114,27 @@ interface CountryStates {
101
114
  interface State {
102
115
  state: string;
103
116
  name: string;
104
- local_name: string | null;
117
+ name_local: string | null;
105
118
  type: string | null;
106
119
  country: string;
107
120
  country_name: string | null;
108
121
  latitude: number | null;
109
122
  longitude: number | null;
110
- population: number | null;
111
- /** Total area in km2. */
112
- area: number | null;
113
123
  timezone: string | null;
114
124
  timezones: string[];
115
125
  iso_3166_2: string | null;
116
- fips: string | null;
117
- capital: string | null;
118
- area_codes: string[];
119
- tax: string | null;
120
- tax_rate: number | null;
126
+ deep?: Deep<StateDeep>;
121
127
  }
122
128
  interface StateDistrictItem {
123
- district: string;
124
- name: string;
129
+ district: string | null;
130
+ name: string | null;
125
131
  type: string | null;
132
+ deep?: Deep<StateDistrictDeep>;
133
+ }
134
+ interface StateDistrictDeep {
135
+ population: number | null;
136
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
137
+ population_period?: string | null;
126
138
  }
127
139
  interface StateDistricts {
128
140
  state: string;
@@ -141,23 +153,14 @@ interface District {
141
153
  country_name: string | null;
142
154
  latitude: number | null;
143
155
  longitude: number | null;
144
- population: number | null;
145
- /** Total area in km2 (land + water, or the official total). */
146
- area: number | null;
147
- /** Land area in km2. Null when the source publishes total only. */
148
- land_area: number | null;
149
- /** Water area in km2. Null when the source publishes total only. */
150
- water_area: number | null;
151
- seat: string | null;
152
156
  timezone: string | null;
153
157
  timezones: string[];
158
+ deep?: Deep<DistrictDeep>;
154
159
  }
155
160
  interface City {
156
161
  name: string;
157
- local_name: string | null;
162
+ name_local: string | null;
158
163
  type: string | null;
159
- /** What this city is the capital of: country, state, or null. */
160
- capital_of: 'country' | 'state' | null;
161
164
  state: string | null;
162
165
  state_name: string | null;
163
166
  district: string | null;
@@ -166,18 +169,10 @@ interface City {
166
169
  country_name: string | null;
167
170
  latitude: number | null;
168
171
  longitude: number | null;
169
- elevation: number | null;
170
- elevation_ft: number | null;
171
- population: number | null;
172
- /** Total area in km2 (land + water, or the official total). */
173
- area: number | null;
174
- /** Land area in km2. Null when the source publishes total only. */
175
- land_area: number | null;
176
- /** Water area in km2. Null when the source publishes total only. */
177
- water_area: number | null;
178
172
  timezone: string | null;
179
173
  /** Minted parse id (`city_` + 12 chars). Stable pin via `/city/id/{id}`. */
180
174
  id: string;
175
+ deep?: Deep<CityDeep>;
181
176
  }
182
177
  /** Nearest-city lookups add the distance from the query point. */
183
178
  interface CityNearest extends City {
@@ -222,20 +217,8 @@ interface Postal {
222
217
  country_name: string | null;
223
218
  latitude: number | null;
224
219
  longitude: number | null;
225
- elevation: number | null;
226
- elevation_ft: number | null;
227
- population: number | null;
228
- /** Total area in km2. Null when the source has no water split. */
229
- area: number | null;
230
- /** Land area in km2. Null where the source has none. */
231
- land_area: number | null;
232
- /** Water area in km2. Null where the source has none. */
233
- water_area: number | null;
234
220
  timezone: string | null;
235
- currency: string | null;
236
- neighbors: string[];
237
- /** Missing/null is unknown; [] is an observed result outside all covered areas. */
238
- metros?: PostalMetro[] | null;
221
+ deep?: Deep<PostalDeep>;
239
222
  }
240
223
  interface PostalNearbyItem {
241
224
  postal: string;
@@ -244,20 +227,20 @@ interface PostalNearbyItem {
244
227
  country: string;
245
228
  distance: number;
246
229
  distance_mi: number;
247
- metros?: PostalMetro[] | null;
230
+ deep?: Deep<PostalMetrosDeep>;
248
231
  }
249
232
  interface PostalNearby {
250
233
  postal: string;
251
234
  country: string;
252
235
  radius: number;
253
236
  unit: string;
254
- metros?: PostalMetro[] | null;
255
237
  nearby: PostalNearbyItem[];
238
+ deep?: Deep<PostalMetrosDeep>;
256
239
  }
257
240
  interface PostalDistanceEnd {
258
241
  postal: string;
259
242
  city: string | null;
260
- metros?: PostalMetro[] | null;
243
+ deep?: Deep<PostalMetrosDeep>;
261
244
  }
262
245
  interface PostalDistance {
263
246
  country: string;
@@ -267,14 +250,16 @@ interface PostalDistance {
267
250
  distance_mi: number;
268
251
  }
269
252
  interface EmailDeep {
270
- deliverable: boolean;
271
- catchall: boolean;
253
+ deliverable: boolean | null;
254
+ catchall: boolean | null;
272
255
  }
273
256
  interface Email {
274
257
  email: string;
275
258
  didyoumean: string | null;
276
259
  valid: boolean;
260
+ free: boolean;
277
261
  domain: string | null;
262
+ domain_type: 'academic' | 'government' | 'military' | null;
278
263
  domain_valid: boolean | null;
279
264
  role: boolean;
280
265
  disposable: boolean;
@@ -291,7 +276,7 @@ interface VatDeep {
291
276
  name: string | null;
292
277
  address: VatAddress | null;
293
278
  consultation: string | null;
294
- /** Registry timestamp of this check, ISO. */
279
+ /** Registry-provided check time, or null when unavailable. */
295
280
  consulted_at: string | null;
296
281
  }
297
282
  interface Vat {
@@ -307,17 +292,13 @@ interface Iban {
307
292
  country: string | null;
308
293
  /** Print form in groups of four, for display. Null when invalid. */
309
294
  formatted: string | null;
310
- /** Two check digits as a string, keeping a leading zero. */
311
- checksum: string | null;
312
295
  /** Bank identifier parsed from the number, not a name. */
313
296
  bank: string | null;
314
297
  /** Institution name from the national bank-code directory. Null when unsourced. */
315
298
  bank_name: string | null;
316
299
  /** BIC from that same directory. Null when unsourced or missing. */
317
300
  bic: string | null;
318
- /** Branch identifier when that country has one. */
319
- branch: string | null;
320
- account: string | null;
301
+ deep?: Deep<IbanDeep>;
321
302
  }
322
303
  interface Npi {
323
304
  /** Normalized 10-digit NPI. Invalid input still echoes the fold. */
@@ -326,8 +307,6 @@ interface Npi {
326
307
  /** Exists in the CMS NPPES registry. */
327
308
  registered: boolean | null;
328
309
  active: boolean | null;
329
- /** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
330
- deactivated_at: string | null;
331
310
  /** On the OIG exclusion list. */
332
311
  excluded: boolean | null;
333
312
  /** individual or organization. */
@@ -361,6 +340,8 @@ interface NpiDeep {
361
340
  opt_out?: boolean | null;
362
341
  /** Enrollment rows. [] when medicare is false. */
363
342
  enrollments?: NpiEnrollment[] | null;
343
+ /** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
344
+ deactivated_at: string | null;
364
345
  }
365
346
  interface TariffMeasure {
366
347
  /** Chapter 99 heading, dotted (9903.01.24). */
@@ -373,6 +354,8 @@ interface TariffMeasure {
373
354
  from: string | null;
374
355
  /** Expires, ISO YYYY-MM-DD. Null when open-ended. */
375
356
  until: string | null;
357
+ /** True when the published measure has additional eligibility conditions. */
358
+ conditional?: boolean | null;
376
359
  }
377
360
  interface TariffDeep {
378
361
  /** The origin country the measures were resolved for. */
@@ -381,6 +364,12 @@ interface TariffDeep {
381
364
  effective_rate?: number | null;
382
365
  /** Every Chapter 99 tariff measure that applies to this code from this origin. */
383
366
  measures?: TariffMeasure[] | null;
367
+ /** Units of quantity (No., kg). */
368
+ units: string[];
369
+ /** Column 1 special rate, verbatim. */
370
+ special: string | null;
371
+ /** Column 2 rate, verbatim. */
372
+ other: string | null;
384
373
  }
385
374
  interface Tariff {
386
375
  /** Normalized code with dots (8471.30.01.00). */
@@ -389,14 +378,8 @@ interface Tariff {
389
378
  description: string;
390
379
  /** Parent descriptions from the schedule outline, outermost first. */
391
380
  lineage: string[];
392
- /** Units of quantity (No., kg). */
393
- units: string[];
394
381
  /** Column 1 general rate, verbatim. */
395
382
  general: string | null;
396
- /** Column 1 special rate, verbatim. */
397
- special: string | null;
398
- /** Column 2 rate, verbatim. */
399
- other: string | null;
400
383
  /** The official release that answered (2026HTSRev17). */
401
384
  revision: string;
402
385
  deep?: Deep<TariffDeep>;
@@ -424,20 +407,7 @@ interface VinRecall {
424
407
  interface VinDeep {
425
408
  /** Open recall campaigns for the decoded vehicle. [] when none, null when the registry did not answer. */
426
409
  recalls?: VinRecall[] | null;
427
- }
428
- interface Vin {
429
- /** Normalized VIN, uppercase, no spaces. Invalid input still echoes the fold. */
430
- vin: string | null;
431
- valid: boolean;
432
- year: number | null;
433
- make: string | null;
434
- model: string | null;
435
- trim: string | null;
436
410
  series: string | null;
437
- /** Body style (sedan, coupe, suv, pickup). */
438
- body: string | null;
439
- /** Vehicle type (passenger car, truck, motorcycle, bus, trailer). */
440
- type: string | null;
441
411
  doors: number | null;
442
412
  cylinders: number | null;
443
413
  /** Engine displacement in liters. */
@@ -454,6 +424,19 @@ interface Vin {
454
424
  plant_country: string | null;
455
425
  /** Gross vehicle weight rating class as filed. */
456
426
  gvwr: string | null;
427
+ }
428
+ interface Vin {
429
+ /** Normalized VIN, uppercase, no spaces. Invalid input still echoes the fold. */
430
+ vin: string | null;
431
+ valid: boolean;
432
+ year: number | null;
433
+ make: string | null;
434
+ model: string | null;
435
+ trim: string | null;
436
+ /** Body style (sedan, coupe, suv, pickup). */
437
+ body: string | null;
438
+ /** Vehicle type (passenger car, truck, motorcycle, bus, trailer). */
439
+ type: string | null;
457
440
  deep?: Deep<VinDeep>;
458
441
  }
459
442
  interface Phone {
@@ -462,15 +445,9 @@ interface Phone {
462
445
  country: string | null;
463
446
  /** What the numbering plan can see. Never voip (that is the carrier field's word). Null when invalid. */
464
447
  type: 'mobile' | 'landline' | 'toll_free' | 'unknown' | null;
465
- /** NPA-derived state code (US/CA). */
466
- state: string | null;
467
- state_name: string | null;
468
- /** Numbering-plan IANA zone. Null when the prefix covers more than one zone, or invalid. Not the handset. */
469
- timezone: string | null;
470
448
  national: string | null;
471
449
  international: string | null;
472
- /** Always empty. The metered proves are their own endpoints: carrier, caller, hlr. */
473
- deep?: Record<string, never>;
450
+ deep?: Deep<PhoneDeep>;
474
451
  }
475
452
  interface Carrier {
476
453
  phone: string | null;
@@ -482,10 +459,7 @@ interface Carrier {
482
459
  carrier: string | null;
483
460
  /** Carrier is a known burner number app. Null when carrier is unknown. */
484
461
  burner: boolean | null;
485
- /** Issuing rate-center city. */
486
- city: string | null;
487
- state: string | null;
488
- state_name: string | null;
462
+ deep?: Deep<CarrierDeep>;
489
463
  }
490
464
  interface Caller {
491
465
  phone: string | null;
@@ -498,20 +472,11 @@ interface Hlr {
498
472
  phone: string | null;
499
473
  valid: boolean;
500
474
  country: string | null;
501
- /** Assigned to a subscriber. Null when invalid. */
475
+ /** Assigned to a subscriber at the last check. Null means unconfirmed. */
502
476
  live: boolean | null;
503
- /** Handset reachable right now. Null means unconfirmed, never no. */
477
+ /** Handset reachable at the last check. Null means unconfirmed, never no. */
504
478
  connected: boolean | null;
505
- /** The six network extras fill on live HLR dips only. Null elsewhere (NANP, failover). */
506
- roaming: boolean | null;
507
- roaming_network: string | null;
508
- /** ISO2, uppercase. */
509
- roaming_country: string | null;
510
- /** Current serving network name. */
511
- network: string | null;
512
- original_network: string | null;
513
- mcc: string | null;
514
- mnc: string | null;
479
+ deep?: Deep<HlrDeep>;
515
480
  }
516
481
  interface MxRecord {
517
482
  priority: number;
@@ -527,12 +492,6 @@ interface DomainRegistration {
527
492
  dnssec: boolean;
528
493
  }
529
494
  interface DomainDeep {
530
- a: string[];
531
- aaaa: string[];
532
- ns: string[];
533
- mx: MxRecord[];
534
- txt: string[];
535
- mailhost: string;
536
495
  registration: DomainRegistration;
537
496
  }
538
497
  interface Domain {
@@ -555,6 +514,33 @@ interface Mac {
555
514
  local: boolean | null;
556
515
  multicast: boolean | null;
557
516
  }
517
+ /** Card-prefix reference data. Null means unknown, not an invalid payment card. */
518
+ interface Bin {
519
+ bin: string;
520
+ /** Actual longest matched prefix. May be shorter than the input. */
521
+ prefix: string | null;
522
+ country: string | null;
523
+ issuer: string | null;
524
+ /** Network key (visa, amex) or co-branded combination. */
525
+ brand: string | null;
526
+ /** Display name for brand (American Express). */
527
+ brand_name: string | null;
528
+ type: string | null;
529
+ prepaid: boolean | null;
530
+ deep?: Record<string, never>;
531
+ }
532
+ /** A published DNS record. Value is DNS presentation text, including TXT quoting. */
533
+ interface DnsRecord {
534
+ name: string;
535
+ type: string;
536
+ /** Remaining cache lifetime in seconds. */
537
+ ttl: number;
538
+ value: string;
539
+ }
540
+ interface Dns {
541
+ domain: string;
542
+ records: DnsRecord[];
543
+ }
558
544
  interface Mx {
559
545
  domain: string;
560
546
  mx: MxRecord[];
@@ -605,23 +591,20 @@ interface Useragent {
605
591
  }
606
592
  interface Currency {
607
593
  currency: string;
608
- numeric: number | null;
609
594
  name: string;
610
- name_plural: string | null;
611
595
  symbol: string | null;
612
596
  symbol_native: string | null;
613
597
  digits: number | null;
614
- countries: string[];
598
+ deep?: Deep<CurrencyDeep>;
615
599
  }
616
600
  /** One language by BCP 47 shortest code (en) or ISO 639-3 (eng). Codes are lowercase. */
617
601
  interface Language {
618
602
  language: string;
619
- iso3: string | null;
620
603
  name: string;
621
- local_name: string | null;
604
+ name_local: string | null;
622
605
  script: string | null;
623
606
  direction: 'ltr' | 'rtl' | string;
624
- countries: string[];
607
+ deep?: Deep<LanguageDeep>;
625
608
  }
626
609
  /** A parsed person name. Junk input returns valid: false, never an error. Gender comes from dictionary data and is null when the data does not decide. */
627
610
  interface Name {
@@ -632,8 +615,7 @@ interface Name {
632
615
  middle: string | null;
633
616
  last: string | null;
634
617
  suffix: string | null;
635
- gender: 'male' | 'female' | null;
636
- salutation: 'Mr' | 'Ms' | null;
618
+ deep?: Deep<NameDeep>;
637
619
  }
638
620
  interface CurrencyRate {
639
621
  base: string;
@@ -656,26 +638,29 @@ interface Timezone {
656
638
  latitude?: number;
657
639
  longitude?: number;
658
640
  timezone: string | null;
659
- name: string | null;
660
641
  abbreviation: string | null;
661
642
  offset: string | null;
662
- offset_minutes: number | null;
663
643
  dst: boolean | null;
664
- next_dst: TimezoneNextDst | null;
665
- /** With to= only: the resolved wall time in the from zone, ISO with its UTC offset. */
666
- at?: string;
644
+ /** Resolved local ISO time with its UTC offset. */
645
+ at: string | null;
646
+ /** Unix seconds for the resolved instant. */
647
+ unix: number | null;
667
648
  /** With to= only: the other zone at the same instant. to.at is the converted time. */
668
- to?: TimezoneConversionTarget;
649
+ to?: TimezoneConversionTarget | null;
650
+ deep?: Deep<TimezoneDeep>;
651
+ }
652
+ /** Current time and timezone facts. Null clock fields mean the coordinates did not resolve. */
653
+ interface Time extends Timezone {
669
654
  }
670
655
  /** The other side of a timezone conversion. `at` is the converted wall time. */
671
656
  interface TimezoneConversionTarget {
672
657
  timezone: string;
673
- name: string | null;
674
658
  abbreviation: string | null;
675
659
  offset: string;
676
- offset_minutes: number;
677
660
  dst: boolean;
678
661
  at: string;
662
+ unix: number;
663
+ deep?: Deep<TimezoneConversionTargetDeep>;
679
664
  }
680
665
  /**
681
666
  * Calendar facts for one date. Junk or ambiguous input returns valid: false,
@@ -684,32 +669,18 @@ interface TimezoneConversionTarget {
684
669
  interface DateInfo {
685
670
  date: string;
686
671
  valid: boolean;
687
- year: number | null;
688
- month: number | null;
689
- month_name: string | null;
690
- day: number | null;
691
- /** ISO weekday, Monday 1 to Sunday 7. */
692
- weekday: number | null;
693
- weekday_name: string | null;
694
- /** ISO 8601 week number. */
695
- week: number | null;
696
- /** The year that ISO week belongs to. Differs from year around January 1. */
697
- week_year: number | null;
698
- day_of_year: number | null;
699
- quarter: number | null;
700
- leap: boolean | null;
701
- days_in_month: number | null;
702
672
  /** Unix time at midnight UTC of that date, seconds. */
703
673
  unix: number | null;
704
674
  /** With to= only: the other date, normalized ISO. */
705
675
  to?: string;
706
676
  /** With to= only: signed days to the other date. Future positive. */
707
677
  days?: number | null;
678
+ deep?: Deep<DateInfoDeep>;
708
679
  }
709
680
  interface Holiday {
710
681
  date: string;
711
682
  name: string;
712
- local_name: string | null;
683
+ name_local: string | null;
713
684
  /** 'public' for an official day off, 'observance' for cultural days. */
714
685
  type: string;
715
686
  regions: string[] | null;
@@ -733,8 +704,10 @@ interface Elevation {
733
704
  resolution: number | null;
734
705
  }
735
706
  interface PointDeep {
736
- city: CityNearest | null;
737
- timezone: Timezone | null;
707
+ city: PointCity | null;
708
+ elevation: number | null;
709
+ elevation_ft: number | null;
710
+ resolution: number | null;
738
711
  }
739
712
  interface Point {
740
713
  latitude: number;
@@ -745,10 +718,8 @@ interface Point {
745
718
  state_name: string | null;
746
719
  district: string | null;
747
720
  district_name: string | null;
748
- elevation: number | null;
749
- elevation_ft: number | null;
750
- resolution: number | null;
751
721
  deep?: Deep<PointDeep>;
722
+ timezone: string | null;
752
723
  }
753
724
  interface WeatherForecastPeriod {
754
725
  name: string;
@@ -844,24 +815,18 @@ interface WeatherDeep {
844
815
  air: WeatherAir | null;
845
816
  /** Only present when the call carried ?date=. */
846
817
  history?: WeatherHistory | null;
818
+ /** Specialist measurements for the same observed current conditions. */
819
+ current: WeatherCurrentDeep;
847
820
  }
848
821
  interface WeatherCurrent {
849
822
  temperature: number | null;
850
823
  temperature_f: number | null;
851
824
  feels_like: number | null;
852
825
  feels_like_f: number | null;
853
- dewpoint: number | null;
854
- dewpoint_f: number | null;
855
826
  humidity: number | null;
856
827
  wind_speed: number | null;
857
828
  wind_speed_mph: number | null;
858
- wind_gust: number | null;
859
- wind_gust_mph: number | null;
860
829
  wind_direction: number | null;
861
- pressure: number | null;
862
- pressure_inhg: number | null;
863
- visibility: number | null;
864
- visibility_mi: number | null;
865
830
  condition: string | null;
866
831
  condition_name: string | null;
867
832
  condition_emoji: string | null;
@@ -873,16 +838,11 @@ interface WeatherStation {
873
838
  distance: number | null;
874
839
  distance_mi: number | null;
875
840
  }
876
- interface WeatherSource {
877
- id: string;
878
- name: string | null;
879
- }
880
841
  interface Weather {
881
842
  latitude: number;
882
843
  longitude: number;
883
844
  current: WeatherCurrent;
884
845
  station: WeatherStation | null;
885
- source: WeatherSource;
886
846
  deep?: Deep<WeatherDeep>;
887
847
  }
888
848
  interface EmojiSkin {
@@ -895,13 +855,8 @@ interface Emoji {
895
855
  emoji: string;
896
856
  name: string;
897
857
  shortcodes: string[];
898
- codepoints: string[];
899
- hex: string;
900
858
  category: string | null;
901
- status: string | null;
902
- version: string | null;
903
- keywords: string[];
904
- skins: EmojiSkin[];
859
+ deep?: Deep<EmojiDeep>;
905
860
  }
906
861
  interface EmojiSearch {
907
862
  q: string;
@@ -944,16 +899,26 @@ interface AddressSearch {
944
899
  state?: string | null;
945
900
  country?: string | null;
946
901
  addresses: AddressSuggestion[];
902
+ /** Why suggestions are empty: more_input, missing_context or no_matches. Null with suggestions. Open to future values. Operational failures are errors. */
903
+ reason?: string | null;
947
904
  }
948
905
  interface CompanyCountry {
949
906
  name: string | null;
950
907
  blocs: string[];
908
+ /** Levy name, such as VAT, GST or sales tax. Null when unknown or not applicable. */
951
909
  tax: string | null;
952
910
  }
953
911
  interface CompanyDeep {
954
- country: CompanyCountry | null;
955
- postal: Postal | null;
956
- city: City | null;
912
+ activity: string | null;
913
+ state_name: string | null;
914
+ country_name: string | null;
915
+ vat: string | null;
916
+ gst: boolean | null;
917
+ acn: string | null;
918
+ siren: string | null;
919
+ siege: boolean | null;
920
+ kind: string | null;
921
+ invoice: string | null;
957
922
  }
958
923
  interface Company {
959
924
  company: string | null;
@@ -963,22 +928,320 @@ interface Company {
963
928
  type: string | null;
964
929
  name: string | null;
965
930
  active: boolean | null;
966
- activity: string | null;
967
931
  address: string | null;
968
932
  city: string | null;
969
933
  state: string | null;
970
- state_name: string | null;
971
934
  postal: string | null;
972
- country_name: string | null;
973
- vat: string | null;
974
- gst: boolean | null;
975
- acn: string | null;
976
- siren: string | null;
977
- siege: boolean | null;
978
- kind: string | null;
979
- invoice: string | null;
980
935
  deep?: Deep<CompanyDeep>;
981
936
  }
937
+ /** A direct child industry code. */
938
+ interface NaicsChild {
939
+ naics: string;
940
+ name: string;
941
+ }
942
+ /** A classification exclusion. Generic exclusions can have no linked codes. */
943
+ interface NaicsExclusion {
944
+ description: string;
945
+ codes: NaicsChild[];
946
+ }
947
+ /** A query token corrected only during typo fallback. */
948
+ interface NaicsCorrection {
949
+ from: string;
950
+ to: string;
951
+ }
952
+ /** The actual title, activity term or code that matched a search. */
953
+ interface NaicsMatch {
954
+ /** Currently name, term or naics. Future fields remain decodable. */
955
+ field: string;
956
+ text: string;
957
+ /** Empty for exact, plural and prefix matches. */
958
+ corrections: NaicsCorrection[];
959
+ }
960
+ /** US NAICS 2022 definition and hierarchy, including two-digit sector ranges. */
961
+ interface Naics {
962
+ naics: string;
963
+ name: string;
964
+ /** Hierarchy depth, from 2 (sector) to 6 (national industry). */
965
+ level: number;
966
+ parent: string | null;
967
+ parent_name: string | null;
968
+ /** Search evidence. Omitted on direct lookup and older responses. */
969
+ match?: NaicsMatch | null;
970
+ year: number;
971
+ country: string;
972
+ deep?: Deep<NaicsDeep>;
973
+ }
974
+ /** Search records inherit country and revision from their envelope. */
975
+ type NaicsSearchItem = Omit<Naics, 'country' | 'year'>;
976
+ interface NaicsSearch {
977
+ q: string;
978
+ year: number;
979
+ country: string;
980
+ results: NaicsSearchItem[];
981
+ }
982
+ interface CountryDeep {
983
+ iso3: string;
984
+ numeric: number;
985
+ full_name: string | null;
986
+ demonym: string | null;
987
+ capital: string | null;
988
+ capital_lat: number | null;
989
+ capital_lon: number | null;
990
+ region: string | null;
991
+ subregion: string | null;
992
+ population: number | null;
993
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
994
+ population_period?: string | null;
995
+ area: number | null;
996
+ /** Land area in km2. */
997
+ land_area?: number | null;
998
+ /** Water area in km2. */
999
+ water_area?: number | null;
1000
+ /** Coastline length in km. Zero is a known landlocked coastline. */
1001
+ coastline?: number | null;
1002
+ /** Mean elevation in metres above sea level. */
1003
+ elevation?: number | null;
1004
+ lowest_point?: CountryElevationPoint | null;
1005
+ highest_point?: CountryElevationPoint | null;
1006
+ tld: string | null;
1007
+ /** Levy name, such as VAT, GST or sales tax. Null when unknown or not applicable. */
1008
+ tax?: string | null;
1009
+ /** Standard country reference rate in percent (19 means 19%). Null is unknown, zero is known zero. */
1010
+ tax_rate?: number | null;
1011
+ /** Tax registration number mask (9 is a digit, A is a letter). Describes format only. */
1012
+ tax_id_format?: string | null;
1013
+ /** Anchored tax registration number format regex. A match does not establish registration. */
1014
+ tax_id_regex?: string | null;
1015
+ borders: string[];
1016
+ /** Bloc memberships (EU, SCHENGEN, NATO, ...). Empty when none. */
1017
+ blocs: string[];
1018
+ week_start: string | null;
1019
+ units: string | null;
1020
+ driving_side: string | null;
1021
+ plugs: string[] | null;
1022
+ voltage: number | null;
1023
+ frequency: number | null;
1024
+ emergency: CountryEmergency | null;
1025
+ postal_format: string | null;
1026
+ postal_regex: string | null;
1027
+ ioc: string | null;
1028
+ fifa: string | null;
1029
+ plate: string | null;
1030
+ }
1031
+ interface CountryElevationPoint {
1032
+ name: string | null;
1033
+ /** Elevation in metres above sea level. Values below sea level are negative. */
1034
+ elevation: number;
1035
+ }
1036
+ interface StateDeep {
1037
+ population: number | null;
1038
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
1039
+ population_period?: string | null;
1040
+ /** Total area in km2. */
1041
+ area: number | null;
1042
+ fips: string | null;
1043
+ capital: string | null;
1044
+ area_codes: string[];
1045
+ /** Levy name, such as VAT, GST or sales tax. Null when unknown or not applicable. */
1046
+ tax: string | null;
1047
+ /** State or province reference rate in percent. Country, state and postal rates are alternative references, not additive. */
1048
+ tax_rate: number | null;
1049
+ }
1050
+ interface DistrictDeep {
1051
+ population: number | null;
1052
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
1053
+ population_period?: string | null;
1054
+ /** Total area in km2 (land + water, or the official total). */
1055
+ area: number | null;
1056
+ /** Land area in km2. Null when the source publishes total only. */
1057
+ land_area: number | null;
1058
+ /** Water area in km2. Null when the source publishes total only. */
1059
+ water_area: number | null;
1060
+ seat: string | null;
1061
+ /** Median annual property tax payable on owner-occupied homes in this statistical area. Null when unsupported, missing or censored. */
1062
+ property_tax?: PropertyTax | null;
1063
+ }
1064
+ interface CityDeep {
1065
+ /** What this city is the capital of: country, state, or null. */
1066
+ capital_of: 'country' | 'state' | null;
1067
+ elevation: number | null;
1068
+ elevation_ft: number | null;
1069
+ population: number | null;
1070
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
1071
+ population_period?: string | null;
1072
+ /** Total area in km2 (land + water, or the official total). */
1073
+ area: number | null;
1074
+ /** Land area in km2. Null when the source publishes total only. */
1075
+ land_area: number | null;
1076
+ /** Water area in km2. Null when the source publishes total only. */
1077
+ water_area: number | null;
1078
+ }
1079
+ interface PostalDeep {
1080
+ elevation: number | null;
1081
+ elevation_ft: number | null;
1082
+ population: number | null;
1083
+ /** Reporting year or period for population (YYYY or YYYY-YYYY). Null when unknown or unverifiable. */
1084
+ population_period?: string | null;
1085
+ /** Total area in km2. Null when the source has no water split. */
1086
+ area: number | null;
1087
+ /** Land area in km2. Null where the source has none. */
1088
+ land_area: number | null;
1089
+ /** Water area in km2. Null where the source has none. */
1090
+ water_area: number | null;
1091
+ currency: string | null;
1092
+ /** Levy name, such as VAT, GST or sales tax. Null when unknown or not applicable. */
1093
+ tax?: string | null;
1094
+ /** Combined US ZIP reference rate in percent (7.9 means 7.9%). An exact address can differ. Null is unknown, zero is known zero. */
1095
+ tax_rate?: number | null;
1096
+ /** State component of the ZIP reference rate, in percent. Null when unknown. */
1097
+ tax_rate_state?: number | null;
1098
+ /** County component of the ZIP reference rate, in percent. Null when unknown. */
1099
+ tax_rate_county?: number | null;
1100
+ /** City component of the ZIP reference rate, in percent. Null when unknown. */
1101
+ tax_rate_city?: number | null;
1102
+ /** Special component of the ZIP reference rate, in percent. Null when unknown. */
1103
+ tax_rate_special?: number | null;
1104
+ neighbors: string[];
1105
+ /** Missing/null is unknown; [] is an observed result outside all covered areas. */
1106
+ metros?: PostalMetro[] | null;
1107
+ /** Median annual property tax payable on owner-occupied homes in this statistical area. Null when unsupported, missing or censored. */
1108
+ property_tax?: PropertyTax | null;
1109
+ }
1110
+ interface IbanDeep {
1111
+ /** Two check digits as a string, keeping a leading zero. */
1112
+ checksum: string | null;
1113
+ /** Branch identifier when that country has one. */
1114
+ branch: string | null;
1115
+ account: string | null;
1116
+ }
1117
+ interface PhoneDeep {
1118
+ /** NPA-derived state code (US/CA). */
1119
+ state: string | null;
1120
+ state_name: string | null;
1121
+ /** Numbering-plan IANA zone. Null when the prefix covers more than one zone, or invalid. Not the handset. */
1122
+ timezone: string | null;
1123
+ }
1124
+ interface CarrierDeep {
1125
+ /** Issuing rate-center city. */
1126
+ city: string | null;
1127
+ state: string | null;
1128
+ state_name: string | null;
1129
+ }
1130
+ interface HlrDeep {
1131
+ /** Network diagnostics available from the last check. Null when unconfirmed. */
1132
+ roaming: boolean | null;
1133
+ roaming_network: string | null;
1134
+ /** ISO2, uppercase. */
1135
+ roaming_country: string | null;
1136
+ /** Serving network name at the last check. */
1137
+ network: string | null;
1138
+ original_network: string | null;
1139
+ mcc: string | null;
1140
+ mnc: string | null;
1141
+ }
1142
+ interface CurrencyDeep {
1143
+ numeric: number | null;
1144
+ name_plural: string | null;
1145
+ countries: string[];
1146
+ }
1147
+ interface LanguageDeep {
1148
+ iso3: string | null;
1149
+ countries: string[];
1150
+ }
1151
+ interface NameDeep {
1152
+ gender: 'male' | 'female' | null;
1153
+ salutation: 'Mr' | 'Ms' | null;
1154
+ /** Compact name using CLDR formatting rules. */
1155
+ short?: string | null;
1156
+ /** Name formatted for a directory listing. */
1157
+ directory?: string | null;
1158
+ /** Name initials using CLDR formatting rules. */
1159
+ initials?: string | null;
1160
+ }
1161
+ interface TimezoneDeep {
1162
+ name: string | null;
1163
+ /** Whole minutes, truncated toward zero for historical second offsets. */
1164
+ offset_minutes: number | null;
1165
+ offset_seconds?: number | null;
1166
+ next_dst: TimezoneNextDst | null;
1167
+ }
1168
+ interface TimezoneConversionTargetDeep {
1169
+ name: string | null;
1170
+ offset_minutes: number;
1171
+ offset_seconds?: number;
1172
+ }
1173
+ interface DateInfoDeep {
1174
+ year: number | null;
1175
+ month: number | null;
1176
+ month_name: string | null;
1177
+ day: number | null;
1178
+ /** ISO weekday, Monday 1 to Sunday 7. */
1179
+ weekday: number | null;
1180
+ weekday_name: string | null;
1181
+ /** ISO 8601 week number. */
1182
+ week: number | null;
1183
+ /** The year that ISO week belongs to. Differs from year around January 1. */
1184
+ week_year: number | null;
1185
+ day_of_year: number | null;
1186
+ quarter: number | null;
1187
+ leap: boolean | null;
1188
+ days_in_month: number | null;
1189
+ }
1190
+ interface EmojiDeep {
1191
+ codepoints: string[];
1192
+ hex: string;
1193
+ status: string | null;
1194
+ version: string | null;
1195
+ keywords: string[];
1196
+ skins: EmojiSkin[];
1197
+ }
1198
+ interface NaicsDeep {
1199
+ description: string | null;
1200
+ children: NaicsChild[];
1201
+ /** Classification exclusions. Omitted or null on older responses. */
1202
+ exclusions?: NaicsExclusion[] | null;
1203
+ }
1204
+ interface CountryEmergency {
1205
+ police: string | null;
1206
+ ambulance: string | null;
1207
+ fire: string | null;
1208
+ }
1209
+ interface PostalMetrosDeep {
1210
+ metros?: PostalMetro[] | null;
1211
+ }
1212
+ interface PointCity {
1213
+ name: string;
1214
+ name_local: string | null;
1215
+ type: string | null;
1216
+ state: string | null;
1217
+ state_name: string | null;
1218
+ country: string;
1219
+ country_name: string | null;
1220
+ latitude: number | null;
1221
+ longitude: number | null;
1222
+ distance: number;
1223
+ distance_mi: number;
1224
+ id: string;
1225
+ }
1226
+ interface WeatherCurrentDeep {
1227
+ dewpoint: number | null;
1228
+ dewpoint_f: number | null;
1229
+ wind_gust: number | null;
1230
+ wind_gust_mph: number | null;
1231
+ pressure: number | null;
1232
+ pressure_inhg: number | null;
1233
+ visibility: number | null;
1234
+ visibility_mi: number | null;
1235
+ }
1236
+ /** Property-tax estimate for an area, not a specific property. */
1237
+ interface PropertyTax {
1238
+ /** Median annual tax payable, in currency units adjusted to the final year of period. Not a tax rate or an individual property bill. */
1239
+ annual_median: number;
1240
+ /** ISO 4217 currency code, currently USD. */
1241
+ currency: string;
1242
+ /** Reporting period, YYYY-YYYY. Monetary amounts use the final year of this period. */
1243
+ period: string;
1244
+ }
982
1245
 
983
1246
  /** Every non-2xx response from the API. Branch on `code`, never on `message`. */
984
1247
  declare class ParseAPIError extends Error {
@@ -992,6 +1255,10 @@ declare class ParseAPIError extends Error {
992
1255
  readonly requestId: string | null;
993
1256
  constructor(status: number, code: string, message: string, docs: string | null, requestId: string | null);
994
1257
  }
1258
+ /** Optional output language for supported display fields. Input parsing stays unchanged. */
1259
+ interface LanguageOption {
1260
+ lang?: string;
1261
+ }
995
1262
  interface RequestOptions {
996
1263
  /** Cancel this call, including any retry wait. */
997
1264
  signal?: AbortSignal;
@@ -1010,137 +1277,193 @@ interface ParseAPIOptions {
1010
1277
  /** Custom fetch implementation (instrumentation, proxies). */
1011
1278
  fetch?: typeof fetch;
1012
1279
  }
1013
- type IpOptions = DeepOption & RequestOptions;
1014
- type IpSelfOptions = DeepOption & RequestOptions;
1015
- type ContinentOptions = RequestOptions;
1016
- type ContinentCountriesOptions = RequestOptions;
1280
+ /** IP enrichment is included with a paid plan. `deep` does not use a separate check meter. */
1281
+ type IpOptions = LanguageOption & DeepOption & RequestOptions;
1282
+ type IpSelfOptions = LanguageOption & DeepOption & RequestOptions;
1283
+ type ContinentOptions = LanguageOption & RequestOptions;
1284
+ type ContinentCountriesOptions = LanguageOption & RequestOptions;
1017
1285
  type BlocOptions = RequestOptions;
1018
- type BlocCountriesOptions = RequestOptions;
1019
- type CountryOptions = RequestOptions;
1020
- type CountryStatesOptions = RequestOptions;
1021
- type StateOptions = {
1286
+ type BlocCountriesOptions = LanguageOption & RequestOptions;
1287
+ type CountryOptions = LanguageOption & DeepOption & RequestOptions;
1288
+ type CountryStatesOptions = LanguageOption & RequestOptions;
1289
+ type StateOptions = LanguageOption & {
1022
1290
  country?: string;
1023
- } & RequestOptions;
1024
- type StateDistrictsOptions = {
1291
+ } & DeepOption & RequestOptions;
1292
+ type StateDistrictsOptions = LanguageOption & {
1025
1293
  country?: string;
1026
- } & RequestOptions;
1027
- type DistrictOptions = {
1294
+ } & DeepOption & RequestOptions;
1295
+ type DistrictOptions = LanguageOption & {
1028
1296
  country?: string;
1029
1297
  state?: string;
1030
- } & RequestOptions;
1031
- type CityOptions = {
1298
+ } & DeepOption & RequestOptions;
1299
+ type CityOptions = LanguageOption & {
1032
1300
  country?: string;
1033
1301
  state?: string;
1034
- } & RequestOptions;
1035
- type CityIdOptions = RequestOptions;
1036
- type CitySearchOptions = {
1302
+ } & DeepOption & RequestOptions;
1303
+ type CityIdOptions = LanguageOption & DeepOption & RequestOptions;
1304
+ type CitySearchOptions = LanguageOption & {
1037
1305
  country?: string;
1038
1306
  state?: string;
1039
1307
  limit?: number;
1040
- } & RequestOptions;
1041
- type CityNearestOptions = RequestOptions;
1042
- type CityNearbyOptions = {
1308
+ } & DeepOption & RequestOptions;
1309
+ type CityNearestOptions = LanguageOption & DeepOption & RequestOptions;
1310
+ type CityNearbyOptions = LanguageOption & {
1043
1311
  radius?: number;
1044
1312
  unit?: 'km' | 'mi';
1045
1313
  country?: string;
1046
1314
  state?: string;
1047
1315
  limit?: number;
1048
- } & RequestOptions;
1049
- type PostalOptions = {
1316
+ } & DeepOption & RequestOptions;
1317
+ /** Pass country when known. Codes shared by multiple countries need it. */
1318
+ type PostalOptions = LanguageOption & {
1050
1319
  country?: string;
1051
- } & RequestOptions;
1052
- type PostalNearbyOptions = {
1320
+ } & DeepOption & RequestOptions;
1321
+ type PostalNearbyOptions = LanguageOption & {
1053
1322
  country?: string;
1054
1323
  radius?: number;
1055
1324
  unit?: 'km' | 'mi';
1056
- } & RequestOptions;
1057
- type PostalDistanceOptions = {
1325
+ } & DeepOption & RequestOptions;
1326
+ type PostalDistanceOptions = LanguageOption & {
1058
1327
  country?: string;
1059
- } & RequestOptions;
1328
+ } & DeepOption & RequestOptions;
1060
1329
  type AddressOptions = {
1061
1330
  country?: string;
1062
1331
  } & DeepOption & RequestOptions;
1332
+ /** Address suggestions report why a result is empty. Operational failures remain errors. */
1063
1333
  type AddressSearchOptions = {
1334
+ /** Country scope. Pass the country known by the form. */
1064
1335
  country?: string;
1336
+ /** Postal-code scope from the form. */
1065
1337
  postal?: string;
1338
+ /** City scope, paired with state for US searches when no postal code is available. */
1066
1339
  city?: string;
1340
+ /** State scope for US searches. */
1067
1341
  state?: string;
1342
+ /** Actual end-user IP as an optional locality hint for server-side calls. */
1068
1343
  ip?: string;
1069
1344
  } & RequestOptions;
1070
- type CompanyOptions = {
1345
+ type CompanyOptions = LanguageOption & {
1071
1346
  country?: string;
1072
1347
  } & DeepOption & RequestOptions;
1348
+ /** `deep: true` requests a metered deliverability check. No automatic retries by default. */
1073
1349
  type EmailOptions = DeepOption & RequestOptions;
1350
+ /** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
1074
1351
  type VatOptions = {
1075
1352
  country?: string;
1076
1353
  from?: string;
1077
1354
  } & DeepOption & RequestOptions;
1078
1355
  type IbanOptions = {
1079
1356
  country?: string;
1080
- } & RequestOptions;
1081
- type NpiOptions = DeepOption & RequestOptions;
1357
+ } & DeepOption & RequestOptions;
1358
+ type NpiOptions = LanguageOption & DeepOption & RequestOptions;
1359
+ /** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
1082
1360
  type PhoneOptions = {
1083
1361
  country?: string;
1084
1362
  } & DeepOption & RequestOptions;
1363
+ /** Deep discloses location detail within the same carrier unit. */
1085
1364
  type CarrierOptions = {
1086
1365
  country?: string;
1087
- } & RequestOptions;
1366
+ } & DeepOption & RequestOptions;
1088
1367
  type CallerOptions = {
1089
1368
  country?: string;
1090
1369
  } & RequestOptions;
1370
+ /** Look up phone status at the last check. Live means assigned and connected means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep adds network diagnostics within the same metered lookup. No automatic retries by default. */
1091
1371
  type HlrOptions = {
1092
1372
  country?: string;
1093
- } & RequestOptions;
1373
+ } & DeepOption & RequestOptions;
1094
1374
  type DomainOptions = DeepOption & RequestOptions;
1095
- type AsnOptions = RequestOptions;
1375
+ type AsnOptions = LanguageOption & RequestOptions;
1096
1376
  type MacOptions = RequestOptions;
1377
+ /** Card-prefix reference lookup. Deep returns an empty object on every plan. */
1378
+ type BinOptions = DeepOption & RequestOptions;
1379
+ /** Parse a measurement, optionally converting it. Locale and system resolve explicit ambiguity. */
1380
+ type MeasureOptions = {
1381
+ to?: string;
1382
+ locale?: string;
1383
+ system?: 'us' | 'imperial';
1384
+ } & RequestOptions;
1385
+ type MeasureUnitsOptions = LanguageOption & {
1386
+ query?: string;
1387
+ type?: string;
1388
+ unit?: string;
1389
+ } & RequestOptions;
1390
+ /** Published DNS records. Omit type to check all ten supported types. Values retain DNS presentation syntax. */
1391
+ type DnsOptions = {
1392
+ type?: string;
1393
+ } & RequestOptions;
1097
1394
  type MxOptions = RequestOptions;
1098
1395
  type UseragentOptions = DeepOption & RequestOptions;
1099
1396
  type VinOptions = DeepOption & RequestOptions;
1397
+ /** US NAICS 2022 code lookup, using pooled requests. */
1398
+ type NaicsOptions = DeepOption & RequestOptions;
1399
+ /** Keyword search. Limit defaults to 10 and accepts 1-50. */
1400
+ type NaicsSearchOptions = {
1401
+ limit?: number;
1402
+ } & DeepOption & RequestOptions;
1403
+ /** Look up the general US duty schedule line. Paid deep adds units and the special and other schedule columns. Add origin with deep to resolve country-specific measures. Without origin, schedule detail remains available and origin-dependent fields are null. A null effective rate is not a zero rate. */
1100
1404
  type TariffOptions = {
1405
+ /** Origin country (ISO2). With paid deep, resolves country-specific measures. */
1101
1406
  origin?: string;
1102
1407
  } & DeepOption & RequestOptions;
1103
1408
  type TariffSearchOptions = RequestOptions;
1104
- type CurrencyOptions = RequestOptions;
1409
+ type CurrencyOptions = LanguageOption & DeepOption & RequestOptions;
1105
1410
  type CurrencyRateOptions = {
1106
1411
  date?: string;
1107
1412
  amount?: number;
1108
1413
  } & RequestOptions;
1109
- type LanguageOptions = RequestOptions;
1110
- type NameOptions = RequestOptions;
1111
- type TimezoneOptions = {
1414
+ type LanguageOptions = LanguageOption & DeepOption & RequestOptions;
1415
+ /** Country scopes paid deep gender evidence. Name locale selects formatting rules without changing parsing. */
1416
+ type NameOptions = {
1417
+ country?: string;
1418
+ /** CLDR name-formatting locale, such as en or ja. Defaults to en. */
1419
+ name_locale?: string;
1420
+ } & DeepOption & RequestOptions;
1421
+ type TimeOptions = LanguageOption & {
1112
1422
  at?: string;
1113
1423
  to?: string;
1114
- } & RequestOptions;
1115
- type TimezoneAtOptions = {
1424
+ } & DeepOption & RequestOptions;
1425
+ type TimeAtOptions = LanguageOption & {
1116
1426
  at?: string;
1117
- } & RequestOptions;
1118
- type DateOptions = {
1427
+ to?: string;
1428
+ } & DeepOption & RequestOptions;
1429
+ type TimezoneOptions = LanguageOption & {
1430
+ at?: string;
1431
+ to?: string;
1432
+ } & DeepOption & RequestOptions;
1433
+ type TimezoneAtOptions = LanguageOption & {
1434
+ at?: string;
1435
+ } & DeepOption & RequestOptions;
1436
+ type DateOptions = LanguageOption & {
1119
1437
  format?: 'mdy' | 'dmy';
1120
1438
  to?: string;
1121
- } & RequestOptions;
1122
- type DateTodayOptions = {
1439
+ } & DeepOption & RequestOptions;
1440
+ type DateTodayOptions = LanguageOption & {
1123
1441
  to?: string;
1124
- } & RequestOptions;
1442
+ } & DeepOption & RequestOptions;
1125
1443
  type HolidayOptions = {
1126
1444
  year?: number;
1127
1445
  } & RequestOptions;
1128
1446
  type HolidayDateOptions = RequestOptions;
1129
1447
  type ElevationOptions = RequestOptions;
1130
- type PointOptions = DeepOption & RequestOptions;
1448
+ /** Resolve the country, state, district and timezone at coordinates. Deep adds terrain and compact nearest-city context on every plan. The timezone ID stays in core. The nearest city is null when none is within 200 km. */
1449
+ type PointOptions = LanguageOption & DeepOption & RequestOptions;
1450
+ /** Get current conditions in metric and imperial units. Paid deep adds specialist current measurements, forecasts and related detail. With deep, date selects a past UTC day (YYYY-MM-DD) in deep.history alongside current conditions. Date alone does not request history. */
1131
1451
  type WeatherOptions = DeepOption & {
1452
+ /** Past UTC day, YYYY-MM-DD. Requires paid deep and populates deep.history alongside current. */
1132
1453
  date?: string;
1133
1454
  } & RequestOptions;
1134
- type EmojiOptions = RequestOptions;
1135
- type EmojiSearchOptions = {
1455
+ type EmojiOptions = LanguageOption & DeepOption & RequestOptions;
1456
+ type EmojiSearchOptions = LanguageOption & {
1136
1457
  limit?: number;
1137
- } & RequestOptions;
1458
+ } & DeepOption & RequestOptions;
1138
1459
  interface DeepOption {
1139
- /** Request richer fields. Availability and usage depend on the endpoint. */
1460
+ /** Request endpoint-specific enrichment. Email/VAT checks are metered. Reference depth can be pooled or included with a paid plan. See the operation's help. */
1140
1461
  deep?: boolean;
1141
1462
  }
1142
1463
  declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1464
+ /** Look up an IP. `deep: true` adds enrichment included with a paid plan, without a separate check meter. */
1143
1465
  ip: ((ip: string, opts?: IpOptions) => Promise<Ip>) & {
1466
+ /** Look up the public IP making this request. On a server, this is the server's IP. */
1144
1467
  self: (opts?: IpSelfOptions) => Promise<Ip>;
1145
1468
  };
1146
1469
  continent: ((code: string, opts?: ContinentOptions) => Promise<Continent>) & {
@@ -1162,28 +1485,55 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1162
1485
  nearest: (lat: number, lon: number, opts?: CityNearestOptions) => Promise<CityNearest>;
1163
1486
  nearby: (name: string, opts?: CityNearbyOptions) => Promise<CityNearby>;
1164
1487
  };
1488
+ /** Look up a postal area. Pass country when known. Check nullable latitude/longitude before another location lookup. */
1165
1489
  postal: ((code: string, opts?: PostalOptions) => Promise<Postal>) & {
1166
1490
  nearby: (code: string, opts?: PostalNearbyOptions) => Promise<PostalNearby>;
1167
1491
  distance: (from: string, to: string, opts?: PostalDistanceOptions) => Promise<PostalDistance>;
1168
1492
  };
1169
1493
  address: ((address: string, opts?: AddressOptions) => Promise<Address>) & {
1494
+ /** Find address suggestions using the context supplied. Prefer postal, or city and state, from the form. ip is an optional end-user locality hint for server-side calls. An empty result has reason more_input, missing_context or no_matches. Suggestions have reason null. Operational failures are errors. */
1170
1495
  search: (query: string, opts?: AddressSearchOptions) => Promise<AddressSearch>;
1171
1496
  };
1172
1497
  company: (number: string, opts?: CompanyOptions) => Promise<Company>;
1498
+ /**
1499
+ * Parse an email and check its format and domain.
1500
+ * `deep: true` explicitly requests a metered deliverability check using included checks or enabled on-demand usage.
1501
+ * Deep checks default to one attempt. An explicit retry count can repeat paid usage.
1502
+ */
1173
1503
  email: (email: string, opts?: EmailOptions) => Promise<Email>;
1504
+ /** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
1174
1505
  vat: (number: string, opts?: VatOptions) => Promise<Vat>;
1175
1506
  iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
1176
1507
  npi: (npi: string, opts?: NpiOptions) => Promise<Npi>;
1508
+ /** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
1177
1509
  phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
1510
+ /** Request a metered carrier lookup. No automatic retries by default. */
1178
1511
  carrier: (number: string, opts?: CarrierOptions) => Promise<Carrier>;
1512
+ /** Request a metered caller-name lookup for a NANP number. No automatic retries by default. */
1179
1513
  caller: (number: string, opts?: CallerOptions) => Promise<Caller>;
1514
+ /** Look up phone status at the last check. Live means assigned and connected means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep adds network diagnostics within the same metered lookup. No automatic retries by default. */
1180
1515
  hlr: (number: string, opts?: HlrOptions) => Promise<Hlr>;
1516
+ /** Check whether a domain is registered. Deep adds registration dates, registrar, status and DNSSEC on paid plans. */
1181
1517
  domain: (domain: string, opts?: DomainOptions) => Promise<Domain>;
1182
1518
  asn: (asn: string, opts?: AsnOptions) => Promise<Asn>;
1183
1519
  mac: (mac: string, opts?: MacOptions) => Promise<Mac>;
1520
+ /** Look up a 6-11 digit card prefix. Keep leading zeros in the input string. */
1521
+ bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
1522
+ /** Parse a measurement or convert it to `to`. Without `to`, use its type's canonical unit. Invalid input is plain data with `valid: false`. */
1523
+ measure: ((measure: string, opts?: MeasureOptions) => Promise<Measure>) & {
1524
+ /** Discover reviewed units. Pass `unit` to find compatible conversion targets. */
1525
+ units: (opts?: MeasureUnitsOptions) => Promise<MeasureUnits>;
1526
+ };
1527
+ /** Look up DNS records with TTLs. Type selects the question and may include its CNAME chain. Pooled on every plan. */
1528
+ dns: (domain: string, opts?: DnsOptions) => Promise<Dns>;
1184
1529
  mx: (domain: string, opts?: MxOptions) => Promise<Mx>;
1185
1530
  useragent: (ua: string, opts?: UseragentOptions) => Promise<Useragent>;
1186
1531
  vin: (vin: string, opts?: VinOptions) => Promise<Vin>;
1532
+ /** US NAICS 2022 definitions and hierarchy. */
1533
+ naics: ((code: string, opts?: NaicsOptions) => Promise<Naics>) & {
1534
+ search: (query: string, opts?: NaicsSearchOptions) => Promise<NaicsSearch>;
1535
+ };
1536
+ /** Look up the general US duty schedule line. Paid deep adds units and the special and other schedule columns. Add origin with deep to resolve country-specific measures. Without origin, schedule detail remains available and origin-dependent fields are null. A null effective rate is not a zero rate. */
1187
1537
  tariff: ((code: string, opts?: TariffOptions) => Promise<Tariff>) & {
1188
1538
  search: (query: string, opts?: TariffSearchOptions) => Promise<TariffSearch>;
1189
1539
  };
@@ -1192,6 +1542,10 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1192
1542
  };
1193
1543
  language: (code: string, opts?: LanguageOptions) => Promise<Language>;
1194
1544
  name: (name: string, opts?: NameOptions) => Promise<Name>;
1545
+ /** Current local time, UTC by default. With to, offsetless at is source wall time. */
1546
+ time: ((timezone?: string, opts?: TimeOptions) => Promise<Time>) & {
1547
+ at: (lat: number, lon: number, opts?: TimeAtOptions) => Promise<Time>;
1548
+ };
1195
1549
  timezone: ((id: string, opts?: TimezoneOptions) => Promise<Timezone>) & {
1196
1550
  at: (lat: number, lon: number, opts?: TimezoneAtOptions) => Promise<Timezone>;
1197
1551
  };
@@ -1202,7 +1556,9 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1202
1556
  date: (country: string, date: string, opts?: HolidayDateOptions) => Promise<HolidayDate>;
1203
1557
  };
1204
1558
  elevation: (lat: number, lon: number, opts?: ElevationOptions) => Promise<Elevation>;
1559
+ /** Resolve the country, state, district and timezone at coordinates. Deep adds terrain and compact nearest-city context on every plan. The timezone ID stays in core. The nearest city is null when none is within 200 km. */
1205
1560
  point: (lat: number, lon: number, opts?: PointOptions) => Promise<Point>;
1561
+ /** Get current conditions in metric and imperial units. Paid deep adds specialist current measurements, forecasts and related detail. With deep, date selects a past UTC day (YYYY-MM-DD) in deep.history alongside current conditions. Date alone does not request history. */
1206
1562
  weather: (lat: number, lon: number, opts?: WeatherOptions) => Promise<Weather>;
1207
1563
  emoji: ((emoji: string, opts?: EmojiOptions) => Promise<Emoji>) & {
1208
1564
  search: (query: string, opts?: EmojiSearchOptions) => Promise<EmojiSearch>;
@@ -1210,4 +1566,4 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1210
1566
  };
1211
1567
  type ParseAPIClient = ReturnType<typeof parseAPI>;
1212
1568
 
1213
- export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Carrier, type CarrierOptions, type City, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictOptions, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanOptions, type Ip, type IpDeep, type IpOptions, type IpSelfOptions, type Language, type LanguageOptions, type Mac, type MacOptions, type Mx, type MxOptions, type MxRecord, type Name, type NameOptions, type Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneOptions, type Point, type PointDeep, type PointOptions, type Postal, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type PostalMetro, type PostalNearby, type PostalNearbyItem, type PostalNearbyOptions, type PostalOptions, type RequestOptions, type State, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Timezone, type TimezoneAtOptions, type TimezoneConversionTarget, type TimezoneNextDst, type TimezoneOptions, type Useragent, type UseragentBrowserBrand, type UseragentBrowserDeep, type UseragentDeep, type UseragentDeviceDeep, type UseragentEngineDeep, type UseragentOptions, type UseragentOsDeep, type Vat, type VatAddress, type VatDeep, type VatOptions, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherSource, type WeatherStation, parseAPI };
1569
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Ip, type IpDeep, type IpOptions, type IpSelfOptions, type Language, type LanguageDeep, type LanguageOption, type LanguageOptions, type Mac, type MacOptions, type Measure, type MeasureChoice, type MeasureOptions, type MeasureUnit, type MeasureUnits, type MeasureUnitsOptions, type Mx, type MxOptions, type MxRecord, type Naics, type NaicsChild, type NaicsCorrection, type NaicsDeep, type NaicsExclusion, type NaicsMatch, type NaicsOptions, type NaicsSearch, type NaicsSearchItem, type NaicsSearchOptions, type Name, type NameDeep, type NameOptions, type Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type PostalMetro, type PostalMetrosDeep, type PostalNearby, type PostalNearbyItem, type PostalNearbyOptions, type PostalOptions, type PropertyTax, type RequestOptions, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type TimeOptions, type Timezone, type TimezoneAtOptions, type TimezoneConversionTarget, type TimezoneConversionTargetDeep, type TimezoneDeep, type TimezoneNextDst, type TimezoneOptions, type Useragent, type UseragentBrowserBrand, type UseragentBrowserDeep, type UseragentDeep, type UseragentDeviceDeep, type UseragentEngineDeep, type UseragentOptions, type UseragentOsDeep, type Vat, type VatAddress, type VatDeep, type VatOptions, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };