@land-catalyst/batch-data-sdk 1.5.2 → 1.6.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.
@@ -16,7 +16,7 @@
16
16
  * .build();
17
17
  * ```
18
18
  */
19
- import { StringFilter, NumericRangeFilter, DateRangeFilter, GeoLocationDistance, GeoLocationBoundingBox, GeoLocationPolygon, AddressSearchCriteria, AssessmentSearchCriteria, BuildingSearchCriteria, CompAddressSearchCriteria, DemographicsSearchCriteria, ForeclosureSearchCriteria, GeneralSearchCriteria, IdsSearchCriteria, IntelSearchCriteria, InvoluntaryLienSearchCriteria, LegalSearchCriteria, ListingSearchCriteria, LotSearchCriteria, OpenLienSearchCriteria, OwnerSearchCriteria, PermitSearchCriteria, PropertyOwnerProfileSearchCriteria, SaleSearchCriteria, TaxSearchCriteria, ValuationSearchCriteria, OrSearchCriteria, SearchCriteria, DeliveryConfig, EventHubConfig, PropertySubscriptionRequest, QuickListValueWithNot, PropertyLookupRequest, PropertyLookupRequestItem, PropertyLookupRequestAddress, PropertyLookupOptions, PropertyPermitRequest, PropertyCountRequest, PropertySearchRequest, PropertySearchAsyncRequest, PropertyLookupAsyncRequest, RequestWithLookupOptions, RequestWithSearchCriteria, GeoPoint, AirConditioningSource, BasementType, BuildingClass, BuildingCondition, BuildingQuality, ConstructionType, Driveway, ExteriorWalls, FloorCover, Garage, HeatSource, HeatingFuelType, InteriorWalls, Patio, Pool, Porch, RoofCover, RoofType, Sewer, Style, WaterService, Features, HomeownerRenter, BusinessOwner, Gender, Investments, DemographicsValue, ReligiousAffiliation, ForeclosureStatus, PropertyTypeCategory, PropertyTypeDetail, LienType, LienTypeCode, LoanType, OwnerStatusType, LastSaleDocumentType, ZoningCode } from "../core/types";
19
+ import { StringFilter, NumericRangeFilter, DateRangeFilter, GeoLocationDistance, GeoLocationBoundingBox, GeoLocationPolygon, AddressSearchCriteria, AssessmentSearchCriteria, BuildingSearchCriteria, CompAddressSearchCriteria, DemographicsSearchCriteria, ForeclosureSearchCriteria, GeneralSearchCriteria, IdsSearchCriteria, IntelSearchCriteria, InvoluntaryLienSearchCriteria, LegalSearchCriteria, ListingSearchCriteria, LotSearchCriteria, OpenLienSearchCriteria, OwnerSearchCriteria, PermitSearchCriteria, PropertyOwnerProfileSearchCriteria, SaleSearchCriteria, TaxSearchCriteria, ValuationSearchCriteria, OrSearchCriteria, SearchCriteria, DeliveryConfig, EventHubConfig, PropertySubscriptionRequest, QuickListValueWithNot, PropertyLookupRequest, PropertyLookupRequestItem, PropertyLookupRequestAddress, PropertyLookupOptions, PropertyPermitRequest, PropertyCountRequest, PropertySearchRequest, PropertySearchAsyncRequest, PropertyLookupAsyncRequest, RequestWithLookupOptions, RequestWithSearchCriteria, GeoPoint, AirConditioningSource, BasementType, BuildingClass, BuildingCondition, BuildingQuality, ConstructionType, Driveway, ExteriorWalls, FloorCover, Garage, HeatSource, HeatingFuelType, InteriorWalls, Patio, Pool, Porch, RoofCover, RoofType, Sewer, Style, WaterService, Features, HomeownerRenter, BusinessOwner, Gender, Investments, DemographicsValue, ReligiousAffiliation, ForeclosureStatus, PropertyTypeCategory, PropertyTypeDetail, LienType, LienTypeCode, LoanType, OwnerStatusType, LastSaleDocumentType, ZoningCode, Dataset } from "../core/types";
20
20
  import type { PropertyFieldMetadata } from "../property-field/metadata";
21
21
  /**
22
22
  * Base interface for all builders
@@ -863,6 +863,18 @@ export declare class PropertyLookupOptionsBuilder {
863
863
  dateFormat(format: string): this;
864
864
  sort(field: string, order: "asc" | "desc" | "random", sessionId?: string): this;
865
865
  useSubdivision(enabled: boolean): this;
866
+ /**
867
+ * Specify which data sections to include in the response.
868
+ * Max 5 items. 'basic' and 'core' are mutually exclusive.
869
+ * If not specified, all datasets allowed for the API token are returned.
870
+ */
871
+ datasets(...datasets: Dataset[]): this;
872
+ /**
873
+ * Field-level projection to include/exclude specific fields.
874
+ * Use 1 to include, 0 to exclude.
875
+ * e.g. projection({ "address": 1, "owner.phoneNumbers": 0 })
876
+ */
877
+ projection(fields: Record<string, 0 | 1>): this;
866
878
  build(): PropertyLookupOptions;
867
879
  }
868
880
  /**
@@ -2480,6 +2480,24 @@ class PropertyLookupOptionsBuilder {
2480
2480
  this.options.useSubdivision = enabled;
2481
2481
  return this;
2482
2482
  }
2483
+ /**
2484
+ * Specify which data sections to include in the response.
2485
+ * Max 5 items. 'basic' and 'core' are mutually exclusive.
2486
+ * If not specified, all datasets allowed for the API token are returned.
2487
+ */
2488
+ datasets(...datasets) {
2489
+ this.options.datasets = datasets;
2490
+ return this;
2491
+ }
2492
+ /**
2493
+ * Field-level projection to include/exclude specific fields.
2494
+ * Use 1 to include, 0 to exclude.
2495
+ * e.g. projection({ "address": 1, "owner.phoneNumbers": 0 })
2496
+ */
2497
+ projection(fields) {
2498
+ this.options.projection = fields;
2499
+ return this;
2500
+ }
2483
2501
  build() {
2484
2502
  return this.options;
2485
2503
  }
@@ -1932,6 +1932,14 @@ export type RequestWithLookupOptionsType = PropertySearchRequest | PropertySearc
1932
1932
  * Useful for writing generic functions that work with search-based requests
1933
1933
  */
1934
1934
  export type RequestWithSearchCriteriaType = PropertySearchRequest | PropertySearchAsyncRequest | PropertySubscriptionRequest;
1935
+ /**
1936
+ * Specifies which data sections to include in the response.
1937
+ * If not specified in the request, all datasets allowed for the API token are returned.
1938
+ * Only datasets that are both requested AND permitted for the API token will be included.
1939
+ * Note: 'basic' and 'core' are mutually exclusive — you can only request one or the other, not both.
1940
+ * Max 5 items per request.
1941
+ */
1942
+ export type Dataset = "basic" | "batchrank" | "contact" | "core" | "deed" | "demographic" | "foreclosure" | "image" | "listing" | "mortgage-liens" | "owner" | "permit" | "quicklist" | "valuation";
1935
1943
  /**
1936
1944
  * Property lookup options (shared with property search)
1937
1945
  */
@@ -1980,6 +1988,10 @@ export interface PropertyLookupOptions {
1980
1988
  sessionId?: string;
1981
1989
  };
1982
1990
  useSubdivision?: boolean;
1991
+ /** Specifies which data sections to include in the response. Max 5 items. */
1992
+ datasets?: Dataset[];
1993
+ /** Field-level projection to include/exclude specific fields from the response. */
1994
+ projection?: Record<string, 0 | 1>;
1983
1995
  }
1984
1996
  /**
1985
1997
  * Property search request (synchronous)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@land-catalyst/batch-data-sdk",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "description": "TypeScript SDK for BatchData.io Property API - Types, Builders, and Utilities",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,7 +38,8 @@
38
38
  "license": "MIT",
39
39
  "repository": {
40
40
  "type": "git",
41
- "url": "git+https://github.com/land-catalyst/batch-data-sdk.git"
41
+ "url": "git+https://github.com/land-catalyst/land-catalyst.git",
42
+ "directory": "packages/batch-data-sdk"
42
43
  },
43
44
  "dependencies": {
44
45
  "axios": "^1.7.9"