@parseapi/sdk 1.2.0 → 1.4.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.2.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
+ Version 1.4.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.
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
 
@@ -173,6 +173,8 @@ Unit discovery accepts optional `query`, `type`, and `unit` filters. `unit` sele
173
173
 
174
174
  ## Place statistics and optional detail
175
175
 
176
+ Australian postal lookups include core `localities` with suburb choices (`city`, `state`, `state_name`) on every plan. Null or an omitted field means unknown, while `[]` means the reviewed reference has no eligible choices. `city` stays null when the source is ambiguous, even if there is only one eligible choice. Let the user select their suburb and keep manual entry available. These are geographic choices, not mailing-address verification. [G-NAF source, adaptations and licence](https://parseapi.com/legal/attribution#postal-au).
177
+
176
178
  Postal and District paid profiles include `deep.property_tax` where supported. It contains `annual_median`, `currency` and `period`: median annual property tax payable on owner-occupied homes in the statistical area. The amount is adjusted to the final year of the reporting period (`YYYY-YYYY`). This is an area statistic, not a rate or an individual property bill. Unsupported, missing and censored estimates are null.
177
179
 
178
180
  ```ts
@@ -287,3 +289,17 @@ const basic = await parse.time('America/New_York');
287
289
  const detail = await parse.time('America/New_York', { deep: true });
288
290
  console.log(basic.at, detail.deep?.next_dst);
289
291
  ```
292
+
293
+ ## Stack API
294
+
295
+ ```typescript
296
+ const result = await parse.stack("example.com");
297
+ ```
298
+
299
+ Pass a public hostname without a scheme, path, port or IP address. Stack returns the checked URL and `checked_at` time, followed by `scope`, `pages` and `partial`. `scope` is `homepage` or `site`; `pages` counts successfully checked HTML pages. `partial` is true for homepage-only or incomplete bounded site checks. False means the known in-scope candidates were completed, not that every page on a website was visited. A homepage result has `scope: "homepage"`, `pages: 1` and `partial: true`.
300
+
301
+ `cms`, `servers`, `frameworks`, `ecommerce`, `analytics`, `chat`, `payments` and `hosting` are arrays because a site can use several technologies in each category. Each entry contains `technology`, `name` and nullable `version`. Technology codes are open strings. A successful check uses empty arrays for categories with no matches. When no HTML page could be checked, `checked_at` and all categories are null, `pages` is 0 and `partial` is null. Unknown or conflicting versions are null. Missing detections do not prove absence.
302
+
303
+ Successful checks may be reused for up to 24 hours. `pretty` optionally formats the wire JSON. Stack uses your plan's request allowance and API version 2.0.0 selected by this client.
304
+
305
+ Stack defaults to 35 seconds per attempt so a first scan has time to finish. Other lookups retain their 10-second default. An explicit client timeout applies to every operation; JavaScript also supports a per-call `timeoutMs` override.
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.2.0";
27
+ var VERSION = "1.4.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;
@@ -102,7 +102,8 @@ function parseAPI(apiKey, options = {}) {
102
102
  throw new Error("parseAPI: missing API key. Pass one or set PARSEAPI_KEY.");
103
103
  }
104
104
  const baseUrl = (options.baseUrl ?? env("PARSEAPI_BASE_URL") ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
105
- const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
105
+ const configuredTimeoutMs = options.timeoutMs;
106
+ const timeoutMs = configuredTimeoutMs ?? DEFAULT_TIMEOUT_MS;
106
107
  const configuredRetries = options.retries;
107
108
  validateTimeout(timeoutMs);
108
109
  validateRetries(configuredRetries);
@@ -110,7 +111,7 @@ function parseAPI(apiKey, options = {}) {
110
111
  async function request(path, query, headers, controls = {}, json) {
111
112
  const signal = controls.signal;
112
113
  signal?.throwIfAborted();
113
- const attemptTimeout = controls.timeoutMs ?? timeoutMs;
114
+ const attemptTimeout = controls.timeoutMs ?? configuredTimeoutMs ?? (path.startsWith("/stack/") ? 35e3 : timeoutMs);
114
115
  const retries = controls.retries ?? configuredRetries ?? (metered(path, query) ? 0 : DEFAULT_RETRIES);
115
116
  validateTimeout(attemptTimeout);
116
117
  validateRetries(retries);
@@ -277,6 +278,8 @@ function parseAPI(apiKey, options = {}) {
277
278
  caller: (number, opts) => request(`/caller/${enc(number)}`, { country: opts?.country }, void 0, opts),
278
279
  /** Look up phone status at the last check. Live means assigned and connected means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep adds network diagnostics within the same metered lookup. No automatic retries by default. */
279
280
  hlr: (number, opts) => request(`/hlr/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
281
+ /** Identify website technologies by category, with homepage or bounded site coverage metadata. */
282
+ stack: (domain, opts) => request(`/stack/${enc(domain)}`, { ...deepQuery(opts), pretty: opts?.pretty }, void 0, opts),
280
283
  /** Check whether a domain is registered. Deep adds registration dates, registrar, status and DNSSEC on paid plans. */
281
284
  domain: (domain, opts) => request(`/domain/${enc(domain)}`, deepQuery(opts), void 0, opts),
282
285
  asn: (asn, opts) => request(`/asn/${enc(asn)}`, void 0, void 0, opts),
package/dist/index.d.cts CHANGED
@@ -203,10 +203,18 @@ interface PostalMetro {
203
203
  business_share: number | null;
204
204
  other_share: number | null;
205
205
  }
206
+ /** A supported Australian postcode suburb choice, independent of the scalar city. */
207
+ interface PostalLocality {
208
+ city: string;
209
+ state: string;
210
+ state_name: string;
211
+ }
206
212
  interface Postal {
207
213
  postal: string;
208
214
  city: string | null;
209
215
  city_local: string | null;
216
+ /** Null/missing is unknown. An empty list has no eligible choices. One choice does not imply city. */
217
+ localities?: PostalLocality[] | null;
210
218
  district: string | null;
211
219
  district_name: string | null;
212
220
  district_name_local: string | null;
@@ -493,6 +501,33 @@ interface MxRecord {
493
501
  priority: number;
494
502
  host: string;
495
503
  }
504
+ interface StackTechnology {
505
+ technology: string;
506
+ name: string;
507
+ version: string | null;
508
+ }
509
+ interface Stack {
510
+ domain: string;
511
+ url: string;
512
+ /** Time of the check, or null when no HTML page could be checked. */
513
+ checked_at: string | null;
514
+ scope: 'homepage' | 'site';
515
+ /** Number of successfully checked HTML pages. */
516
+ pages: number;
517
+ /** True for homepage-only or incomplete bounded checks; null when no HTML page could be checked. False never guarantees every page was visited. */
518
+ partial: boolean | null;
519
+ /** Collections are null when no HTML page could be checked and empty when no matches were found. */
520
+ cms: StackTechnology[] | null;
521
+ servers: StackTechnology[] | null;
522
+ frameworks: StackTechnology[] | null;
523
+ ecommerce: StackTechnology[] | null;
524
+ analytics: StackTechnology[] | null;
525
+ chat: StackTechnology[] | null;
526
+ payments: StackTechnology[] | null;
527
+ hosting: StackTechnology[] | null;
528
+ /** Empty only when the generic deep compatibility flag was requested. */
529
+ deep?: Record<string, never>;
530
+ }
496
531
  interface DomainRegistration {
497
532
  registered: boolean;
498
533
  created: string | null;
@@ -1377,7 +1412,7 @@ interface RequestOptions {
1377
1412
  interface ParseAPIOptions {
1378
1413
  /** Override https://api.parseapi.com (tests, canaries). Also read from PARSEAPI_BASE_URL. */
1379
1414
  baseUrl?: string;
1380
- /** Per-attempt timeout in milliseconds. Default 10000. */
1415
+ /** Per-attempt timeout in milliseconds. Defaults to 35000 for Stack and 10000 otherwise. An explicit value applies to every operation. */
1381
1416
  timeoutMs?: number;
1382
1417
  /** Retries after the first attempt on network errors / 429 / 5xx. Default 2 for ordinary calls, 0 for paid checks. An explicit count overrides both. */
1383
1418
  retries?: number;
@@ -1478,6 +1513,10 @@ type CallerOptions = {
1478
1513
  type HlrOptions = {
1479
1514
  country?: string;
1480
1515
  } & DeepOption & RequestOptions;
1516
+ /** Public website hostname only. Optional formatting and request controls. */
1517
+ type StackOptions = {
1518
+ pretty?: boolean;
1519
+ } & DeepOption & RequestOptions;
1481
1520
  type DomainOptions = DeepOption & RequestOptions;
1482
1521
  type AsnOptions = LanguageOption & RequestOptions;
1483
1522
  type MacOptions = RequestOptions;
@@ -1622,6 +1661,8 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1622
1661
  caller: (number: string, opts?: CallerOptions) => Promise<Caller>;
1623
1662
  /** Look up phone status at the last check. Live means assigned and connected means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep adds network diagnostics within the same metered lookup. No automatic retries by default. */
1624
1663
  hlr: (number: string, opts?: HlrOptions) => Promise<Hlr>;
1664
+ /** Identify website technologies by category, with homepage or bounded site coverage metadata. */
1665
+ stack: (domain: string, opts?: StackOptions) => Promise<Stack>;
1625
1666
  /** Check whether a domain is registered. Deep adds registration dates, registrar, status and DNSSEC on paid plans. */
1626
1667
  domain: (domain: string, opts?: DomainOptions) => Promise<Domain>;
1627
1668
  asn: (asn: string, opts?: AsnOptions) => Promise<Asn>;
@@ -1675,4 +1716,4 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1675
1716
  };
1676
1717
  type ParseAPIClient = ReturnType<typeof parseAPI>;
1677
1718
 
1678
- export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Ip, type IpDeep, type IpOptions, type IpSelfOptions, type Language, type LanguageDeep, type LanguageOption, type LanguageOptions, type Mac, type MacOptions, type Measure, type MeasureChoice, type MeasureOptions, type MeasureUnit, type MeasureUnits, type MeasureUnitsOptions, type Mx, type MxOptions, type MxRecord, type Naics, type NaicsChild, type NaicsCorrection, type NaicsDeep, type NaicsExclusion, type NaicsMatch, type NaicsOptions, type NaicsSearch, type NaicsSearchItem, type NaicsSearchOptions, type Name, type NameDeep, type NameOptions, type Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type PostalMetro, type PostalMetrosDeep, type PostalNearby, type PostalNearbyItem, type PostalNearbyOptions, type PostalOptions, type Preflight, type PreflightCost, type PreflightEmailCapacity, type PreflightOperation, type PreflightOperationEstimate, type PreflightPooledCapacity, type PreflightSpendCapacity, type PreflightTask, type PropertyTax, type RequestOptions, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type TimeOptions, type Timezone, type TimezoneAtOptions, type TimezoneConversionTarget, type TimezoneConversionTargetDeep, type TimezoneDeep, type TimezoneNextDst, type TimezoneOptions, type Useragent, type UseragentBrowserBrand, type UseragentBrowserDeep, type UseragentDeep, type UseragentDeviceDeep, type UseragentEngineDeep, type UseragentOptions, type UseragentOsDeep, type Vat, type VatAddress, type VatDeep, type VatOptions, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
1719
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Ip, type IpDeep, type IpOptions, type IpSelfOptions, type Language, type LanguageDeep, type LanguageOption, type LanguageOptions, type Mac, type MacOptions, type Measure, type MeasureChoice, type MeasureOptions, type MeasureUnit, type MeasureUnits, type MeasureUnitsOptions, type Mx, type MxOptions, type MxRecord, type Naics, type NaicsChild, type NaicsCorrection, type NaicsDeep, type NaicsExclusion, type NaicsMatch, type NaicsOptions, type NaicsSearch, type NaicsSearchItem, type NaicsSearchOptions, type Name, type NameDeep, type NameOptions, type Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type 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 Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type TimeOptions, type Timezone, type TimezoneAtOptions, type TimezoneConversionTarget, type TimezoneConversionTargetDeep, type TimezoneDeep, type TimezoneNextDst, type TimezoneOptions, type Useragent, type UseragentBrowserBrand, type UseragentBrowserDeep, type UseragentDeep, type UseragentDeviceDeep, type UseragentEngineDeep, type UseragentOptions, type UseragentOsDeep, type Vat, type VatAddress, type VatDeep, type VatOptions, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
package/dist/index.d.ts CHANGED
@@ -203,10 +203,18 @@ interface PostalMetro {
203
203
  business_share: number | null;
204
204
  other_share: number | null;
205
205
  }
206
+ /** A supported Australian postcode suburb choice, independent of the scalar city. */
207
+ interface PostalLocality {
208
+ city: string;
209
+ state: string;
210
+ state_name: string;
211
+ }
206
212
  interface Postal {
207
213
  postal: string;
208
214
  city: string | null;
209
215
  city_local: string | null;
216
+ /** Null/missing is unknown. An empty list has no eligible choices. One choice does not imply city. */
217
+ localities?: PostalLocality[] | null;
210
218
  district: string | null;
211
219
  district_name: string | null;
212
220
  district_name_local: string | null;
@@ -493,6 +501,33 @@ interface MxRecord {
493
501
  priority: number;
494
502
  host: string;
495
503
  }
504
+ interface StackTechnology {
505
+ technology: string;
506
+ name: string;
507
+ version: string | null;
508
+ }
509
+ interface Stack {
510
+ domain: string;
511
+ url: string;
512
+ /** Time of the check, or null when no HTML page could be checked. */
513
+ checked_at: string | null;
514
+ scope: 'homepage' | 'site';
515
+ /** Number of successfully checked HTML pages. */
516
+ pages: number;
517
+ /** True for homepage-only or incomplete bounded checks; null when no HTML page could be checked. False never guarantees every page was visited. */
518
+ partial: boolean | null;
519
+ /** Collections are null when no HTML page could be checked and empty when no matches were found. */
520
+ cms: StackTechnology[] | null;
521
+ servers: StackTechnology[] | null;
522
+ frameworks: StackTechnology[] | null;
523
+ ecommerce: StackTechnology[] | null;
524
+ analytics: StackTechnology[] | null;
525
+ chat: StackTechnology[] | null;
526
+ payments: StackTechnology[] | null;
527
+ hosting: StackTechnology[] | null;
528
+ /** Empty only when the generic deep compatibility flag was requested. */
529
+ deep?: Record<string, never>;
530
+ }
496
531
  interface DomainRegistration {
497
532
  registered: boolean;
498
533
  created: string | null;
@@ -1377,7 +1412,7 @@ interface RequestOptions {
1377
1412
  interface ParseAPIOptions {
1378
1413
  /** Override https://api.parseapi.com (tests, canaries). Also read from PARSEAPI_BASE_URL. */
1379
1414
  baseUrl?: string;
1380
- /** Per-attempt timeout in milliseconds. Default 10000. */
1415
+ /** Per-attempt timeout in milliseconds. Defaults to 35000 for Stack and 10000 otherwise. An explicit value applies to every operation. */
1381
1416
  timeoutMs?: number;
1382
1417
  /** Retries after the first attempt on network errors / 429 / 5xx. Default 2 for ordinary calls, 0 for paid checks. An explicit count overrides both. */
1383
1418
  retries?: number;
@@ -1478,6 +1513,10 @@ type CallerOptions = {
1478
1513
  type HlrOptions = {
1479
1514
  country?: string;
1480
1515
  } & DeepOption & RequestOptions;
1516
+ /** Public website hostname only. Optional formatting and request controls. */
1517
+ type StackOptions = {
1518
+ pretty?: boolean;
1519
+ } & DeepOption & RequestOptions;
1481
1520
  type DomainOptions = DeepOption & RequestOptions;
1482
1521
  type AsnOptions = LanguageOption & RequestOptions;
1483
1522
  type MacOptions = RequestOptions;
@@ -1622,6 +1661,8 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1622
1661
  caller: (number: string, opts?: CallerOptions) => Promise<Caller>;
1623
1662
  /** Look up phone status at the last check. Live means assigned and connected means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep adds network diagnostics within the same metered lookup. No automatic retries by default. */
1624
1663
  hlr: (number: string, opts?: HlrOptions) => Promise<Hlr>;
1664
+ /** Identify website technologies by category, with homepage or bounded site coverage metadata. */
1665
+ stack: (domain: string, opts?: StackOptions) => Promise<Stack>;
1625
1666
  /** Check whether a domain is registered. Deep adds registration dates, registrar, status and DNSSEC on paid plans. */
1626
1667
  domain: (domain: string, opts?: DomainOptions) => Promise<Domain>;
1627
1668
  asn: (asn: string, opts?: AsnOptions) => Promise<Asn>;
@@ -1675,4 +1716,4 @@ declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
1675
1716
  };
1676
1717
  type ParseAPIClient = ReturnType<typeof parseAPI>;
1677
1718
 
1678
- export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Ip, type IpDeep, type IpOptions, type IpSelfOptions, type Language, type LanguageDeep, type LanguageOption, type LanguageOptions, type Mac, type MacOptions, type Measure, type MeasureChoice, type MeasureOptions, type MeasureUnit, type MeasureUnits, type MeasureUnitsOptions, type Mx, type MxOptions, type MxRecord, type Naics, type NaicsChild, type NaicsCorrection, type NaicsDeep, type NaicsExclusion, type NaicsMatch, type NaicsOptions, type NaicsSearch, type NaicsSearchItem, type NaicsSearchOptions, type Name, type NameDeep, type NameOptions, type Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type PostalMetro, type PostalMetrosDeep, type PostalNearby, type PostalNearbyItem, type PostalNearbyOptions, type PostalOptions, type Preflight, type PreflightCost, type PreflightEmailCapacity, type PreflightOperation, type PreflightOperationEstimate, type PreflightPooledCapacity, type PreflightSpendCapacity, type PreflightTask, type PropertyTax, type RequestOptions, type State, type StateDeep, type StateDistrictDeep, type StateDistrictItem, type StateDistricts, type StateDistrictsOptions, type StateOptions, type Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type TimeOptions, type Timezone, type TimezoneAtOptions, type TimezoneConversionTarget, type TimezoneConversionTargetDeep, type TimezoneDeep, type TimezoneNextDst, type TimezoneOptions, type Useragent, type UseragentBrowserBrand, type UseragentBrowserDeep, type UseragentDeep, type UseragentDeviceDeep, type UseragentEngineDeep, type UseragentOptions, type UseragentOsDeep, type Vat, type VatAddress, type VatDeep, type VatOptions, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
1719
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type Asn, type AsnOptions, type Bin, type BinOptions, type Bloc, type BlocCountries, type BlocCountriesOptions, type BlocCountryItem, type BlocOptions, type Caller, type CallerOptions, type Carrier, type CarrierDeep, type CarrierOptions, type City, type CityDeep, type CityIdOptions, type CityNearby, type CityNearbyOptions, type CityNearest, type CityNearestOptions, type CityOptions, type CitySearch, type CitySearchOptions, type Company, type CompanyCountry, type CompanyDeep, type CompanyOptions, type Continent, type ContinentCountries, type ContinentCountriesOptions, type ContinentCountryItem, type ContinentOptions, type Country, type CountryDeep, type CountryElevationPoint, type CountryEmergency, type CountryOptions, type CountryStateItem, type CountryStates, type CountryStatesOptions, type Currency, type CurrencyDeep, type CurrencyOptions, type CurrencyRate, type CurrencyRateOptions, type DateInfo, type DateInfoDeep, type DateOptions, type DateTodayOptions, type Deep, type District, type DistrictDeep, type DistrictOptions, type Dns, type DnsOptions, type DnsRecord, type Domain, type DomainDeep, type DomainOptions, type DomainRegistration, type Elevation, type ElevationOptions, type Email, type EmailDeep, type EmailOptions, type Emoji, type EmojiDeep, type EmojiOptions, type EmojiSearch, type EmojiSearchOptions, type EmojiSkin, type Hlr, type HlrDeep, type HlrOptions, type Holiday, type HolidayDate, type HolidayDateOptions, type HolidayOptions, type HolidayYear, type Iban, type IbanDeep, type IbanOptions, type Ip, type IpDeep, type IpOptions, type IpSelfOptions, type Language, type LanguageDeep, type LanguageOption, type LanguageOptions, type Mac, type MacOptions, type Measure, type MeasureChoice, type MeasureOptions, type MeasureUnit, type MeasureUnits, type MeasureUnitsOptions, type Mx, type MxOptions, type MxRecord, type Naics, type NaicsChild, type NaicsCorrection, type NaicsDeep, type NaicsExclusion, type NaicsMatch, type NaicsOptions, type NaicsSearch, type NaicsSearchItem, type NaicsSearchOptions, type Name, type NameDeep, type NameOptions, type Npi, type NpiDeep, type NpiEnrollment, type NpiOptions, type ParseAPIClient, ParseAPIError, type ParseAPIOptions, type Phone, type PhoneDeep, type PhoneOptions, type Point, type PointCity, type PointDeep, type PointOptions, type Postal, type PostalDeep, type PostalDistance, type PostalDistanceEnd, type PostalDistanceOptions, type 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 Tariff, type TariffDeep, type TariffMeasure, type TariffOptions, type TariffSearch, type TariffSearchHit, type TariffSearchOptions, type Time, type TimeAtOptions, type TimeOptions, type Timezone, type TimezoneAtOptions, type TimezoneConversionTarget, type TimezoneConversionTargetDeep, type TimezoneDeep, type TimezoneNextDst, type TimezoneOptions, type Useragent, type UseragentBrowserBrand, type UseragentBrowserDeep, type UseragentDeep, type UseragentDeviceDeep, type UseragentEngineDeep, type UseragentOptions, type UseragentOsDeep, type Vat, type VatAddress, type VatDeep, type VatOptions, type Vin, type VinDeep, type VinOptions, type VinRecall, type Weather, type WeatherAir, type WeatherAlert, type WeatherCurrent, type WeatherCurrentDeep, type WeatherDay, type WeatherDeep, type WeatherForecastPeriod, type WeatherHistory, type WeatherHour, type WeatherMinute, type WeatherOptions, type WeatherStation, parseAPI };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var VERSION = "1.2.0";
2
+ var VERSION = "1.4.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;
@@ -77,7 +77,8 @@ function parseAPI(apiKey, options = {}) {
77
77
  throw new Error("parseAPI: missing API key. Pass one or set PARSEAPI_KEY.");
78
78
  }
79
79
  const baseUrl = (options.baseUrl ?? env("PARSEAPI_BASE_URL") ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
80
- const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
80
+ const configuredTimeoutMs = options.timeoutMs;
81
+ const timeoutMs = configuredTimeoutMs ?? DEFAULT_TIMEOUT_MS;
81
82
  const configuredRetries = options.retries;
82
83
  validateTimeout(timeoutMs);
83
84
  validateRetries(configuredRetries);
@@ -85,7 +86,7 @@ function parseAPI(apiKey, options = {}) {
85
86
  async function request(path, query, headers, controls = {}, json) {
86
87
  const signal = controls.signal;
87
88
  signal?.throwIfAborted();
88
- const attemptTimeout = controls.timeoutMs ?? timeoutMs;
89
+ const attemptTimeout = controls.timeoutMs ?? configuredTimeoutMs ?? (path.startsWith("/stack/") ? 35e3 : timeoutMs);
89
90
  const retries = controls.retries ?? configuredRetries ?? (metered(path, query) ? 0 : DEFAULT_RETRIES);
90
91
  validateTimeout(attemptTimeout);
91
92
  validateRetries(retries);
@@ -252,6 +253,8 @@ function parseAPI(apiKey, options = {}) {
252
253
  caller: (number, opts) => request(`/caller/${enc(number)}`, { country: opts?.country }, void 0, opts),
253
254
  /** Look up phone status at the last check. Live means assigned and connected means reachable at that check. Cached results may be returned. Null means unconfirmed. Deep adds network diagnostics within the same metered lookup. No automatic retries by default. */
254
255
  hlr: (number, opts) => request(`/hlr/${enc(number)}`, { country: opts?.country, ...deepQuery(opts) }, void 0, opts),
256
+ /** Identify website technologies by category, with homepage or bounded site coverage metadata. */
257
+ stack: (domain, opts) => request(`/stack/${enc(domain)}`, { ...deepQuery(opts), pretty: opts?.pretty }, void 0, opts),
255
258
  /** Check whether a domain is registered. Deep adds registration dates, registrar, status and DNSSEC on paid plans. */
256
259
  domain: (domain, opts) => request(`/domain/${enc(domain)}`, deepQuery(opts), void 0, opts),
257
260
  asn: (asn, opts) => request(`/asn/${enc(asn)}`, void 0, void 0, opts),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parseapi/sdk",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Official ParseAPI client for Node and TypeScript. One key, minimal JSON, fast.",
5
5
  "keywords": [
6
6
  "parseapi",