@parseapi/sdk 1.11.2 → 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 +1 -10
- package/dist/index.cjs +1 -8
- package/dist/index.d.cts +1 -128
- package/dist/index.d.ts +1 -128
- package/dist/index.js +1 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -115,7 +115,6 @@ One method per endpoint, named after the route.
|
|
|
115
115
|
await parse.ip('8.8.8.8');
|
|
116
116
|
await parse.ip.self();
|
|
117
117
|
await parse.email('hello@gmail.com');
|
|
118
|
-
await parse.bank('DE89370400440532013000');
|
|
119
118
|
await parse.card('424242');
|
|
120
119
|
await parse.phone('+14155552671');
|
|
121
120
|
await parse.carrier('+14155552671');
|
|
@@ -280,16 +279,8 @@ Address search uses context from the form: prefer postal, or city and state. An
|
|
|
280
279
|
|
|
281
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.
|
|
282
281
|
|
|
283
|
-
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.
|
|
284
|
-
|
|
285
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.
|
|
286
283
|
|
|
287
|
-
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.
|
|
288
|
-
|
|
289
|
-
```ts
|
|
290
|
-
await parse.bankRequirements('US', { format: 'us_ach' });
|
|
291
|
-
await parse.bankUsAch({ routing: '011000015', account: '0001234567' });
|
|
292
|
-
```
|
|
293
284
|
|
|
294
285
|
## Deep
|
|
295
286
|
|
|
@@ -300,7 +291,7 @@ Choose enrichment for the question you need answered.
|
|
|
300
291
|
| IP | Richer IP fields included with a paid plan. No separate check meter. |
|
|
301
292
|
| Domain | Registration dates, registrar, status and DNSSEC, included with a paid plan. Use `dns` for DNS records and `mx` for mail routing. |
|
|
302
293
|
| Email | A metered mailbox check with deliverability, catch-all, status, reason and address hints, using included email checks or enabled on-demand usage. |
|
|
303
|
-
| Phone, Time, Date, Currency, Language, Emoji,
|
|
294
|
+
| Phone, Time, Date, Currency, Language, Emoji, Point | Optional detail in the same pooled request on every plan. |
|
|
304
295
|
| Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
|
|
305
296
|
| Name, Industry | Name evidence or the industry definition profile on paid plans. |
|
|
306
297
|
| Company (national number) | The complete product detail bag on paid plans. |
|
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;
|
|
@@ -599,14 +599,7 @@ function parseAPI(apiKey, options = {}) {
|
|
|
599
599
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
600
600
|
*/
|
|
601
601
|
email: (email, opts) => request(`/email/${enc(email)}`, deepQuery(opts), void 0, opts),
|
|
602
|
-
// Keep existing callers on their established HTTP contracts.
|
|
603
|
-
iban: (iban, opts) => request(`/iban/${enc(iban)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
604
602
|
bin: (bin, opts) => request(`/bin/${enc(bin)}`, { deep: opts?.deep }, void 0, opts),
|
|
605
|
-
bank: (iban, opts) => request("/bank", void 0, void 0, opts, { iban, country: opts?.country, deep: opts?.deep }),
|
|
606
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
607
|
-
bankUsAch: (input, opts) => request("/bank", void 0, void 0, opts, { format: "us_ach", country: "US", routing: input.routing, account: input.account }),
|
|
608
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
609
|
-
bankRequirements: (country, opts) => request("/bank/requirements", { country, format: opts?.format }, void 0, opts),
|
|
610
603
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
611
604
|
phone: (number, opts) => request(`/phone/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
612
605
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
package/dist/index.d.cts
CHANGED
|
@@ -284,88 +284,6 @@ interface Email {
|
|
|
284
284
|
disposable: boolean;
|
|
285
285
|
deep?: Deep<EmailDeep>;
|
|
286
286
|
}
|
|
287
|
-
/** Ordered IBAN checks. States are open strings for future API values. */
|
|
288
|
-
interface BankChecks {
|
|
289
|
-
input: string;
|
|
290
|
-
country: string;
|
|
291
|
-
length: string;
|
|
292
|
-
structure: string;
|
|
293
|
-
checksum: string;
|
|
294
|
-
national: string;
|
|
295
|
-
}
|
|
296
|
-
/** A validation issue. Fields and codes remain open strings. */
|
|
297
|
-
interface BankIssue {
|
|
298
|
-
field: string;
|
|
299
|
-
code: string;
|
|
300
|
-
message: string;
|
|
301
|
-
}
|
|
302
|
-
interface Bank {
|
|
303
|
-
iban: string | null;
|
|
304
|
-
valid: boolean;
|
|
305
|
-
country: string | null;
|
|
306
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
307
|
-
formatted: string | null;
|
|
308
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
309
|
-
bank: string | null;
|
|
310
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
311
|
-
bank_name: string | null;
|
|
312
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
313
|
-
bic: string | null;
|
|
314
|
-
/** Core check results. Older responses may omit them. */
|
|
315
|
-
checks?: BankChecks;
|
|
316
|
-
/** First blocking validation issue, or an empty list. Older responses may omit it. */
|
|
317
|
-
issues?: BankIssue[];
|
|
318
|
-
deep?: Deep<BankDeep>;
|
|
319
|
-
}
|
|
320
|
-
/** Directory evidence is optional and present only when a lookup ran. */
|
|
321
|
-
interface BankDirectory {
|
|
322
|
-
edition: string;
|
|
323
|
-
country: string;
|
|
324
|
-
/** bank, branch, prefix or none; remains open for future API values. */
|
|
325
|
-
match: string;
|
|
326
|
-
}
|
|
327
|
-
interface BankRequirementField {
|
|
328
|
-
key: string;
|
|
329
|
-
label: string;
|
|
330
|
-
required: boolean;
|
|
331
|
-
type: string;
|
|
332
|
-
length?: number;
|
|
333
|
-
min_length?: number;
|
|
334
|
-
max_length?: number;
|
|
335
|
-
max_input_length?: number;
|
|
336
|
-
length_unit?: string;
|
|
337
|
-
pattern?: string;
|
|
338
|
-
normalization?: string;
|
|
339
|
-
}
|
|
340
|
-
interface BankRequirements {
|
|
341
|
-
country: string;
|
|
342
|
-
format: string;
|
|
343
|
-
supported: boolean;
|
|
344
|
-
fields: BankRequirementField[];
|
|
345
|
-
checks: Record<string, string>;
|
|
346
|
-
limitations: string[];
|
|
347
|
-
}
|
|
348
|
-
/** US ACH syntax/checksum analysis; no account or payment verification. */
|
|
349
|
-
interface BankUsAchInput {
|
|
350
|
-
routing: string;
|
|
351
|
-
account: string;
|
|
352
|
-
}
|
|
353
|
-
interface BankUsAchChecks {
|
|
354
|
-
routing_format: string;
|
|
355
|
-
routing_checksum: string;
|
|
356
|
-
account_format: string;
|
|
357
|
-
account_checksum: string;
|
|
358
|
-
}
|
|
359
|
-
interface BankUsAch {
|
|
360
|
-
format: string;
|
|
361
|
-
country: string;
|
|
362
|
-
routing: string | null;
|
|
363
|
-
account: string | null;
|
|
364
|
-
valid: boolean;
|
|
365
|
-
bank_name: string | null;
|
|
366
|
-
checks: BankUsAchChecks;
|
|
367
|
-
issues: BankIssue[];
|
|
368
|
-
}
|
|
369
287
|
interface Phone {
|
|
370
288
|
phone: string | null;
|
|
371
289
|
valid: boolean;
|
|
@@ -1407,15 +1325,6 @@ interface PostalDeep {
|
|
|
1407
1325
|
/** Median annual property tax payable on owner-occupied homes in this statistical area. Null when unsupported, missing or censored. */
|
|
1408
1326
|
property_tax?: PropertyTax | null;
|
|
1409
1327
|
}
|
|
1410
|
-
interface BankDeep {
|
|
1411
|
-
/** Source edition and exact match grain, not coverage or account verification. */
|
|
1412
|
-
directory?: BankDirectory;
|
|
1413
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1414
|
-
checksum?: string | null;
|
|
1415
|
-
/** Branch identifier when that country has one. */
|
|
1416
|
-
branch: string | null;
|
|
1417
|
-
account: string | null;
|
|
1418
|
-
}
|
|
1419
1328
|
interface PhoneDeep {
|
|
1420
1329
|
/** NPA-derived state code (US/CA). */
|
|
1421
1330
|
state: string | null;
|
|
@@ -1600,20 +1509,6 @@ type IndustryExclusion = NaicsExclusion;
|
|
|
1600
1509
|
type IndustryMatch = NaicsMatch;
|
|
1601
1510
|
type IndustrySearch = NaicsSearch;
|
|
1602
1511
|
type IndustrySearchItem = NaicsSearchItem;
|
|
1603
|
-
interface Iban {
|
|
1604
|
-
iban: string | null;
|
|
1605
|
-
valid: boolean;
|
|
1606
|
-
country: string | null;
|
|
1607
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
1608
|
-
formatted: string | null;
|
|
1609
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
1610
|
-
bank: string | null;
|
|
1611
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
1612
|
-
bank_name: string | null;
|
|
1613
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
1614
|
-
bic: string | null;
|
|
1615
|
-
deep?: Deep<IbanDeep>;
|
|
1616
|
-
}
|
|
1617
1512
|
interface Bin {
|
|
1618
1513
|
bin: string;
|
|
1619
1514
|
/** Actual longest matched prefix. May be shorter than the input. */
|
|
@@ -1628,13 +1523,6 @@ interface Bin {
|
|
|
1628
1523
|
prepaid: boolean | null;
|
|
1629
1524
|
deep?: Record<string, never>;
|
|
1630
1525
|
}
|
|
1631
|
-
interface IbanDeep {
|
|
1632
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1633
|
-
checksum: string | null;
|
|
1634
|
-
/** Branch identifier when that country has one. */
|
|
1635
|
-
branch: string | null;
|
|
1636
|
-
account: string | null;
|
|
1637
|
-
}
|
|
1638
1526
|
interface EmojiParse {
|
|
1639
1527
|
emojis: (Emoji & {
|
|
1640
1528
|
positions: EmojiPosition[];
|
|
@@ -2083,12 +1971,6 @@ type CompanySearchOptions = {
|
|
|
2083
1971
|
type CompanyCoverageOptions = RequestOptions;
|
|
2084
1972
|
/** `deep: true` requests a metered deliverability check. No automatic retries by default. */
|
|
2085
1973
|
type EmailOptions = DeepOption & RequestOptions;
|
|
2086
|
-
type BankOptions = {
|
|
2087
|
-
country?: string;
|
|
2088
|
-
} & DeepOption & RequestOptions;
|
|
2089
|
-
type BankRequirementsOptions = {
|
|
2090
|
-
format?: string;
|
|
2091
|
-
} & RequestOptions;
|
|
2092
1974
|
/** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
|
|
2093
1975
|
type PhoneOptions = {
|
|
2094
1976
|
country?: string;
|
|
@@ -2308,13 +2190,7 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2308
2190
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
2309
2191
|
*/
|
|
2310
2192
|
email: (email: string, opts?: EmailOptions) => Promise<Email>;
|
|
2311
|
-
iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
|
|
2312
2193
|
bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
|
|
2313
|
-
bank: (iban: string, opts?: BankOptions) => Promise<Bank>;
|
|
2314
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
2315
|
-
bankUsAch: (input: BankUsAchInput, opts?: RequestOptions) => Promise<BankUsAch>;
|
|
2316
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
2317
|
-
bankRequirements: (country: string, opts?: BankRequirementsOptions) => Promise<BankRequirements>;
|
|
2318
2194
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
2319
2195
|
phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
|
|
2320
2196
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -2393,9 +2269,6 @@ type ParseAPIClient = ReturnType<typeof parseAPI>;
|
|
|
2393
2269
|
/** Existing NAICS options remain source compatible. */
|
|
2394
2270
|
type NaicsOptions = IndustryOptions;
|
|
2395
2271
|
type NaicsSearchOptions = IndustrySearchOptions;
|
|
2396
|
-
type IbanOptions = {
|
|
2397
|
-
country?: string;
|
|
2398
|
-
} & DeepOption & RequestOptions;
|
|
2399
2272
|
type BinOptions = DeepOption & RequestOptions;
|
|
2400
2273
|
type CityScopeOptions = {
|
|
2401
2274
|
country?: string;
|
|
@@ -2485,4 +2358,4 @@ interface CityNearbyCall {
|
|
|
2485
2358
|
(name: string, opts: CityNearbyOptions): Promise<CityNearby | CityCollection>;
|
|
2486
2359
|
}
|
|
2487
2360
|
|
|
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
|
|
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
|
@@ -284,88 +284,6 @@ interface Email {
|
|
|
284
284
|
disposable: boolean;
|
|
285
285
|
deep?: Deep<EmailDeep>;
|
|
286
286
|
}
|
|
287
|
-
/** Ordered IBAN checks. States are open strings for future API values. */
|
|
288
|
-
interface BankChecks {
|
|
289
|
-
input: string;
|
|
290
|
-
country: string;
|
|
291
|
-
length: string;
|
|
292
|
-
structure: string;
|
|
293
|
-
checksum: string;
|
|
294
|
-
national: string;
|
|
295
|
-
}
|
|
296
|
-
/** A validation issue. Fields and codes remain open strings. */
|
|
297
|
-
interface BankIssue {
|
|
298
|
-
field: string;
|
|
299
|
-
code: string;
|
|
300
|
-
message: string;
|
|
301
|
-
}
|
|
302
|
-
interface Bank {
|
|
303
|
-
iban: string | null;
|
|
304
|
-
valid: boolean;
|
|
305
|
-
country: string | null;
|
|
306
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
307
|
-
formatted: string | null;
|
|
308
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
309
|
-
bank: string | null;
|
|
310
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
311
|
-
bank_name: string | null;
|
|
312
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
313
|
-
bic: string | null;
|
|
314
|
-
/** Core check results. Older responses may omit them. */
|
|
315
|
-
checks?: BankChecks;
|
|
316
|
-
/** First blocking validation issue, or an empty list. Older responses may omit it. */
|
|
317
|
-
issues?: BankIssue[];
|
|
318
|
-
deep?: Deep<BankDeep>;
|
|
319
|
-
}
|
|
320
|
-
/** Directory evidence is optional and present only when a lookup ran. */
|
|
321
|
-
interface BankDirectory {
|
|
322
|
-
edition: string;
|
|
323
|
-
country: string;
|
|
324
|
-
/** bank, branch, prefix or none; remains open for future API values. */
|
|
325
|
-
match: string;
|
|
326
|
-
}
|
|
327
|
-
interface BankRequirementField {
|
|
328
|
-
key: string;
|
|
329
|
-
label: string;
|
|
330
|
-
required: boolean;
|
|
331
|
-
type: string;
|
|
332
|
-
length?: number;
|
|
333
|
-
min_length?: number;
|
|
334
|
-
max_length?: number;
|
|
335
|
-
max_input_length?: number;
|
|
336
|
-
length_unit?: string;
|
|
337
|
-
pattern?: string;
|
|
338
|
-
normalization?: string;
|
|
339
|
-
}
|
|
340
|
-
interface BankRequirements {
|
|
341
|
-
country: string;
|
|
342
|
-
format: string;
|
|
343
|
-
supported: boolean;
|
|
344
|
-
fields: BankRequirementField[];
|
|
345
|
-
checks: Record<string, string>;
|
|
346
|
-
limitations: string[];
|
|
347
|
-
}
|
|
348
|
-
/** US ACH syntax/checksum analysis; no account or payment verification. */
|
|
349
|
-
interface BankUsAchInput {
|
|
350
|
-
routing: string;
|
|
351
|
-
account: string;
|
|
352
|
-
}
|
|
353
|
-
interface BankUsAchChecks {
|
|
354
|
-
routing_format: string;
|
|
355
|
-
routing_checksum: string;
|
|
356
|
-
account_format: string;
|
|
357
|
-
account_checksum: string;
|
|
358
|
-
}
|
|
359
|
-
interface BankUsAch {
|
|
360
|
-
format: string;
|
|
361
|
-
country: string;
|
|
362
|
-
routing: string | null;
|
|
363
|
-
account: string | null;
|
|
364
|
-
valid: boolean;
|
|
365
|
-
bank_name: string | null;
|
|
366
|
-
checks: BankUsAchChecks;
|
|
367
|
-
issues: BankIssue[];
|
|
368
|
-
}
|
|
369
287
|
interface Phone {
|
|
370
288
|
phone: string | null;
|
|
371
289
|
valid: boolean;
|
|
@@ -1407,15 +1325,6 @@ interface PostalDeep {
|
|
|
1407
1325
|
/** Median annual property tax payable on owner-occupied homes in this statistical area. Null when unsupported, missing or censored. */
|
|
1408
1326
|
property_tax?: PropertyTax | null;
|
|
1409
1327
|
}
|
|
1410
|
-
interface BankDeep {
|
|
1411
|
-
/** Source edition and exact match grain, not coverage or account verification. */
|
|
1412
|
-
directory?: BankDirectory;
|
|
1413
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1414
|
-
checksum?: string | null;
|
|
1415
|
-
/** Branch identifier when that country has one. */
|
|
1416
|
-
branch: string | null;
|
|
1417
|
-
account: string | null;
|
|
1418
|
-
}
|
|
1419
1328
|
interface PhoneDeep {
|
|
1420
1329
|
/** NPA-derived state code (US/CA). */
|
|
1421
1330
|
state: string | null;
|
|
@@ -1600,20 +1509,6 @@ type IndustryExclusion = NaicsExclusion;
|
|
|
1600
1509
|
type IndustryMatch = NaicsMatch;
|
|
1601
1510
|
type IndustrySearch = NaicsSearch;
|
|
1602
1511
|
type IndustrySearchItem = NaicsSearchItem;
|
|
1603
|
-
interface Iban {
|
|
1604
|
-
iban: string | null;
|
|
1605
|
-
valid: boolean;
|
|
1606
|
-
country: string | null;
|
|
1607
|
-
/** Print form in groups of four, for display. Null when invalid. */
|
|
1608
|
-
formatted: string | null;
|
|
1609
|
-
/** Bank identifier parsed from the number, not a name. */
|
|
1610
|
-
bank: string | null;
|
|
1611
|
-
/** Institution name from the national bank-code directory. Null when unsourced. */
|
|
1612
|
-
bank_name: string | null;
|
|
1613
|
-
/** BIC from that same directory. Null when unsourced or missing. */
|
|
1614
|
-
bic: string | null;
|
|
1615
|
-
deep?: Deep<IbanDeep>;
|
|
1616
|
-
}
|
|
1617
1512
|
interface Bin {
|
|
1618
1513
|
bin: string;
|
|
1619
1514
|
/** Actual longest matched prefix. May be shorter than the input. */
|
|
@@ -1628,13 +1523,6 @@ interface Bin {
|
|
|
1628
1523
|
prepaid: boolean | null;
|
|
1629
1524
|
deep?: Record<string, never>;
|
|
1630
1525
|
}
|
|
1631
|
-
interface IbanDeep {
|
|
1632
|
-
/** Two check digits as a string, keeping a leading zero. */
|
|
1633
|
-
checksum: string | null;
|
|
1634
|
-
/** Branch identifier when that country has one. */
|
|
1635
|
-
branch: string | null;
|
|
1636
|
-
account: string | null;
|
|
1637
|
-
}
|
|
1638
1526
|
interface EmojiParse {
|
|
1639
1527
|
emojis: (Emoji & {
|
|
1640
1528
|
positions: EmojiPosition[];
|
|
@@ -2083,12 +1971,6 @@ type CompanySearchOptions = {
|
|
|
2083
1971
|
type CompanyCoverageOptions = RequestOptions;
|
|
2084
1972
|
/** `deep: true` requests a metered deliverability check. No automatic retries by default. */
|
|
2085
1973
|
type EmailOptions = DeepOption & RequestOptions;
|
|
2086
|
-
type BankOptions = {
|
|
2087
|
-
country?: string;
|
|
2088
|
-
} & DeepOption & RequestOptions;
|
|
2089
|
-
type BankRequirementsOptions = {
|
|
2090
|
-
format?: string;
|
|
2091
|
-
} & RequestOptions;
|
|
2092
1974
|
/** Country resolves national-number ambiguity. Deep adds numbering-plan geography on every plan. */
|
|
2093
1975
|
type PhoneOptions = {
|
|
2094
1976
|
country?: string;
|
|
@@ -2308,13 +2190,7 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
|
|
|
2308
2190
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
2309
2191
|
*/
|
|
2310
2192
|
email: (email: string, opts?: EmailOptions) => Promise<Email>;
|
|
2311
|
-
iban: (iban: string, opts?: IbanOptions) => Promise<Iban>;
|
|
2312
2193
|
bin: (bin: string, opts?: BinOptions) => Promise<Bin>;
|
|
2313
|
-
bank: (iban: string, opts?: BankOptions) => Promise<Bank>;
|
|
2314
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
2315
|
-
bankUsAch: (input: BankUsAchInput, opts?: RequestOptions) => Promise<BankUsAch>;
|
|
2316
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
2317
|
-
bankRequirements: (country: string, opts?: BankRequirementsOptions) => Promise<BankRequirements>;
|
|
2318
2194
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
2319
2195
|
phone: (number: string, opts?: PhoneOptions) => Promise<Phone>;
|
|
2320
2196
|
/** Request a metered carrier lookup. No automatic retries by default. */
|
|
@@ -2393,9 +2269,6 @@ type ParseAPIClient = ReturnType<typeof parseAPI>;
|
|
|
2393
2269
|
/** Existing NAICS options remain source compatible. */
|
|
2394
2270
|
type NaicsOptions = IndustryOptions;
|
|
2395
2271
|
type NaicsSearchOptions = IndustrySearchOptions;
|
|
2396
|
-
type IbanOptions = {
|
|
2397
|
-
country?: string;
|
|
2398
|
-
} & DeepOption & RequestOptions;
|
|
2399
2272
|
type BinOptions = DeepOption & RequestOptions;
|
|
2400
2273
|
type CityScopeOptions = {
|
|
2401
2274
|
country?: string;
|
|
@@ -2485,4 +2358,4 @@ interface CityNearbyCall {
|
|
|
2485
2358
|
(name: string, opts: CityNearbyOptions): Promise<CityNearby | CityCollection>;
|
|
2486
2359
|
}
|
|
2487
2360
|
|
|
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
|
|
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;
|
|
@@ -570,14 +570,7 @@ function parseAPI(apiKey, options = {}) {
|
|
|
570
570
|
* Deep checks default to one attempt. An explicit retry count can repeat paid usage.
|
|
571
571
|
*/
|
|
572
572
|
email: (email, opts) => request(`/email/${enc(email)}`, deepQuery(opts), void 0, opts),
|
|
573
|
-
// Keep existing callers on their established HTTP contracts.
|
|
574
|
-
iban: (iban, opts) => request(`/iban/${enc(iban)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
575
573
|
bin: (bin, opts) => request(`/bin/${enc(bin)}`, { deep: opts?.deep }, void 0, opts),
|
|
576
|
-
bank: (iban, opts) => request("/bank", void 0, void 0, opts, { iban, country: opts?.country, deep: opts?.deep }),
|
|
577
|
-
/** Check US routing/account syntax using POST. Does not verify ownership, existence or ACH eligibility. */
|
|
578
|
-
bankUsAch: (input, opts) => request("/bank", void 0, void 0, opts, { format: "us_ach", country: "US", routing: input.routing, account: input.account }),
|
|
579
|
-
/** Describe supported input fields and check scope; this does not establish country directory coverage. */
|
|
580
|
-
bankRequirements: (country, opts) => request("/bank/requirements", { country, format: opts?.format }, void 0, opts),
|
|
581
574
|
/** Parse a phone number and its formats. Pass country for national numbers when needed. Deep adds numbering-plan geography. */
|
|
582
575
|
phone: (number, opts) => request(`/phone/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
|
|
583
576
|
/** Request a metered carrier lookup. No automatic retries by default. */
|