@parseapi/sdk 1.9.0 → 1.10.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/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.9.0";
27
+ var VERSION = "1.10.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;
@@ -214,6 +214,16 @@ function parseAPI(apiKey, options = {}) {
214
214
  }
215
215
  );
216
216
  return {
217
+ /** Create a bounded task. Reuse the same request ID and inputs on retries. */
218
+ task: Object.assign(
219
+ (input, requestId, opts) => request("/task", void 0, { "Idempotency-Key": requestId }, opts, input),
220
+ {
221
+ get: (id, opts) => request(`/task/${enc(id)}`, void 0, void 0, opts),
222
+ cancel: (id, opts) => request(`/task/${enc(id)}/cancel`, void 0, void 0, opts, {}),
223
+ /** Reuse requestId with identical inputs to recover the saved result without another lookup or charge. */
224
+ lookup: (id, input, requestId, opts) => request(`/task/${enc(id)}/lookup`, void 0, { "Idempotency-Key": requestId }, opts, input)
225
+ }
226
+ ),
217
227
  /** Estimate task access, capacity and additional charges. Requires a secret key. Reserves no units or money and does not enforce the supplied budget. */
218
228
  preflight: (task, opts) => request("/preflight", void 0, void 0, opts, task),
219
229
  /** Look up an IP. `deep: true` adds enrichment included with a paid plan, without a separate check meter. */
package/dist/index.d.cts CHANGED
@@ -1752,7 +1752,7 @@ interface IbanDeep {
1752
1752
 
1753
1753
  /** A proposed task contains operation counts, never lookup inputs. */
1754
1754
  interface PreflightOperation {
1755
- operation: 'email' | 'domain' | 'dns' | 'mx' | 'country';
1755
+ operation: 'email' | 'domain' | 'dns' | 'mx' | 'country' | 'vat' | 'carrier' | 'caller' | 'hlr' | 'ip' | 'phone' | 'postal';
1756
1756
  /** Positive integer, at most 100000. */
1757
1757
  count: number;
1758
1758
  deep?: boolean;
@@ -1833,6 +1833,16 @@ interface Preflight {
1833
1833
  operations: PreflightOperationEstimate[];
1834
1834
  cost: PreflightCost;
1835
1835
  capacity: {
1836
+ meters?: Record<string, {
1837
+ advisory: true;
1838
+ required_max: number;
1839
+ included_limit: number;
1840
+ reserved_at_snapshot: number | null;
1841
+ unallocated_included_at_snapshot: number | null;
1842
+ on_demand_enabled: boolean | null;
1843
+ on_demand_unit_price_usd: string | null;
1844
+ reset_at: number;
1845
+ }>;
1836
1846
  pooled_requests: PreflightPooledCapacity;
1837
1847
  email_verifications: PreflightEmailCapacity;
1838
1848
  shared_on_demand_spend: PreflightSpendCapacity;
@@ -1846,6 +1856,58 @@ interface Preflight {
1846
1856
  warnings: string[];
1847
1857
  }
1848
1858
 
1859
+ /** Additional-charge budget enforced only for lookups run through this task. */
1860
+ interface AgentTaskInput {
1861
+ operations: PreflightOperation[];
1862
+ budget_usd: string;
1863
+ }
1864
+ interface AgentTaskLookupInput {
1865
+ operation: PreflightOperation['operation'];
1866
+ value: string;
1867
+ deep?: boolean;
1868
+ country?: string;
1869
+ }
1870
+ interface AgentTask {
1871
+ id: string;
1872
+ status: string;
1873
+ api_version: string;
1874
+ created_at: string;
1875
+ expires_at: string;
1876
+ result_expires_at: string;
1877
+ budget: {
1878
+ currency: string;
1879
+ enforced: true;
1880
+ maximum_usd: string;
1881
+ spent_usd: string;
1882
+ reserved_usd: string;
1883
+ remaining_usd: string;
1884
+ };
1885
+ operations: {
1886
+ operation: string;
1887
+ deep: boolean;
1888
+ count: number;
1889
+ allocated: number;
1890
+ completed: number;
1891
+ remaining: number;
1892
+ }[];
1893
+ }
1894
+ /** Inspect status_code and result. Saved errors also replay without new usage. */
1895
+ interface AgentTaskResult<T = unknown> {
1896
+ status_code: number;
1897
+ result: T;
1898
+ receipt: {
1899
+ task_id: string;
1900
+ request_id: string;
1901
+ operation: string;
1902
+ deep: boolean;
1903
+ metered_unit: boolean;
1904
+ additional_cost_usd: string;
1905
+ checked_at: string;
1906
+ api_version: string;
1907
+ retry_after?: string;
1908
+ };
1909
+ }
1910
+
1849
1911
  /** Every non-2xx response from the API. Branch on `code`, never on `message`. */
1850
1912
  declare class ParseAPIError extends Error {
1851
1913
  /** HTTP status */
@@ -2141,6 +2203,13 @@ interface DeepOption {
2141
2203
  deep?: boolean;
2142
2204
  }
2143
2205
  declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
2206
+ /** Create a bounded task. Reuse the same request ID and inputs on retries. */
2207
+ task: ((input: AgentTaskInput, requestId: string, opts?: RequestOptions) => Promise<AgentTask>) & {
2208
+ get: (id: string, opts?: RequestOptions) => Promise<AgentTask>;
2209
+ cancel: (id: string, opts?: RequestOptions) => Promise<AgentTask>;
2210
+ /** Reuse requestId with identical inputs to recover the saved result without another lookup or charge. */
2211
+ lookup: <T = unknown>(id: string, input: AgentTaskLookupInput, requestId: string, opts?: RequestOptions) => Promise<AgentTaskResult<T>>;
2212
+ };
2144
2213
  /** Estimate task access, capacity and additional charges. Requires a secret key. Reserves no units or money and does not enforce the supplied budget. */
2145
2214
  preflight: (task: PreflightTask, opts?: RequestOptions) => Promise<Preflight>;
2146
2215
  /** Look up an IP. `deep: true` adds enrichment included with a paid plan, without a separate check meter. */
@@ -2286,4 +2355,4 @@ type IbanOptions = {
2286
2355
  type NpiOptions = LanguageOption & DeepOption & RequestOptions;
2287
2356
  type BinOptions = DeepOption & RequestOptions;
2288
2357
 
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 };
2358
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type 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
@@ -1752,7 +1752,7 @@ interface IbanDeep {
1752
1752
 
1753
1753
  /** A proposed task contains operation counts, never lookup inputs. */
1754
1754
  interface PreflightOperation {
1755
- operation: 'email' | 'domain' | 'dns' | 'mx' | 'country';
1755
+ operation: 'email' | 'domain' | 'dns' | 'mx' | 'country' | 'vat' | 'carrier' | 'caller' | 'hlr' | 'ip' | 'phone' | 'postal';
1756
1756
  /** Positive integer, at most 100000. */
1757
1757
  count: number;
1758
1758
  deep?: boolean;
@@ -1833,6 +1833,16 @@ interface Preflight {
1833
1833
  operations: PreflightOperationEstimate[];
1834
1834
  cost: PreflightCost;
1835
1835
  capacity: {
1836
+ meters?: Record<string, {
1837
+ advisory: true;
1838
+ required_max: number;
1839
+ included_limit: number;
1840
+ reserved_at_snapshot: number | null;
1841
+ unallocated_included_at_snapshot: number | null;
1842
+ on_demand_enabled: boolean | null;
1843
+ on_demand_unit_price_usd: string | null;
1844
+ reset_at: number;
1845
+ }>;
1836
1846
  pooled_requests: PreflightPooledCapacity;
1837
1847
  email_verifications: PreflightEmailCapacity;
1838
1848
  shared_on_demand_spend: PreflightSpendCapacity;
@@ -1846,6 +1856,58 @@ interface Preflight {
1846
1856
  warnings: string[];
1847
1857
  }
1848
1858
 
1859
+ /** Additional-charge budget enforced only for lookups run through this task. */
1860
+ interface AgentTaskInput {
1861
+ operations: PreflightOperation[];
1862
+ budget_usd: string;
1863
+ }
1864
+ interface AgentTaskLookupInput {
1865
+ operation: PreflightOperation['operation'];
1866
+ value: string;
1867
+ deep?: boolean;
1868
+ country?: string;
1869
+ }
1870
+ interface AgentTask {
1871
+ id: string;
1872
+ status: string;
1873
+ api_version: string;
1874
+ created_at: string;
1875
+ expires_at: string;
1876
+ result_expires_at: string;
1877
+ budget: {
1878
+ currency: string;
1879
+ enforced: true;
1880
+ maximum_usd: string;
1881
+ spent_usd: string;
1882
+ reserved_usd: string;
1883
+ remaining_usd: string;
1884
+ };
1885
+ operations: {
1886
+ operation: string;
1887
+ deep: boolean;
1888
+ count: number;
1889
+ allocated: number;
1890
+ completed: number;
1891
+ remaining: number;
1892
+ }[];
1893
+ }
1894
+ /** Inspect status_code and result. Saved errors also replay without new usage. */
1895
+ interface AgentTaskResult<T = unknown> {
1896
+ status_code: number;
1897
+ result: T;
1898
+ receipt: {
1899
+ task_id: string;
1900
+ request_id: string;
1901
+ operation: string;
1902
+ deep: boolean;
1903
+ metered_unit: boolean;
1904
+ additional_cost_usd: string;
1905
+ checked_at: string;
1906
+ api_version: string;
1907
+ retry_after?: string;
1908
+ };
1909
+ }
1910
+
1849
1911
  /** Every non-2xx response from the API. Branch on `code`, never on `message`. */
1850
1912
  declare class ParseAPIError extends Error {
1851
1913
  /** HTTP status */
@@ -2141,6 +2203,13 @@ interface DeepOption {
2141
2203
  deep?: boolean;
2142
2204
  }
2143
2205
  declare function parseAPI(apiKey?: string, options?: ParseAPIOptions): {
2206
+ /** Create a bounded task. Reuse the same request ID and inputs on retries. */
2207
+ task: ((input: AgentTaskInput, requestId: string, opts?: RequestOptions) => Promise<AgentTask>) & {
2208
+ get: (id: string, opts?: RequestOptions) => Promise<AgentTask>;
2209
+ cancel: (id: string, opts?: RequestOptions) => Promise<AgentTask>;
2210
+ /** Reuse requestId with identical inputs to recover the saved result without another lookup or charge. */
2211
+ lookup: <T = unknown>(id: string, input: AgentTaskLookupInput, requestId: string, opts?: RequestOptions) => Promise<AgentTaskResult<T>>;
2212
+ };
2144
2213
  /** Estimate task access, capacity and additional charges. Requires a secret key. Reserves no units or money and does not enforce the supplied budget. */
2145
2214
  preflight: (task: PreflightTask, opts?: RequestOptions) => Promise<Preflight>;
2146
2215
  /** Look up an IP. `deep: true` adds enrichment included with a paid plan, without a separate check meter. */
@@ -2286,4 +2355,4 @@ type IbanOptions = {
2286
2355
  type NpiOptions = LanguageOption & DeepOption & RequestOptions;
2287
2356
  type BinOptions = DeepOption & RequestOptions;
2288
2357
 
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 };
2358
+ export { type Address, type AddressOptions, type AddressSearch, type AddressSearchOptions, type AddressSuggestion, type AgentTask, type AgentTaskInput, type AgentTaskLookupInput, type AgentTaskResult, type Asn, type AsnOptions, type Bank, type BankChecks, type BankDeep, type BankDirectory, type BankIssue, type BankOptions, type BankRequirementField, type BankRequirements, type BankRequirementsOptions, type BankUsAch, type BankUsAchChecks, type BankUsAchInput, type Bin, type BinOptions, type 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.9.0";
2
+ var VERSION = "1.10.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;
@@ -189,6 +189,16 @@ function parseAPI(apiKey, options = {}) {
189
189
  }
190
190
  );
191
191
  return {
192
+ /** Create a bounded task. Reuse the same request ID and inputs on retries. */
193
+ task: Object.assign(
194
+ (input, requestId, opts) => request("/task", void 0, { "Idempotency-Key": requestId }, opts, input),
195
+ {
196
+ get: (id, opts) => request(`/task/${enc(id)}`, void 0, void 0, opts),
197
+ cancel: (id, opts) => request(`/task/${enc(id)}/cancel`, void 0, void 0, opts, {}),
198
+ /** Reuse requestId with identical inputs to recover the saved result without another lookup or charge. */
199
+ lookup: (id, input, requestId, opts) => request(`/task/${enc(id)}/lookup`, void 0, { "Idempotency-Key": requestId }, opts, input)
200
+ }
201
+ ),
192
202
  /** Estimate task access, capacity and additional charges. Requires a secret key. Reserves no units or money and does not enforce the supplied budget. */
193
203
  preflight: (task, opts) => request("/preflight", void 0, void 0, opts, task),
194
204
  /** Look up an IP. `deep: true` adds enrichment included with a paid plan, without a separate check meter. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parseapi/sdk",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Official ParseAPI client for Node and TypeScript. One key, minimal JSON, fast.",
5
5
  "keywords": [
6
6
  "parseapi",