@land-catalyst/batch-data-sdk 1.1.12 → 1.1.19
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.d.ts → builders/builders.d.ts} +75 -1
- package/dist/{builders.js → builders/builders.js} +90 -0
- package/dist/builders/property-field-builder-mixin.d.ts +47 -0
- package/dist/builders/property-field-builder-mixin.js +35 -0
- package/dist/{client.d.ts → client/client.d.ts} +2 -2
- package/dist/{client.interface.d.ts → client/client.interface.d.ts} +1 -1
- package/dist/{client.js → client/client.js} +2 -2
- package/dist/{types.d.ts → core/types.d.ts} +217 -0
- package/dist/index.d.ts +11 -7
- package/dist/index.js +8 -6
- package/dist/property-field/metadata.d.ts +105 -0
- package/dist/property-field/metadata.js +6251 -0
- package/dist/property-field/types.d.ts +33 -0
- package/dist/property-field/types.js +9 -0
- package/dist/property-field/utils.d.ts +306 -0
- package/dist/property-field/utils.js +479 -0
- package/package.json +5 -2
- /package/dist/{client.interface.js → client/client.interface.js} +0 -0
- /package/dist/{errors.d.ts → core/errors.d.ts} +0 -0
- /package/dist/{errors.js → core/errors.js} +0 -0
- /package/dist/{logger.interface.d.ts → core/logger.interface.d.ts} +0 -0
- /package/dist/{logger.interface.js → core/logger.interface.js} +0 -0
- /package/dist/{types.js → core/types.js} +0 -0
|
@@ -16,7 +16,8 @@
|
|
|
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, PropertySubscriptionRequest, QuickListValueWithNot, PropertyLookupRequest, PropertyLookupRequestItem, PropertyLookupRequestAddress, PropertyLookupOptions, PropertyPermitRequest, PropertySearchRequest, PropertySearchAsyncRequest, PropertyLookupAsyncRequest, GeoPoint } from "
|
|
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, PropertySubscriptionRequest, QuickListValueWithNot, PropertyLookupRequest, PropertyLookupRequestItem, PropertyLookupRequestAddress, PropertyLookupOptions, PropertyPermitRequest, PropertySearchRequest, PropertySearchAsyncRequest, PropertyLookupAsyncRequest, GeoPoint } from "../core/types";
|
|
20
|
+
import type { PropertyFieldMetadata } from "../property-field/metadata";
|
|
20
21
|
/**
|
|
21
22
|
* Base interface for all builders
|
|
22
23
|
*/
|
|
@@ -47,6 +48,79 @@ export type BuildersStorage<T> = {
|
|
|
47
48
|
declare abstract class BaseBuilder<T> implements Builder<T> {
|
|
48
49
|
protected criteria: Partial<T>;
|
|
49
50
|
protected builders: BuildersStorage<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Get metadata for a property field path
|
|
53
|
+
* @param fieldPath The field path (e.g., "address.city", "owner.fullName")
|
|
54
|
+
* @returns The field metadata, or undefined if not found
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const builder = new SearchCriteriaBuilder("test");
|
|
58
|
+
* const cityMeta = builder.getFieldMetadata("address.city");
|
|
59
|
+
* console.log(cityMeta?.description); // "The city (e.g. Chicago)"
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
getFieldMetadata(fieldPath: string): PropertyFieldMetadata | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Get description for a property field path
|
|
65
|
+
* @param fieldPath The field path
|
|
66
|
+
* @returns The description, or undefined if not found
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const builder = new SearchCriteriaBuilder("test");
|
|
70
|
+
* const desc = builder.getFieldDescription("address.city");
|
|
71
|
+
* console.log(desc); // "The city (e.g. Chicago)"
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
getFieldDescription(fieldPath: string): string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Get data type for a property field path
|
|
77
|
+
* @param fieldPath The field path
|
|
78
|
+
* @returns The data type, or undefined if not found
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const builder = new SearchCriteriaBuilder("test");
|
|
82
|
+
* const type = builder.getFieldType("address.city");
|
|
83
|
+
* console.log(type); // "string"
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
getFieldType(fieldPath: string): PropertyFieldMetadata["dataType"] | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Get Property field metadata for a SearchCriteria field path
|
|
89
|
+
* This helps you understand what Property field you're filtering on
|
|
90
|
+
* @param searchCriteriaPath The SearchCriteria field path (e.g., "address.city")
|
|
91
|
+
* @returns The Property field metadata, or undefined if not found
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* const builder = new AddressSearchCriteriaBuilder();
|
|
95
|
+
* builder.city((c) => {
|
|
96
|
+
* // See what Property field this filters on
|
|
97
|
+
* const meta = builder.getSearchCriteriaFieldMetadata("address.city");
|
|
98
|
+
* console.log(`Filtering on: ${meta?.description}`);
|
|
99
|
+
* c.equals("Phoenix");
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
getSearchCriteriaFieldMetadata(searchCriteriaPath: string): PropertyFieldMetadata | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Get SearchCriteria field metadata inferred from Property field metadata
|
|
106
|
+
* This provides a SearchCriteria-specific metadata object that explains what Property field
|
|
107
|
+
* you're filtering on, even if the mapping isn't exact
|
|
108
|
+
* @param searchCriteriaPath The SearchCriteria field path (e.g., "address.city")
|
|
109
|
+
* @returns SearchCriteria field metadata with Property field information
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* const builder = new AddressSearchCriteriaBuilder();
|
|
113
|
+
* builder.city((c) => {
|
|
114
|
+
* // Get SearchCriteria metadata (inferred from Property metadata)
|
|
115
|
+
* const scMeta = builder.getSearchCriteriaMetadata("address.city");
|
|
116
|
+
* console.log(scMeta.description); // "Filter on: The city (e.g. Chicago)"
|
|
117
|
+
* console.log(scMeta.hasPropertyMapping); // true
|
|
118
|
+
* console.log(scMeta.propertyDataType); // "string"
|
|
119
|
+
* c.equals("Phoenix");
|
|
120
|
+
* });
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
getSearchCriteriaMetadata(searchCriteriaPath: string): any;
|
|
50
124
|
/**
|
|
51
125
|
* Helper method to set a property either directly or via a builder configurator.
|
|
52
126
|
* This extracts the common pattern of checking if a configurator function is provided,
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
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;
|
|
22
|
+
const metadata_1 = require("../property-field/metadata");
|
|
22
23
|
/**
|
|
23
24
|
* Abstract base class for builders that store nested builders
|
|
24
25
|
* Handles the common pattern of storing builder instances and building them all at once
|
|
@@ -28,6 +29,95 @@ class BaseBuilder {
|
|
|
28
29
|
this.criteria = {};
|
|
29
30
|
this.builders = {};
|
|
30
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Get metadata for a property field path
|
|
34
|
+
* @param fieldPath The field path (e.g., "address.city", "owner.fullName")
|
|
35
|
+
* @returns The field metadata, or undefined if not found
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const builder = new SearchCriteriaBuilder("test");
|
|
39
|
+
* const cityMeta = builder.getFieldMetadata("address.city");
|
|
40
|
+
* console.log(cityMeta?.description); // "The city (e.g. Chicago)"
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
getFieldMetadata(fieldPath) {
|
|
44
|
+
return (0, metadata_1.getFieldMetadata)(fieldPath);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get description for a property field path
|
|
48
|
+
* @param fieldPath The field path
|
|
49
|
+
* @returns The description, or undefined if not found
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const builder = new SearchCriteriaBuilder("test");
|
|
53
|
+
* const desc = builder.getFieldDescription("address.city");
|
|
54
|
+
* console.log(desc); // "The city (e.g. Chicago)"
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
getFieldDescription(fieldPath) {
|
|
58
|
+
return this.getFieldMetadata(fieldPath)?.description;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get data type for a property field path
|
|
62
|
+
* @param fieldPath The field path
|
|
63
|
+
* @returns The data type, or undefined if not found
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const builder = new SearchCriteriaBuilder("test");
|
|
67
|
+
* const type = builder.getFieldType("address.city");
|
|
68
|
+
* console.log(type); // "string"
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
getFieldType(fieldPath) {
|
|
72
|
+
return this.getFieldMetadata(fieldPath)?.dataType;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get Property field metadata for a SearchCriteria field path
|
|
76
|
+
* This helps you understand what Property field you're filtering on
|
|
77
|
+
* @param searchCriteriaPath The SearchCriteria field path (e.g., "address.city")
|
|
78
|
+
* @returns The Property field metadata, or undefined if not found
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const builder = new AddressSearchCriteriaBuilder();
|
|
82
|
+
* builder.city((c) => {
|
|
83
|
+
* // See what Property field this filters on
|
|
84
|
+
* const meta = builder.getSearchCriteriaFieldMetadata("address.city");
|
|
85
|
+
* console.log(`Filtering on: ${meta?.description}`);
|
|
86
|
+
* c.equals("Phoenix");
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
getSearchCriteriaFieldMetadata(searchCriteriaPath) {
|
|
91
|
+
// Dynamic import to avoid circular dependency
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
93
|
+
const { getSearchCriteriaFieldMetadata } = require("../property-field/utils");
|
|
94
|
+
return getSearchCriteriaFieldMetadata(searchCriteriaPath);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get SearchCriteria field metadata inferred from Property field metadata
|
|
98
|
+
* This provides a SearchCriteria-specific metadata object that explains what Property field
|
|
99
|
+
* you're filtering on, even if the mapping isn't exact
|
|
100
|
+
* @param searchCriteriaPath The SearchCriteria field path (e.g., "address.city")
|
|
101
|
+
* @returns SearchCriteria field metadata with Property field information
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* const builder = new AddressSearchCriteriaBuilder();
|
|
105
|
+
* builder.city((c) => {
|
|
106
|
+
* // Get SearchCriteria metadata (inferred from Property metadata)
|
|
107
|
+
* const scMeta = builder.getSearchCriteriaMetadata("address.city");
|
|
108
|
+
* console.log(scMeta.description); // "Filter on: The city (e.g. Chicago)"
|
|
109
|
+
* console.log(scMeta.hasPropertyMapping); // true
|
|
110
|
+
* console.log(scMeta.propertyDataType); // "string"
|
|
111
|
+
* c.equals("Phoenix");
|
|
112
|
+
* });
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
getSearchCriteriaMetadata(searchCriteriaPath) {
|
|
116
|
+
// Dynamic import to avoid circular dependency
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
118
|
+
const { getSearchCriteriaMetadata } = require("../property-field/utils");
|
|
119
|
+
return getSearchCriteriaMetadata(searchCriteriaPath);
|
|
120
|
+
}
|
|
31
121
|
/**
|
|
32
122
|
* Helper method to set a property either directly or via a builder configurator.
|
|
33
123
|
* This extracts the common pattern of checking if a configurator function is provided,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property Field Builder Mixin
|
|
3
|
+
*
|
|
4
|
+
* Mixin to add metadata access capabilities to builders
|
|
5
|
+
*/
|
|
6
|
+
import type { PropertyFieldMetadata } from "../property-field/metadata";
|
|
7
|
+
/**
|
|
8
|
+
* Interface for builders that support metadata access
|
|
9
|
+
*/
|
|
10
|
+
export interface MetadataAwareBuilder {
|
|
11
|
+
/**
|
|
12
|
+
* Get metadata for a field path
|
|
13
|
+
* @param fieldPath The field path (e.g., "address.city")
|
|
14
|
+
* @returns The field metadata, or undefined if not found
|
|
15
|
+
*/
|
|
16
|
+
getFieldMetadata(fieldPath: string): PropertyFieldMetadata | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Get description for a field path
|
|
19
|
+
* @param fieldPath The field path
|
|
20
|
+
* @returns The description, or undefined if not found
|
|
21
|
+
*/
|
|
22
|
+
getFieldDescription(fieldPath: string): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Get data type for a field path
|
|
25
|
+
* @param fieldPath The field path
|
|
26
|
+
* @returns The data type, or undefined if not found
|
|
27
|
+
*/
|
|
28
|
+
getFieldType(fieldPath: string): PropertyFieldMetadata["dataType"] | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Mixin to add metadata capabilities to any builder
|
|
32
|
+
* @param Base The base builder class
|
|
33
|
+
* @returns A builder class with metadata access
|
|
34
|
+
*/
|
|
35
|
+
export declare function withMetadataAccess<T extends new (...args: any[]) => any>(Base: T): {
|
|
36
|
+
new (...args: any[]): {
|
|
37
|
+
[x: string]: any;
|
|
38
|
+
getFieldMetadata(fieldPath: string): PropertyFieldMetadata | undefined;
|
|
39
|
+
getFieldDescription(fieldPath: string): string | undefined;
|
|
40
|
+
getFieldType(fieldPath: string): PropertyFieldMetadata["dataType"] | undefined;
|
|
41
|
+
};
|
|
42
|
+
} & T;
|
|
43
|
+
/**
|
|
44
|
+
* Helper to get metadata for a builder field
|
|
45
|
+
* This can be used as a static method or utility function
|
|
46
|
+
*/
|
|
47
|
+
export declare function getBuilderFieldMetadata(fieldPath: string): PropertyFieldMetadata | undefined;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Property Field Builder Mixin
|
|
4
|
+
*
|
|
5
|
+
* Mixin to add metadata access capabilities to builders
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.withMetadataAccess = withMetadataAccess;
|
|
9
|
+
exports.getBuilderFieldMetadata = getBuilderFieldMetadata;
|
|
10
|
+
const metadata_1 = require("../property-field/metadata");
|
|
11
|
+
/**
|
|
12
|
+
* Mixin to add metadata capabilities to any builder
|
|
13
|
+
* @param Base The base builder class
|
|
14
|
+
* @returns A builder class with metadata access
|
|
15
|
+
*/
|
|
16
|
+
function withMetadataAccess(Base) {
|
|
17
|
+
return class extends Base {
|
|
18
|
+
getFieldMetadata(fieldPath) {
|
|
19
|
+
return (0, metadata_1.getFieldMetadata)(fieldPath);
|
|
20
|
+
}
|
|
21
|
+
getFieldDescription(fieldPath) {
|
|
22
|
+
return (0, metadata_1.getFieldMetadata)(fieldPath)?.description;
|
|
23
|
+
}
|
|
24
|
+
getFieldType(fieldPath) {
|
|
25
|
+
return (0, metadata_1.getFieldMetadata)(fieldPath)?.dataType;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Helper to get metadata for a builder field
|
|
31
|
+
* This can be used as a static method or utility function
|
|
32
|
+
*/
|
|
33
|
+
function getBuilderFieldMetadata(fieldPath) {
|
|
34
|
+
return (0, metadata_1.getFieldMetadata)(fieldPath);
|
|
35
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosResponse, AxiosError, InternalAxiosRequestConfig } from "axios";
|
|
2
2
|
import { IBatchDataClient } from "./client.interface";
|
|
3
|
-
import { ILogger } from "
|
|
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 "
|
|
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";
|
|
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.).
|
|
@@ -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 "
|
|
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";
|
|
2
2
|
/**
|
|
3
3
|
* BatchData API Client Interface
|
|
4
4
|
*
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BatchDataClient = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const logger_interface_1 = require("
|
|
9
|
-
const builders_1 = require("
|
|
8
|
+
const logger_interface_1 = require("../core/logger.interface");
|
|
9
|
+
const builders_1 = require("../builders/builders");
|
|
10
10
|
/**
|
|
11
11
|
* BatchData API Client
|
|
12
12
|
*
|
|
@@ -711,33 +711,194 @@ export interface PropertySearchPreviewResponse {
|
|
|
711
711
|
* Property address information
|
|
712
712
|
*/
|
|
713
713
|
export interface PropertyAddress {
|
|
714
|
+
/**
|
|
715
|
+
* The validity of the address (e.g. Valid, Invalid, Partially Valid)
|
|
716
|
+
* @fieldPath address.addressValidity
|
|
717
|
+
* @dataType string
|
|
718
|
+
* @dataset Basic Property Data
|
|
719
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
720
|
+
*/
|
|
714
721
|
addressValidity?: string;
|
|
722
|
+
/**
|
|
723
|
+
* House number of the property address.
|
|
724
|
+
* @fieldPath address.houseNumber
|
|
725
|
+
* @dataType string
|
|
726
|
+
* @dataset Basic Property Data
|
|
727
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
728
|
+
*/
|
|
715
729
|
houseNumber?: string;
|
|
730
|
+
/**
|
|
731
|
+
* The street address (e.g. 123 Main Street)
|
|
732
|
+
* @fieldPath address.street
|
|
733
|
+
* @dataType string
|
|
734
|
+
* @dataset Basic Property Data
|
|
735
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
736
|
+
*/
|
|
716
737
|
street?: string;
|
|
738
|
+
/**
|
|
739
|
+
* The city (e.g. Chicago)
|
|
740
|
+
* @fieldPath address.city
|
|
741
|
+
* @dataType string
|
|
742
|
+
* @dataset Basic Property Data
|
|
743
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
744
|
+
*/
|
|
717
745
|
city?: string;
|
|
746
|
+
/**
|
|
747
|
+
* Property address County
|
|
748
|
+
* @fieldPath address.county
|
|
749
|
+
* @dataType string
|
|
750
|
+
* @dataset Basic Property Data
|
|
751
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
752
|
+
*/
|
|
718
753
|
county?: string;
|
|
754
|
+
/**
|
|
755
|
+
* Property address state (2 letter abbreviation)
|
|
756
|
+
* @fieldPath address.state
|
|
757
|
+
* @dataType string
|
|
758
|
+
* @dataset Basic Property Data
|
|
759
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
760
|
+
*/
|
|
719
761
|
state?: string;
|
|
762
|
+
/**
|
|
763
|
+
* Property address zip code.
|
|
764
|
+
* @fieldPath address.zip
|
|
765
|
+
* @dataType string
|
|
766
|
+
* @dataset Basic Property Data
|
|
767
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
768
|
+
*/
|
|
720
769
|
zip?: string;
|
|
770
|
+
/**
|
|
771
|
+
* Property address zip+4 code
|
|
772
|
+
* @fieldPath address.zipPlus4
|
|
773
|
+
* @dataType string
|
|
774
|
+
* @dataset Basic Property Data
|
|
775
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
776
|
+
*/
|
|
721
777
|
zipPlus4?: string;
|
|
778
|
+
/**
|
|
779
|
+
* The property's latitude
|
|
780
|
+
* @fieldPath address.latitude
|
|
781
|
+
* @dataType number
|
|
782
|
+
* @dataset Basic Property Data
|
|
783
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
784
|
+
*/
|
|
722
785
|
latitude?: number;
|
|
786
|
+
/**
|
|
787
|
+
* The property's longitude
|
|
788
|
+
* @fieldPath address.longitude
|
|
789
|
+
* @dataType number
|
|
790
|
+
* @dataset Basic Property Data
|
|
791
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
792
|
+
*/
|
|
723
793
|
longitude?: number;
|
|
794
|
+
/**
|
|
795
|
+
* The county FIPS code for the property address
|
|
796
|
+
* @fieldPath address.countyFipsCode
|
|
797
|
+
* @dataType string
|
|
798
|
+
* @dataset Basic Property Data
|
|
799
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
800
|
+
*/
|
|
724
801
|
countyFipsCode?: string;
|
|
802
|
+
/**
|
|
803
|
+
* The property's address hash. Used to uniquely identify an address street, city, state and zip.
|
|
804
|
+
* @fieldPath address.hash
|
|
805
|
+
* @dataType string
|
|
806
|
+
* @dataset Basic Property Data
|
|
807
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
808
|
+
*/
|
|
725
809
|
hash?: string;
|
|
726
810
|
}
|
|
727
811
|
/**
|
|
728
812
|
* Mailing address information
|
|
729
813
|
*/
|
|
730
814
|
export interface MailingAddress {
|
|
815
|
+
/**
|
|
816
|
+
* The street address (e.g. 123 Main St Apt 45)
|
|
817
|
+
* @fieldPath owner.mailingAddress.street
|
|
818
|
+
* @dataType string
|
|
819
|
+
* @dataset Basic Property Data
|
|
820
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
821
|
+
*/
|
|
731
822
|
street?: string;
|
|
823
|
+
/**
|
|
824
|
+
* The city (e.g. Chicago)
|
|
825
|
+
* @fieldPath owner.mailingAddress.city
|
|
826
|
+
* @dataType string
|
|
827
|
+
* @dataset Basic Property Data
|
|
828
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
829
|
+
*/
|
|
732
830
|
city?: string;
|
|
831
|
+
/**
|
|
832
|
+
* The state abbreviation (e.g. IL)
|
|
833
|
+
* @fieldPath owner.mailingAddress.state
|
|
834
|
+
* @dataType string
|
|
835
|
+
* @dataset Basic Property Data
|
|
836
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
837
|
+
*/
|
|
733
838
|
state?: string;
|
|
839
|
+
/**
|
|
840
|
+
* The zip code (e.g. 12345)
|
|
841
|
+
* @fieldPath owner.mailingAddress.zip
|
|
842
|
+
* @dataType string
|
|
843
|
+
* @dataset Basic Property Data
|
|
844
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
845
|
+
*/
|
|
734
846
|
zip?: string;
|
|
847
|
+
/**
|
|
848
|
+
* The owner mailing address' hash. Used to uniquely identify an address street, city, state and zip.
|
|
849
|
+
* @fieldPath owner.mailingAddress.hash
|
|
850
|
+
* @dataType string
|
|
851
|
+
* @dataset Basic Property Data
|
|
852
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
853
|
+
*/
|
|
735
854
|
hash?: string;
|
|
855
|
+
/**
|
|
856
|
+
* The validity of the address (e.g. Valid, Invalid, Partially Valid)
|
|
857
|
+
* @fieldPath owner.mailingAddress.addressValidity
|
|
858
|
+
* @dataType string
|
|
859
|
+
* @dataset Basic Property Data
|
|
860
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
861
|
+
*/
|
|
736
862
|
addressValidity?: string;
|
|
863
|
+
/**
|
|
864
|
+
* The county (e.g. Cook)
|
|
865
|
+
* @fieldPath owner.mailingAddress.county
|
|
866
|
+
* @dataType string
|
|
867
|
+
* @dataset Basic Property Data
|
|
868
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
869
|
+
*/
|
|
737
870
|
county?: string;
|
|
871
|
+
/**
|
|
872
|
+
* The zip plus 4 code (e.g. 6789)
|
|
873
|
+
* @fieldPath owner.mailingAddress.zipPlus4
|
|
874
|
+
* @dataType string
|
|
875
|
+
* @dataset Basic Property Data
|
|
876
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
877
|
+
*/
|
|
738
878
|
zipPlus4?: string;
|
|
879
|
+
/**
|
|
880
|
+
* The 2 digits representing the delivery point of the address + an additional check digit.
|
|
881
|
+
* @fieldPath owner.mailingAddress.deliveryPointCode
|
|
882
|
+
* @dataType string
|
|
883
|
+
* @dataset Basic Property Data
|
|
884
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
885
|
+
*/
|
|
739
886
|
deliveryPointCode?: string;
|
|
887
|
+
/**
|
|
888
|
+
* Delivery point verification match code.
|
|
889
|
+
* @fieldPath owner.mailingAddress.dpvMatchCode
|
|
890
|
+
* @dataType string
|
|
891
|
+
* @dataset Basic Property Data
|
|
892
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
893
|
+
*/
|
|
740
894
|
dpvMatchCode?: string;
|
|
895
|
+
/**
|
|
896
|
+
* Codes with more details about the DPV match.
|
|
897
|
+
* @fieldPath owner.mailingAddress.dpvFootnotes
|
|
898
|
+
* @dataType string
|
|
899
|
+
* @dataset Basic Property Data
|
|
900
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
901
|
+
*/
|
|
741
902
|
dpvFootnotes?: string;
|
|
742
903
|
}
|
|
743
904
|
/**
|
|
@@ -798,6 +959,13 @@ export interface Foreclosure {
|
|
|
798
959
|
* Property IDs
|
|
799
960
|
*/
|
|
800
961
|
export interface PropertyIds {
|
|
962
|
+
/**
|
|
963
|
+
* The assessor's parcel number
|
|
964
|
+
* @fieldPath ids.apn
|
|
965
|
+
* @dataType string
|
|
966
|
+
* @dataset Basic Property Data
|
|
967
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
968
|
+
*/
|
|
801
969
|
apn?: string;
|
|
802
970
|
}
|
|
803
971
|
/**
|
|
@@ -888,6 +1056,13 @@ export interface OwnerName {
|
|
|
888
1056
|
* Owner information
|
|
889
1057
|
*/
|
|
890
1058
|
export interface Owner {
|
|
1059
|
+
/**
|
|
1060
|
+
* The property owner name(s)
|
|
1061
|
+
* @fieldPath owner.fullName
|
|
1062
|
+
* @dataType string
|
|
1063
|
+
* @dataset Basic Property Data
|
|
1064
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1065
|
+
*/
|
|
891
1066
|
fullName?: string;
|
|
892
1067
|
mailingAddress?: MailingAddress;
|
|
893
1068
|
names?: OwnerName[];
|
|
@@ -989,9 +1164,51 @@ export interface Valuation {
|
|
|
989
1164
|
*/
|
|
990
1165
|
export interface Property {
|
|
991
1166
|
_id?: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* The address of the listing brokerage
|
|
1169
|
+
* @fieldPath listing.brokerage.address
|
|
1170
|
+
* @dataType string
|
|
1171
|
+
* @dataset Listing
|
|
1172
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1173
|
+
*/
|
|
1174
|
+
/**
|
|
1175
|
+
* The address of the listing brokerage
|
|
1176
|
+
* @fieldPath listing.brokerage.address
|
|
1177
|
+
* @dataType string
|
|
1178
|
+
* @dataset Listing
|
|
1179
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1180
|
+
*/
|
|
1181
|
+
/**
|
|
1182
|
+
* The address of the listing brokerage
|
|
1183
|
+
* @fieldPath listing.brokerage.address
|
|
1184
|
+
* @dataType string
|
|
1185
|
+
* @dataset Listing
|
|
1186
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1187
|
+
*/
|
|
992
1188
|
address?: PropertyAddress;
|
|
993
1189
|
deedHistory?: DeedHistoryEntry[];
|
|
994
1190
|
demographics?: Demographics;
|
|
1191
|
+
/**
|
|
1192
|
+
* A flag indicating the sale/transfer is at auction by an investor or repossession by a financial institution
|
|
1193
|
+
* @fieldPath deedHistory.[n].foreclosure
|
|
1194
|
+
* @dataType boolean
|
|
1195
|
+
* @dataset History (Deed)
|
|
1196
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1197
|
+
*/
|
|
1198
|
+
/**
|
|
1199
|
+
* A flag indicating the sale/transfer is at auction by an investor or repossession by a financial institution
|
|
1200
|
+
* @fieldPath deedHistory.[n].foreclosure
|
|
1201
|
+
* @dataType boolean
|
|
1202
|
+
* @dataset History (Deed)
|
|
1203
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1204
|
+
*/
|
|
1205
|
+
/**
|
|
1206
|
+
* A flag indicating the sale/transfer is at auction by an investor or repossession by a financial institution
|
|
1207
|
+
* @fieldPath deedHistory.[n].foreclosure
|
|
1208
|
+
* @dataType boolean
|
|
1209
|
+
* @dataset History (Deed)
|
|
1210
|
+
* @see {@link getPropertyFieldMetadata} to get full metadata
|
|
1211
|
+
*/
|
|
995
1212
|
foreclosure?: Foreclosure;
|
|
996
1213
|
ids?: PropertyIds;
|
|
997
1214
|
images?: PropertyImages;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
* TypeScript SDK for BatchData.io Property API
|
|
5
5
|
* Complete type definitions, fluent query builders, and utilities
|
|
6
6
|
*/
|
|
7
|
-
export * from "./types";
|
|
8
|
-
export * from "./builders";
|
|
9
|
-
export * from "./errors";
|
|
10
|
-
export * from "./client";
|
|
11
|
-
export * from "./client.interface";
|
|
12
|
-
export * from "./logger.interface";
|
|
13
|
-
export
|
|
7
|
+
export * from "./core/types";
|
|
8
|
+
export * from "./builders/builders";
|
|
9
|
+
export * from "./core/errors";
|
|
10
|
+
export * from "./client/client";
|
|
11
|
+
export * from "./client/client.interface";
|
|
12
|
+
export * from "./core/logger.interface";
|
|
13
|
+
export * from "./property-field/metadata";
|
|
14
|
+
export * from "./property-field/utils";
|
|
15
|
+
export { type PropertyFieldPathType, type PropertyFieldValueType, type FieldMetadataForPath, } from "./property-field/types";
|
|
16
|
+
export type { SearchCriteriaFieldMapping, SearchCriteriaFieldMetadata, } from "./property-field/utils";
|
|
17
|
+
export type { RequestMiddleware, ResponseMiddleware, ErrorMiddleware, HttpMiddleware, } from "./client/client";
|
package/dist/index.js
CHANGED
|
@@ -20,9 +20,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
__exportStar(require("./types"), exports);
|
|
24
|
-
__exportStar(require("./builders"), exports);
|
|
25
|
-
__exportStar(require("./errors"), exports);
|
|
26
|
-
__exportStar(require("./client"), exports);
|
|
27
|
-
__exportStar(require("./client.interface"), exports);
|
|
28
|
-
__exportStar(require("./logger.interface"), exports);
|
|
23
|
+
__exportStar(require("./core/types"), exports);
|
|
24
|
+
__exportStar(require("./builders/builders"), exports);
|
|
25
|
+
__exportStar(require("./core/errors"), exports);
|
|
26
|
+
__exportStar(require("./client/client"), exports);
|
|
27
|
+
__exportStar(require("./client/client.interface"), exports);
|
|
28
|
+
__exportStar(require("./core/logger.interface"), exports);
|
|
29
|
+
__exportStar(require("./property-field/metadata"), exports);
|
|
30
|
+
__exportStar(require("./property-field/utils"), exports);
|