@land-catalyst/batch-data-sdk 1.5.3 → 1.6.1

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)
@@ -152,6 +152,48 @@ exports.PROPERTY_DATA_DOMAINS = [
152
152
  investmentRelevance: "Demographics inform communication approach. Senior owners may be considering downsizing. Income and net worth estimates help gauge financial position and deal size capability.",
153
153
  keyFields: ["estimatedAge", "estimatedIncome", "estimatedNetWorth"],
154
154
  },
155
+ {
156
+ name: "deedHistory",
157
+ description: "Ownership transfer and deed transaction history",
158
+ investmentRelevance: "Deed history reveals ownership chain, flip activity, and distress signals. Frequent transfers indicate investor activity or problem properties. Inter-family transfers suggest inheritance situations. REO sales confirm prior foreclosure. Sale price trends reveal appreciation or depreciation patterns.",
159
+ keyFields: [
160
+ "buyers",
161
+ "sellers",
162
+ "salePrice",
163
+ "saleDate",
164
+ "documentType",
165
+ "newConstruction",
166
+ "interFamily",
167
+ ],
168
+ },
169
+ {
170
+ name: "mortgageHistory",
171
+ description: "Mortgage origination and refinance history",
172
+ investmentRelevance: "Mortgage history exposes refinance patterns, rate exposure, and lender diversity. Multiple recent refinances may indicate cash-out activity or financial pressure. High interest rates on older loans suggest refinance opportunity. Loan term and type reveal owner's financial strategy.",
173
+ keyFields: [
174
+ "loanAmount",
175
+ "interestRate",
176
+ "lenderName",
177
+ "loanType",
178
+ "loanTermMonths",
179
+ "recordingDate",
180
+ "borrowers",
181
+ ],
182
+ },
183
+ {
184
+ name: "listing",
185
+ description: "Current and historical MLS listing information",
186
+ investmentRelevance: "Listing data reveals market positioning and seller motivation. Failed listings or price reductions indicate motivated sellers. Days on market above area average suggests overpricing or property issues. Sold price vs list price ratio shows negotiation leverage. Rental listings indicate investor-owned properties.",
187
+ keyFields: [
188
+ "status",
189
+ "price",
190
+ "soldPrice",
191
+ "soldDate",
192
+ "originalListingDate",
193
+ "rental",
194
+ "failedListingDate",
195
+ ],
196
+ },
155
197
  ];
156
198
  /**
157
199
  * Extract key motivation signals from property data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@land-catalyst/batch-data-sdk",
3
- "version": "1.5.3",
3
+ "version": "1.6.1",
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",
@@ -22,9 +22,9 @@
22
22
  "generate:docs": "npx tsx scripts/generate-property-type-docs.ts",
23
23
  "add:jsdoc": "node scripts/add-jsdoc-to-types.js",
24
24
  "preversion": "npm run build",
25
- "v:patch": "npm version patch && git push --follow-tags",
26
- "v:minor": "npm version minor && git push --follow-tags",
27
- "v:major": "npm version major && git push --follow-tags"
25
+ "v:patch": "npm version patch --no-git-tag-version && bash scripts/tag-and-push.sh",
26
+ "v:minor": "npm version minor --no-git-tag-version && bash scripts/tag-and-push.sh",
27
+ "v:major": "npm version major --no-git-tag-version && bash scripts/tag-and-push.sh"
28
28
  },
29
29
  "keywords": [
30
30
  "batchdata",
@@ -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"