@land-catalyst/batch-data-sdk 1.2.6 → 1.2.9
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/builders/builders.d.ts +94 -81
- package/dist/builders/builders.js +123 -14
- package/dist/client/client.d.ts +7 -3
- package/dist/client/client.interface.d.ts +7 -3
- package/dist/client/client.js +8 -5
- package/dist/core/types.d.ts +137 -48
- package/dist/property-field/metadata.d.ts +57 -0
- package/dist/property-field/metadata.js +1276 -1
- package/dist/property-field/search-criteria-ai-context.js +193 -12
- package/dist/property-field/search-criteria-filter-context.d.ts +14 -0
- package/dist/property-field/search-criteria-filter-context.js +102 -32
- package/package.json +2 -1
|
@@ -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, PropertySearchRequest, PropertySearchAsyncRequest, PropertyLookupAsyncRequest, GeoPoint } 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, 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";
|
|
20
20
|
import type { PropertyFieldMetadata } from "../property-field/metadata";
|
|
21
21
|
/**
|
|
22
22
|
* Base interface for all builders
|
|
@@ -147,18 +147,19 @@ declare abstract class BaseBuilder<T> implements Builder<T> {
|
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Base builder for string filters
|
|
150
|
+
* @template T - Optional union type of allowed string values. Defaults to `string` for backward compatibility.
|
|
150
151
|
*/
|
|
151
|
-
export declare class StringFilterBuilder implements Builder<StringFilter
|
|
152
|
+
export declare class StringFilterBuilder<T extends string = string> implements Builder<StringFilter<T>> {
|
|
152
153
|
private filter;
|
|
153
|
-
static from(filter: StringFilter): StringFilterBuilder
|
|
154
|
-
equals(value:
|
|
154
|
+
static from<T extends string = string>(filter: StringFilter<T>): StringFilterBuilder<T>;
|
|
155
|
+
equals(value: T): this;
|
|
155
156
|
contains(value: string): this;
|
|
156
157
|
startsWith(value: string): this;
|
|
157
158
|
endsWith(value: string): this;
|
|
158
|
-
inList(values:
|
|
159
|
-
notInList(values:
|
|
160
|
-
matches(patterns:
|
|
161
|
-
build(): StringFilter
|
|
159
|
+
inList(values: T[]): this;
|
|
160
|
+
notInList(values: T[]): this;
|
|
161
|
+
matches(patterns: T[]): this;
|
|
162
|
+
build(): StringFilter<T>;
|
|
162
163
|
}
|
|
163
164
|
/**
|
|
164
165
|
* Base builder for numeric range filters
|
|
@@ -286,36 +287,36 @@ export declare class AssessmentSearchCriteriaBuilder extends BaseBuilder<Assessm
|
|
|
286
287
|
export declare class BuildingSearchCriteriaBuilder extends BaseBuilder<BuildingSearchCriteria> {
|
|
287
288
|
protected criteria: BuildingSearchCriteria;
|
|
288
289
|
static from(criteria: BuildingSearchCriteria): BuildingSearchCriteriaBuilder;
|
|
289
|
-
airConditioningSource(filter: StringFilter): this;
|
|
290
|
-
airConditioningSource(configurator: (builder: StringFilterBuilder) => void): this;
|
|
291
|
-
basementType(filter: StringFilter): this;
|
|
292
|
-
basementType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
290
|
+
airConditioningSource(filter: StringFilter<AirConditioningSource>): this;
|
|
291
|
+
airConditioningSource(configurator: (builder: StringFilterBuilder<AirConditioningSource>) => void): this;
|
|
292
|
+
basementType(filter: StringFilter<BasementType>): this;
|
|
293
|
+
basementType(configurator: (builder: StringFilterBuilder<BasementType>) => void): this;
|
|
293
294
|
totalBuildingAreaSquareFeet(filter: NumericRangeFilter): this;
|
|
294
295
|
totalBuildingAreaSquareFeet(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
295
|
-
buildingClass(filter: StringFilter): this;
|
|
296
|
-
buildingClass(configurator: (builder: StringFilterBuilder) => void): this;
|
|
297
|
-
buildingCondition(filter: StringFilter): this;
|
|
298
|
-
buildingCondition(configurator: (builder: StringFilterBuilder) => void): this;
|
|
299
|
-
buildingQuality(filter: StringFilter): this;
|
|
300
|
-
buildingQuality(configurator: (builder: StringFilterBuilder) => void): this;
|
|
296
|
+
buildingClass(filter: StringFilter<BuildingClass>): this;
|
|
297
|
+
buildingClass(configurator: (builder: StringFilterBuilder<BuildingClass>) => void): this;
|
|
298
|
+
buildingCondition(filter: StringFilter<BuildingCondition>): this;
|
|
299
|
+
buildingCondition(configurator: (builder: StringFilterBuilder<BuildingCondition>) => void): this;
|
|
300
|
+
buildingQuality(filter: StringFilter<BuildingQuality>): this;
|
|
301
|
+
buildingQuality(configurator: (builder: StringFilterBuilder<BuildingQuality>) => void): this;
|
|
301
302
|
buildingType(filter: StringFilter): this;
|
|
302
303
|
buildingType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
303
|
-
driveway(filter: StringFilter): this;
|
|
304
|
-
driveway(configurator: (builder: StringFilterBuilder) => void): this;
|
|
305
|
-
exteriorWalls(filter: StringFilter): this;
|
|
306
|
-
exteriorWalls(configurator: (builder: StringFilterBuilder) => void): this;
|
|
307
|
-
floorCover(filter: StringFilter): this;
|
|
308
|
-
floorCover(configurator: (builder: StringFilterBuilder) => void): this;
|
|
304
|
+
driveway(filter: StringFilter<Driveway>): this;
|
|
305
|
+
driveway(configurator: (builder: StringFilterBuilder<Driveway>) => void): this;
|
|
306
|
+
exteriorWalls(filter: StringFilter<ExteriorWalls>): this;
|
|
307
|
+
exteriorWalls(configurator: (builder: StringFilterBuilder<ExteriorWalls>) => void): this;
|
|
308
|
+
floorCover(filter: StringFilter<FloorCover>): this;
|
|
309
|
+
floorCover(configurator: (builder: StringFilterBuilder<FloorCover>) => void): this;
|
|
309
310
|
garageParkingSpaceCount(filter: NumericRangeFilter): this;
|
|
310
311
|
garageParkingSpaceCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
311
|
-
garage(filter: StringFilter): this;
|
|
312
|
-
garage(configurator: (builder: StringFilterBuilder) => void): this;
|
|
313
|
-
heatSource(filter: StringFilter): this;
|
|
314
|
-
heatSource(configurator: (builder: StringFilterBuilder) => void): this;
|
|
315
|
-
heatingFuelType(filter: StringFilter): this;
|
|
316
|
-
heatingFuelType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
317
|
-
interiorWalls(filter: StringFilter): this;
|
|
318
|
-
interiorWalls(configurator: (builder: StringFilterBuilder) => void): this;
|
|
312
|
+
garage(filter: StringFilter<Garage>): this;
|
|
313
|
+
garage(configurator: (builder: StringFilterBuilder<Garage>) => void): this;
|
|
314
|
+
heatSource(filter: StringFilter<HeatSource>): this;
|
|
315
|
+
heatSource(configurator: (builder: StringFilterBuilder<HeatSource>) => void): this;
|
|
316
|
+
heatingFuelType(filter: StringFilter<HeatingFuelType>): this;
|
|
317
|
+
heatingFuelType(configurator: (builder: StringFilterBuilder<HeatingFuelType>) => void): this;
|
|
318
|
+
interiorWalls(filter: StringFilter<InteriorWalls>): this;
|
|
319
|
+
interiorWalls(configurator: (builder: StringFilterBuilder<InteriorWalls>) => void): this;
|
|
319
320
|
buildingCount(filter: NumericRangeFilter): this;
|
|
320
321
|
buildingCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
321
322
|
bathroomCount(filter: NumericRangeFilter): this;
|
|
@@ -324,34 +325,34 @@ export declare class BuildingSearchCriteriaBuilder extends BaseBuilder<BuildingS
|
|
|
324
325
|
calculatedBathroomCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
325
326
|
bedroomCount(filter: NumericRangeFilter): this;
|
|
326
327
|
bedroomCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
327
|
-
patio(filter: StringFilter): this;
|
|
328
|
-
patio(configurator: (builder: StringFilterBuilder) => void): this;
|
|
328
|
+
patio(filter: StringFilter<Patio>): this;
|
|
329
|
+
patio(configurator: (builder: StringFilterBuilder<Patio>) => void): this;
|
|
329
330
|
storyCount(filter: NumericRangeFilter): this;
|
|
330
331
|
storyCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
331
|
-
features(filter: StringFilter): this;
|
|
332
|
-
features(configurator: (builder: StringFilterBuilder) => void): this;
|
|
332
|
+
features(filter: StringFilter<Features>): this;
|
|
333
|
+
features(configurator: (builder: StringFilterBuilder<Features>) => void): this;
|
|
333
334
|
residentialUnitCount(filter: NumericRangeFilter): this;
|
|
334
335
|
residentialUnitCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
335
|
-
pool(filter: StringFilter): this;
|
|
336
|
-
pool(configurator: (builder: StringFilterBuilder) => void): this;
|
|
337
|
-
porch(filter: StringFilter): this;
|
|
338
|
-
porch(configurator: (builder: StringFilterBuilder) => void): this;
|
|
339
|
-
roofCover(filter: StringFilter): this;
|
|
340
|
-
roofCover(configurator: (builder: StringFilterBuilder) => void): this;
|
|
341
|
-
roofType(filter: StringFilter): this;
|
|
342
|
-
roofType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
343
|
-
sewer(filter: StringFilter): this;
|
|
344
|
-
sewer(configurator: (builder: StringFilterBuilder) => void): this;
|
|
345
|
-
style(filter: StringFilter): this;
|
|
346
|
-
style(configurator: (builder: StringFilterBuilder) => void): this;
|
|
336
|
+
pool(filter: StringFilter<Pool>): this;
|
|
337
|
+
pool(configurator: (builder: StringFilterBuilder<Pool>) => void): this;
|
|
338
|
+
porch(filter: StringFilter<Porch>): this;
|
|
339
|
+
porch(configurator: (builder: StringFilterBuilder<Porch>) => void): this;
|
|
340
|
+
roofCover(filter: StringFilter<RoofCover>): this;
|
|
341
|
+
roofCover(configurator: (builder: StringFilterBuilder<RoofCover>) => void): this;
|
|
342
|
+
roofType(filter: StringFilter<RoofType>): this;
|
|
343
|
+
roofType(configurator: (builder: StringFilterBuilder<RoofType>) => void): this;
|
|
344
|
+
sewer(filter: StringFilter<Sewer>): this;
|
|
345
|
+
sewer(configurator: (builder: StringFilterBuilder<Sewer>) => void): this;
|
|
346
|
+
style(filter: StringFilter<Style>): this;
|
|
347
|
+
style(configurator: (builder: StringFilterBuilder<Style>) => void): this;
|
|
347
348
|
roomCount(filter: NumericRangeFilter): this;
|
|
348
349
|
roomCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
349
350
|
unitCount(filter: NumericRangeFilter): this;
|
|
350
351
|
unitCount(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
351
|
-
constructionType(filter: StringFilter): this;
|
|
352
|
-
constructionType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
353
|
-
waterService(filter: StringFilter): this;
|
|
354
|
-
waterService(configurator: (builder: StringFilterBuilder) => void): this;
|
|
352
|
+
constructionType(filter: StringFilter<ConstructionType>): this;
|
|
353
|
+
constructionType(configurator: (builder: StringFilterBuilder<ConstructionType>) => void): this;
|
|
354
|
+
waterService(filter: StringFilter<WaterService>): this;
|
|
355
|
+
waterService(configurator: (builder: StringFilterBuilder<WaterService>) => void): this;
|
|
355
356
|
yearBuilt(filter: NumericRangeFilter): this;
|
|
356
357
|
yearBuilt(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
357
358
|
build(): BuildingSearchCriteria;
|
|
@@ -385,18 +386,18 @@ export declare class DemographicsSearchCriteriaBuilder extends BaseBuilder<Demog
|
|
|
385
386
|
netWorth(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
386
387
|
discretionaryIncome(filter: NumericRangeFilter): this;
|
|
387
388
|
discretionaryIncome(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
388
|
-
homeownerRenter(filter: StringFilter): this;
|
|
389
|
-
homeownerRenter(configurator: (builder: StringFilterBuilder) => void): this;
|
|
390
|
-
businessOwner(filter: StringFilter): this;
|
|
391
|
-
businessOwner(configurator: (builder: StringFilterBuilder) => void): this;
|
|
392
|
-
gender(filter: StringFilter): this;
|
|
393
|
-
gender(configurator: (builder: StringFilterBuilder) => void): this;
|
|
389
|
+
homeownerRenter(filter: StringFilter<HomeownerRenter>): this;
|
|
390
|
+
homeownerRenter(configurator: (builder: StringFilterBuilder<HomeownerRenter>) => void): this;
|
|
391
|
+
businessOwner(filter: StringFilter<BusinessOwner>): this;
|
|
392
|
+
businessOwner(configurator: (builder: StringFilterBuilder<BusinessOwner>) => void): this;
|
|
393
|
+
gender(filter: StringFilter<Gender>): this;
|
|
394
|
+
gender(configurator: (builder: StringFilterBuilder<Gender>) => void): this;
|
|
394
395
|
hasChildren(value: boolean): this;
|
|
395
|
-
investments(filter: StringFilter): this;
|
|
396
|
-
investments(configurator: (builder: StringFilterBuilder) => void): this;
|
|
397
|
-
demographics(filter: StringFilter): this;
|
|
398
|
-
demographics(configurator: (builder: StringFilterBuilder) => void): this;
|
|
399
|
-
religiousAffiliation(filter: StringFilter): this;
|
|
396
|
+
investments(filter: StringFilter<Investments>): this;
|
|
397
|
+
investments(configurator: (builder: StringFilterBuilder<Investments>) => void): this;
|
|
398
|
+
demographics(filter: StringFilter<DemographicsValue>): this;
|
|
399
|
+
demographics(configurator: (builder: StringFilterBuilder<DemographicsValue>) => void): this;
|
|
400
|
+
religiousAffiliation(filter: StringFilter<ReligiousAffiliation>): this;
|
|
400
401
|
religiousAffiliation(configurator: (builder: StringFilterBuilder) => void): this;
|
|
401
402
|
}
|
|
402
403
|
/**
|
|
@@ -405,8 +406,8 @@ export declare class DemographicsSearchCriteriaBuilder extends BaseBuilder<Demog
|
|
|
405
406
|
export declare class ForeclosureSearchCriteriaBuilder {
|
|
406
407
|
private criteria;
|
|
407
408
|
static from(criteria: ForeclosureSearchCriteria): ForeclosureSearchCriteriaBuilder;
|
|
408
|
-
status(filter: StringFilter): this;
|
|
409
|
-
status(configurator: (builder: StringFilterBuilder) => void): this;
|
|
409
|
+
status(filter: StringFilter<ForeclosureStatus>): this;
|
|
410
|
+
status(configurator: (builder: StringFilterBuilder<ForeclosureStatus>) => void): this;
|
|
410
411
|
recordingDate(filter: DateRangeFilter): this;
|
|
411
412
|
recordingDate(configurator: (builder: DateRangeFilterBuilder) => void): this;
|
|
412
413
|
auctionDate(filter: DateRangeFilter): this;
|
|
@@ -425,9 +426,9 @@ export declare class ForeclosureSearchCriteriaBuilder {
|
|
|
425
426
|
export declare class GeneralSearchCriteriaBuilder {
|
|
426
427
|
private criteria;
|
|
427
428
|
static from(criteria: GeneralSearchCriteria): GeneralSearchCriteriaBuilder;
|
|
428
|
-
propertyTypeCategory(filter: StringFilter): this;
|
|
429
|
+
propertyTypeCategory(filter: StringFilter<PropertyTypeCategory>): this;
|
|
429
430
|
propertyTypeCategory(configurator: (builder: StringFilterBuilder) => void): this;
|
|
430
|
-
propertyTypeDetail(filter: StringFilter): this;
|
|
431
|
+
propertyTypeDetail(filter: StringFilter<PropertyTypeDetail>): this;
|
|
431
432
|
propertyTypeDetail(configurator: (builder: StringFilterBuilder) => void): this;
|
|
432
433
|
build(): GeneralSearchCriteria;
|
|
433
434
|
}
|
|
@@ -469,10 +470,10 @@ export declare class IntelSearchCriteriaBuilder {
|
|
|
469
470
|
export declare class InvoluntaryLienSearchCriteriaBuilder {
|
|
470
471
|
private criteria;
|
|
471
472
|
static from(criteria: InvoluntaryLienSearchCriteria): InvoluntaryLienSearchCriteriaBuilder;
|
|
472
|
-
lienType(filter: StringFilter): this;
|
|
473
|
-
lienType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
474
|
-
lienTypeCode(filter: StringFilter): this;
|
|
475
|
-
lienTypeCode(configurator: (builder: StringFilterBuilder) => void): this;
|
|
473
|
+
lienType(filter: StringFilter<LienType>): this;
|
|
474
|
+
lienType(configurator: (builder: StringFilterBuilder<LienType>) => void): this;
|
|
475
|
+
lienTypeCode(filter: StringFilter<LienTypeCode>): this;
|
|
476
|
+
lienTypeCode(configurator: (builder: StringFilterBuilder<LienTypeCode>) => void): this;
|
|
476
477
|
documentType(filter: StringFilter): this;
|
|
477
478
|
documentType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
478
479
|
documentTypeCode(filter: StringFilter): this;
|
|
@@ -531,8 +532,8 @@ export declare class LotSearchCriteriaBuilder {
|
|
|
531
532
|
lotFrontageFeet(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
532
533
|
lotSizeSquareFeet(filter: NumericRangeFilter): this;
|
|
533
534
|
lotSizeSquareFeet(configurator: (builder: NumericRangeFilterBuilder) => void): this;
|
|
534
|
-
zoningCode(filter: StringFilter): this;
|
|
535
|
-
zoningCode(configurator: (builder: StringFilterBuilder) => void): this;
|
|
535
|
+
zoningCode(filter: StringFilter<ZoningCode>): this;
|
|
536
|
+
zoningCode(configurator: (builder: StringFilterBuilder<ZoningCode>) => void): this;
|
|
536
537
|
build(): LotSearchCriteria;
|
|
537
538
|
}
|
|
538
539
|
/**
|
|
@@ -541,8 +542,8 @@ export declare class LotSearchCriteriaBuilder {
|
|
|
541
542
|
export declare class OpenLienSearchCriteriaBuilder {
|
|
542
543
|
private criteria;
|
|
543
544
|
static from(criteria: OpenLienSearchCriteria): OpenLienSearchCriteriaBuilder;
|
|
544
|
-
allLoanTypes(filter: StringFilter): this;
|
|
545
|
-
juniorLoanTypes(filter: StringFilter): this;
|
|
545
|
+
allLoanTypes(filter: StringFilter<LoanType>): this;
|
|
546
|
+
juniorLoanTypes(filter: StringFilter<LoanType>): this;
|
|
546
547
|
totalOpenLienCount(filter: NumericRangeFilter): this;
|
|
547
548
|
totalOpenLienBalance(filter: NumericRangeFilter): this;
|
|
548
549
|
firstLoanLtv(filter: NumericRangeFilter): this;
|
|
@@ -550,10 +551,10 @@ export declare class OpenLienSearchCriteriaBuilder {
|
|
|
550
551
|
secondLoanInterestRate(filter: NumericRangeFilter): this;
|
|
551
552
|
thirdLoanInterestRate(filter: NumericRangeFilter): this;
|
|
552
553
|
fourthLoanInterestRate(filter: NumericRangeFilter): this;
|
|
553
|
-
firstLoanType(filter: StringFilter): this;
|
|
554
|
-
secondLoanType(filter: StringFilter): this;
|
|
555
|
-
thirdLoanType(filter: StringFilter): this;
|
|
556
|
-
fourthLoanType(filter: StringFilter): this;
|
|
554
|
+
firstLoanType(filter: StringFilter<LoanType>): this;
|
|
555
|
+
secondLoanType(filter: StringFilter<LoanType>): this;
|
|
556
|
+
thirdLoanType(filter: StringFilter<LoanType>): this;
|
|
557
|
+
fourthLoanType(filter: StringFilter<LoanType>): this;
|
|
557
558
|
firstLoanRecordingDate(filter: DateRangeFilter): this;
|
|
558
559
|
lastLoanRecordingDate(filter: DateRangeFilter): this;
|
|
559
560
|
build(): OpenLienSearchCriteria;
|
|
@@ -571,7 +572,7 @@ export declare class OwnerSearchCriteriaBuilder {
|
|
|
571
572
|
mailingCity(filter: StringFilter): this;
|
|
572
573
|
mailingState(filter: StringFilter): this;
|
|
573
574
|
mailingZip(filter: StringFilter): this;
|
|
574
|
-
ownerStatusType(filter: StringFilter): this;
|
|
575
|
+
ownerStatusType(filter: StringFilter<OwnerStatusType>): this;
|
|
575
576
|
lengthOfResidenceMonths(filter: NumericRangeFilter): this;
|
|
576
577
|
lengthOfResidenceYears(filter: NumericRangeFilter): this;
|
|
577
578
|
ownershipStartDate(filter: DateRangeFilter): this;
|
|
@@ -613,7 +614,8 @@ export declare class SaleSearchCriteriaBuilder {
|
|
|
613
614
|
static from(criteria: SaleSearchCriteria): SaleSearchCriteriaBuilder;
|
|
614
615
|
lastSalePrice(filter: NumericRangeFilter): this;
|
|
615
616
|
lastSaleDate(filter: DateRangeFilter): this;
|
|
616
|
-
lastSaleDocumentType(filter: StringFilter): this;
|
|
617
|
+
lastSaleDocumentType(filter: StringFilter<LastSaleDocumentType>): this;
|
|
618
|
+
lastSaleDocumentType(configurator: (builder: StringFilterBuilder) => void): this;
|
|
617
619
|
lastSalePricePerSquareFoot(filter: NumericRangeFilter): this;
|
|
618
620
|
flipLength(filter: NumericRangeFilter): this;
|
|
619
621
|
flipLengthCategory(filter: NumericRangeFilter): this;
|
|
@@ -813,6 +815,17 @@ export declare class PropertyLookupRequestBuilder extends BaseBuilder<PropertyLo
|
|
|
813
815
|
options(configurator: (builder: PropertyLookupOptionsBuilder) => void): this;
|
|
814
816
|
build(): PropertyLookupRequest;
|
|
815
817
|
}
|
|
818
|
+
/**
|
|
819
|
+
* Builder for property count requests
|
|
820
|
+
*
|
|
821
|
+
* Used specifically for count-only requests that should never fetch property data.
|
|
822
|
+
*/
|
|
823
|
+
export declare class PropertyCountRequestBuilder extends BaseBuilder<PropertyCountRequest> {
|
|
824
|
+
static from(request: PropertyCountRequest): PropertyCountRequestBuilder;
|
|
825
|
+
searchCriteria(criteria: SearchCriteria): this;
|
|
826
|
+
searchCriteria(configurator: (builder: SearchCriteriaBuilder) => void): this;
|
|
827
|
+
build(): PropertyCountRequest;
|
|
828
|
+
}
|
|
816
829
|
/**
|
|
817
830
|
* Builder for property search requests
|
|
818
831
|
*/
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.PropertyPermitRequestBuilder = exports.PropertyLookupAsyncRequestBuilder = exports.PropertySearchAsyncRequestBuilder = exports.PropertySearchRequestBuilder = exports.PropertyLookupRequestBuilder = exports.AsyncPropertyLookupOptionsBuilder = exports.PropertyLookupOptionsBuilder = exports.PropertyLookupRequestItemBuilder = exports.PropertySubscriptionBuilder = exports.DeliveryConfigBuilder = exports.SearchCriteriaBuilder = exports.OrSearchCriteriaBuilder = exports.ValuationSearchCriteriaBuilder = exports.TaxSearchCriteriaBuilder = exports.SaleSearchCriteriaBuilder = exports.PropertyOwnerProfileSearchCriteriaBuilder = exports.PermitSearchCriteriaBuilder = exports.OwnerSearchCriteriaBuilder = exports.OpenLienSearchCriteriaBuilder = exports.LotSearchCriteriaBuilder = exports.ListingSearchCriteriaBuilder = exports.LegalSearchCriteriaBuilder = exports.InvoluntaryLienSearchCriteriaBuilder = exports.IntelSearchCriteriaBuilder = exports.IdsSearchCriteriaBuilder = exports.GeneralSearchCriteriaBuilder = exports.ForeclosureSearchCriteriaBuilder = exports.DemographicsSearchCriteriaBuilder = exports.CompAddressSearchCriteriaBuilder = exports.BuildingSearchCriteriaBuilder = exports.AssessmentSearchCriteriaBuilder = exports.AddressSearchCriteriaBuilder = exports.GeoLocationFactory = exports.DateRangeFilterBuilder = exports.NumericRangeFilterBuilder = exports.StringFilterBuilder = void 0;
|
|
21
|
+
exports.PropertyPermitRequestBuilder = exports.PropertyLookupAsyncRequestBuilder = exports.PropertySearchAsyncRequestBuilder = exports.PropertySearchRequestBuilder = exports.PropertyCountRequestBuilder = exports.PropertyLookupRequestBuilder = exports.AsyncPropertyLookupOptionsBuilder = exports.PropertyLookupOptionsBuilder = exports.PropertyLookupRequestItemBuilder = exports.PropertySubscriptionBuilder = exports.DeliveryConfigBuilder = exports.SearchCriteriaBuilder = exports.OrSearchCriteriaBuilder = exports.ValuationSearchCriteriaBuilder = exports.TaxSearchCriteriaBuilder = exports.SaleSearchCriteriaBuilder = exports.PropertyOwnerProfileSearchCriteriaBuilder = exports.PermitSearchCriteriaBuilder = exports.OwnerSearchCriteriaBuilder = exports.OpenLienSearchCriteriaBuilder = exports.LotSearchCriteriaBuilder = exports.ListingSearchCriteriaBuilder = exports.LegalSearchCriteriaBuilder = exports.InvoluntaryLienSearchCriteriaBuilder = exports.IntelSearchCriteriaBuilder = exports.IdsSearchCriteriaBuilder = exports.GeneralSearchCriteriaBuilder = exports.ForeclosureSearchCriteriaBuilder = exports.DemographicsSearchCriteriaBuilder = exports.CompAddressSearchCriteriaBuilder = exports.BuildingSearchCriteriaBuilder = exports.AssessmentSearchCriteriaBuilder = exports.AddressSearchCriteriaBuilder = exports.GeoLocationFactory = exports.DateRangeFilterBuilder = exports.NumericRangeFilterBuilder = exports.StringFilterBuilder = void 0;
|
|
22
22
|
const metadata_1 = require("../property-field/metadata");
|
|
23
|
+
const utils_1 = require("../property-field/utils");
|
|
23
24
|
/**
|
|
24
25
|
* Abstract base class for builders that store nested builders
|
|
25
26
|
* Handles the common pattern of storing builder instances and building them all at once
|
|
@@ -88,9 +89,7 @@ class BaseBuilder {
|
|
|
88
89
|
* ```
|
|
89
90
|
*/
|
|
90
91
|
getSearchCriteriaFieldMetadata(searchCriteriaPath) {
|
|
91
|
-
|
|
92
|
-
const { getSearchCriteriaFieldMetadata, } = require("../property-field/utils");
|
|
93
|
-
return getSearchCriteriaFieldMetadata(searchCriteriaPath);
|
|
92
|
+
return (0, utils_1.getSearchCriteriaFieldMetadata)(searchCriteriaPath);
|
|
94
93
|
}
|
|
95
94
|
/**
|
|
96
95
|
* Get SearchCriteria field metadata inferred from Property field metadata
|
|
@@ -167,6 +166,7 @@ class BaseBuilder {
|
|
|
167
166
|
}
|
|
168
167
|
/**
|
|
169
168
|
* Base builder for string filters
|
|
169
|
+
* @template T - Optional union type of allowed string values. Defaults to `string` for backward compatibility.
|
|
170
170
|
*/
|
|
171
171
|
class StringFilterBuilder {
|
|
172
172
|
constructor() {
|
|
@@ -439,10 +439,26 @@ class BuildingSearchCriteriaBuilder extends BaseBuilder {
|
|
|
439
439
|
return builder;
|
|
440
440
|
}
|
|
441
441
|
airConditioningSource(filterOrConfigurator) {
|
|
442
|
-
|
|
442
|
+
if (typeof filterOrConfigurator === "function") {
|
|
443
|
+
const builder = new StringFilterBuilder();
|
|
444
|
+
filterOrConfigurator(builder);
|
|
445
|
+
this.criteria.airConditioningSource = builder.build();
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
this.criteria.airConditioningSource = filterOrConfigurator;
|
|
449
|
+
}
|
|
450
|
+
return this;
|
|
443
451
|
}
|
|
444
452
|
basementType(filterOrConfigurator) {
|
|
445
|
-
|
|
453
|
+
if (typeof filterOrConfigurator === "function") {
|
|
454
|
+
const builder = new StringFilterBuilder();
|
|
455
|
+
filterOrConfigurator(builder);
|
|
456
|
+
this.criteria.basementType = builder.build();
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
this.criteria.basementType = filterOrConfigurator;
|
|
460
|
+
}
|
|
461
|
+
return this;
|
|
446
462
|
}
|
|
447
463
|
totalBuildingAreaSquareFeet(filterOrConfigurator) {
|
|
448
464
|
return this.setPropertyWithBuilderClass("totalBuildingAreaSquareFeet", filterOrConfigurator, NumericRangeFilterBuilder);
|
|
@@ -886,26 +902,74 @@ class DemographicsSearchCriteriaBuilder extends BaseBuilder {
|
|
|
886
902
|
return this.setPropertyWithBuilderClass("discretionaryIncome", filterOrConfigurator, NumericRangeFilterBuilder);
|
|
887
903
|
}
|
|
888
904
|
homeownerRenter(filterOrConfigurator) {
|
|
889
|
-
|
|
905
|
+
if (typeof filterOrConfigurator === "function") {
|
|
906
|
+
const builder = new StringFilterBuilder();
|
|
907
|
+
filterOrConfigurator(builder);
|
|
908
|
+
this.criteria.homeownerRenter = builder.build();
|
|
909
|
+
}
|
|
910
|
+
else {
|
|
911
|
+
this.criteria.homeownerRenter = filterOrConfigurator;
|
|
912
|
+
}
|
|
913
|
+
return this;
|
|
890
914
|
}
|
|
891
915
|
businessOwner(filterOrConfigurator) {
|
|
892
|
-
|
|
916
|
+
if (typeof filterOrConfigurator === "function") {
|
|
917
|
+
const builder = new StringFilterBuilder();
|
|
918
|
+
filterOrConfigurator(builder);
|
|
919
|
+
this.criteria.businessOwner = builder.build();
|
|
920
|
+
}
|
|
921
|
+
else {
|
|
922
|
+
this.criteria.businessOwner = filterOrConfigurator;
|
|
923
|
+
}
|
|
924
|
+
return this;
|
|
893
925
|
}
|
|
894
926
|
gender(filterOrConfigurator) {
|
|
895
|
-
|
|
927
|
+
if (typeof filterOrConfigurator === "function") {
|
|
928
|
+
const builder = new StringFilterBuilder();
|
|
929
|
+
filterOrConfigurator(builder);
|
|
930
|
+
this.criteria.gender = builder.build();
|
|
931
|
+
}
|
|
932
|
+
else {
|
|
933
|
+
this.criteria.gender = filterOrConfigurator;
|
|
934
|
+
}
|
|
935
|
+
return this;
|
|
896
936
|
}
|
|
897
937
|
hasChildren(value) {
|
|
898
938
|
this.criteria.hasChildren = { equals: value };
|
|
899
939
|
return this;
|
|
900
940
|
}
|
|
901
941
|
investments(filterOrConfigurator) {
|
|
902
|
-
|
|
942
|
+
if (typeof filterOrConfigurator === "function") {
|
|
943
|
+
const builder = new StringFilterBuilder();
|
|
944
|
+
filterOrConfigurator(builder);
|
|
945
|
+
this.criteria.investments = builder.build();
|
|
946
|
+
}
|
|
947
|
+
else {
|
|
948
|
+
this.criteria.investments = filterOrConfigurator;
|
|
949
|
+
}
|
|
950
|
+
return this;
|
|
903
951
|
}
|
|
904
952
|
demographics(filterOrConfigurator) {
|
|
905
|
-
|
|
953
|
+
if (typeof filterOrConfigurator === "function") {
|
|
954
|
+
const builder = new StringFilterBuilder();
|
|
955
|
+
filterOrConfigurator(builder);
|
|
956
|
+
this.criteria.demographics = builder.build();
|
|
957
|
+
}
|
|
958
|
+
else {
|
|
959
|
+
this.criteria.demographics = filterOrConfigurator;
|
|
960
|
+
}
|
|
961
|
+
return this;
|
|
906
962
|
}
|
|
907
963
|
religiousAffiliation(filterOrConfigurator) {
|
|
908
|
-
|
|
964
|
+
if (typeof filterOrConfigurator === "function") {
|
|
965
|
+
const builder = new StringFilterBuilder();
|
|
966
|
+
filterOrConfigurator(builder);
|
|
967
|
+
this.criteria.religiousAffiliation = builder.build();
|
|
968
|
+
}
|
|
969
|
+
else {
|
|
970
|
+
this.criteria.religiousAffiliation = filterOrConfigurator;
|
|
971
|
+
}
|
|
972
|
+
return this;
|
|
909
973
|
}
|
|
910
974
|
}
|
|
911
975
|
exports.DemographicsSearchCriteriaBuilder = DemographicsSearchCriteriaBuilder;
|
|
@@ -1681,8 +1745,19 @@ class SaleSearchCriteriaBuilder {
|
|
|
1681
1745
|
this.criteria.lastSaleDate = filter;
|
|
1682
1746
|
return this;
|
|
1683
1747
|
}
|
|
1684
|
-
lastSaleDocumentType(
|
|
1685
|
-
|
|
1748
|
+
lastSaleDocumentType(filterOrConfigurator) {
|
|
1749
|
+
if (typeof filterOrConfigurator === "function") {
|
|
1750
|
+
const builder = new StringFilterBuilder();
|
|
1751
|
+
filterOrConfigurator(builder);
|
|
1752
|
+
// Type assertion needed because StringFilterBuilder returns StringFilter<string>
|
|
1753
|
+
// but criteria expects StringFilter<LastSaleDocumentType>
|
|
1754
|
+
this.criteria.lastSaleDocumentType = builder.build();
|
|
1755
|
+
}
|
|
1756
|
+
else {
|
|
1757
|
+
// Type assertion needed because StringFilter<string> is not assignable to StringFilter<LastSaleDocumentType>
|
|
1758
|
+
// but at runtime they're compatible
|
|
1759
|
+
this.criteria.lastSaleDocumentType = filterOrConfigurator;
|
|
1760
|
+
}
|
|
1686
1761
|
return this;
|
|
1687
1762
|
}
|
|
1688
1763
|
lastSalePricePerSquareFoot(filter) {
|
|
@@ -2421,6 +2496,40 @@ class PropertyLookupRequestBuilder extends BaseBuilder {
|
|
|
2421
2496
|
}
|
|
2422
2497
|
}
|
|
2423
2498
|
exports.PropertyLookupRequestBuilder = PropertyLookupRequestBuilder;
|
|
2499
|
+
/**
|
|
2500
|
+
* Builder for property count requests
|
|
2501
|
+
*
|
|
2502
|
+
* Used specifically for count-only requests that should never fetch property data.
|
|
2503
|
+
*/
|
|
2504
|
+
class PropertyCountRequestBuilder extends BaseBuilder {
|
|
2505
|
+
static from(request) {
|
|
2506
|
+
const builder = new PropertyCountRequestBuilder();
|
|
2507
|
+
builder.searchCriteria(request.searchCriteria);
|
|
2508
|
+
return builder;
|
|
2509
|
+
}
|
|
2510
|
+
searchCriteria(criteriaOrConfigurator) {
|
|
2511
|
+
if (typeof criteriaOrConfigurator === "function") {
|
|
2512
|
+
const builder = new SearchCriteriaBuilder("");
|
|
2513
|
+
criteriaOrConfigurator(builder);
|
|
2514
|
+
this.criteria.searchCriteria = builder.build();
|
|
2515
|
+
this.builders.searchCriteria = undefined;
|
|
2516
|
+
}
|
|
2517
|
+
else {
|
|
2518
|
+
this.criteria.searchCriteria = criteriaOrConfigurator;
|
|
2519
|
+
this.builders.searchCriteria = undefined;
|
|
2520
|
+
}
|
|
2521
|
+
return this;
|
|
2522
|
+
}
|
|
2523
|
+
build() {
|
|
2524
|
+
if (!this.criteria.searchCriteria) {
|
|
2525
|
+
throw new Error("Search criteria is required");
|
|
2526
|
+
}
|
|
2527
|
+
return {
|
|
2528
|
+
searchCriteria: this.criteria.searchCriteria,
|
|
2529
|
+
};
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
exports.PropertyCountRequestBuilder = PropertyCountRequestBuilder;
|
|
2424
2533
|
/**
|
|
2425
2534
|
* Builder for property search requests
|
|
2426
2535
|
*/
|
package/dist/client/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosResponse, AxiosError, InternalAxiosRequestConfig } from "axios";
|
|
2
2
|
import { IBatchDataClient } from "./client.interface";
|
|
3
3
|
import { ILogger } from "../core/logger.interface";
|
|
4
|
-
import { PropertySubscriptionRequest, PropertySubscriptionResponse, PropertySearchRequest, PropertySearchResponse, AddressVerifyRequest, AddressVerifyResponse, AddressAutocompleteRequest, AddressAutocompleteResponse, AddressGeocodeRequest, AddressGeocodeResponse, AddressReverseGeocodeRequest, AddressReverseGeocodeResponse, PropertyLookupRequest, PropertyLookupResponse, PropertyLookupAsyncRequest, PropertyLookupAsyncResponse, PropertySearchAsyncRequest, PropertySearchAsyncResponse, PropertySkipTraceRequest, PropertySkipTraceResponse, PropertySkipTraceAsyncRequest, PropertySkipTraceAsyncResponse, PhoneVerificationRequest, PhoneVerificationResponse, PhoneVerificationAsyncRequest, PhoneVerificationAsyncResponse, PhoneDNCRequest, PhoneDNCResponse, PhoneDNCAsyncRequest, PhoneDNCAsyncResponse, PhoneTCPARequest, PhoneTCPAResponse, PhoneTCPAAsyncRequest, PhoneTCPAAsyncResponse, GetPropertySubscriptionsResponse, GetPropertySubscriptionDetailResponse, DeletePropertySubscriptionResponse, PropertyPermitRequest, PropertyPermitResponse, PropertySkipTraceV3Request, PropertySkipTraceV3Response, PropertySkipTraceV3AsyncRequest, PropertySkipTraceV3AsyncResponse } from "../core/types";
|
|
4
|
+
import { PropertySubscriptionRequest, PropertySubscriptionResponse, PropertyCountRequest, PropertySearchRequest, PropertySearchResponse, AddressVerifyRequest, AddressVerifyResponse, AddressAutocompleteRequest, AddressAutocompleteResponse, AddressGeocodeRequest, AddressGeocodeResponse, AddressReverseGeocodeRequest, AddressReverseGeocodeResponse, PropertyLookupRequest, PropertyLookupResponse, PropertyLookupAsyncRequest, PropertyLookupAsyncResponse, PropertySearchAsyncRequest, PropertySearchAsyncResponse, PropertySkipTraceRequest, PropertySkipTraceResponse, PropertySkipTraceAsyncRequest, PropertySkipTraceAsyncResponse, PhoneVerificationRequest, PhoneVerificationResponse, PhoneVerificationAsyncRequest, PhoneVerificationAsyncResponse, PhoneDNCRequest, PhoneDNCResponse, PhoneDNCAsyncRequest, PhoneDNCAsyncResponse, PhoneTCPARequest, PhoneTCPAResponse, PhoneTCPAAsyncRequest, PhoneTCPAAsyncResponse, GetPropertySubscriptionsResponse, GetPropertySubscriptionDetailResponse, DeletePropertySubscriptionResponse, PropertyPermitRequest, PropertyPermitResponse, PropertySkipTraceV3Request, PropertySkipTraceV3Response, PropertySkipTraceV3AsyncRequest, PropertySkipTraceV3AsyncResponse } from "../core/types";
|
|
5
5
|
/**
|
|
6
6
|
* Middleware function that executes before an HTTP request is sent.
|
|
7
7
|
* Can modify the request config or perform side effects (logging, metrics, etc.).
|
|
@@ -258,10 +258,14 @@ export declare class BatchDataClient implements IBatchDataClient {
|
|
|
258
258
|
searchProperties(request: PropertySearchRequest): Promise<PropertySearchResponse>;
|
|
259
259
|
/**
|
|
260
260
|
* Get the count of properties matching the search criteria
|
|
261
|
-
*
|
|
261
|
+
*
|
|
262
|
+
* Uses PropertyCountRequest to ensure no property data is fetched (count-only).
|
|
263
|
+
* This prevents accidental charges for property data retrieval.
|
|
264
|
+
*
|
|
265
|
+
* @param searchRequest Count request with search criteria (no options allowed)
|
|
262
266
|
* @returns Number of matching properties, or null if the endpoint is unavailable
|
|
263
267
|
*/
|
|
264
|
-
getPropertyCount(searchRequest:
|
|
268
|
+
getPropertyCount(searchRequest: PropertyCountRequest): Promise<number | null>;
|
|
265
269
|
/**
|
|
266
270
|
* Verify and normalize addresses (v1 API)
|
|
267
271
|
* POST /api/v1/address/verify
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropertySubscriptionRequest, PropertySubscriptionResponse, PropertySearchRequest, PropertySearchResponse, AddressVerifyRequest, AddressVerifyResponse, AddressAutocompleteRequest, AddressAutocompleteResponse, AddressGeocodeRequest, AddressGeocodeResponse, AddressReverseGeocodeRequest, AddressReverseGeocodeResponse, PropertyLookupRequest, PropertyLookupResponse, PropertyLookupAsyncRequest, PropertyLookupAsyncResponse, PropertySearchAsyncRequest, PropertySearchAsyncResponse, PropertySkipTraceRequest, PropertySkipTraceResponse, PropertySkipTraceAsyncRequest, PropertySkipTraceAsyncResponse, PhoneVerificationRequest, PhoneVerificationResponse, PhoneVerificationAsyncRequest, PhoneVerificationAsyncResponse, PhoneDNCRequest, PhoneDNCResponse, PhoneDNCAsyncRequest, PhoneDNCAsyncResponse, PhoneTCPARequest, PhoneTCPAResponse, PhoneTCPAAsyncRequest, PhoneTCPAAsyncResponse, GetPropertySubscriptionsResponse, GetPropertySubscriptionDetailResponse, DeletePropertySubscriptionResponse, PropertyPermitRequest, PropertyPermitResponse, PropertySkipTraceV3Request, PropertySkipTraceV3Response, PropertySkipTraceV3AsyncRequest, PropertySkipTraceV3AsyncResponse } from "../core/types";
|
|
1
|
+
import { PropertySubscriptionRequest, PropertySubscriptionResponse, PropertyCountRequest, PropertySearchRequest, PropertySearchResponse, AddressVerifyRequest, AddressVerifyResponse, AddressAutocompleteRequest, AddressAutocompleteResponse, AddressGeocodeRequest, AddressGeocodeResponse, AddressReverseGeocodeRequest, AddressReverseGeocodeResponse, PropertyLookupRequest, PropertyLookupResponse, PropertyLookupAsyncRequest, PropertyLookupAsyncResponse, PropertySearchAsyncRequest, PropertySearchAsyncResponse, PropertySkipTraceRequest, PropertySkipTraceResponse, PropertySkipTraceAsyncRequest, PropertySkipTraceAsyncResponse, PhoneVerificationRequest, PhoneVerificationResponse, PhoneVerificationAsyncRequest, PhoneVerificationAsyncResponse, PhoneDNCRequest, PhoneDNCResponse, PhoneDNCAsyncRequest, PhoneDNCAsyncResponse, PhoneTCPARequest, PhoneTCPAResponse, PhoneTCPAAsyncRequest, PhoneTCPAAsyncResponse, GetPropertySubscriptionsResponse, GetPropertySubscriptionDetailResponse, DeletePropertySubscriptionResponse, PropertyPermitRequest, PropertyPermitResponse, PropertySkipTraceV3Request, PropertySkipTraceV3Response, PropertySkipTraceV3AsyncRequest, PropertySkipTraceV3AsyncResponse } from "../core/types";
|
|
2
2
|
/**
|
|
3
3
|
* BatchData API Client Interface
|
|
4
4
|
*
|
|
@@ -26,10 +26,14 @@ export interface IBatchDataClient {
|
|
|
26
26
|
searchProperties(request: PropertySearchRequest): Promise<PropertySearchResponse>;
|
|
27
27
|
/**
|
|
28
28
|
* Get the count of properties matching the search criteria
|
|
29
|
-
*
|
|
29
|
+
*
|
|
30
|
+
* Uses PropertyCountRequest to ensure no property data is fetched (count-only).
|
|
31
|
+
* This prevents accidental charges for property data retrieval.
|
|
32
|
+
*
|
|
33
|
+
* @param searchRequest Count request with search criteria (no options allowed)
|
|
30
34
|
* @returns Number of matching properties, or null if the endpoint is unavailable
|
|
31
35
|
*/
|
|
32
|
-
getPropertyCount(searchRequest:
|
|
36
|
+
getPropertyCount(searchRequest: PropertyCountRequest): Promise<number | null>;
|
|
33
37
|
/**
|
|
34
38
|
* Verify and normalize addresses (v1 API)
|
|
35
39
|
* POST /api/v1/address/verify
|
package/dist/client/client.js
CHANGED
|
@@ -321,14 +321,17 @@ class BatchDataClient {
|
|
|
321
321
|
}
|
|
322
322
|
/**
|
|
323
323
|
* Get the count of properties matching the search criteria
|
|
324
|
-
*
|
|
324
|
+
*
|
|
325
|
+
* Uses PropertyCountRequest to ensure no property data is fetched (count-only).
|
|
326
|
+
* This prevents accidental charges for property data retrieval.
|
|
327
|
+
*
|
|
328
|
+
* @param searchRequest Count request with search criteria (no options allowed)
|
|
325
329
|
* @returns Number of matching properties, or null if the endpoint is unavailable
|
|
326
330
|
*/
|
|
327
331
|
async getPropertyCount(searchRequest) {
|
|
328
|
-
const { searchCriteria
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
: new builders_1.PropertyLookupOptionsBuilder();
|
|
332
|
+
const { searchCriteria } = searchRequest;
|
|
333
|
+
// Always use take(0) to ensure no property data is fetched
|
|
334
|
+
const lookupOptions = new builders_1.PropertyLookupOptionsBuilder().take(0);
|
|
332
335
|
const response = await this.searchProperties({
|
|
333
336
|
searchCriteria,
|
|
334
337
|
options: lookupOptions.build(),
|