@parseapi/sdk 1.11.0 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -42
- package/dist/index.cjs +1 -35
- package/dist/index.d.cts +2 -301
- package/dist/index.d.ts +2 -301
- package/dist/index.js +1 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,17 +109,14 @@ Discovery example: `await parse.company.search({ country: 'US', industry: '0700'
|
|
|
109
109
|
Supply `industry` and `industry_type` together. The supported namespace is `sic`, with an exact four-digit string such as `0700`; leading zeros are meaningful. Country-only discovery is also supported. Filters intersect and may narrow an existing selector. Country matches the profile country, not a headquarters or operating-presence claim. Unknown values do not match a requested filter. Filter-only candidates use `match.field: "filters"` and `match.value: null`; reuse the same filters and limit with a returned cursor. Counts describe this directory edition, not complete country coverage.
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
|
|
113
112
|
One method per endpoint, named after the route.
|
|
114
113
|
|
|
115
114
|
```ts
|
|
116
115
|
await parse.ip('8.8.8.8');
|
|
117
116
|
await parse.ip.self();
|
|
118
117
|
await parse.email('hello@gmail.com');
|
|
119
|
-
await parse.vat('DE136695976');
|
|
120
118
|
await parse.bank('DE89370400440532013000');
|
|
121
119
|
await parse.card('424242');
|
|
122
|
-
await parse.provider('1881018208');
|
|
123
120
|
await parse.phone('+14155552671');
|
|
124
121
|
await parse.carrier('+14155552671');
|
|
125
122
|
await parse.caller('+14155552671');
|
|
@@ -150,8 +147,6 @@ await parse.district('37081');
|
|
|
150
147
|
await parse.district('guilford county');
|
|
151
148
|
await parse.continent('NA');
|
|
152
149
|
await parse.continent.countries('NA');
|
|
153
|
-
await parse.bloc('EU');
|
|
154
|
-
await parse.bloc.countries('EU');
|
|
155
150
|
await parse.currency('USD');
|
|
156
151
|
await parse.currency.rate('USD', 'EUR');
|
|
157
152
|
await parse.language('en');
|
|
@@ -178,11 +173,8 @@ await parse.mx('example.com');
|
|
|
178
173
|
await parse.dns('example.com');
|
|
179
174
|
await parse.dns('_dmarc.example.com', { type: 'TXT' });
|
|
180
175
|
await parse.useragent(uaString);
|
|
181
|
-
await parse.vehicle('1HGCM82633A004352');
|
|
182
176
|
await parse.industry('541511');
|
|
183
177
|
await parse.industry.search('coffee shop', { limit: 5 });
|
|
184
|
-
await parse.tariff('8471.30.01.00');
|
|
185
|
-
await parse.tariff.search('sunglasses');
|
|
186
178
|
await parse.emoji('rocket');
|
|
187
179
|
await parse.emoji.search('fire');
|
|
188
180
|
```
|
|
@@ -283,19 +275,6 @@ Weather returns current conditions by default. Paid deep adds specialist current
|
|
|
283
275
|
await parse.weather(40.7128, -74.006, { deep: true, date: '2026-08-15' });
|
|
284
276
|
```
|
|
285
277
|
|
|
286
|
-
Tariff starts with the general schedule line. Paid deep adds units and the special and other schedule columns. An optional origin then resolves country-specific measures. The three calls below show those successive choices. Without origin, schedule detail is still returned and origin-dependent fields are null. A null effective rate is not a zero rate.
|
|
287
|
-
|
|
288
|
-
Tariff lookup and search accept the `edition` ID returned by Tariff, such as `ted_3`, and an optional `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
|
|
289
|
-
|
|
290
|
-
Origin means where the goods originate, not where they ship from. The effective rate covers matched stored schedule measures only. It is not complete duty or landed cost.
|
|
291
|
-
|
|
292
|
-
Codes contain 4, 6, 8 or 10 ASCII digits; dots and whitespace are optional. Search returns up to 20 description matches with parent `lineage` so a result named "Other" has context. Search is not product classification. In deep, `measures: null` means origin-dependent measures were not resolved. `measures: []` means the resolved lookup found none.
|
|
293
|
-
|
|
294
|
-
```ts
|
|
295
|
-
await parse.tariff('8471.30.01.00');
|
|
296
|
-
await parse.tariff('8471.30.01.00', { deep: true });
|
|
297
|
-
await parse.tariff('8471.30.01.00', { deep: true, origin: 'CN' });
|
|
298
|
-
```
|
|
299
278
|
|
|
300
279
|
Address search uses context from the form: prefer postal, or city and state. An optional end-user `ip` is a locality hint for server-side calls. An empty result explains itself with `reason`: `more_input`, `missing_context` or `no_matches`. With suggestions, reason is null. Older responses may omit it, and future reasons remain strings. Catalog and lookup failures use the existing API errors.
|
|
301
280
|
|
|
@@ -312,21 +291,6 @@ await parse.bankRequirements('US', { format: 'us_ach' });
|
|
|
312
291
|
await parse.bankUsAch({ routing: '011000015', account: '0001234567' });
|
|
313
292
|
```
|
|
314
293
|
|
|
315
|
-
## Provider lookup
|
|
316
|
-
|
|
317
|
-
```ts
|
|
318
|
-
const provider = await parse.provider('1881018208');
|
|
319
|
-
const profile = await parse.provider('1881018208', { deep: true });
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
Pass the original NPI as a string. `valid` checks its format and checksum; `registered` means a match in the stored NPPES snapshot. `active` reflects recorded NPI deactivation, not licensure. `excluded` is an NPI-only OIG LEIE match; `false` is not a complete exclusion clearance. These directory facts do not verify credentials, current practice contact or payment eligibility.
|
|
323
|
-
|
|
324
|
-
Invalid input returns `valid: false` with unknown provider fields. A checksum-valid number missing from the snapshot returns `registered: false`; unavailable storage remains an API error. Preserve `null` as unknown.
|
|
325
|
-
|
|
326
|
-
The default pooled lookup includes provider identity, specialty and practice contact where held. Paid `deep` adds `deactivated_at`, `medicare`, `opt_out` and `enrollments` from stored source files, with no separate check meter or live verification. `enrollments: null` means unavailable; `[]` means no enrollment rows are returned. The API omits unrequested `deep` and returns `{}` when requested on Free.
|
|
327
|
-
|
|
328
|
-
Paid Deep also returns `taxonomies` in published order, with taxonomy code, specialty label, primary flag and provider-reported license number/state, plus `enumerated_at`, `updated_at` and `reactivated_at` record dates. Reported licenses are not verified licenses. Null lists mean unavailable; empty lists mean the edition contains no entries. Provider record dates describe the provider record. Unknown dates stay null.
|
|
329
|
-
|
|
330
294
|
## Deep
|
|
331
295
|
|
|
332
296
|
Choose enrichment for the question you need answered.
|
|
@@ -336,11 +300,10 @@ Choose enrichment for the question you need answered.
|
|
|
336
300
|
| IP | Richer IP fields included with a paid plan. No separate check meter. |
|
|
337
301
|
| Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
|
|
338
302
|
| Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
|
|
339
|
-
| VAT | A metered registry check where supported, using included VAT checks or enabled on-demand usage. |
|
|
340
303
|
| Phone, Time, Date, Currency, Language, Emoji, Bank, Point | Optional detail in the same pooled request on every plan. |
|
|
341
304
|
| Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
|
|
342
305
|
| Name, Industry | Name evidence or the industry definition profile on paid plans. |
|
|
343
|
-
|
|
|
306
|
+
| Company (national number) | The complete product detail bag on paid plans. |
|
|
344
307
|
| Company directory | Profile detail in the same pooled request on every plan. Search detail belongs to each company result. |
|
|
345
308
|
| Weather | Specialist current measurements and the existing forecast, alert, air and history bag on paid plans. |
|
|
346
309
|
| Carrier, HLR | Optional diagnostic detail within the same metered core unit, including Free allowance units. No second gate or additional check. |
|
|
@@ -393,7 +356,7 @@ const country = await parse.country('US', {
|
|
|
393
356
|
|
|
394
357
|
Requires Node 18 or later. Zero dependencies.
|
|
395
358
|
|
|
396
|
-
Ordinary lookups retry network failures, 429, and 500/502/503/504 responses twice by default. Carrier, caller, HLR, and email
|
|
359
|
+
Ordinary lookups retry network failures, 429, and 500/502/503/504 responses twice by default. Carrier, caller, HLR, and email with `deep: true` make one attempt by default. Address with `deep: true` also uses one attempt, reserving the same behavior for future verification.
|
|
397
360
|
|
|
398
361
|
An explicit `retries` setting on the client or call overrides those defaults. Another attempt can consume additional usage if the earlier response was lost. Cancellation stops the request and any retry wait. Automatic redirects are disabled.
|
|
399
362
|
|
|
@@ -452,8 +415,6 @@ Successful checks may be reused for up to 24 hours. `pretty` optionally formats
|
|
|
452
415
|
|
|
453
416
|
Stack defaults to 35 seconds per attempt so a first scan has time to finish. Other lookups retain their 10-second default. An explicit client timeout applies to every operation; JavaScript also supports a per-call `timeoutMs` override.
|
|
454
417
|
|
|
455
|
-
Vehicle lookups use `vin` as the input and response field. Existing VIN methods remain available for compatibility.
|
|
456
|
-
|
|
457
418
|
## Emoji catalog additions
|
|
458
419
|
|
|
459
420
|
Resolve Unicode emoji or a named shortcode, search or browse a bounded catalog,
|
|
@@ -506,7 +467,6 @@ Reviewed children, ancestors and siblings use canonical lists with partial relat
|
|
|
506
467
|
Strict `ambiguity=error` can return HTTP 409 `ambiguous_city` with up to two safe candidate identities. The existing error constructor and unrelated error metadata are preserved; candidates are retained only for that status/code and never contain Deep. GeoJSON is available through HTTP; these typed City list methods do not return GeoJSON.
|
|
507
468
|
|
|
508
469
|
|
|
509
|
-
|
|
510
470
|
Reviewed name forms:
|
|
511
471
|
|
|
512
472
|
```js
|
package/dist/index.cjs
CHANGED
|
@@ -285,7 +285,7 @@ var EmojiCatalog = class {
|
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
// src/index.ts
|
|
288
|
-
var VERSION = "1.11.
|
|
288
|
+
var VERSION = "1.11.2";
|
|
289
289
|
var API_VERSION = "2.0.0";
|
|
290
290
|
var DEFAULT_BASE_URL = "https://api.parseapi.com";
|
|
291
291
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
@@ -313,15 +313,6 @@ var ParseAPIError = class extends Error {
|
|
|
313
313
|
this.retryAfter = retryAfter;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
function tariffEditionId(value) {
|
|
317
|
-
return typeof value === "string" && (value.length === 64 && /^[a-f0-9]{64}$/.test(value) || /^ted_[1-9][0-9]{0,19}(?![\s\S])/.test(value) && (value.length < 24 || value.slice(4) <= "18446744073709551615"));
|
|
318
|
-
}
|
|
319
|
-
function tariffSelection(result, opts) {
|
|
320
|
-
if ((opts?.edition !== void 0 || opts?.date !== void 0) && (!tariffEditionId(result.edition) || opts.edition !== void 0 && result.edition !== opts.edition || (opts.date !== void 0 ? result.date !== opts.date : result.date != null))) {
|
|
321
|
-
throw new ParseAPIError(0, "tariff_selection_mismatch", "Tariff response did not confirm the requested edition/date. The server may not support this selection.", null, null);
|
|
322
|
-
}
|
|
323
|
-
return result;
|
|
324
|
-
}
|
|
325
316
|
var requestControls = (opts) => ({ signal: opts?.signal, timeoutMs: opts?.timeoutMs, retries: opts?.retries });
|
|
326
317
|
function env(name) {
|
|
327
318
|
return typeof process !== "undefined" ? process.env?.[name] : void 0;
|
|
@@ -509,12 +500,6 @@ function parseAPI(apiKey, options = {}) {
|
|
|
509
500
|
countries: (code, opts) => request(`/continent/${enc(code)}/countries`, void 0, void 0, opts)
|
|
510
501
|
}
|
|
511
502
|
),
|
|
512
|
-
bloc: Object.assign(
|
|
513
|
-
(code, opts) => request(`/bloc/${enc(code)}`, void 0, void 0, opts),
|
|
514
|
-
{
|
|
515
|
-
countries: (code, opts) => request(`/bloc/${enc(code)}/countries`, void 0, void 0, opts)
|
|
516
|
-
}
|
|
517
|
-
),
|
|
518
503
|
country: Object.assign(
|
|
519
504
|
(code, opts) => request(`/country/${enc(code)}`, deepQuery(opts), void 0, opts),
|
|
520
505
|
{
|
|
@@ -614,22 +599,14 @@ function parseAPI(apiKey, options = {}) {
|
|
|
614
599
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
615
600
|
*/
|
|
616
601
|
email: (email, opts) => request(`/email/${enc(email)}`, deepQuery(opts), void 0, opts),
|
|
617
|
-
/** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
|
|
618
|
-
vat: (number, opts) => request(`/vat/${enc(number)}`, {
|
|
619
|
-
country: opts?.country,
|
|
620
|
-
from: opts?.from,
|
|
621
|
-
...deepQuery(opts)
|
|
622
|
-
}, void 0, opts),
|
|
623
602
|
// Keep existing callers on their established HTTP contracts.
|
|
624
603
|
iban: (iban, opts) => request(`/iban/${enc(iban)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
625
604
|
bin: (bin, opts) => request(`/bin/${enc(bin)}`, { deep: opts?.deep }, void 0, opts),
|
|
626
|
-
npi: (npi, opts) => request(`/npi/${enc(npi)}`, deepQuery(opts), void 0, opts),
|
|
627
605
|
bank: (iban, opts) => request("/bank", void 0, void 0, opts, { iban, country: opts?.country, deep: opts?.deep }),
|
|
628
606
|
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
629
607
|
bankUsAch: (input, opts) => request("/bank", void 0, void 0, opts, { format: "us_ach", country: "US", routing: input.routing, account: input.account }),
|
|
630
608
|
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
631
609
|
bankRequirements: (country, opts) => request("/bank/requirements", { country, format: opts?.format }, void 0, opts),
|
|
632
|
-
provider: (npi, opts) => request(`/provider/${enc(npi)}`, deepQuery(opts), void 0, opts),
|
|
633
610
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
634
611
|
phone: (number, opts) => request(`/phone/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
635
612
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -668,21 +645,10 @@ function parseAPI(apiKey, options = {}) {
|
|
|
668
645
|
dns: (domain, opts) => request(`/dns/${enc(domain)}`, { type: opts?.type }, void 0, opts),
|
|
669
646
|
mx: (domain, opts) => request(`/mx/${enc(domain)}`, void 0, void 0, opts),
|
|
670
647
|
useragent: (ua, opts) => request("/useragent", deepQuery(opts), { "User-Agent": ua }, opts),
|
|
671
|
-
/** Identify a vehicle by VIN. Paid deep adds specifications and model-level recall campaigns. */
|
|
672
|
-
vehicle: (vin, opts) => request(`/vehicle/${enc(vin)}`, deepQuery(opts), void 0, opts),
|
|
673
|
-
/** Compatibility entry for VIN callers. */
|
|
674
|
-
vin: (vin, opts) => request(`/vin/${enc(vin)}`, deepQuery(opts), void 0, opts),
|
|
675
648
|
/** US NAICS 2022 definitions and hierarchy. */
|
|
676
649
|
industry,
|
|
677
650
|
/** Compatibility name for industry. */
|
|
678
651
|
naics: industry,
|
|
679
|
-
/** 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. */
|
|
680
|
-
tariff: Object.assign(
|
|
681
|
-
(code, opts) => request(`/tariff/${enc(code)}`, { origin: opts?.origin, edition: opts?.edition, date: opts?.date, ...deepQuery(opts) }, void 0, opts).then((result) => tariffSelection(result, opts)),
|
|
682
|
-
{
|
|
683
|
-
search: (query, opts) => request("/tariff", { q: query, edition: opts?.edition, date: opts?.date }, void 0, opts).then((result) => tariffSelection(result, opts))
|
|
684
|
-
}
|
|
685
|
-
),
|
|
686
652
|
currency: Object.assign(
|
|
687
653
|
(code, opts) => request(`/currency/${enc(code)}`, deepQuery(opts), void 0, opts),
|
|
688
654
|
{
|
package/dist/index.d.cts
CHANGED
|
@@ -73,22 +73,6 @@ interface ContinentCountries {
|
|
|
73
73
|
continent: string;
|
|
74
74
|
countries: ContinentCountryItem[];
|
|
75
75
|
}
|
|
76
|
-
interface Bloc {
|
|
77
|
-
bloc: string;
|
|
78
|
-
name: string;
|
|
79
|
-
/** Current member count. An entity fact, not a list-length field. */
|
|
80
|
-
members: number;
|
|
81
|
-
}
|
|
82
|
-
interface BlocCountryItem {
|
|
83
|
-
country: string;
|
|
84
|
-
name: string;
|
|
85
|
-
emoji?: string | null;
|
|
86
|
-
calling_code?: string | null;
|
|
87
|
-
}
|
|
88
|
-
interface BlocCountries {
|
|
89
|
-
bloc: string;
|
|
90
|
-
countries: BlocCountryItem[];
|
|
91
|
-
}
|
|
92
76
|
interface Country {
|
|
93
77
|
country: string;
|
|
94
78
|
name: string;
|
|
@@ -300,27 +284,6 @@ interface Email {
|
|
|
300
284
|
disposable: boolean;
|
|
301
285
|
deep?: Deep<EmailDeep>;
|
|
302
286
|
}
|
|
303
|
-
interface VatAddress {
|
|
304
|
-
street: string | null;
|
|
305
|
-
city: string | null;
|
|
306
|
-
postal: string | null;
|
|
307
|
-
country: string | null;
|
|
308
|
-
}
|
|
309
|
-
interface VatDeep {
|
|
310
|
-
registered: boolean | null;
|
|
311
|
-
name: string | null;
|
|
312
|
-
address: VatAddress | null;
|
|
313
|
-
consultation: string | null;
|
|
314
|
-
/** Registry-provided check time, or null when unavailable. */
|
|
315
|
-
consulted_at: string | null;
|
|
316
|
-
}
|
|
317
|
-
interface Vat {
|
|
318
|
-
vat: string | null;
|
|
319
|
-
valid: boolean;
|
|
320
|
-
country: string | null;
|
|
321
|
-
from?: string;
|
|
322
|
-
deep?: Deep<VatDeep>;
|
|
323
|
-
}
|
|
324
287
|
/** Ordered IBAN checks. States are open strings for future API values. */
|
|
325
288
|
interface BankChecks {
|
|
326
289
|
input: string;
|
|
@@ -403,183 +366,6 @@ interface BankUsAch {
|
|
|
403
366
|
checks: BankUsAchChecks;
|
|
404
367
|
issues: BankIssue[];
|
|
405
368
|
}
|
|
406
|
-
interface ProviderTaxonomy {
|
|
407
|
-
taxonomy?: string | null;
|
|
408
|
-
specialty?: string | null;
|
|
409
|
-
primary?: boolean | null;
|
|
410
|
-
license?: string | null;
|
|
411
|
-
state?: string | null;
|
|
412
|
-
}
|
|
413
|
-
interface ProviderSource {
|
|
414
|
-
edition?: string | null;
|
|
415
|
-
published_at?: string | null;
|
|
416
|
-
through?: string | null;
|
|
417
|
-
imported_at?: string | null;
|
|
418
|
-
}
|
|
419
|
-
interface ProviderSources {
|
|
420
|
-
nppes?: ProviderSource | null;
|
|
421
|
-
leie?: ProviderSource | null;
|
|
422
|
-
pecos?: ProviderSource | null;
|
|
423
|
-
optout?: ProviderSource | null;
|
|
424
|
-
}
|
|
425
|
-
interface Provider {
|
|
426
|
-
sources?: ProviderSources | null;
|
|
427
|
-
/** Input with accepted separators removed; null when empty. Invalid values remain visible. */
|
|
428
|
-
npi: string | null;
|
|
429
|
-
/** Format and NPI checksum only; does not verify a provider or credentials. */
|
|
430
|
-
valid: boolean;
|
|
431
|
-
/** Found in the stored NPPES snapshot. Null when input is invalid. */
|
|
432
|
-
registered: boolean | null;
|
|
433
|
-
/** Recorded NPI activation status. Null when unknown; not licensure or practice status. */
|
|
434
|
-
active: boolean | null;
|
|
435
|
-
/** NPI-only match in the stored OIG LEIE file. False is not complete exclusion clearance. */
|
|
436
|
-
excluded: boolean | null;
|
|
437
|
-
/** individual or organization. */
|
|
438
|
-
type: string | null;
|
|
439
|
-
name: string | null;
|
|
440
|
-
first: string | null;
|
|
441
|
-
last: string | null;
|
|
442
|
-
credential: string | null;
|
|
443
|
-
specialty: string | null;
|
|
444
|
-
/** NUCC taxonomy code. */
|
|
445
|
-
taxonomy: string | null;
|
|
446
|
-
address: string | null;
|
|
447
|
-
city: string | null;
|
|
448
|
-
state: string | null;
|
|
449
|
-
state_name: string | null;
|
|
450
|
-
postal: string | null;
|
|
451
|
-
country: string | null;
|
|
452
|
-
phone: string | null;
|
|
453
|
-
deep?: Deep<ProviderDeep>;
|
|
454
|
-
}
|
|
455
|
-
interface ProviderEnrollment {
|
|
456
|
-
/** part_a, part_b, practitioner, dme, order_refer, mdpp. Null when the code is unknown. */
|
|
457
|
-
type: string | null;
|
|
458
|
-
specialty: string | null;
|
|
459
|
-
state: string | null;
|
|
460
|
-
}
|
|
461
|
-
interface ProviderDeep {
|
|
462
|
-
enumerated_at?: string | null;
|
|
463
|
-
updated_at?: string | null;
|
|
464
|
-
reactivated_at?: string | null;
|
|
465
|
-
taxonomies?: ProviderTaxonomy[] | null;
|
|
466
|
-
/** Present in the stored Medicare FFS enrollment extract; not payment eligibility. */
|
|
467
|
-
medicare?: boolean | null;
|
|
468
|
-
/** NPI-only match in the stored CMS opt-out affidavit list. Null when unavailable. */
|
|
469
|
-
opt_out?: boolean | null;
|
|
470
|
-
/** Stored enrollment rows. Null when unavailable; [] when no rows are returned. */
|
|
471
|
-
enrollments?: ProviderEnrollment[] | null;
|
|
472
|
-
/** Recorded NPI deactivation date, YYYY-MM-DD. Null when active or unavailable. */
|
|
473
|
-
deactivated_at: string | null;
|
|
474
|
-
}
|
|
475
|
-
interface TariffMeasure {
|
|
476
|
-
/** Chapter 99 heading, dotted (9903.01.24). */
|
|
477
|
-
heading: string;
|
|
478
|
-
/** The measure text verbatim. */
|
|
479
|
-
description: string;
|
|
480
|
-
/** The rate string verbatim ("The duty provided in the applicable subheading + 10%"). */
|
|
481
|
-
rate: string | null;
|
|
482
|
-
/** Effective from, ISO YYYY-MM-DD. Null when the schedule states none. */
|
|
483
|
-
from: string | null;
|
|
484
|
-
/** Expires, ISO YYYY-MM-DD. Null when open-ended. */
|
|
485
|
-
until: string | null;
|
|
486
|
-
/** True when the published measure has additional eligibility conditions. */
|
|
487
|
-
conditional?: boolean | null;
|
|
488
|
-
}
|
|
489
|
-
interface TariffDeep {
|
|
490
|
-
/** Open-string explanation when effective_rate is null. */
|
|
491
|
-
reason?: string | null;
|
|
492
|
-
/** The origin country the measures were resolved for. */
|
|
493
|
-
origin?: string | null;
|
|
494
|
-
/** Composed ad valorem percent for matched stored measures only, not complete duty or landed cost. Null when the components do not compose cleanly. */
|
|
495
|
-
effective_rate?: number | null;
|
|
496
|
-
/** Matching stored Chapter 99 schedule measures for this code and goods origin. */
|
|
497
|
-
measures?: TariffMeasure[] | null;
|
|
498
|
-
/** Units of quantity (No., kg). */
|
|
499
|
-
units: string[];
|
|
500
|
-
/** Column 1 special rate, verbatim. */
|
|
501
|
-
special: string | null;
|
|
502
|
-
/** Column 2 rate, verbatim. */
|
|
503
|
-
other: string | null;
|
|
504
|
-
}
|
|
505
|
-
interface Tariff {
|
|
506
|
-
/** Exact immutable edition. Older servers may omit it. */
|
|
507
|
-
edition?: string;
|
|
508
|
-
/** Answering date, or null for an undated edition query. */
|
|
509
|
-
date?: string | null;
|
|
510
|
-
/** Normalized code with dots (8471.30.01.00). */
|
|
511
|
-
hts: string;
|
|
512
|
-
/** The schedule line verbatim. */
|
|
513
|
-
description: string;
|
|
514
|
-
/** Parent descriptions from the schedule outline, outermost first. */
|
|
515
|
-
lineage: string[];
|
|
516
|
-
/** Column 1 general rate, verbatim. */
|
|
517
|
-
general: string | null;
|
|
518
|
-
/** @deprecated Omitted from current API responses. */
|
|
519
|
-
revision?: string;
|
|
520
|
-
deep?: Deep<TariffDeep>;
|
|
521
|
-
}
|
|
522
|
-
interface TariffSearchHit {
|
|
523
|
-
hts: string;
|
|
524
|
-
description: string;
|
|
525
|
-
general: string | null;
|
|
526
|
-
/** Parent descriptions, outermost first. Older responses may omit this context. */
|
|
527
|
-
lineage?: string[] | null;
|
|
528
|
-
}
|
|
529
|
-
interface TariffSearch {
|
|
530
|
-
/** Exact immutable edition. Older servers may omit it. */
|
|
531
|
-
edition?: string;
|
|
532
|
-
/** Answering date, or null for an undated edition query. */
|
|
533
|
-
date?: string | null;
|
|
534
|
-
q: string;
|
|
535
|
-
revision?: string;
|
|
536
|
-
/** Up to 20 tariff lines, best match first. */
|
|
537
|
-
lines: TariffSearchHit[];
|
|
538
|
-
}
|
|
539
|
-
interface VinRecall {
|
|
540
|
-
/** Government campaign number. */
|
|
541
|
-
campaign: string;
|
|
542
|
-
/** Report date, ISO YYYY-MM-DD. */
|
|
543
|
-
date: string | null;
|
|
544
|
-
component: string | null;
|
|
545
|
-
/** The filed summary verbatim. */
|
|
546
|
-
summary: string | null;
|
|
547
|
-
}
|
|
548
|
-
interface VinDeep {
|
|
549
|
-
/** Recall campaigns for the decoded year, make and model. [] when none, null when the registry did not answer. */
|
|
550
|
-
recalls?: VinRecall[] | null;
|
|
551
|
-
series: string | null;
|
|
552
|
-
doors: number | null;
|
|
553
|
-
cylinders: number | null;
|
|
554
|
-
/** Engine displacement in liters. */
|
|
555
|
-
displacement: number | null;
|
|
556
|
-
fuel: string | null;
|
|
557
|
-
horsepower: number | null;
|
|
558
|
-
/** fwd, rwd, awd, 4wd. */
|
|
559
|
-
drive: string | null;
|
|
560
|
-
/** automatic, manual, cvt. */
|
|
561
|
-
transmission: string | null;
|
|
562
|
-
manufacturer: string | null;
|
|
563
|
-
plant_city: string | null;
|
|
564
|
-
plant_state: string | null;
|
|
565
|
-
plant_country: string | null;
|
|
566
|
-
/** Gross vehicle weight rating class as filed. */
|
|
567
|
-
gvwr: string | null;
|
|
568
|
-
}
|
|
569
|
-
interface Vin {
|
|
570
|
-
/** Normalized VIN, uppercase, no spaces. Invalid input still echoes the fold. */
|
|
571
|
-
vin: string | null;
|
|
572
|
-
valid: boolean;
|
|
573
|
-
year: number | null;
|
|
574
|
-
make: string | null;
|
|
575
|
-
model: string | null;
|
|
576
|
-
trim: string | null;
|
|
577
|
-
/** Body style (sedan, coupe, suv, pickup). */
|
|
578
|
-
body: string | null;
|
|
579
|
-
/** Vehicle type (passenger car, truck, motorcycle, bus, trailer). */
|
|
580
|
-
type: string | null;
|
|
581
|
-
deep?: Deep<VinDeep>;
|
|
582
|
-
}
|
|
583
369
|
interface Phone {
|
|
584
370
|
phone: string | null;
|
|
585
371
|
valid: boolean;
|
|
@@ -1814,9 +1600,6 @@ type IndustryExclusion = NaicsExclusion;
|
|
|
1814
1600
|
type IndustryMatch = NaicsMatch;
|
|
1815
1601
|
type IndustrySearch = NaicsSearch;
|
|
1816
1602
|
type IndustrySearchItem = NaicsSearchItem;
|
|
1817
|
-
type Vehicle = Vin;
|
|
1818
|
-
type VehicleDeep = VinDeep;
|
|
1819
|
-
type VehicleRecall = VinRecall;
|
|
1820
1603
|
interface Iban {
|
|
1821
1604
|
iban: string | null;
|
|
1822
1605
|
valid: boolean;
|
|
@@ -1831,49 +1614,6 @@ interface Iban {
|
|
|
1831
1614
|
bic: string | null;
|
|
1832
1615
|
deep?: Deep<IbanDeep>;
|
|
1833
1616
|
}
|
|
1834
|
-
interface Npi {
|
|
1835
|
-
/** Normalized 10-digit NPI. Invalid input still echoes the fold. */
|
|
1836
|
-
npi: string | null;
|
|
1837
|
-
valid: boolean;
|
|
1838
|
-
/** Exists in the CMS NPPES registry. */
|
|
1839
|
-
registered: boolean | null;
|
|
1840
|
-
active: boolean | null;
|
|
1841
|
-
/** On the OIG exclusion list. */
|
|
1842
|
-
excluded: boolean | null;
|
|
1843
|
-
/** individual or organization. */
|
|
1844
|
-
type: string | null;
|
|
1845
|
-
name: string | null;
|
|
1846
|
-
first: string | null;
|
|
1847
|
-
last: string | null;
|
|
1848
|
-
credential: string | null;
|
|
1849
|
-
specialty: string | null;
|
|
1850
|
-
/** NUCC taxonomy code. */
|
|
1851
|
-
taxonomy: string | null;
|
|
1852
|
-
address: string | null;
|
|
1853
|
-
city: string | null;
|
|
1854
|
-
state: string | null;
|
|
1855
|
-
state_name: string | null;
|
|
1856
|
-
postal: string | null;
|
|
1857
|
-
country: string | null;
|
|
1858
|
-
phone: string | null;
|
|
1859
|
-
deep?: Deep<NpiDeep>;
|
|
1860
|
-
}
|
|
1861
|
-
interface NpiEnrollment {
|
|
1862
|
-
/** part_a, part_b, practitioner, dme, order_refer, mdpp. Null when the code is unknown. */
|
|
1863
|
-
type: string | null;
|
|
1864
|
-
specialty: string | null;
|
|
1865
|
-
state: string | null;
|
|
1866
|
-
}
|
|
1867
|
-
interface NpiDeep {
|
|
1868
|
-
/** In the published Medicare FFS enrollment extract. */
|
|
1869
|
-
medicare?: boolean | null;
|
|
1870
|
-
/** On the CMS opt-out affidavit list. Matched by NPI only. */
|
|
1871
|
-
opt_out?: boolean | null;
|
|
1872
|
-
/** Enrollment rows. [] when medicare is false. */
|
|
1873
|
-
enrollments?: NpiEnrollment[] | null;
|
|
1874
|
-
/** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
|
|
1875
|
-
deactivated_at: string | null;
|
|
1876
|
-
}
|
|
1877
1617
|
interface Bin {
|
|
1878
1618
|
bin: string;
|
|
1879
1619
|
/** Actual longest matched prefix. May be shorter than the input. */
|
|
@@ -2245,8 +1985,6 @@ type IpOptions = LanguageOption & DeepOption & RequestOptions;
|
|
|
2245
1985
|
type IpSelfOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2246
1986
|
type ContinentOptions = LanguageOption & RequestOptions;
|
|
2247
1987
|
type ContinentCountriesOptions = LanguageOption & RequestOptions;
|
|
2248
|
-
type BlocOptions = RequestOptions;
|
|
2249
|
-
type BlocCountriesOptions = LanguageOption & RequestOptions;
|
|
2250
1988
|
type CountryOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2251
1989
|
type CountryStatesOptions = LanguageOption & RequestOptions;
|
|
2252
1990
|
type StateOptions = LanguageOption & {
|
|
@@ -2345,18 +2083,12 @@ type CompanySearchOptions = {
|
|
|
2345
2083
|
type CompanyCoverageOptions = RequestOptions;
|
|
2346
2084
|
/** `deep: true` requests a metered deliverability check. No automatic retries by default. */
|
|
2347
2085
|
type EmailOptions = DeepOption & RequestOptions;
|
|
2348
|
-
/** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
|
|
2349
|
-
type VatOptions = {
|
|
2350
|
-
country?: string;
|
|
2351
|
-
from?: string;
|
|
2352
|
-
} & DeepOption & RequestOptions;
|
|
2353
2086
|
type BankOptions = {
|
|
2354
2087
|
country?: string;
|
|
2355
2088
|
} & DeepOption & RequestOptions;
|
|
2356
2089
|
type BankRequirementsOptions = {
|
|
2357
2090
|
format?: string;
|
|
2358
2091
|
} & RequestOptions;
|
|
2359
|
-
type ProviderOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2360
2092
|
/** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
|
|
2361
2093
|
type PhoneOptions = {
|
|
2362
2094
|
country?: string;
|
|
@@ -2398,27 +2130,12 @@ type DnsOptions = {
|
|
|
2398
2130
|
} & RequestOptions;
|
|
2399
2131
|
type MxOptions = RequestOptions;
|
|
2400
2132
|
type UseragentOptions = DeepOption & RequestOptions;
|
|
2401
|
-
type VinOptions = DeepOption & RequestOptions;
|
|
2402
|
-
type VehicleOptions = VinOptions;
|
|
2403
2133
|
/** US NAICS 2022 code lookup, using pooled requests. */
|
|
2404
2134
|
type IndustryOptions = DeepOption & RequestOptions;
|
|
2405
2135
|
/** Keyword search. Limit defaults to 10 and accepts 1-50. */
|
|
2406
2136
|
type IndustrySearchOptions = {
|
|
2407
2137
|
limit?: number;
|
|
2408
2138
|
} & DeepOption & RequestOptions;
|
|
2409
|
-
/** 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. */
|
|
2410
|
-
type TariffOptions = {
|
|
2411
|
-
/** Origin country (ISO2). With paid deep, resolves country-specific measures. */
|
|
2412
|
-
origin?: string;
|
|
2413
|
-
/** Exact immutable edition fingerprint. */
|
|
2414
|
-
edition?: string;
|
|
2415
|
-
/** YYYY-MM-DD, accepted only with verified source coverage. */
|
|
2416
|
-
date?: string;
|
|
2417
|
-
} & DeepOption & RequestOptions;
|
|
2418
|
-
type TariffSearchOptions = {
|
|
2419
|
-
edition?: string;
|
|
2420
|
-
date?: string;
|
|
2421
|
-
} & RequestOptions;
|
|
2422
2139
|
type CurrencyOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2423
2140
|
type CurrencyRateOptions = {
|
|
2424
2141
|
date?: string;
|
|
@@ -2524,7 +2241,7 @@ type EmojiConvertOptions = RequestOptions & {
|
|
|
2524
2241
|
shortcodeSource: 'cldr' | 'github' | 'slack' | 'discord';
|
|
2525
2242
|
};
|
|
2526
2243
|
interface DeepOption {
|
|
2527
|
-
/** Request endpoint-specific enrichment. Email
|
|
2244
|
+
/** Request endpoint-specific enrichment. Email checks are metered. Reference depth can be pooled or included with a paid plan. See the operation's help. */
|
|
2528
2245
|
deep?: boolean;
|
|
2529
2246
|
}
|
|
2530
2247
|
declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
@@ -2545,9 +2262,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2545
2262
|
continent: ((code: string, opts?: ContinentOptions) => Promise<Continent>) & {
|
|
2546
2263
|
countries: (code: string, opts?: ContinentCountriesOptions) => Promise<ContinentCountries>;
|
|
2547
2264
|
};
|
|
2548
|
-
bloc: ((code: string, opts?: BlocOptions) => Promise<Bloc>) & {
|
|
2549
|
-
countries: (code: string, opts?: BlocCountriesOptions) => Promise<BlocCountries>;
|
|
2550
|
-
};
|
|
2551
2265
|
country: ((code: string, opts?: CountryOptions) => Promise<Country>) & {
|
|
2552
2266
|
states: (code: string, opts?: CountryStatesOptions) => Promise<CountryStates>;
|
|
2553
2267
|
};
|
|
@@ -2594,17 +2308,13 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2594
2308
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
2595
2309
|
*/
|
|
2596
2310
|
email: (email: string, opts?: EmailOptions) => Promise<Email>;
|
|
2597
|
-
/** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
|
|
2598
|
-
vat: (number: string, opts?: VatOptions) => Promise<Vat>;
|
|
2599
2311
|
iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
|
|
2600
2312
|
bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
|
|
2601
|
-
npi: (npi: string, opts?: NpiOptions) => Promise<Npi>;
|
|
2602
2313
|
bank: (iban: string, opts?: BankOptions) => Promise<Bank>;
|
|
2603
2314
|
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
2604
2315
|
bankUsAch: (input: BankUsAchInput, opts?: RequestOptions) => Promise<BankUsAch>;
|
|
2605
2316
|
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
2606
2317
|
bankRequirements: (country: string, opts?: BankRequirementsOptions) => Promise<BankRequirements>;
|
|
2607
|
-
provider: (npi: string, opts?: ProviderOptions) => Promise<Provider>;
|
|
2608
2318
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
2609
2319
|
phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
|
|
2610
2320
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -2630,10 +2340,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2630
2340
|
dns: (domain: string, opts?: DnsOptions) => Promise<Dns>;
|
|
2631
2341
|
mx: (domain: string, opts?: MxOptions) => Promise<Mx>;
|
|
2632
2342
|
useragent: (ua: string, opts?: UseragentOptions) => Promise<Useragent>;
|
|
2633
|
-
/** Identify a vehicle by VIN. Paid deep adds specifications and model-level recall campaigns. */
|
|
2634
|
-
vehicle: (vin: string, opts?: VehicleOptions) => Promise<Vehicle>;
|
|
2635
|
-
/** Compatibility entry for VIN callers. */
|
|
2636
|
-
vin: (vin: string, opts?: VinOptions) => Promise<Vin>;
|
|
2637
2343
|
/** US NAICS 2022 definitions and hierarchy. */
|
|
2638
2344
|
industry: ((code: string, opts?: IndustryOptions) => Promise<Industry>) & {
|
|
2639
2345
|
search: (query: string, opts?: IndustrySearchOptions) => Promise<IndustrySearch>;
|
|
@@ -2642,10 +2348,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2642
2348
|
naics: ((code: string, opts?: IndustryOptions) => Promise<Industry>) & {
|
|
2643
2349
|
search: (query: string, opts?: IndustrySearchOptions) => Promise<IndustrySearch>;
|
|
2644
2350
|
};
|
|
2645
|
-
/** 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. */
|
|
2646
|
-
tariff: ((code: string, opts?: TariffOptions) => Promise<Tariff>) & {
|
|
2647
|
-
search: (query: string, opts?: TariffSearchOptions) => Promise<TariffSearch>;
|
|
2648
|
-
};
|
|
2649
2351
|
currency: ((code: string, opts?: CurrencyOptions) => Promise<Currency>) & {
|
|
2650
2352
|
rate: (base: string, quote: string, opts?: CurrencyRateOptions) => Promise<CurrencyRate>;
|
|
2651
2353
|
};
|
|
@@ -2694,7 +2396,6 @@ type NaicsSearchOptions = IndustrySearchOptions;
|
|
|
2694
2396
|
type IbanOptions = {
|
|
2695
2397
|
country?: string;
|
|
2696
2398
|
} & DeepOption & RequestOptions;
|
|
2697
|
-
type NpiOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2698
2399
|
type BinOptions = DeepOption & RequestOptions;
|
|
2699
2400
|
type CityScopeOptions = {
|
|
2700
2401
|
country?: string;
|
|
@@ -2784,4 +2485,4 @@ interface CityNearbyCall {
|
|
|
2784
2485
|
(name: string, opts: CityNearbyOptions): Promise<CityNearby | CityCollection>;
|
|
2785
2486
|
}
|
|
2786
2487
|
|
|
2787
|
-
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type
|
|
2488
|
+
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type Caller, type CallerOptions, type Card, type CardDeep, type CardOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityAmbiguityCandidate, type CityAncestorsOptions, type CityCollection, type CityCollectionFilters, type CityDeep, type CityDistance, type CityDistanceOptions, type CityGrain, type CityIdCall, type CityIdOptions, type CityList, type CityListOptions, type CityLookupCall, type CityMatch, type CityNearby, type CityNearbyCall, type CityNearbyCoordinates, type CityNearbyCoordinatesOptions, type CityNearbyOptions, type CityNearest, type CityNearestCall, type CityNearestOptions, type CityOptions, type CityPagingOptions, type CityParent, type CityRelations, type CityRelationsOptions, type CityResource, type CityResponseOptions, type CityScopeOptions, type CitySearch, type CitySearchCall, type CitySearchOptions, type CitySort, type Company, type CompanyCandidate, type CompanyCountry, type CompanyCoverage, type CompanyCoverageOptions, type CompanyDeep, type CompanyEmailAddress, type CompanyIdOptions, type CompanyMatch, type CompanyOptions, type CompanyPhoneNumber, type CompanyProfile, type CompanyProfileAddress, type CompanyProfileDeep, type CompanyProfileDomain, type CompanyProfileEmail, type CompanyProfileEmployees, type CompanyProfileFounding, type CompanyProfileIdentifier, type CompanyProfileIndustry, type CompanyProfileJurisdiction, type CompanyProfileListing, type CompanyProfilePhone, type CompanyProfileRegistration, type CompanyProfileRegistrationAddress, type CompanyProfileRegistrationLegalForm, type CompanyProfileSource, type CompanyProfileWebsite, type CompanySearch, type CompanySearchOptions, type CompanySocialProfile, 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 ElevationLocations, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiArtwork, type EmojiArtworkSource, type EmojiBrowse, type EmojiBrowseOptions, EmojiCatalog, type EmojiCatalogConvertOptions, type EmojiCatalogData, EmojiCatalogError, type EmojiCatalogLocalization, type EmojiCatalogLookupOptions, type EmojiCatalogOptions, type EmojiCatalogParseOptions, type EmojiCatalogRegexOptions, type EmojiCatalogScope, type EmojiCatalogSearchFacts, type EmojiCatalogSearchOptions, type EmojiCategories, type EmojiCategory, type EmojiConversion, type EmojiConvertOptions, type EmojiDeep, type EmojiMetadata, type EmojiNativeSearchFacts, type EmojiNotice, type EmojiOptions, type EmojiParse, type EmojiParseOptions, type EmojiPosition, type EmojiSearch, type EmojiSearchOptions, type EmojiShortcodeSourceMetadata, type EmojiSkin, type EmojiSource, type EmojiUnresolved, type EmojiVariant, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Industry, type IndustryChild, type IndustryCorrection, type IndustryDeep, type IndustryExclusion, type IndustryMatch, type IndustryOptions, type IndustrySearch, type IndustrySearchItem, type IndustrySearchOptions, 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 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 PostalLocality, type PostalMetro, type PostalMetrosDeep, type PostalNearby, type PostalNearbyItem, type PostalNearbyOptions, type PostalOptions, type Preflight, type PreflightCost, type PreflightEmailCapacity, type PreflightOperation, type PreflightOperationEstimate, type PreflightPooledCapacity, type PreflightSpendCapacity, type PreflightTask, type PropertyTax, type RequestOptions, type Stack, type StackOptions, type StackTechnology, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Time, type TimeAtOptions, type TimeLocation, type TimeLocationCandidate, type TimeLocationInput, type TimeOptions, type TimeResolution, type TimeResolutionAlternative, type TimeSeason, type TimeTransition, type TimeTransitionState, type TimeZoneEntry, type TimeZones, type TimeZonesOptions, 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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -73,22 +73,6 @@ interface ContinentCountries {
|
|
|
73
73
|
continent: string;
|
|
74
74
|
countries: ContinentCountryItem[];
|
|
75
75
|
}
|
|
76
|
-
interface Bloc {
|
|
77
|
-
bloc: string;
|
|
78
|
-
name: string;
|
|
79
|
-
/** Current member count. An entity fact, not a list-length field. */
|
|
80
|
-
members: number;
|
|
81
|
-
}
|
|
82
|
-
interface BlocCountryItem {
|
|
83
|
-
country: string;
|
|
84
|
-
name: string;
|
|
85
|
-
emoji?: string | null;
|
|
86
|
-
calling_code?: string | null;
|
|
87
|
-
}
|
|
88
|
-
interface BlocCountries {
|
|
89
|
-
bloc: string;
|
|
90
|
-
countries: BlocCountryItem[];
|
|
91
|
-
}
|
|
92
76
|
interface Country {
|
|
93
77
|
country: string;
|
|
94
78
|
name: string;
|
|
@@ -300,27 +284,6 @@ interface Email {
|
|
|
300
284
|
disposable: boolean;
|
|
301
285
|
deep?: Deep<EmailDeep>;
|
|
302
286
|
}
|
|
303
|
-
interface VatAddress {
|
|
304
|
-
street: string | null;
|
|
305
|
-
city: string | null;
|
|
306
|
-
postal: string | null;
|
|
307
|
-
country: string | null;
|
|
308
|
-
}
|
|
309
|
-
interface VatDeep {
|
|
310
|
-
registered: boolean | null;
|
|
311
|
-
name: string | null;
|
|
312
|
-
address: VatAddress | null;
|
|
313
|
-
consultation: string | null;
|
|
314
|
-
/** Registry-provided check time, or null when unavailable. */
|
|
315
|
-
consulted_at: string | null;
|
|
316
|
-
}
|
|
317
|
-
interface Vat {
|
|
318
|
-
vat: string | null;
|
|
319
|
-
valid: boolean;
|
|
320
|
-
country: string | null;
|
|
321
|
-
from?: string;
|
|
322
|
-
deep?: Deep<VatDeep>;
|
|
323
|
-
}
|
|
324
287
|
/** Ordered IBAN checks. States are open strings for future API values. */
|
|
325
288
|
interface BankChecks {
|
|
326
289
|
input: string;
|
|
@@ -403,183 +366,6 @@ interface BankUsAch {
|
|
|
403
366
|
checks: BankUsAchChecks;
|
|
404
367
|
issues: BankIssue[];
|
|
405
368
|
}
|
|
406
|
-
interface ProviderTaxonomy {
|
|
407
|
-
taxonomy?: string | null;
|
|
408
|
-
specialty?: string | null;
|
|
409
|
-
primary?: boolean | null;
|
|
410
|
-
license?: string | null;
|
|
411
|
-
state?: string | null;
|
|
412
|
-
}
|
|
413
|
-
interface ProviderSource {
|
|
414
|
-
edition?: string | null;
|
|
415
|
-
published_at?: string | null;
|
|
416
|
-
through?: string | null;
|
|
417
|
-
imported_at?: string | null;
|
|
418
|
-
}
|
|
419
|
-
interface ProviderSources {
|
|
420
|
-
nppes?: ProviderSource | null;
|
|
421
|
-
leie?: ProviderSource | null;
|
|
422
|
-
pecos?: ProviderSource | null;
|
|
423
|
-
optout?: ProviderSource | null;
|
|
424
|
-
}
|
|
425
|
-
interface Provider {
|
|
426
|
-
sources?: ProviderSources | null;
|
|
427
|
-
/** Input with accepted separators removed; null when empty. Invalid values remain visible. */
|
|
428
|
-
npi: string | null;
|
|
429
|
-
/** Format and NPI checksum only; does not verify a provider or credentials. */
|
|
430
|
-
valid: boolean;
|
|
431
|
-
/** Found in the stored NPPES snapshot. Null when input is invalid. */
|
|
432
|
-
registered: boolean | null;
|
|
433
|
-
/** Recorded NPI activation status. Null when unknown; not licensure or practice status. */
|
|
434
|
-
active: boolean | null;
|
|
435
|
-
/** NPI-only match in the stored OIG LEIE file. False is not complete exclusion clearance. */
|
|
436
|
-
excluded: boolean | null;
|
|
437
|
-
/** individual or organization. */
|
|
438
|
-
type: string | null;
|
|
439
|
-
name: string | null;
|
|
440
|
-
first: string | null;
|
|
441
|
-
last: string | null;
|
|
442
|
-
credential: string | null;
|
|
443
|
-
specialty: string | null;
|
|
444
|
-
/** NUCC taxonomy code. */
|
|
445
|
-
taxonomy: string | null;
|
|
446
|
-
address: string | null;
|
|
447
|
-
city: string | null;
|
|
448
|
-
state: string | null;
|
|
449
|
-
state_name: string | null;
|
|
450
|
-
postal: string | null;
|
|
451
|
-
country: string | null;
|
|
452
|
-
phone: string | null;
|
|
453
|
-
deep?: Deep<ProviderDeep>;
|
|
454
|
-
}
|
|
455
|
-
interface ProviderEnrollment {
|
|
456
|
-
/** part_a, part_b, practitioner, dme, order_refer, mdpp. Null when the code is unknown. */
|
|
457
|
-
type: string | null;
|
|
458
|
-
specialty: string | null;
|
|
459
|
-
state: string | null;
|
|
460
|
-
}
|
|
461
|
-
interface ProviderDeep {
|
|
462
|
-
enumerated_at?: string | null;
|
|
463
|
-
updated_at?: string | null;
|
|
464
|
-
reactivated_at?: string | null;
|
|
465
|
-
taxonomies?: ProviderTaxonomy[] | null;
|
|
466
|
-
/** Present in the stored Medicare FFS enrollment extract; not payment eligibility. */
|
|
467
|
-
medicare?: boolean | null;
|
|
468
|
-
/** NPI-only match in the stored CMS opt-out affidavit list. Null when unavailable. */
|
|
469
|
-
opt_out?: boolean | null;
|
|
470
|
-
/** Stored enrollment rows. Null when unavailable; [] when no rows are returned. */
|
|
471
|
-
enrollments?: ProviderEnrollment[] | null;
|
|
472
|
-
/** Recorded NPI deactivation date, YYYY-MM-DD. Null when active or unavailable. */
|
|
473
|
-
deactivated_at: string | null;
|
|
474
|
-
}
|
|
475
|
-
interface TariffMeasure {
|
|
476
|
-
/** Chapter 99 heading, dotted (9903.01.24). */
|
|
477
|
-
heading: string;
|
|
478
|
-
/** The measure text verbatim. */
|
|
479
|
-
description: string;
|
|
480
|
-
/** The rate string verbatim ("The duty provided in the applicable subheading + 10%"). */
|
|
481
|
-
rate: string | null;
|
|
482
|
-
/** Effective from, ISO YYYY-MM-DD. Null when the schedule states none. */
|
|
483
|
-
from: string | null;
|
|
484
|
-
/** Expires, ISO YYYY-MM-DD. Null when open-ended. */
|
|
485
|
-
until: string | null;
|
|
486
|
-
/** True when the published measure has additional eligibility conditions. */
|
|
487
|
-
conditional?: boolean | null;
|
|
488
|
-
}
|
|
489
|
-
interface TariffDeep {
|
|
490
|
-
/** Open-string explanation when effective_rate is null. */
|
|
491
|
-
reason?: string | null;
|
|
492
|
-
/** The origin country the measures were resolved for. */
|
|
493
|
-
origin?: string | null;
|
|
494
|
-
/** Composed ad valorem percent for matched stored measures only, not complete duty or landed cost. Null when the components do not compose cleanly. */
|
|
495
|
-
effective_rate?: number | null;
|
|
496
|
-
/** Matching stored Chapter 99 schedule measures for this code and goods origin. */
|
|
497
|
-
measures?: TariffMeasure[] | null;
|
|
498
|
-
/** Units of quantity (No., kg). */
|
|
499
|
-
units: string[];
|
|
500
|
-
/** Column 1 special rate, verbatim. */
|
|
501
|
-
special: string | null;
|
|
502
|
-
/** Column 2 rate, verbatim. */
|
|
503
|
-
other: string | null;
|
|
504
|
-
}
|
|
505
|
-
interface Tariff {
|
|
506
|
-
/** Exact immutable edition. Older servers may omit it. */
|
|
507
|
-
edition?: string;
|
|
508
|
-
/** Answering date, or null for an undated edition query. */
|
|
509
|
-
date?: string | null;
|
|
510
|
-
/** Normalized code with dots (8471.30.01.00). */
|
|
511
|
-
hts: string;
|
|
512
|
-
/** The schedule line verbatim. */
|
|
513
|
-
description: string;
|
|
514
|
-
/** Parent descriptions from the schedule outline, outermost first. */
|
|
515
|
-
lineage: string[];
|
|
516
|
-
/** Column 1 general rate, verbatim. */
|
|
517
|
-
general: string | null;
|
|
518
|
-
/** @deprecated Omitted from current API responses. */
|
|
519
|
-
revision?: string;
|
|
520
|
-
deep?: Deep<TariffDeep>;
|
|
521
|
-
}
|
|
522
|
-
interface TariffSearchHit {
|
|
523
|
-
hts: string;
|
|
524
|
-
description: string;
|
|
525
|
-
general: string | null;
|
|
526
|
-
/** Parent descriptions, outermost first. Older responses may omit this context. */
|
|
527
|
-
lineage?: string[] | null;
|
|
528
|
-
}
|
|
529
|
-
interface TariffSearch {
|
|
530
|
-
/** Exact immutable edition. Older servers may omit it. */
|
|
531
|
-
edition?: string;
|
|
532
|
-
/** Answering date, or null for an undated edition query. */
|
|
533
|
-
date?: string | null;
|
|
534
|
-
q: string;
|
|
535
|
-
revision?: string;
|
|
536
|
-
/** Up to 20 tariff lines, best match first. */
|
|
537
|
-
lines: TariffSearchHit[];
|
|
538
|
-
}
|
|
539
|
-
interface VinRecall {
|
|
540
|
-
/** Government campaign number. */
|
|
541
|
-
campaign: string;
|
|
542
|
-
/** Report date, ISO YYYY-MM-DD. */
|
|
543
|
-
date: string | null;
|
|
544
|
-
component: string | null;
|
|
545
|
-
/** The filed summary verbatim. */
|
|
546
|
-
summary: string | null;
|
|
547
|
-
}
|
|
548
|
-
interface VinDeep {
|
|
549
|
-
/** Recall campaigns for the decoded year, make and model. [] when none, null when the registry did not answer. */
|
|
550
|
-
recalls?: VinRecall[] | null;
|
|
551
|
-
series: string | null;
|
|
552
|
-
doors: number | null;
|
|
553
|
-
cylinders: number | null;
|
|
554
|
-
/** Engine displacement in liters. */
|
|
555
|
-
displacement: number | null;
|
|
556
|
-
fuel: string | null;
|
|
557
|
-
horsepower: number | null;
|
|
558
|
-
/** fwd, rwd, awd, 4wd. */
|
|
559
|
-
drive: string | null;
|
|
560
|
-
/** automatic, manual, cvt. */
|
|
561
|
-
transmission: string | null;
|
|
562
|
-
manufacturer: string | null;
|
|
563
|
-
plant_city: string | null;
|
|
564
|
-
plant_state: string | null;
|
|
565
|
-
plant_country: string | null;
|
|
566
|
-
/** Gross vehicle weight rating class as filed. */
|
|
567
|
-
gvwr: string | null;
|
|
568
|
-
}
|
|
569
|
-
interface Vin {
|
|
570
|
-
/** Normalized VIN, uppercase, no spaces. Invalid input still echoes the fold. */
|
|
571
|
-
vin: string | null;
|
|
572
|
-
valid: boolean;
|
|
573
|
-
year: number | null;
|
|
574
|
-
make: string | null;
|
|
575
|
-
model: string | null;
|
|
576
|
-
trim: string | null;
|
|
577
|
-
/** Body style (sedan, coupe, suv, pickup). */
|
|
578
|
-
body: string | null;
|
|
579
|
-
/** Vehicle type (passenger car, truck, motorcycle, bus, trailer). */
|
|
580
|
-
type: string | null;
|
|
581
|
-
deep?: Deep<VinDeep>;
|
|
582
|
-
}
|
|
583
369
|
interface Phone {
|
|
584
370
|
phone: string | null;
|
|
585
371
|
valid: boolean;
|
|
@@ -1814,9 +1600,6 @@ type IndustryExclusion = NaicsExclusion;
|
|
|
1814
1600
|
type IndustryMatch = NaicsMatch;
|
|
1815
1601
|
type IndustrySearch = NaicsSearch;
|
|
1816
1602
|
type IndustrySearchItem = NaicsSearchItem;
|
|
1817
|
-
type Vehicle = Vin;
|
|
1818
|
-
type VehicleDeep = VinDeep;
|
|
1819
|
-
type VehicleRecall = VinRecall;
|
|
1820
1603
|
interface Iban {
|
|
1821
1604
|
iban: string | null;
|
|
1822
1605
|
valid: boolean;
|
|
@@ -1831,49 +1614,6 @@ interface Iban {
|
|
|
1831
1614
|
bic: string | null;
|
|
1832
1615
|
deep?: Deep<IbanDeep>;
|
|
1833
1616
|
}
|
|
1834
|
-
interface Npi {
|
|
1835
|
-
/** Normalized 10-digit NPI. Invalid input still echoes the fold. */
|
|
1836
|
-
npi: string | null;
|
|
1837
|
-
valid: boolean;
|
|
1838
|
-
/** Exists in the CMS NPPES registry. */
|
|
1839
|
-
registered: boolean | null;
|
|
1840
|
-
active: boolean | null;
|
|
1841
|
-
/** On the OIG exclusion list. */
|
|
1842
|
-
excluded: boolean | null;
|
|
1843
|
-
/** individual or organization. */
|
|
1844
|
-
type: string | null;
|
|
1845
|
-
name: string | null;
|
|
1846
|
-
first: string | null;
|
|
1847
|
-
last: string | null;
|
|
1848
|
-
credential: string | null;
|
|
1849
|
-
specialty: string | null;
|
|
1850
|
-
/** NUCC taxonomy code. */
|
|
1851
|
-
taxonomy: string | null;
|
|
1852
|
-
address: string | null;
|
|
1853
|
-
city: string | null;
|
|
1854
|
-
state: string | null;
|
|
1855
|
-
state_name: string | null;
|
|
1856
|
-
postal: string | null;
|
|
1857
|
-
country: string | null;
|
|
1858
|
-
phone: string | null;
|
|
1859
|
-
deep?: Deep<NpiDeep>;
|
|
1860
|
-
}
|
|
1861
|
-
interface NpiEnrollment {
|
|
1862
|
-
/** part_a, part_b, practitioner, dme, order_refer, mdpp. Null when the code is unknown. */
|
|
1863
|
-
type: string | null;
|
|
1864
|
-
specialty: string | null;
|
|
1865
|
-
state: string | null;
|
|
1866
|
-
}
|
|
1867
|
-
interface NpiDeep {
|
|
1868
|
-
/** In the published Medicare FFS enrollment extract. */
|
|
1869
|
-
medicare?: boolean | null;
|
|
1870
|
-
/** On the CMS opt-out affidavit list. Matched by NPI only. */
|
|
1871
|
-
opt_out?: boolean | null;
|
|
1872
|
-
/** Enrollment rows. [] when medicare is false. */
|
|
1873
|
-
enrollments?: NpiEnrollment[] | null;
|
|
1874
|
-
/** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
|
|
1875
|
-
deactivated_at: string | null;
|
|
1876
|
-
}
|
|
1877
1617
|
interface Bin {
|
|
1878
1618
|
bin: string;
|
|
1879
1619
|
/** Actual longest matched prefix. May be shorter than the input. */
|
|
@@ -2245,8 +1985,6 @@ type IpOptions = LanguageOption & DeepOption & RequestOptions;
|
|
|
2245
1985
|
type IpSelfOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2246
1986
|
type ContinentOptions = LanguageOption & RequestOptions;
|
|
2247
1987
|
type ContinentCountriesOptions = LanguageOption & RequestOptions;
|
|
2248
|
-
type BlocOptions = RequestOptions;
|
|
2249
|
-
type BlocCountriesOptions = LanguageOption & RequestOptions;
|
|
2250
1988
|
type CountryOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2251
1989
|
type CountryStatesOptions = LanguageOption & RequestOptions;
|
|
2252
1990
|
type StateOptions = LanguageOption & {
|
|
@@ -2345,18 +2083,12 @@ type CompanySearchOptions = {
|
|
|
2345
2083
|
type CompanyCoverageOptions = RequestOptions;
|
|
2346
2084
|
/** `deep: true` requests a metered deliverability check. No automatic retries by default. */
|
|
2347
2085
|
type EmailOptions = DeepOption & RequestOptions;
|
|
2348
|
-
/** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
|
|
2349
|
-
type VatOptions = {
|
|
2350
|
-
country?: string;
|
|
2351
|
-
from?: string;
|
|
2352
|
-
} & DeepOption & RequestOptions;
|
|
2353
2086
|
type BankOptions = {
|
|
2354
2087
|
country?: string;
|
|
2355
2088
|
} & DeepOption & RequestOptions;
|
|
2356
2089
|
type BankRequirementsOptions = {
|
|
2357
2090
|
format?: string;
|
|
2358
2091
|
} & RequestOptions;
|
|
2359
|
-
type ProviderOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2360
2092
|
/** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
|
|
2361
2093
|
type PhoneOptions = {
|
|
2362
2094
|
country?: string;
|
|
@@ -2398,27 +2130,12 @@ type DnsOptions = {
|
|
|
2398
2130
|
} & RequestOptions;
|
|
2399
2131
|
type MxOptions = RequestOptions;
|
|
2400
2132
|
type UseragentOptions = DeepOption & RequestOptions;
|
|
2401
|
-
type VinOptions = DeepOption & RequestOptions;
|
|
2402
|
-
type VehicleOptions = VinOptions;
|
|
2403
2133
|
/** US NAICS 2022 code lookup, using pooled requests. */
|
|
2404
2134
|
type IndustryOptions = DeepOption & RequestOptions;
|
|
2405
2135
|
/** Keyword search. Limit defaults to 10 and accepts 1-50. */
|
|
2406
2136
|
type IndustrySearchOptions = {
|
|
2407
2137
|
limit?: number;
|
|
2408
2138
|
} & DeepOption & RequestOptions;
|
|
2409
|
-
/** 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. */
|
|
2410
|
-
type TariffOptions = {
|
|
2411
|
-
/** Origin country (ISO2). With paid deep, resolves country-specific measures. */
|
|
2412
|
-
origin?: string;
|
|
2413
|
-
/** Exact immutable edition fingerprint. */
|
|
2414
|
-
edition?: string;
|
|
2415
|
-
/** YYYY-MM-DD, accepted only with verified source coverage. */
|
|
2416
|
-
date?: string;
|
|
2417
|
-
} & DeepOption & RequestOptions;
|
|
2418
|
-
type TariffSearchOptions = {
|
|
2419
|
-
edition?: string;
|
|
2420
|
-
date?: string;
|
|
2421
|
-
} & RequestOptions;
|
|
2422
2139
|
type CurrencyOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2423
2140
|
type CurrencyRateOptions = {
|
|
2424
2141
|
date?: string;
|
|
@@ -2524,7 +2241,7 @@ type EmojiConvertOptions = RequestOptions & {
|
|
|
2524
2241
|
shortcodeSource: 'cldr' | 'github' | 'slack' | 'discord';
|
|
2525
2242
|
};
|
|
2526
2243
|
interface DeepOption {
|
|
2527
|
-
/** Request endpoint-specific enrichment. Email
|
|
2244
|
+
/** Request endpoint-specific enrichment. Email checks are metered. Reference depth can be pooled or included with a paid plan. See the operation's help. */
|
|
2528
2245
|
deep?: boolean;
|
|
2529
2246
|
}
|
|
2530
2247
|
declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
@@ -2545,9 +2262,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2545
2262
|
continent: ((code: string, opts?: ContinentOptions) => Promise<Continent>) & {
|
|
2546
2263
|
countries: (code: string, opts?: ContinentCountriesOptions) => Promise<ContinentCountries>;
|
|
2547
2264
|
};
|
|
2548
|
-
bloc: ((code: string, opts?: BlocOptions) => Promise<Bloc>) & {
|
|
2549
|
-
countries: (code: string, opts?: BlocCountriesOptions) => Promise<BlocCountries>;
|
|
2550
|
-
};
|
|
2551
2265
|
country: ((code: string, opts?: CountryOptions) => Promise<Country>) & {
|
|
2552
2266
|
states: (code: string, opts?: CountryStatesOptions) => Promise<CountryStates>;
|
|
2553
2267
|
};
|
|
@@ -2594,17 +2308,13 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2594
2308
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
2595
2309
|
*/
|
|
2596
2310
|
email: (email: string, opts?: EmailOptions) => Promise<Email>;
|
|
2597
|
-
/** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
|
|
2598
|
-
vat: (number: string, opts?: VatOptions) => Promise<Vat>;
|
|
2599
2311
|
iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
|
|
2600
2312
|
bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
|
|
2601
|
-
npi: (npi: string, opts?: NpiOptions) => Promise<Npi>;
|
|
2602
2313
|
bank: (iban: string, opts?: BankOptions) => Promise<Bank>;
|
|
2603
2314
|
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
2604
2315
|
bankUsAch: (input: BankUsAchInput, opts?: RequestOptions) => Promise<BankUsAch>;
|
|
2605
2316
|
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
2606
2317
|
bankRequirements: (country: string, opts?: BankRequirementsOptions) => Promise<BankRequirements>;
|
|
2607
|
-
provider: (npi: string, opts?: ProviderOptions) => Promise<Provider>;
|
|
2608
2318
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
2609
2319
|
phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
|
|
2610
2320
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -2630,10 +2340,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2630
2340
|
dns: (domain: string, opts?: DnsOptions) => Promise<Dns>;
|
|
2631
2341
|
mx: (domain: string, opts?: MxOptions) => Promise<Mx>;
|
|
2632
2342
|
useragent: (ua: string, opts?: UseragentOptions) => Promise<Useragent>;
|
|
2633
|
-
/** Identify a vehicle by VIN. Paid deep adds specifications and model-level recall campaigns. */
|
|
2634
|
-
vehicle: (vin: string, opts?: VehicleOptions) => Promise<Vehicle>;
|
|
2635
|
-
/** Compatibility entry for VIN callers. */
|
|
2636
|
-
vin: (vin: string, opts?: VinOptions) => Promise<Vin>;
|
|
2637
2343
|
/** US NAICS 2022 definitions and hierarchy. */
|
|
2638
2344
|
industry: ((code: string, opts?: IndustryOptions) => Promise<Industry>) & {
|
|
2639
2345
|
search: (query: string, opts?: IndustrySearchOptions) => Promise<IndustrySearch>;
|
|
@@ -2642,10 +2348,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2642
2348
|
naics: ((code: string, opts?: IndustryOptions) => Promise<Industry>) & {
|
|
2643
2349
|
search: (query: string, opts?: IndustrySearchOptions) => Promise<IndustrySearch>;
|
|
2644
2350
|
};
|
|
2645
|
-
/** 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. */
|
|
2646
|
-
tariff: ((code: string, opts?: TariffOptions) => Promise<Tariff>) & {
|
|
2647
|
-
search: (query: string, opts?: TariffSearchOptions) => Promise<TariffSearch>;
|
|
2648
|
-
};
|
|
2649
2351
|
currency: ((code: string, opts?: CurrencyOptions) => Promise<Currency>) & {
|
|
2650
2352
|
rate: (base: string, quote: string, opts?: CurrencyRateOptions) => Promise<CurrencyRate>;
|
|
2651
2353
|
};
|
|
@@ -2694,7 +2396,6 @@ type NaicsSearchOptions = IndustrySearchOptions;
|
|
|
2694
2396
|
type IbanOptions = {
|
|
2695
2397
|
country?: string;
|
|
2696
2398
|
} & DeepOption & RequestOptions;
|
|
2697
|
-
type NpiOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2698
2399
|
type BinOptions = DeepOption & RequestOptions;
|
|
2699
2400
|
type CityScopeOptions = {
|
|
2700
2401
|
country?: string;
|
|
@@ -2784,4 +2485,4 @@ interface CityNearbyCall {
|
|
|
2784
2485
|
(name: string, opts: CityNearbyOptions): Promise<CityNearby | CityCollection>;
|
|
2785
2486
|
}
|
|
2786
2487
|
|
|
2787
|
-
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type
|
|
2488
|
+
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type Caller, type CallerOptions, type Card, type CardDeep, type CardOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityAmbiguityCandidate, type CityAncestorsOptions, type CityCollection, type CityCollectionFilters, type CityDeep, type CityDistance, type CityDistanceOptions, type CityGrain, type CityIdCall, type CityIdOptions, type CityList, type CityListOptions, type CityLookupCall, type CityMatch, type CityNearby, type CityNearbyCall, type CityNearbyCoordinates, type CityNearbyCoordinatesOptions, type CityNearbyOptions, type CityNearest, type CityNearestCall, type CityNearestOptions, type CityOptions, type CityPagingOptions, type CityParent, type CityRelations, type CityRelationsOptions, type CityResource, type CityResponseOptions, type CityScopeOptions, type CitySearch, type CitySearchCall, type CitySearchOptions, type CitySort, type Company, type CompanyCandidate, type CompanyCountry, type CompanyCoverage, type CompanyCoverageOptions, type CompanyDeep, type CompanyEmailAddress, type CompanyIdOptions, type CompanyMatch, type CompanyOptions, type CompanyPhoneNumber, type CompanyProfile, type CompanyProfileAddress, type CompanyProfileDeep, type CompanyProfileDomain, type CompanyProfileEmail, type CompanyProfileEmployees, type CompanyProfileFounding, type CompanyProfileIdentifier, type CompanyProfileIndustry, type CompanyProfileJurisdiction, type CompanyProfileListing, type CompanyProfilePhone, type CompanyProfileRegistration, type CompanyProfileRegistrationAddress, type CompanyProfileRegistrationLegalForm, type CompanyProfileSource, type CompanyProfileWebsite, type CompanySearch, type CompanySearchOptions, type CompanySocialProfile, 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 ElevationLocations, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiArtwork, type EmojiArtworkSource, type EmojiBrowse, type EmojiBrowseOptions, EmojiCatalog, type EmojiCatalogConvertOptions, type EmojiCatalogData, EmojiCatalogError, type EmojiCatalogLocalization, type EmojiCatalogLookupOptions, type EmojiCatalogOptions, type EmojiCatalogParseOptions, type EmojiCatalogRegexOptions, type EmojiCatalogScope, type EmojiCatalogSearchFacts, type EmojiCatalogSearchOptions, type EmojiCategories, type EmojiCategory, type EmojiConversion, type EmojiConvertOptions, type EmojiDeep, type EmojiMetadata, type EmojiNativeSearchFacts, type EmojiNotice, type EmojiOptions, type EmojiParse, type EmojiParseOptions, type EmojiPosition, type EmojiSearch, type EmojiSearchOptions, type EmojiShortcodeSourceMetadata, type EmojiSkin, type EmojiSource, type EmojiUnresolved, type EmojiVariant, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Industry, type IndustryChild, type IndustryCorrection, type IndustryDeep, type IndustryExclusion, type IndustryMatch, type IndustryOptions, type IndustrySearch, type IndustrySearchItem, type IndustrySearchOptions, 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 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 PostalLocality, type PostalMetro, type PostalMetrosDeep, type PostalNearby, type PostalNearbyItem, type PostalNearbyOptions, type PostalOptions, type Preflight, type PreflightCost, type PreflightEmailCapacity, type PreflightOperation, type PreflightOperationEstimate, type PreflightPooledCapacity, type PreflightSpendCapacity, type PreflightTask, type PropertyTax, type RequestOptions, type Stack, type StackOptions, type StackTechnology, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Time, type TimeAtOptions, type TimeLocation, type TimeLocationCandidate, type TimeLocationInput, type TimeOptions, type TimeResolution, type TimeResolutionAlternative, type TimeSeason, type TimeTransition, type TimeTransitionState, type TimeZoneEntry, type TimeZones, type TimeZonesOptions, 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 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 };
|
package/dist/index.js
CHANGED
|
@@ -256,7 +256,7 @@ var EmojiCatalog = class {
|
|
|
256
256
|
};
|
|
257
257
|
|
|
258
258
|
// src/index.ts
|
|
259
|
-
var VERSION = "1.11.
|
|
259
|
+
var VERSION = "1.11.2";
|
|
260
260
|
var API_VERSION = "2.0.0";
|
|
261
261
|
var DEFAULT_BASE_URL = "https://api.parseapi.com";
|
|
262
262
|
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
@@ -284,15 +284,6 @@ var ParseAPIError = class extends Error {
|
|
|
284
284
|
this.retryAfter = retryAfter;
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
function tariffEditionId(value) {
|
|
288
|
-
return typeof value === "string" && (value.length === 64 && /^[a-f0-9]{64}$/.test(value) || /^ted_[1-9][0-9]{0,19}(?![\s\S])/.test(value) && (value.length < 24 || value.slice(4) <= "18446744073709551615"));
|
|
289
|
-
}
|
|
290
|
-
function tariffSelection(result, opts) {
|
|
291
|
-
if ((opts?.edition !== void 0 || opts?.date !== void 0) && (!tariffEditionId(result.edition) || opts.edition !== void 0 && result.edition !== opts.edition || (opts.date !== void 0 ? result.date !== opts.date : result.date != null))) {
|
|
292
|
-
throw new ParseAPIError(0, "tariff_selection_mismatch", "Tariff response did not confirm the requested edition/date. The server may not support this selection.", null, null);
|
|
293
|
-
}
|
|
294
|
-
return result;
|
|
295
|
-
}
|
|
296
287
|
var requestControls = (opts) => ({ signal: opts?.signal, timeoutMs: opts?.timeoutMs, retries: opts?.retries });
|
|
297
288
|
function env(name) {
|
|
298
289
|
return typeof process !== "undefined" ? process.env?.[name] : void 0;
|
|
@@ -480,12 +471,6 @@ function parseAPI(apiKey, options = {}) {
|
|
|
480
471
|
countries: (code, opts) => request(`/continent/${enc(code)}/countries`, void 0, void 0, opts)
|
|
481
472
|
}
|
|
482
473
|
),
|
|
483
|
-
bloc: Object.assign(
|
|
484
|
-
(code, opts) => request(`/bloc/${enc(code)}`, void 0, void 0, opts),
|
|
485
|
-
{
|
|
486
|
-
countries: (code, opts) => request(`/bloc/${enc(code)}/countries`, void 0, void 0, opts)
|
|
487
|
-
}
|
|
488
|
-
),
|
|
489
474
|
country: Object.assign(
|
|
490
475
|
(code, opts) => request(`/country/${enc(code)}`, deepQuery(opts), void 0, opts),
|
|
491
476
|
{
|
|
@@ -585,22 +570,14 @@ function parseAPI(apiKey, options = {}) {
|
|
|
585
570
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
586
571
|
*/
|
|
587
572
|
email: (email, opts) => request(`/email/${enc(email)}`, deepQuery(opts), void 0, opts),
|
|
588
|
-
/** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
|
|
589
|
-
vat: (number, opts) => request(`/vat/${enc(number)}`, {
|
|
590
|
-
country: opts?.country,
|
|
591
|
-
from: opts?.from,
|
|
592
|
-
...deepQuery(opts)
|
|
593
|
-
}, void 0, opts),
|
|
594
573
|
// Keep existing callers on their established HTTP contracts.
|
|
595
574
|
iban: (iban, opts) => request(`/iban/${enc(iban)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
596
575
|
bin: (bin, opts) => request(`/bin/${enc(bin)}`, { deep: opts?.deep }, void 0, opts),
|
|
597
|
-
npi: (npi, opts) => request(`/npi/${enc(npi)}`, deepQuery(opts), void 0, opts),
|
|
598
576
|
bank: (iban, opts) => request("/bank", void 0, void 0, opts, { iban, country: opts?.country, deep: opts?.deep }),
|
|
599
577
|
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
600
578
|
bankUsAch: (input, opts) => request("/bank", void 0, void 0, opts, { format: "us_ach", country: "US", routing: input.routing, account: input.account }),
|
|
601
579
|
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
602
580
|
bankRequirements: (country, opts) => request("/bank/requirements", { country, format: opts?.format }, void 0, opts),
|
|
603
|
-
provider: (npi, opts) => request(`/provider/${enc(npi)}`, deepQuery(opts), void 0, opts),
|
|
604
581
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
605
582
|
phone: (number, opts) => request(`/phone/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
606
583
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -639,21 +616,10 @@ function parseAPI(apiKey, options = {}) {
|
|
|
639
616
|
dns: (domain, opts) => request(`/dns/${enc(domain)}`, { type: opts?.type }, void 0, opts),
|
|
640
617
|
mx: (domain, opts) => request(`/mx/${enc(domain)}`, void 0, void 0, opts),
|
|
641
618
|
useragent: (ua, opts) => request("/useragent", deepQuery(opts), { "User-Agent": ua }, opts),
|
|
642
|
-
/** Identify a vehicle by VIN. Paid deep adds specifications and model-level recall campaigns. */
|
|
643
|
-
vehicle: (vin, opts) => request(`/vehicle/${enc(vin)}`, deepQuery(opts), void 0, opts),
|
|
644
|
-
/** Compatibility entry for VIN callers. */
|
|
645
|
-
vin: (vin, opts) => request(`/vin/${enc(vin)}`, deepQuery(opts), void 0, opts),
|
|
646
619
|
/** US NAICS 2022 definitions and hierarchy. */
|
|
647
620
|
industry,
|
|
648
621
|
/** Compatibility name for industry. */
|
|
649
622
|
naics: industry,
|
|
650
|
-
/** 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. */
|
|
651
|
-
tariff: Object.assign(
|
|
652
|
-
(code, opts) => request(`/tariff/${enc(code)}`, { origin: opts?.origin, edition: opts?.edition, date: opts?.date, ...deepQuery(opts) }, void 0, opts).then((result) => tariffSelection(result, opts)),
|
|
653
|
-
{
|
|
654
|
-
search: (query, opts) => request("/tariff", { q: query, edition: opts?.edition, date: opts?.date }, void 0, opts).then((result) => tariffSelection(result, opts))
|
|
655
|
-
}
|
|
656
|
-
),
|
|
657
623
|
currency: Object.assign(
|
|
658
624
|
(code, opts) => request(`/currency/${enc(code)}`, deepQuery(opts), void 0, opts),
|
|
659
625
|
{
|