@parseapi/sdk 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,7 +17,7 @@ Get a key at [parseapi.com](https://parseapi.com). The client also reads `PARSEA
17
17
 
18
18
  ## API versions
19
19
 
20
- Version 1.7.0 explicitly selects the API contract supported by this SDK. It sends `Parse-Version: 2.0.0` on every lookup so responses match the API contract supported by the package. Your key and the team's saved default stay the same.
20
+ This SDK explicitly selects the API contract supported by this SDK. It sends `Parse-Version: 2.0.0` on every lookup so responses match the API contract supported by the package. Your key and the team's saved default stay the same.
21
21
 
22
22
  Upgrade the dependency in staging, review the [release notes](https://parseapi.com/docs/releases), and test the application before deploying the same code and dependency version to production. Commit your dependency lockfile so the tested package travels with your deployment. Future major SDK upgrades can select a newer API contract.
23
23
 
@@ -80,6 +80,36 @@ behavior and does not inherit a previous request's choice.
80
80
 
81
81
  ## Calls
82
82
 
83
+ Search the company directory, then refetch an ID you have chosen:
84
+
85
+ ```ts
86
+ const candidates = await parse.company.search({ query: 'Cloudflare', country: 'US' });
87
+ // After the caller chooses a candidate, retain its id for later lookups.
88
+ const chosenId = 'co_xw3f22es6cjq';
89
+ const company = await parse.company.id(chosenId, { deep: true });
90
+ const coverage = await parse.company.coverage();
91
+ ```
92
+
93
+ Company search accepts at most one of `query`, `domain`, `ticker`, or `identifier`, or discovers candidates using country or exact industry filters.
94
+ Use `exchange` with a ticker, or `authority` with an identifier. `country`, `limit`
95
+ and the returned `next` cursor narrow or page the same search. Pass the cursor as
96
+ `cursor` with the same selector, filters and limit. Each result has its own
97
+ `match` and optional `deep`. The SDK returns all candidates without choosing one.
98
+ Directory methods accept `signal`, `timeoutMs` and `retries`, and omit `lang`.
99
+ Directory deep adds detail in the same pooled request on every plan.
100
+
101
+ Company directory social profiles contain `platform`, `url` and `handle`; unknown metadata stays null. Phone and email records use `type` for the source-reported purpose. Earlier response fields remain readable by the client.
102
+ Coverage describes the current directory edition. Empty listings do not establish
103
+ private ownership. Deep source entries attribute selected enrichment fields, and
104
+ logo URLs are returned without fetching images. The existing `company(number)`
105
+ call still parses national registration numbers and returns `Company`.
106
+
107
+ Discovery example: `await parse.company.search({ country: 'US', industry: '0700', industry_type: 'sic' });`
108
+
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
+
111
+
112
+
83
113
  One method per endpoint, named after the route.
84
114
 
85
115
  ```ts
@@ -101,6 +131,11 @@ await parse.postal.distance('28202', '10001', { country: 'US' });
101
131
  await parse.address('1600 Pennsylvania Ave NW, Washington DC', { country: 'US' });
102
132
  await parse.address.search('1600 Pennsylvania', { country: 'US', postal: '20500' });
103
133
  await parse.company('51 824 753 556', { country: 'AU' });
134
+ await parse.company.id('co_xw3f22es6cjq', { deep: true });
135
+ await parse.company.search({ domain: 'cloudflare.com' });
136
+ await parse.company.search({ ticker: 'NET', exchange: 'NYSE' });
137
+ await parse.company.search({ identifier: '0001477333', authority: 'SEC' });
138
+ await parse.company.coverage();
104
139
  await parse.city('charlotte', { country: 'US' });
105
140
  await parse.city.id('city_mb8mbqrkz8zb');
106
141
  await parse.city.search('char', { country: 'US', limit: 10 });
@@ -303,8 +338,8 @@ Choose enrichment for the question you need answered.
303
338
  | Phone, Time, Date, Currency, Language, Emoji, Bank, Point | Optional detail in the same pooled request on every plan. |
304
339
  | Country, State, District, City, Postal | The place profile on paid plans, including demographic and tax facts where held. |
305
340
  | Name, Industry | Name evidence or the industry definition profile on paid plans. |
306
- | NPI | Deactivation date, Medicare enrollment, opt-out and enrollment rows from stored sources on paid plans. Exclusion evidence stays core. |
307
- | Vehicle, Tariff, Company | The complete product detail bag on paid plans. |
341
+ | Vehicle, Tariff, Company (national number) | The complete product detail bag on paid plans. |
342
+ | Company directory | Profile detail in the same pooled request on every plan. Search detail belongs to each company result. |
308
343
  | Weather | Specialist current measurements and the existing forecast, alert, air and history bag on paid plans. |
309
344
  | Carrier, HLR | Optional diagnostic detail within the same metered core unit, including Free allowance units. No second gate or additional check. |
310
345
 
package/dist/index.cjs CHANGED
@@ -24,7 +24,7 @@ __export(index_exports, {
24
24
  parseAPI: () => parseAPI
25
25
  });
26
26
  module.exports = __toCommonJS(index_exports);
27
- var VERSION = "1.8.0";
27
+ var VERSION = "1.9.0";
28
28
  var API_VERSION = "2.0.0";
29
29
  var DEFAULT_BASE_URL = "https://api.parseapi.com";
30
30
  var DEFAULT_TIMEOUT_MS = 1e4;
@@ -58,6 +58,7 @@ function tariffSelection(result, opts) {
58
58
  }
59
59
  return result;
60
60
  }
61
+ var requestControls = (opts) => ({ signal: opts?.signal, timeoutMs: opts?.timeoutMs, retries: opts?.retries });
61
62
  function env(name) {
62
63
  return typeof process !== "undefined" ? process.env?.[name] : void 0;
63
64
  }
@@ -284,7 +285,17 @@ function parseAPI(apiKey, options = {}) {
284
285
  search: (query, opts) => request("/address", { q: query, country: opts?.country, postal: opts?.postal, city: opts?.city, state: opts?.state, ip: opts?.ip }, void 0, opts)
285
286
  }
286
287
  ),
287
- company: (number, opts) => request(`/company/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
288
+ company: Object.assign(
289
+ (number, opts) => request(`/company/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
290
+ {
291
+ /** Look up a stable directory ID. Requested deep belongs to this profile. */
292
+ id: (id, opts) => request(`/company/id/${enc(id)}`, deepQuery(opts), void 0, requestControls(opts)),
293
+ /** Return candidates without selecting a match. Use one selector, country, exact industry, filters. */
294
+ search: (opts) => request("/company", { q: opts.query, domain: opts.domain, ticker: opts.ticker, identifier: opts.identifier, country: opts.country, industry: opts.industry, industry_type: opts.industry_type, exchange: opts.exchange, authority: opts.authority, limit: opts.limit, cursor: opts.cursor, ...deepQuery(opts) }, void 0, requestControls(opts)),
295
+ /** Describe the directory edition and its counts. Counts do not establish complete country coverage. */
296
+ coverage: (opts) => request("/company/directory/coverage", void 0, void 0, requestControls(opts))
297
+ }
298
+ ),
288
299
  /**
289
300
  * Parse an email and check its format and domain.
290
301
  * `deep: true` explicitly requests a metered deliverability check using included checks or enabled on-demand usage.
package/dist/index.d.cts CHANGED
@@ -1132,6 +1132,180 @@ interface Company {
1132
1132
  postal: string | null;
1133
1133
  deep?: Deep<CompanyDeep>;
1134
1134
  }
1135
+ /** Directory listing claims. Exchange and symbol remain separate from legal identifiers. */
1136
+ interface CompanyProfileListing {
1137
+ exchange: string;
1138
+ symbol: string;
1139
+ }
1140
+ interface CompanyProfileAddress {
1141
+ type: string;
1142
+ street: string | null;
1143
+ city: string | null;
1144
+ state: string | null;
1145
+ postal: string | null;
1146
+ country: string | null;
1147
+ }
1148
+ interface CompanyProfileJurisdiction {
1149
+ country: string | null;
1150
+ state: string | null;
1151
+ }
1152
+ interface CompanyProfileWebsite {
1153
+ domain: string;
1154
+ url: string | null;
1155
+ }
1156
+ interface CompanyProfileIdentifier {
1157
+ type: string;
1158
+ authority: string;
1159
+ value: string;
1160
+ }
1161
+ interface CompanyProfileIndustry {
1162
+ type: string;
1163
+ code: string;
1164
+ name: string | null;
1165
+ }
1166
+ /** Source-stated founding value. Precision is year, month, day, or a future open value. */
1167
+ interface CompanyProfileFounding {
1168
+ value: string;
1169
+ precision: string;
1170
+ }
1171
+ /** Reported workforce count for the stated basis, scope and measurement date. */
1172
+ interface CompanyProfileEmployees {
1173
+ count: number;
1174
+ as_of: string;
1175
+ /** Open string: headcount, full_time or full_time_equivalent. Older responses omit it. */
1176
+ basis?: string | null;
1177
+ /** Open string, currently legal_entity or consolidated_group. */
1178
+ scope: string;
1179
+ /** Open string, currently reported. */
1180
+ method: string;
1181
+ approximate: boolean;
1182
+ }
1183
+ /** Legal form recorded by a register; codes remain open strings. */
1184
+ interface CompanyProfileRegistrationLegalForm {
1185
+ code: string;
1186
+ name: string;
1187
+ }
1188
+ /** Source-recorded principal address. State and country_raw are not inferred ISO codes. */
1189
+ interface CompanyProfileRegistrationAddress {
1190
+ kind: string;
1191
+ line1: string | null;
1192
+ line2: string | null;
1193
+ city: string | null;
1194
+ state: string | null;
1195
+ postal: string | null;
1196
+ country_raw: string | null;
1197
+ }
1198
+ /** Registry-scoped legal facts; registration does not establish current operation or tax exemption. */
1199
+ interface CompanyProfileRegistration {
1200
+ authority: string;
1201
+ number: string;
1202
+ jurisdiction: CompanyProfileJurisdiction;
1203
+ role: string;
1204
+ legal_form: CompanyProfileRegistrationLegalForm;
1205
+ status: string;
1206
+ /** This register's reported entity-form date, not universal incorporation or founding. */
1207
+ formation_date: string | null;
1208
+ address: CompanyProfileRegistrationAddress | null;
1209
+ }
1210
+ /** Attribution for selected enrichment fields, not the whole company profile. */
1211
+ interface CompanyProfileSource {
1212
+ type: string;
1213
+ url: string;
1214
+ fields: string[];
1215
+ observed_at: string;
1216
+ /** Explicit source update timestamp or null; employee measurement dates remain in as_of. */
1217
+ updated_at: string | null;
1218
+ }
1219
+ /** Selected public business contacts. Purpose is source-reported or null. */
1220
+ interface CompanyProfilePhone {
1221
+ number: string;
1222
+ kind: string | null;
1223
+ }
1224
+ interface CompanyProfileEmail {
1225
+ address: string;
1226
+ kind: string | null;
1227
+ }
1228
+ /** An associated domain and its recorded URL, when known. */
1229
+ type CompanyProfileDomain = CompanyProfileWebsite;
1230
+ interface CompanySocialProfile {
1231
+ platform: string | null;
1232
+ url: string;
1233
+ handle: string | null;
1234
+ }
1235
+ interface CompanyPhoneNumber {
1236
+ number: string;
1237
+ type: string | null;
1238
+ }
1239
+ interface CompanyEmailAddress {
1240
+ address: string;
1241
+ type: string | null;
1242
+ }
1243
+ /** Directory detail, distinct from national-number CompanyDeep. Missing or null facts remain unknown. */
1244
+ interface CompanyProfileDeep {
1245
+ legal_name?: string | null;
1246
+ aliases?: string[] | null;
1247
+ jurisdiction?: CompanyProfileJurisdiction | null;
1248
+ status?: string | null;
1249
+ domains?: CompanyProfileDomain[] | null;
1250
+ social_profiles?: CompanySocialProfile[] | null;
1251
+ phone_numbers?: CompanyPhoneNumber[] | null;
1252
+ email_addresses?: CompanyEmailAddress[] | null;
1253
+ /** Earlier directory responses. */
1254
+ websites?: CompanyProfileWebsite[] | null;
1255
+ identifiers?: CompanyProfileIdentifier[] | null;
1256
+ incorporated?: string | null;
1257
+ addresses?: CompanyProfileAddress[] | null;
1258
+ industries?: CompanyProfileIndustry[] | null;
1259
+ parent?: string | null;
1260
+ description?: string | null;
1261
+ /** Returned asset URL only. The SDK does not fetch it. */
1262
+ logo?: string | null;
1263
+ socials?: string[] | null;
1264
+ phones?: CompanyProfilePhone[] | null;
1265
+ emails?: CompanyProfileEmail[] | null;
1266
+ /** Founding claim, distinct from legal incorporation. Year-only dates stay year-only. */
1267
+ founded?: CompanyProfileFounding | null;
1268
+ employees?: CompanyProfileEmployees | null;
1269
+ /** Empty means no admitted registration facts; older editions may omit this member. */
1270
+ registrations?: CompanyProfileRegistration[] | null;
1271
+ sources?: CompanyProfileSource[] | null;
1272
+ }
1273
+ interface CompanyProfile {
1274
+ id: string;
1275
+ name: string;
1276
+ country: string | null;
1277
+ website: string | null;
1278
+ listings: CompanyProfileListing[] | null;
1279
+ address: CompanyProfileAddress | null;
1280
+ deep?: Deep<CompanyProfileDeep>;
1281
+ }
1282
+ /** Why a candidate matched. Field/type/authority/exchange values remain extensible strings. */
1283
+ interface CompanyMatch {
1284
+ field?: string | null;
1285
+ value?: string | null;
1286
+ type?: string | null;
1287
+ authority?: string | null;
1288
+ exchange?: string | null;
1289
+ }
1290
+ interface CompanyCandidate extends CompanyProfile {
1291
+ match: CompanyMatch;
1292
+ }
1293
+ interface CompanySearch {
1294
+ companies: CompanyCandidate[];
1295
+ next: string | null;
1296
+ }
1297
+ /** Edition counts describe the records available, not all companies in a country. */
1298
+ interface CompanyCoverage {
1299
+ scope: string;
1300
+ label: string;
1301
+ description: string;
1302
+ snapshot_at: string;
1303
+ companies: number;
1304
+ countries: string[];
1305
+ with_website: number;
1306
+ with_listings: number;
1307
+ with_address: number;
1308
+ }
1135
1309
  /** A direct child industry code. */
1136
1310
  interface NaicsChild {
1137
1311
  naics: string;
@@ -1776,6 +1950,30 @@ type AddressSearchOptions = {
1776
1950
  type CompanyOptions = LanguageOption & {
1777
1951
  country?: string;
1778
1952
  } & DeepOption & RequestOptions;
1953
+ /** Refetch a directory company by its stable co_ ID. */
1954
+ type CompanyIdOptions = DeepOption & RequestOptions;
1955
+ /** Choose at most one selector, or discover by country, exact industry. The API validates filters and cursors. */
1956
+ type CompanySearchOptions = {
1957
+ /** Company name search. Sent as q. */
1958
+ query?: string;
1959
+ domain?: string;
1960
+ ticker?: string;
1961
+ identifier?: string;
1962
+ /** ISO2 country filter. */
1963
+ country?: string;
1964
+ /** Exact four-digit SIC code string, preserving leading zeros. Requires industry_type. */
1965
+ industry?: string;
1966
+ /** Industry namespace; currently sic. Requires industry. */
1967
+ industry_type?: string;
1968
+ /** Exchange filter for ticker searches. */
1969
+ exchange?: string;
1970
+ /** Issuing authority filter for identifier searches. */
1971
+ authority?: string;
1972
+ limit?: number;
1973
+ /** Opaque next-page cursor. Keep the same selector and filters. */
1974
+ cursor?: string;
1975
+ } & DeepOption & RequestOptions;
1976
+ type CompanyCoverageOptions = RequestOptions;
1779
1977
  /** `deep: true` requests a metered deliverability check. No automatic retries by default. */
1780
1978
  type EmailOptions = DeepOption & RequestOptions;
1781
1979
  /** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
@@ -1978,7 +2176,14 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1978
2176
  /** Find address suggestions using the context supplied. Prefer postal, or city and state, from the form. ip is an optional end-user locality hint for server-side calls. An empty result has reason more_input, missing_context or no_matches. Suggestions have reason null. Operational failures are errors. */
1979
2177
  search: (query: string, opts?: AddressSearchOptions) => Promise<AddressSearch>;
1980
2178
  };
1981
- company: (number: string, opts?: CompanyOptions) => Promise<Company>;
2179
+ company: ((number: string, opts?: CompanyOptions) => Promise<Company>) & {
2180
+ /** Look up a stable directory ID. Requested deep belongs to this profile. */
2181
+ id: (id: string, opts?: CompanyIdOptions) => Promise<CompanyProfile>;
2182
+ /** Return candidates without selecting a match. Use one selector, country, exact industry, filters. */
2183
+ search: (opts: CompanySearchOptions) => Promise<CompanySearch>;
2184
+ /** Describe the directory edition and its counts. Counts do not establish complete country coverage. */
2185
+ coverage: (opts?: CompanyCoverageOptions) => Promise<CompanyCoverage>;
2186
+ };
1982
2187
  /**
1983
2188
  * Parse an email and check its format and domain.
1984
2189
  * `deep: true` explicitly requests a metered deliverability check using included checks or enabled on-demand usage.
@@ -2081,4 +2286,4 @@ type IbanOptions = {
2081
2286
  type NpiOptions = LanguageOption & DeepOption & RequestOptions;
2082
2287
  type BinOptions = DeepOption & RequestOptions;
2083
2288
 
2084
- export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Card, type CardDeep, type CardOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationLocations, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type 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 Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type 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 Provider, type ProviderDeep, type ProviderEnrollment, type ProviderOptions, type ProviderSource, type ProviderSources, type ProviderTaxonomy, type RequestOptions, type Stack, type StackOptions, type StackTechnology, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type 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 Vat, type VatAddress, type VatDeep, type VatOptions, type Vehicle, type VehicleDeep, type VehicleOptions, type VehicleRecall, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
2289
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Card, type CardDeep, type CardOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type 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 EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type 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 Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type 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 Provider, type ProviderDeep, type ProviderEnrollment, type ProviderOptions, type ProviderSource, type ProviderSources, type ProviderTaxonomy, type RequestOptions, type Stack, type StackOptions, type StackTechnology, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type 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 Vat, type VatAddress, type VatDeep, type VatOptions, type Vehicle, type VehicleDeep, type VehicleOptions, type VehicleRecall, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
package/dist/index.d.ts CHANGED
@@ -1132,6 +1132,180 @@ interface Company {
1132
1132
  postal: string | null;
1133
1133
  deep?: Deep<CompanyDeep>;
1134
1134
  }
1135
+ /** Directory listing claims. Exchange and symbol remain separate from legal identifiers. */
1136
+ interface CompanyProfileListing {
1137
+ exchange: string;
1138
+ symbol: string;
1139
+ }
1140
+ interface CompanyProfileAddress {
1141
+ type: string;
1142
+ street: string | null;
1143
+ city: string | null;
1144
+ state: string | null;
1145
+ postal: string | null;
1146
+ country: string | null;
1147
+ }
1148
+ interface CompanyProfileJurisdiction {
1149
+ country: string | null;
1150
+ state: string | null;
1151
+ }
1152
+ interface CompanyProfileWebsite {
1153
+ domain: string;
1154
+ url: string | null;
1155
+ }
1156
+ interface CompanyProfileIdentifier {
1157
+ type: string;
1158
+ authority: string;
1159
+ value: string;
1160
+ }
1161
+ interface CompanyProfileIndustry {
1162
+ type: string;
1163
+ code: string;
1164
+ name: string | null;
1165
+ }
1166
+ /** Source-stated founding value. Precision is year, month, day, or a future open value. */
1167
+ interface CompanyProfileFounding {
1168
+ value: string;
1169
+ precision: string;
1170
+ }
1171
+ /** Reported workforce count for the stated basis, scope and measurement date. */
1172
+ interface CompanyProfileEmployees {
1173
+ count: number;
1174
+ as_of: string;
1175
+ /** Open string: headcount, full_time or full_time_equivalent. Older responses omit it. */
1176
+ basis?: string | null;
1177
+ /** Open string, currently legal_entity or consolidated_group. */
1178
+ scope: string;
1179
+ /** Open string, currently reported. */
1180
+ method: string;
1181
+ approximate: boolean;
1182
+ }
1183
+ /** Legal form recorded by a register; codes remain open strings. */
1184
+ interface CompanyProfileRegistrationLegalForm {
1185
+ code: string;
1186
+ name: string;
1187
+ }
1188
+ /** Source-recorded principal address. State and country_raw are not inferred ISO codes. */
1189
+ interface CompanyProfileRegistrationAddress {
1190
+ kind: string;
1191
+ line1: string | null;
1192
+ line2: string | null;
1193
+ city: string | null;
1194
+ state: string | null;
1195
+ postal: string | null;
1196
+ country_raw: string | null;
1197
+ }
1198
+ /** Registry-scoped legal facts; registration does not establish current operation or tax exemption. */
1199
+ interface CompanyProfileRegistration {
1200
+ authority: string;
1201
+ number: string;
1202
+ jurisdiction: CompanyProfileJurisdiction;
1203
+ role: string;
1204
+ legal_form: CompanyProfileRegistrationLegalForm;
1205
+ status: string;
1206
+ /** This register's reported entity-form date, not universal incorporation or founding. */
1207
+ formation_date: string | null;
1208
+ address: CompanyProfileRegistrationAddress | null;
1209
+ }
1210
+ /** Attribution for selected enrichment fields, not the whole company profile. */
1211
+ interface CompanyProfileSource {
1212
+ type: string;
1213
+ url: string;
1214
+ fields: string[];
1215
+ observed_at: string;
1216
+ /** Explicit source update timestamp or null; employee measurement dates remain in as_of. */
1217
+ updated_at: string | null;
1218
+ }
1219
+ /** Selected public business contacts. Purpose is source-reported or null. */
1220
+ interface CompanyProfilePhone {
1221
+ number: string;
1222
+ kind: string | null;
1223
+ }
1224
+ interface CompanyProfileEmail {
1225
+ address: string;
1226
+ kind: string | null;
1227
+ }
1228
+ /** An associated domain and its recorded URL, when known. */
1229
+ type CompanyProfileDomain = CompanyProfileWebsite;
1230
+ interface CompanySocialProfile {
1231
+ platform: string | null;
1232
+ url: string;
1233
+ handle: string | null;
1234
+ }
1235
+ interface CompanyPhoneNumber {
1236
+ number: string;
1237
+ type: string | null;
1238
+ }
1239
+ interface CompanyEmailAddress {
1240
+ address: string;
1241
+ type: string | null;
1242
+ }
1243
+ /** Directory detail, distinct from national-number CompanyDeep. Missing or null facts remain unknown. */
1244
+ interface CompanyProfileDeep {
1245
+ legal_name?: string | null;
1246
+ aliases?: string[] | null;
1247
+ jurisdiction?: CompanyProfileJurisdiction | null;
1248
+ status?: string | null;
1249
+ domains?: CompanyProfileDomain[] | null;
1250
+ social_profiles?: CompanySocialProfile[] | null;
1251
+ phone_numbers?: CompanyPhoneNumber[] | null;
1252
+ email_addresses?: CompanyEmailAddress[] | null;
1253
+ /** Earlier directory responses. */
1254
+ websites?: CompanyProfileWebsite[] | null;
1255
+ identifiers?: CompanyProfileIdentifier[] | null;
1256
+ incorporated?: string | null;
1257
+ addresses?: CompanyProfileAddress[] | null;
1258
+ industries?: CompanyProfileIndustry[] | null;
1259
+ parent?: string | null;
1260
+ description?: string | null;
1261
+ /** Returned asset URL only. The SDK does not fetch it. */
1262
+ logo?: string | null;
1263
+ socials?: string[] | null;
1264
+ phones?: CompanyProfilePhone[] | null;
1265
+ emails?: CompanyProfileEmail[] | null;
1266
+ /** Founding claim, distinct from legal incorporation. Year-only dates stay year-only. */
1267
+ founded?: CompanyProfileFounding | null;
1268
+ employees?: CompanyProfileEmployees | null;
1269
+ /** Empty means no admitted registration facts; older editions may omit this member. */
1270
+ registrations?: CompanyProfileRegistration[] | null;
1271
+ sources?: CompanyProfileSource[] | null;
1272
+ }
1273
+ interface CompanyProfile {
1274
+ id: string;
1275
+ name: string;
1276
+ country: string | null;
1277
+ website: string | null;
1278
+ listings: CompanyProfileListing[] | null;
1279
+ address: CompanyProfileAddress | null;
1280
+ deep?: Deep<CompanyProfileDeep>;
1281
+ }
1282
+ /** Why a candidate matched. Field/type/authority/exchange values remain extensible strings. */
1283
+ interface CompanyMatch {
1284
+ field?: string | null;
1285
+ value?: string | null;
1286
+ type?: string | null;
1287
+ authority?: string | null;
1288
+ exchange?: string | null;
1289
+ }
1290
+ interface CompanyCandidate extends CompanyProfile {
1291
+ match: CompanyMatch;
1292
+ }
1293
+ interface CompanySearch {
1294
+ companies: CompanyCandidate[];
1295
+ next: string | null;
1296
+ }
1297
+ /** Edition counts describe the records available, not all companies in a country. */
1298
+ interface CompanyCoverage {
1299
+ scope: string;
1300
+ label: string;
1301
+ description: string;
1302
+ snapshot_at: string;
1303
+ companies: number;
1304
+ countries: string[];
1305
+ with_website: number;
1306
+ with_listings: number;
1307
+ with_address: number;
1308
+ }
1135
1309
  /** A direct child industry code. */
1136
1310
  interface NaicsChild {
1137
1311
  naics: string;
@@ -1776,6 +1950,30 @@ type AddressSearchOptions = {
1776
1950
  type CompanyOptions = LanguageOption & {
1777
1951
  country?: string;
1778
1952
  } & DeepOption & RequestOptions;
1953
+ /** Refetch a directory company by its stable co_ ID. */
1954
+ type CompanyIdOptions = DeepOption & RequestOptions;
1955
+ /** Choose at most one selector, or discover by country, exact industry. The API validates filters and cursors. */
1956
+ type CompanySearchOptions = {
1957
+ /** Company name search. Sent as q. */
1958
+ query?: string;
1959
+ domain?: string;
1960
+ ticker?: string;
1961
+ identifier?: string;
1962
+ /** ISO2 country filter. */
1963
+ country?: string;
1964
+ /** Exact four-digit SIC code string, preserving leading zeros. Requires industry_type. */
1965
+ industry?: string;
1966
+ /** Industry namespace; currently sic. Requires industry. */
1967
+ industry_type?: string;
1968
+ /** Exchange filter for ticker searches. */
1969
+ exchange?: string;
1970
+ /** Issuing authority filter for identifier searches. */
1971
+ authority?: string;
1972
+ limit?: number;
1973
+ /** Opaque next-page cursor. Keep the same selector and filters. */
1974
+ cursor?: string;
1975
+ } & DeepOption & RequestOptions;
1976
+ type CompanyCoverageOptions = RequestOptions;
1779
1977
  /** `deep: true` requests a metered deliverability check. No automatic retries by default. */
1780
1978
  type EmailOptions = DeepOption & RequestOptions;
1781
1979
  /** `deep: true` requests a metered registry check where supported. `from` is your own VAT number. */
@@ -1978,7 +2176,14 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1978
2176
  /** Find address suggestions using the context supplied. Prefer postal, or city and state, from the form. ip is an optional end-user locality hint for server-side calls. An empty result has reason more_input, missing_context or no_matches. Suggestions have reason null. Operational failures are errors. */
1979
2177
  search: (query: string, opts?: AddressSearchOptions) => Promise<AddressSearch>;
1980
2178
  };
1981
- company: (number: string, opts?: CompanyOptions) => Promise<Company>;
2179
+ company: ((number: string, opts?: CompanyOptions) => Promise<Company>) & {
2180
+ /** Look up a stable directory ID. Requested deep belongs to this profile. */
2181
+ id: (id: string, opts?: CompanyIdOptions) => Promise<CompanyProfile>;
2182
+ /** Return candidates without selecting a match. Use one selector, country, exact industry, filters. */
2183
+ search: (opts: CompanySearchOptions) => Promise<CompanySearch>;
2184
+ /** Describe the directory edition and its counts. Counts do not establish complete country coverage. */
2185
+ coverage: (opts?: CompanyCoverageOptions) => Promise<CompanyCoverage>;
2186
+ };
1982
2187
  /**
1983
2188
  * Parse an email and check its format and domain.
1984
2189
  * `deep: true` explicitly requests a metered deliverability check using included checks or enabled on-demand usage.
@@ -2081,4 +2286,4 @@ type IbanOptions = {
2081
2286
  type NpiOptions = LanguageOption & DeepOption & RequestOptions;
2082
2287
  type BinOptions = DeepOption & RequestOptions;
2083
2288
 
2084
- export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Card, type CardDeep, type CardOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationLocations, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type 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 Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type 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 Provider, type ProviderDeep, type ProviderEnrollment, type ProviderOptions, type ProviderSource, type ProviderSources, type ProviderTaxonomy, type RequestOptions, type Stack, type StackOptions, type StackTechnology, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type 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 Vat, type VatAddress, type VatDeep, type VatOptions, type Vehicle, type VehicleDeep, type VehicleOptions, type VehicleRecall, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
2289
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Card, type CardDeep, type CardOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type 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 EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type 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 Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type 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 Provider, type ProviderDeep, type ProviderEnrollment, type ProviderOptions, type ProviderSource, type ProviderSources, type ProviderTaxonomy, type RequestOptions, type Stack, type StackOptions, type StackTechnology, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type 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 Vat, type VatAddress, type VatDeep, type VatOptions, type Vehicle, type VehicleDeep, type VehicleOptions, type VehicleRecall, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var VERSION = "1.8.0";
2
+ var VERSION = "1.9.0";
3
3
  var API_VERSION = "2.0.0";
4
4
  var DEFAULT_BASE_URL = "https://api.parseapi.com";
5
5
  var DEFAULT_TIMEOUT_MS = 1e4;
@@ -33,6 +33,7 @@ function tariffSelection(result, opts) {
33
33
  }
34
34
  return result;
35
35
  }
36
+ var requestControls = (opts) => ({ signal: opts?.signal, timeoutMs: opts?.timeoutMs, retries: opts?.retries });
36
37
  function env(name) {
37
38
  return typeof process !== "undefined" ? process.env?.[name] : void 0;
38
39
  }
@@ -259,7 +260,17 @@ function parseAPI(apiKey, options = {}) {
259
260
  search: (query, opts) => request("/address", { q: query, country: opts?.country, postal: opts?.postal, city: opts?.city, state: opts?.state, ip: opts?.ip }, void 0, opts)
260
261
  }
261
262
  ),
262
- company: (number, opts) => request(`/company/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
263
+ company: Object.assign(
264
+ (number, opts) => request(`/company/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
265
+ {
266
+ /** Look up a stable directory ID. Requested deep belongs to this profile. */
267
+ id: (id, opts) => request(`/company/id/${enc(id)}`, deepQuery(opts), void 0, requestControls(opts)),
268
+ /** Return candidates without selecting a match. Use one selector, country, exact industry, filters. */
269
+ search: (opts) => request("/company", { q: opts.query, domain: opts.domain, ticker: opts.ticker, identifier: opts.identifier, country: opts.country, industry: opts.industry, industry_type: opts.industry_type, exchange: opts.exchange, authority: opts.authority, limit: opts.limit, cursor: opts.cursor, ...deepQuery(opts) }, void 0, requestControls(opts)),
270
+ /** Describe the directory edition and its counts. Counts do not establish complete country coverage. */
271
+ coverage: (opts) => request("/company/directory/coverage", void 0, void 0, requestControls(opts))
272
+ }
273
+ ),
263
274
  /**
264
275
  * Parse an email and check its format and domain.
265
276
  * `deep: true` explicitly requests a metered deliverability check using included checks or enabled on-demand usage.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parseapi/sdk",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Official ParseAPI client for Node and TypeScript. One key, minimal JSON, fast.",
5
5
  "keywords": [
6
6
  "parseapi",