@parseapi/sdk 1.11.1 → 1.11.3
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 +3 -49
- package/dist/index.cjs +1 -38
- package/dist/index.d.cts +2 -375
- package/dist/index.d.ts +2 -375
- package/dist/index.js +1 -38
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,17 +109,13 @@ 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
|
-
await parse.bank('DE89370400440532013000');
|
|
121
118
|
await parse.card('424242');
|
|
122
|
-
await parse.provider('1881018208');
|
|
123
119
|
await parse.phone('+14155552671');
|
|
124
120
|
await parse.carrier('+14155552671');
|
|
125
121
|
await parse.caller('+14155552671');
|
|
@@ -150,8 +146,6 @@ await parse.district('37081');
|
|
|
150
146
|
await parse.district('guilford county');
|
|
151
147
|
await parse.continent('NA');
|
|
152
148
|
await parse.continent.countries('NA');
|
|
153
|
-
await parse.bloc('EU');
|
|
154
|
-
await parse.bloc.countries('EU');
|
|
155
149
|
await parse.currency('USD');
|
|
156
150
|
await parse.currency.rate('USD', 'EUR');
|
|
157
151
|
await parse.language('en');
|
|
@@ -180,8 +174,6 @@ await parse.dns('_dmarc.example.com', { type: 'TXT' });
|
|
|
180
174
|
await parse.useragent(uaString);
|
|
181
175
|
await parse.industry('541511');
|
|
182
176
|
await parse.industry.search('coffee shop', { limit: 5 });
|
|
183
|
-
await parse.tariff('8471.30.01.00');
|
|
184
|
-
await parse.tariff.search('sunglasses');
|
|
185
177
|
await parse.emoji('rocket');
|
|
186
178
|
await parse.emoji.search('fire');
|
|
187
179
|
```
|
|
@@ -282,49 +274,13 @@ Weather returns current conditions by default. Paid deep adds specialist current
|
|
|
282
274
|
await parse.weather(40.7128, -74.006, { deep: true, date: '2026-08-15' });
|
|
283
275
|
```
|
|
284
276
|
|
|
285
|
-
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.
|
|
286
|
-
|
|
287
|
-
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.
|
|
288
|
-
|
|
289
|
-
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.
|
|
290
|
-
|
|
291
|
-
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.
|
|
292
|
-
|
|
293
|
-
```ts
|
|
294
|
-
await parse.tariff('8471.30.01.00');
|
|
295
|
-
await parse.tariff('8471.30.01.00', { deep: true });
|
|
296
|
-
await parse.tariff('8471.30.01.00', { deep: true, origin: 'CN' });
|
|
297
|
-
```
|
|
298
277
|
|
|
299
278
|
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.
|
|
300
279
|
|
|
301
280
|
HLR reports status at the last check. `live` means assigned and `connected` means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep diagnostics stay within the same metered lookup.
|
|
302
281
|
|
|
303
|
-
Bank returns core `checks` for input, country, length, structure, checksum and national rules, plus an `issues` list. States are `passed`, `failed`, `not_checked` or `not_supported`. Unsupported national checking is not a failure. `valid` covers the implemented format and checksum rules, not account existence, ownership or payment reachability. Directory names and BICs may be null independently. Older responses may omit `checks` and `issues`, and future states and issue codes remain strings. Pass the original input unchanged so the API can report invalid characters. Deep `account` remains the BBAN remainder.
|
|
304
|
-
|
|
305
282
|
Bank inputs use `POST /bank` JSON bodies, keeping IBAN and account values out of request URLs. Pass original strings; the server owns normalization and validation. Avoid logging request bodies. IBAN deep adds the branch identifier and account remainder.
|
|
306
283
|
|
|
307
|
-
Use country requirements to build supported input fields. US ACH has an explicit helper with no deep option. It checks the routing format/ABA checksum and account-field syntax; `account_checksum` is `not_supported`. It preserves account characters and leading zeros. A nullable bank name is routing-directory identity, not account existence, ownership or ACH eligibility. The examples below are synthetic test inputs, not payment instructions.
|
|
308
|
-
|
|
309
|
-
```ts
|
|
310
|
-
await parse.bankRequirements('US', { format: 'us_ach' });
|
|
311
|
-
await parse.bankUsAch({ routing: '011000015', account: '0001234567' });
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
## Provider lookup
|
|
315
|
-
|
|
316
|
-
```ts
|
|
317
|
-
const provider = await parse.provider('1881018208');
|
|
318
|
-
const profile = await parse.provider('1881018208', { deep: true });
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
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.
|
|
322
|
-
|
|
323
|
-
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.
|
|
324
|
-
|
|
325
|
-
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.
|
|
326
|
-
|
|
327
|
-
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.
|
|
328
284
|
|
|
329
285
|
## Deep
|
|
330
286
|
|
|
@@ -335,11 +291,10 @@ Choose enrichment for the question you need answered.
|
|
|
335
291
|
| IP | Richer IP fields included with a paid plan. No separate check meter. |
|
|
336
292
|
| Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
|
|
337
293
|
| Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
|
|
338
|
-
|
|
|
339
|
-
| Phone, Time, Date, Currency, Language, Emoji, Bank, Point | Optional detail in the same pooled request on every plan. |
|
|
294
|
+
| Phone, Time, Date, Currency, Language, Emoji, Point | Optional detail in the same pooled request on every plan. |
|
|
340
295
|
| Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
|
|
341
296
|
| Name, Industry | Name evidence or the industry definition profile on paid plans. |
|
|
342
|
-
|
|
|
297
|
+
| Company (national number) | The complete product detail bag on paid plans. |
|
|
343
298
|
| Company directory | Profile detail in the same pooled request on every plan. Search detail belongs to each company result. |
|
|
344
299
|
| Weather | Specialist current measurements and the existing forecast, alert, air and history bag on paid plans. |
|
|
345
300
|
| Carrier, HLR | Optional diagnostic detail within the same metered core unit, including Free allowance units. No second gate or additional check. |
|
|
@@ -392,7 +347,7 @@ const country = await parse.country('US', {
|
|
|
392
347
|
|
|
393
348
|
Requires Node 18 or later. Zero dependencies.
|
|
394
349
|
|
|
395
|
-
Ordinary lookups retry network failures, 429, and 500/502/503/504 responses twice by default. Carrier, caller, HLR, and email
|
|
350
|
+
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.
|
|
396
351
|
|
|
397
352
|
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.
|
|
398
353
|
|
|
@@ -503,7 +458,6 @@ Reviewed children, ancestors and siblings use canonical lists with partial relat
|
|
|
503
458
|
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.
|
|
504
459
|
|
|
505
460
|
|
|
506
|
-
|
|
507
461
|
Reviewed name forms:
|
|
508
462
|
|
|
509
463
|
```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.3";
|
|
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,7 @@ 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
|
-
// Keep existing callers on their established HTTP contracts.
|
|
624
|
-
iban: (iban, opts) => request(`/iban/${enc(iban)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
625
602
|
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
|
-
bank: (iban, opts) => request("/bank", void 0, void 0, opts, { iban, country: opts?.country, deep: opts?.deep }),
|
|
628
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
629
|
-
bankUsAch: (input, opts) => request("/bank", void 0, void 0, opts, { format: "us_ach", country: "US", routing: input.routing, account: input.account }),
|
|
630
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
631
|
-
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
603
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
634
604
|
phone: (number, opts) => request(`/phone/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
635
605
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -672,13 +642,6 @@ function parseAPI(apiKey, options = {}) {
|
|
|
672
642
|
industry,
|
|
673
643
|
/** Compatibility name for industry. */
|
|
674
644
|
naics: industry,
|
|
675
|
-
/** 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. */
|
|
676
|
-
tariff: Object.assign(
|
|
677
|
-
(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)),
|
|
678
|
-
{
|
|
679
|
-
search: (query, opts) => request("/tariff", { q: query, edition: opts?.edition, date: opts?.date }, void 0, opts).then((result) => tariffSelection(result, opts))
|
|
680
|
-
}
|
|
681
|
-
),
|
|
682
645
|
currency: Object.assign(
|
|
683
646
|
(code, opts) => request(`/currency/${enc(code)}`, deepQuery(opts), void 0, opts),
|
|
684
647
|
{
|
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,242 +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
|
-
/** Ordered IBAN checks. States are open strings for future API values. */
|
|
325
|
-
interface BankChecks {
|
|
326
|
-
input: string;
|
|
327
|
-
country: string;
|
|
328
|
-
length: string;
|
|
329
|
-
structure: string;
|
|
330
|
-
checksum: string;
|
|
331
|
-
national: string;
|
|
332
|
-
}
|
|
333
|
-
/** A validation issue. Fields and codes remain open strings. */
|
|
334
|
-
interface BankIssue {
|
|
335
|
-
field: string;
|
|
336
|
-
code: string;
|
|
337
|
-
message: string;
|
|
338
|
-
}
|
|
339
|
-
interface Bank {
|
|
340
|
-
iban: string | null;
|
|
341
|
-
valid: boolean;
|
|
342
|
-
country: string | null;
|
|
343
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
344
|
-
formatted: string | null;
|
|
345
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
346
|
-
bank: string | null;
|
|
347
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
348
|
-
bank_name: string | null;
|
|
349
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
350
|
-
bic: string | null;
|
|
351
|
-
/** Core check results. Older responses may omit them. */
|
|
352
|
-
checks?: BankChecks;
|
|
353
|
-
/** First blocking validation issue, or an empty list. Older responses may omit it. */
|
|
354
|
-
issues?: BankIssue[];
|
|
355
|
-
deep?: Deep<BankDeep>;
|
|
356
|
-
}
|
|
357
|
-
/** Directory evidence is optional and present only when a lookup ran. */
|
|
358
|
-
interface BankDirectory {
|
|
359
|
-
edition: string;
|
|
360
|
-
country: string;
|
|
361
|
-
/** bank, branch, prefix or none; remains open for future API values. */
|
|
362
|
-
match: string;
|
|
363
|
-
}
|
|
364
|
-
interface BankRequirementField {
|
|
365
|
-
key: string;
|
|
366
|
-
label: string;
|
|
367
|
-
required: boolean;
|
|
368
|
-
type: string;
|
|
369
|
-
length?: number;
|
|
370
|
-
min_length?: number;
|
|
371
|
-
max_length?: number;
|
|
372
|
-
max_input_length?: number;
|
|
373
|
-
length_unit?: string;
|
|
374
|
-
pattern?: string;
|
|
375
|
-
normalization?: string;
|
|
376
|
-
}
|
|
377
|
-
interface BankRequirements {
|
|
378
|
-
country: string;
|
|
379
|
-
format: string;
|
|
380
|
-
supported: boolean;
|
|
381
|
-
fields: BankRequirementField[];
|
|
382
|
-
checks: Record<string, string>;
|
|
383
|
-
limitations: string[];
|
|
384
|
-
}
|
|
385
|
-
/** US ACH syntax/checksum analysis; no account or payment verification. */
|
|
386
|
-
interface BankUsAchInput {
|
|
387
|
-
routing: string;
|
|
388
|
-
account: string;
|
|
389
|
-
}
|
|
390
|
-
interface BankUsAchChecks {
|
|
391
|
-
routing_format: string;
|
|
392
|
-
routing_checksum: string;
|
|
393
|
-
account_format: string;
|
|
394
|
-
account_checksum: string;
|
|
395
|
-
}
|
|
396
|
-
interface BankUsAch {
|
|
397
|
-
format: string;
|
|
398
|
-
country: string;
|
|
399
|
-
routing: string | null;
|
|
400
|
-
account: string | null;
|
|
401
|
-
valid: boolean;
|
|
402
|
-
bank_name: string | null;
|
|
403
|
-
checks: BankUsAchChecks;
|
|
404
|
-
issues: BankIssue[];
|
|
405
|
-
}
|
|
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
287
|
interface Phone {
|
|
540
288
|
phone: string | null;
|
|
541
289
|
valid: boolean;
|
|
@@ -1577,15 +1325,6 @@ interface PostalDeep {
|
|
|
1577
1325
|
/** Median annual property tax payable on owner-occupied homes in this statistical area. Null when unsupported, missing or censored. */
|
|
1578
1326
|
property_tax?: PropertyTax | null;
|
|
1579
1327
|
}
|
|
1580
|
-
interface BankDeep {
|
|
1581
|
-
/** Source edition and exact match grain, not coverage or account verification. */
|
|
1582
|
-
directory?: BankDirectory;
|
|
1583
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1584
|
-
checksum?: string | null;
|
|
1585
|
-
/** Branch identifier when that country has one. */
|
|
1586
|
-
branch: string | null;
|
|
1587
|
-
account: string | null;
|
|
1588
|
-
}
|
|
1589
1328
|
interface PhoneDeep {
|
|
1590
1329
|
/** NPA-derived state code (US/CA). */
|
|
1591
1330
|
state: string | null;
|
|
@@ -1770,63 +1509,6 @@ type IndustryExclusion = NaicsExclusion;
|
|
|
1770
1509
|
type IndustryMatch = NaicsMatch;
|
|
1771
1510
|
type IndustrySearch = NaicsSearch;
|
|
1772
1511
|
type IndustrySearchItem = NaicsSearchItem;
|
|
1773
|
-
interface Iban {
|
|
1774
|
-
iban: string | null;
|
|
1775
|
-
valid: boolean;
|
|
1776
|
-
country: string | null;
|
|
1777
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
1778
|
-
formatted: string | null;
|
|
1779
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
1780
|
-
bank: string | null;
|
|
1781
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
1782
|
-
bank_name: string | null;
|
|
1783
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
1784
|
-
bic: string | null;
|
|
1785
|
-
deep?: Deep<IbanDeep>;
|
|
1786
|
-
}
|
|
1787
|
-
interface Npi {
|
|
1788
|
-
/** Normalized 10-digit NPI. Invalid input still echoes the fold. */
|
|
1789
|
-
npi: string | null;
|
|
1790
|
-
valid: boolean;
|
|
1791
|
-
/** Exists in the CMS NPPES registry. */
|
|
1792
|
-
registered: boolean | null;
|
|
1793
|
-
active: boolean | null;
|
|
1794
|
-
/** On the OIG exclusion list. */
|
|
1795
|
-
excluded: boolean | null;
|
|
1796
|
-
/** individual or organization. */
|
|
1797
|
-
type: string | null;
|
|
1798
|
-
name: string | null;
|
|
1799
|
-
first: string | null;
|
|
1800
|
-
last: string | null;
|
|
1801
|
-
credential: string | null;
|
|
1802
|
-
specialty: string | null;
|
|
1803
|
-
/** NUCC taxonomy code. */
|
|
1804
|
-
taxonomy: string | null;
|
|
1805
|
-
address: string | null;
|
|
1806
|
-
city: string | null;
|
|
1807
|
-
state: string | null;
|
|
1808
|
-
state_name: string | null;
|
|
1809
|
-
postal: string | null;
|
|
1810
|
-
country: string | null;
|
|
1811
|
-
phone: string | null;
|
|
1812
|
-
deep?: Deep<NpiDeep>;
|
|
1813
|
-
}
|
|
1814
|
-
interface NpiEnrollment {
|
|
1815
|
-
/** part_a, part_b, practitioner, dme, order_refer, mdpp. Null when the code is unknown. */
|
|
1816
|
-
type: string | null;
|
|
1817
|
-
specialty: string | null;
|
|
1818
|
-
state: string | null;
|
|
1819
|
-
}
|
|
1820
|
-
interface NpiDeep {
|
|
1821
|
-
/** In the published Medicare FFS enrollment extract. */
|
|
1822
|
-
medicare?: boolean | null;
|
|
1823
|
-
/** On the CMS opt-out affidavit list. Matched by NPI only. */
|
|
1824
|
-
opt_out?: boolean | null;
|
|
1825
|
-
/** Enrollment rows. [] when medicare is false. */
|
|
1826
|
-
enrollments?: NpiEnrollment[] | null;
|
|
1827
|
-
/** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
|
|
1828
|
-
deactivated_at: string | null;
|
|
1829
|
-
}
|
|
1830
1512
|
interface Bin {
|
|
1831
1513
|
bin: string;
|
|
1832
1514
|
/** Actual longest matched prefix. May be shorter than the input. */
|
|
@@ -1841,13 +1523,6 @@ interface Bin {
|
|
|
1841
1523
|
prepaid: boolean | null;
|
|
1842
1524
|
deep?: Record<string, never>;
|
|
1843
1525
|
}
|
|
1844
|
-
interface IbanDeep {
|
|
1845
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1846
|
-
checksum: string | null;
|
|
1847
|
-
/** Branch identifier when that country has one. */
|
|
1848
|
-
branch: string | null;
|
|
1849
|
-
account: string | null;
|
|
1850
|
-
}
|
|
1851
1526
|
interface EmojiParse {
|
|
1852
1527
|
emojis: (Emoji & {
|
|
1853
1528
|
positions: EmojiPosition[];
|
|
@@ -2198,8 +1873,6 @@ type IpOptions = LanguageOption & DeepOption & RequestOptions;
|
|
|
2198
1873
|
type IpSelfOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2199
1874
|
type ContinentOptions = LanguageOption & RequestOptions;
|
|
2200
1875
|
type ContinentCountriesOptions = LanguageOption & RequestOptions;
|
|
2201
|
-
type BlocOptions = RequestOptions;
|
|
2202
|
-
type BlocCountriesOptions = LanguageOption & RequestOptions;
|
|
2203
1876
|
type CountryOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2204
1877
|
type CountryStatesOptions = LanguageOption & RequestOptions;
|
|
2205
1878
|
type StateOptions = LanguageOption & {
|
|
@@ -2298,18 +1971,6 @@ type CompanySearchOptions = {
|
|
|
2298
1971
|
type CompanyCoverageOptions = RequestOptions;
|
|
2299
1972
|
/** `deep: true` requests a metered deliverability check. No automatic retries by default. */
|
|
2300
1973
|
type EmailOptions = DeepOption & RequestOptions;
|
|
2301
|
-
/** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
|
|
2302
|
-
type VatOptions = {
|
|
2303
|
-
country?: string;
|
|
2304
|
-
from?: string;
|
|
2305
|
-
} & DeepOption & RequestOptions;
|
|
2306
|
-
type BankOptions = {
|
|
2307
|
-
country?: string;
|
|
2308
|
-
} & DeepOption & RequestOptions;
|
|
2309
|
-
type BankRequirementsOptions = {
|
|
2310
|
-
format?: string;
|
|
2311
|
-
} & RequestOptions;
|
|
2312
|
-
type ProviderOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2313
1974
|
/** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
|
|
2314
1975
|
type PhoneOptions = {
|
|
2315
1976
|
country?: string;
|
|
@@ -2357,19 +2018,6 @@ type IndustryOptions = DeepOption & RequestOptions;
|
|
|
2357
2018
|
type IndustrySearchOptions = {
|
|
2358
2019
|
limit?: number;
|
|
2359
2020
|
} & DeepOption & RequestOptions;
|
|
2360
|
-
/** 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. */
|
|
2361
|
-
type TariffOptions = {
|
|
2362
|
-
/** Origin country (ISO2). With paid deep, resolves country-specific measures. */
|
|
2363
|
-
origin?: string;
|
|
2364
|
-
/** Exact immutable edition fingerprint. */
|
|
2365
|
-
edition?: string;
|
|
2366
|
-
/** YYYY-MM-DD, accepted only with verified source coverage. */
|
|
2367
|
-
date?: string;
|
|
2368
|
-
} & DeepOption & RequestOptions;
|
|
2369
|
-
type TariffSearchOptions = {
|
|
2370
|
-
edition?: string;
|
|
2371
|
-
date?: string;
|
|
2372
|
-
} & RequestOptions;
|
|
2373
2021
|
type CurrencyOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2374
2022
|
type CurrencyRateOptions = {
|
|
2375
2023
|
date?: string;
|
|
@@ -2475,7 +2123,7 @@ type EmojiConvertOptions = RequestOptions & {
|
|
|
2475
2123
|
shortcodeSource: 'cldr' | 'github' | 'slack' | 'discord';
|
|
2476
2124
|
};
|
|
2477
2125
|
interface DeepOption {
|
|
2478
|
-
/** Request endpoint-specific enrichment. Email
|
|
2126
|
+
/** Request endpoint-specific enrichment. Email checks are metered. Reference depth can be pooled or included with a paid plan. See the operation's help. */
|
|
2479
2127
|
deep?: boolean;
|
|
2480
2128
|
}
|
|
2481
2129
|
declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
@@ -2496,9 +2144,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2496
2144
|
continent: ((code: string, opts?: ContinentOptions) => Promise<Continent>) & {
|
|
2497
2145
|
countries: (code: string, opts?: ContinentCountriesOptions) => Promise<ContinentCountries>;
|
|
2498
2146
|
};
|
|
2499
|
-
bloc: ((code: string, opts?: BlocOptions) => Promise<Bloc>) & {
|
|
2500
|
-
countries: (code: string, opts?: BlocCountriesOptions) => Promise<BlocCountries>;
|
|
2501
|
-
};
|
|
2502
2147
|
country: ((code: string, opts?: CountryOptions) => Promise<Country>) & {
|
|
2503
2148
|
states: (code: string, opts?: CountryStatesOptions) => Promise<CountryStates>;
|
|
2504
2149
|
};
|
|
@@ -2545,17 +2190,7 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2545
2190
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
2546
2191
|
*/
|
|
2547
2192
|
email: (email: string, opts?: EmailOptions) => Promise<Email>;
|
|
2548
|
-
/** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
|
|
2549
|
-
vat: (number: string, opts?: VatOptions) => Promise<Vat>;
|
|
2550
|
-
iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
|
|
2551
2193
|
bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
|
|
2552
|
-
npi: (npi: string, opts?: NpiOptions) => Promise<Npi>;
|
|
2553
|
-
bank: (iban: string, opts?: BankOptions) => Promise<Bank>;
|
|
2554
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
2555
|
-
bankUsAch: (input: BankUsAchInput, opts?: RequestOptions) => Promise<BankUsAch>;
|
|
2556
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
2557
|
-
bankRequirements: (country: string, opts?: BankRequirementsOptions) => Promise<BankRequirements>;
|
|
2558
|
-
provider: (npi: string, opts?: ProviderOptions) => Promise<Provider>;
|
|
2559
2194
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
2560
2195
|
phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
|
|
2561
2196
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -2589,10 +2224,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2589
2224
|
naics: ((code: string, opts?: IndustryOptions) => Promise<Industry>) & {
|
|
2590
2225
|
search: (query: string, opts?: IndustrySearchOptions) => Promise<IndustrySearch>;
|
|
2591
2226
|
};
|
|
2592
|
-
/** 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. */
|
|
2593
|
-
tariff: ((code: string, opts?: TariffOptions) => Promise<Tariff>) & {
|
|
2594
|
-
search: (query: string, opts?: TariffSearchOptions) => Promise<TariffSearch>;
|
|
2595
|
-
};
|
|
2596
2227
|
currency: ((code: string, opts?: CurrencyOptions) => Promise<Currency>) & {
|
|
2597
2228
|
rate: (base: string, quote: string, opts?: CurrencyRateOptions) => Promise<CurrencyRate>;
|
|
2598
2229
|
};
|
|
@@ -2638,10 +2269,6 @@ type ParseAPIClient = ReturnType<typeof parseAPI>;
|
|
|
2638
2269
|
/** Existing NAICS options remain source compatible. */
|
|
2639
2270
|
type NaicsOptions = IndustryOptions;
|
|
2640
2271
|
type NaicsSearchOptions = IndustrySearchOptions;
|
|
2641
|
-
type IbanOptions = {
|
|
2642
|
-
country?: string;
|
|
2643
|
-
} & DeepOption & RequestOptions;
|
|
2644
|
-
type NpiOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2645
2272
|
type BinOptions = DeepOption & RequestOptions;
|
|
2646
2273
|
type CityScopeOptions = {
|
|
2647
2274
|
country?: string;
|
|
@@ -2731,4 +2358,4 @@ interface CityNearbyCall {
|
|
|
2731
2358
|
(name: string, opts: CityNearbyOptions): Promise<CityNearby | CityCollection>;
|
|
2732
2359
|
}
|
|
2733
2360
|
|
|
2734
|
-
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type
|
|
2361
|
+
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, 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 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,242 +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
|
-
/** Ordered IBAN checks. States are open strings for future API values. */
|
|
325
|
-
interface BankChecks {
|
|
326
|
-
input: string;
|
|
327
|
-
country: string;
|
|
328
|
-
length: string;
|
|
329
|
-
structure: string;
|
|
330
|
-
checksum: string;
|
|
331
|
-
national: string;
|
|
332
|
-
}
|
|
333
|
-
/** A validation issue. Fields and codes remain open strings. */
|
|
334
|
-
interface BankIssue {
|
|
335
|
-
field: string;
|
|
336
|
-
code: string;
|
|
337
|
-
message: string;
|
|
338
|
-
}
|
|
339
|
-
interface Bank {
|
|
340
|
-
iban: string | null;
|
|
341
|
-
valid: boolean;
|
|
342
|
-
country: string | null;
|
|
343
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
344
|
-
formatted: string | null;
|
|
345
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
346
|
-
bank: string | null;
|
|
347
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
348
|
-
bank_name: string | null;
|
|
349
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
350
|
-
bic: string | null;
|
|
351
|
-
/** Core check results. Older responses may omit them. */
|
|
352
|
-
checks?: BankChecks;
|
|
353
|
-
/** First blocking validation issue, or an empty list. Older responses may omit it. */
|
|
354
|
-
issues?: BankIssue[];
|
|
355
|
-
deep?: Deep<BankDeep>;
|
|
356
|
-
}
|
|
357
|
-
/** Directory evidence is optional and present only when a lookup ran. */
|
|
358
|
-
interface BankDirectory {
|
|
359
|
-
edition: string;
|
|
360
|
-
country: string;
|
|
361
|
-
/** bank, branch, prefix or none; remains open for future API values. */
|
|
362
|
-
match: string;
|
|
363
|
-
}
|
|
364
|
-
interface BankRequirementField {
|
|
365
|
-
key: string;
|
|
366
|
-
label: string;
|
|
367
|
-
required: boolean;
|
|
368
|
-
type: string;
|
|
369
|
-
length?: number;
|
|
370
|
-
min_length?: number;
|
|
371
|
-
max_length?: number;
|
|
372
|
-
max_input_length?: number;
|
|
373
|
-
length_unit?: string;
|
|
374
|
-
pattern?: string;
|
|
375
|
-
normalization?: string;
|
|
376
|
-
}
|
|
377
|
-
interface BankRequirements {
|
|
378
|
-
country: string;
|
|
379
|
-
format: string;
|
|
380
|
-
supported: boolean;
|
|
381
|
-
fields: BankRequirementField[];
|
|
382
|
-
checks: Record<string, string>;
|
|
383
|
-
limitations: string[];
|
|
384
|
-
}
|
|
385
|
-
/** US ACH syntax/checksum analysis; no account or payment verification. */
|
|
386
|
-
interface BankUsAchInput {
|
|
387
|
-
routing: string;
|
|
388
|
-
account: string;
|
|
389
|
-
}
|
|
390
|
-
interface BankUsAchChecks {
|
|
391
|
-
routing_format: string;
|
|
392
|
-
routing_checksum: string;
|
|
393
|
-
account_format: string;
|
|
394
|
-
account_checksum: string;
|
|
395
|
-
}
|
|
396
|
-
interface BankUsAch {
|
|
397
|
-
format: string;
|
|
398
|
-
country: string;
|
|
399
|
-
routing: string | null;
|
|
400
|
-
account: string | null;
|
|
401
|
-
valid: boolean;
|
|
402
|
-
bank_name: string | null;
|
|
403
|
-
checks: BankUsAchChecks;
|
|
404
|
-
issues: BankIssue[];
|
|
405
|
-
}
|
|
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
287
|
interface Phone {
|
|
540
288
|
phone: string | null;
|
|
541
289
|
valid: boolean;
|
|
@@ -1577,15 +1325,6 @@ interface PostalDeep {
|
|
|
1577
1325
|
/** Median annual property tax payable on owner-occupied homes in this statistical area. Null when unsupported, missing or censored. */
|
|
1578
1326
|
property_tax?: PropertyTax | null;
|
|
1579
1327
|
}
|
|
1580
|
-
interface BankDeep {
|
|
1581
|
-
/** Source edition and exact match grain, not coverage or account verification. */
|
|
1582
|
-
directory?: BankDirectory;
|
|
1583
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1584
|
-
checksum?: string | null;
|
|
1585
|
-
/** Branch identifier when that country has one. */
|
|
1586
|
-
branch: string | null;
|
|
1587
|
-
account: string | null;
|
|
1588
|
-
}
|
|
1589
1328
|
interface PhoneDeep {
|
|
1590
1329
|
/** NPA-derived state code (US/CA). */
|
|
1591
1330
|
state: string | null;
|
|
@@ -1770,63 +1509,6 @@ type IndustryExclusion = NaicsExclusion;
|
|
|
1770
1509
|
type IndustryMatch = NaicsMatch;
|
|
1771
1510
|
type IndustrySearch = NaicsSearch;
|
|
1772
1511
|
type IndustrySearchItem = NaicsSearchItem;
|
|
1773
|
-
interface Iban {
|
|
1774
|
-
iban: string | null;
|
|
1775
|
-
valid: boolean;
|
|
1776
|
-
country: string | null;
|
|
1777
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
1778
|
-
formatted: string | null;
|
|
1779
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
1780
|
-
bank: string | null;
|
|
1781
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
1782
|
-
bank_name: string | null;
|
|
1783
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
1784
|
-
bic: string | null;
|
|
1785
|
-
deep?: Deep<IbanDeep>;
|
|
1786
|
-
}
|
|
1787
|
-
interface Npi {
|
|
1788
|
-
/** Normalized 10-digit NPI. Invalid input still echoes the fold. */
|
|
1789
|
-
npi: string | null;
|
|
1790
|
-
valid: boolean;
|
|
1791
|
-
/** Exists in the CMS NPPES registry. */
|
|
1792
|
-
registered: boolean | null;
|
|
1793
|
-
active: boolean | null;
|
|
1794
|
-
/** On the OIG exclusion list. */
|
|
1795
|
-
excluded: boolean | null;
|
|
1796
|
-
/** individual or organization. */
|
|
1797
|
-
type: string | null;
|
|
1798
|
-
name: string | null;
|
|
1799
|
-
first: string | null;
|
|
1800
|
-
last: string | null;
|
|
1801
|
-
credential: string | null;
|
|
1802
|
-
specialty: string | null;
|
|
1803
|
-
/** NUCC taxonomy code. */
|
|
1804
|
-
taxonomy: string | null;
|
|
1805
|
-
address: string | null;
|
|
1806
|
-
city: string | null;
|
|
1807
|
-
state: string | null;
|
|
1808
|
-
state_name: string | null;
|
|
1809
|
-
postal: string | null;
|
|
1810
|
-
country: string | null;
|
|
1811
|
-
phone: string | null;
|
|
1812
|
-
deep?: Deep<NpiDeep>;
|
|
1813
|
-
}
|
|
1814
|
-
interface NpiEnrollment {
|
|
1815
|
-
/** part_a, part_b, practitioner, dme, order_refer, mdpp. Null when the code is unknown. */
|
|
1816
|
-
type: string | null;
|
|
1817
|
-
specialty: string | null;
|
|
1818
|
-
state: string | null;
|
|
1819
|
-
}
|
|
1820
|
-
interface NpiDeep {
|
|
1821
|
-
/** In the published Medicare FFS enrollment extract. */
|
|
1822
|
-
medicare?: boolean | null;
|
|
1823
|
-
/** On the CMS opt-out affidavit list. Matched by NPI only. */
|
|
1824
|
-
opt_out?: boolean | null;
|
|
1825
|
-
/** Enrollment rows. [] when medicare is false. */
|
|
1826
|
-
enrollments?: NpiEnrollment[] | null;
|
|
1827
|
-
/** Date CMS deactivated the NPI, YYYY-MM-DD. Null when still active. */
|
|
1828
|
-
deactivated_at: string | null;
|
|
1829
|
-
}
|
|
1830
1512
|
interface Bin {
|
|
1831
1513
|
bin: string;
|
|
1832
1514
|
/** Actual longest matched prefix. May be shorter than the input. */
|
|
@@ -1841,13 +1523,6 @@ interface Bin {
|
|
|
1841
1523
|
prepaid: boolean | null;
|
|
1842
1524
|
deep?: Record<string, never>;
|
|
1843
1525
|
}
|
|
1844
|
-
interface IbanDeep {
|
|
1845
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1846
|
-
checksum: string | null;
|
|
1847
|
-
/** Branch identifier when that country has one. */
|
|
1848
|
-
branch: string | null;
|
|
1849
|
-
account: string | null;
|
|
1850
|
-
}
|
|
1851
1526
|
interface EmojiParse {
|
|
1852
1527
|
emojis: (Emoji & {
|
|
1853
1528
|
positions: EmojiPosition[];
|
|
@@ -2198,8 +1873,6 @@ type IpOptions = LanguageOption & DeepOption & RequestOptions;
|
|
|
2198
1873
|
type IpSelfOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2199
1874
|
type ContinentOptions = LanguageOption & RequestOptions;
|
|
2200
1875
|
type ContinentCountriesOptions = LanguageOption & RequestOptions;
|
|
2201
|
-
type BlocOptions = RequestOptions;
|
|
2202
|
-
type BlocCountriesOptions = LanguageOption & RequestOptions;
|
|
2203
1876
|
type CountryOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2204
1877
|
type CountryStatesOptions = LanguageOption & RequestOptions;
|
|
2205
1878
|
type StateOptions = LanguageOption & {
|
|
@@ -2298,18 +1971,6 @@ type CompanySearchOptions = {
|
|
|
2298
1971
|
type CompanyCoverageOptions = RequestOptions;
|
|
2299
1972
|
/** `deep: true` requests a metered deliverability check. No automatic retries by default. */
|
|
2300
1973
|
type EmailOptions = DeepOption & RequestOptions;
|
|
2301
|
-
/** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
|
|
2302
|
-
type VatOptions = {
|
|
2303
|
-
country?: string;
|
|
2304
|
-
from?: string;
|
|
2305
|
-
} & DeepOption & RequestOptions;
|
|
2306
|
-
type BankOptions = {
|
|
2307
|
-
country?: string;
|
|
2308
|
-
} & DeepOption & RequestOptions;
|
|
2309
|
-
type BankRequirementsOptions = {
|
|
2310
|
-
format?: string;
|
|
2311
|
-
} & RequestOptions;
|
|
2312
|
-
type ProviderOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2313
1974
|
/** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
|
|
2314
1975
|
type PhoneOptions = {
|
|
2315
1976
|
country?: string;
|
|
@@ -2357,19 +2018,6 @@ type IndustryOptions = DeepOption & RequestOptions;
|
|
|
2357
2018
|
type IndustrySearchOptions = {
|
|
2358
2019
|
limit?: number;
|
|
2359
2020
|
} & DeepOption & RequestOptions;
|
|
2360
|
-
/** 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. */
|
|
2361
|
-
type TariffOptions = {
|
|
2362
|
-
/** Origin country (ISO2). With paid deep, resolves country-specific measures. */
|
|
2363
|
-
origin?: string;
|
|
2364
|
-
/** Exact immutable edition fingerprint. */
|
|
2365
|
-
edition?: string;
|
|
2366
|
-
/** YYYY-MM-DD, accepted only with verified source coverage. */
|
|
2367
|
-
date?: string;
|
|
2368
|
-
} & DeepOption & RequestOptions;
|
|
2369
|
-
type TariffSearchOptions = {
|
|
2370
|
-
edition?: string;
|
|
2371
|
-
date?: string;
|
|
2372
|
-
} & RequestOptions;
|
|
2373
2021
|
type CurrencyOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2374
2022
|
type CurrencyRateOptions = {
|
|
2375
2023
|
date?: string;
|
|
@@ -2475,7 +2123,7 @@ type EmojiConvertOptions = RequestOptions & {
|
|
|
2475
2123
|
shortcodeSource: 'cldr' | 'github' | 'slack' | 'discord';
|
|
2476
2124
|
};
|
|
2477
2125
|
interface DeepOption {
|
|
2478
|
-
/** Request endpoint-specific enrichment. Email
|
|
2126
|
+
/** Request endpoint-specific enrichment. Email checks are metered. Reference depth can be pooled or included with a paid plan. See the operation's help. */
|
|
2479
2127
|
deep?: boolean;
|
|
2480
2128
|
}
|
|
2481
2129
|
declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
@@ -2496,9 +2144,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2496
2144
|
continent: ((code: string, opts?: ContinentOptions) => Promise<Continent>) & {
|
|
2497
2145
|
countries: (code: string, opts?: ContinentCountriesOptions) => Promise<ContinentCountries>;
|
|
2498
2146
|
};
|
|
2499
|
-
bloc: ((code: string, opts?: BlocOptions) => Promise<Bloc>) & {
|
|
2500
|
-
countries: (code: string, opts?: BlocCountriesOptions) => Promise<BlocCountries>;
|
|
2501
|
-
};
|
|
2502
2147
|
country: ((code: string, opts?: CountryOptions) => Promise<Country>) & {
|
|
2503
2148
|
states: (code: string, opts?: CountryStatesOptions) => Promise<CountryStates>;
|
|
2504
2149
|
};
|
|
@@ -2545,17 +2190,7 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2545
2190
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
2546
2191
|
*/
|
|
2547
2192
|
email: (email: string, opts?: EmailOptions) => Promise<Email>;
|
|
2548
|
-
/** Check VAT format and checksum. `deep: true` requests a metered registry check where supported, with no automatic retries by default. */
|
|
2549
|
-
vat: (number: string, opts?: VatOptions) => Promise<Vat>;
|
|
2550
|
-
iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
|
|
2551
2193
|
bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
|
|
2552
|
-
npi: (npi: string, opts?: NpiOptions) => Promise<Npi>;
|
|
2553
|
-
bank: (iban: string, opts?: BankOptions) => Promise<Bank>;
|
|
2554
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
2555
|
-
bankUsAch: (input: BankUsAchInput, opts?: RequestOptions) => Promise<BankUsAch>;
|
|
2556
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
2557
|
-
bankRequirements: (country: string, opts?: BankRequirementsOptions) => Promise<BankRequirements>;
|
|
2558
|
-
provider: (npi: string, opts?: ProviderOptions) => Promise<Provider>;
|
|
2559
2194
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
2560
2195
|
phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
|
|
2561
2196
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -2589,10 +2224,6 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2589
2224
|
naics: ((code: string, opts?: IndustryOptions) => Promise<Industry>) & {
|
|
2590
2225
|
search: (query: string, opts?: IndustrySearchOptions) => Promise<IndustrySearch>;
|
|
2591
2226
|
};
|
|
2592
|
-
/** 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. */
|
|
2593
|
-
tariff: ((code: string, opts?: TariffOptions) => Promise<Tariff>) & {
|
|
2594
|
-
search: (query: string, opts?: TariffSearchOptions) => Promise<TariffSearch>;
|
|
2595
|
-
};
|
|
2596
2227
|
currency: ((code: string, opts?: CurrencyOptions) => Promise<Currency>) & {
|
|
2597
2228
|
rate: (base: string, quote: string, opts?: CurrencyRateOptions) => Promise<CurrencyRate>;
|
|
2598
2229
|
};
|
|
@@ -2638,10 +2269,6 @@ type ParseAPIClient = ReturnType<typeof parseAPI>;
|
|
|
2638
2269
|
/** Existing NAICS options remain source compatible. */
|
|
2639
2270
|
type NaicsOptions = IndustryOptions;
|
|
2640
2271
|
type NaicsSearchOptions = IndustrySearchOptions;
|
|
2641
|
-
type IbanOptions = {
|
|
2642
|
-
country?: string;
|
|
2643
|
-
} & DeepOption & RequestOptions;
|
|
2644
|
-
type NpiOptions = LanguageOption & DeepOption & RequestOptions;
|
|
2645
2272
|
type BinOptions = DeepOption & RequestOptions;
|
|
2646
2273
|
type CityScopeOptions = {
|
|
2647
2274
|
country?: string;
|
|
@@ -2731,4 +2358,4 @@ interface CityNearbyCall {
|
|
|
2731
2358
|
(name: string, opts: CityNearbyOptions): Promise<CityNearby | CityCollection>;
|
|
2732
2359
|
}
|
|
2733
2360
|
|
|
2734
|
-
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type
|
|
2361
|
+
export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, 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 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.3";
|
|
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,7 @@ 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
|
-
// Keep existing callers on their established HTTP contracts.
|
|
595
|
-
iban: (iban, opts) => request(`/iban/${enc(iban)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
596
573
|
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
|
-
bank: (iban, opts) => request("/bank", void 0, void 0, opts, { iban, country: opts?.country, deep: opts?.deep }),
|
|
599
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
600
|
-
bankUsAch: (input, opts) => request("/bank", void 0, void 0, opts, { format: "us_ach", country: "US", routing: input.routing, account: input.account }),
|
|
601
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
602
|
-
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
574
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
605
575
|
phone: (number, opts) => request(`/phone/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
606
576
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -643,13 +613,6 @@ function parseAPI(apiKey, options = {}) {
|
|
|
643
613
|
industry,
|
|
644
614
|
/** Compatibility name for industry. */
|
|
645
615
|
naics: industry,
|
|
646
|
-
/** 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. */
|
|
647
|
-
tariff: Object.assign(
|
|
648
|
-
(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)),
|
|
649
|
-
{
|
|
650
|
-
search: (query, opts) => request("/tariff", { q: query, edition: opts?.edition, date: opts?.date }, void 0, opts).then((result) => tariffSelection(result, opts))
|
|
651
|
-
}
|
|
652
|
-
),
|
|
653
616
|
currency: Object.assign(
|
|
654
617
|
(code, opts) => request(`/currency/${enc(code)}`, deepQuery(opts), void 0, opts),
|
|
655
618
|
{
|