samls-js-integration 1.0.31
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/LICENSE +1 -0
- package/README.md +1 -0
- package/lib/clients/ListingClient.ts +19 -0
- package/lib/clients/MlsClient.ts +13 -0
- package/lib/clients/index.ts +2 -0
- package/lib/globals/HttpModule.ts +7 -0
- package/lib/globals/interfaces/IApiResponse.ts +5 -0
- package/lib/globals/interfaces/IPagination.ts +4 -0
- package/lib/globals/interfaces/index.ts +2 -0
- package/lib/index.ts +2 -0
- package/lib/models/Address/AddressDetailModel.ts +40 -0
- package/lib/models/Address/AddressQueryModel.ts +5 -0
- package/lib/models/Address/index.ts +2 -0
- package/lib/models/Agent/AgentInfoModel.ts +28 -0
- package/lib/models/Agent/AgentModel.ts +8 -0
- package/lib/models/Agent/GetAgentRequestModel.ts +8 -0
- package/lib/models/Agent/GetAgentsRequestModel.ts +9 -0
- package/lib/models/Agent/OfficeModel.ts +20 -0
- package/lib/models/Agent/index.ts +5 -0
- package/lib/models/Common/GlobalQueryModel.ts +2 -0
- package/lib/models/Common/LocationModel.ts +4 -0
- package/lib/models/Common/PaginationOptions.ts +4 -0
- package/lib/models/Common/Point.ts +10 -0
- package/lib/models/Common/index.ts +4 -0
- package/lib/models/Entities/AddressDetail.ts +46 -0
- package/lib/models/Entities/AddressPolygon.ts +11 -0
- package/lib/models/Entities/Entity.ts +11 -0
- package/lib/models/Entities/Listing.ts +87 -0
- package/lib/models/Entities/ListingOpenHouse.ts +26 -0
- package/lib/models/Entities/ListingSchool.ts +10 -0
- package/lib/models/Entities/Polygon.ts +23 -0
- package/lib/models/Entities/Property.ts +60 -0
- package/lib/models/Entities/PropertyFeature.ts +13 -0
- package/lib/models/Entities/School.ts +19 -0
- package/lib/models/Entities/index.ts +10 -0
- package/lib/models/Enums/AgentTypeEnum.ts +7 -0
- package/lib/models/Enums/AssociationFeeFrequencyEnum.ts +13 -0
- package/lib/models/Enums/AuthenticationTypeEnum.ts +6 -0
- package/lib/models/Enums/CurrencyEnum.ts +5 -0
- package/lib/models/Enums/DirectionFacesEnum.ts +11 -0
- package/lib/models/Enums/FeatureSourceEnum.ts +15 -0
- package/lib/models/Enums/GeometryTypeEnum.ts +10 -0
- package/lib/models/Enums/ListingStatusEnum.ts +35 -0
- package/lib/models/Enums/ListingTypeClassEnum.ts +5 -0
- package/lib/models/Enums/ListingTypeEnum.ts +20 -0
- package/lib/models/Enums/MLSEnum.ts +38 -0
- package/lib/models/Enums/OrderByOptions.ts +6 -0
- package/lib/models/Enums/OwnershipTypeEnum.ts +26 -0
- package/lib/models/Enums/PhysicalPropertyClassEnum.ts +6 -0
- package/lib/models/Enums/PhysicalPropertyTypeEnum.ts +55 -0
- package/lib/models/Enums/PlatformEnum.ts +6 -0
- package/lib/models/Enums/ProcessingStatusEnum.ts +8 -0
- package/lib/models/Enums/ProcessingTypeEnum.ts +5 -0
- package/lib/models/Enums/PropertyConditionEnum.ts +21 -0
- package/lib/models/Enums/PropertyLevelEnum.ts +16 -0
- package/lib/models/Enums/StreetDirectionEnum.ts +15 -0
- package/lib/models/Enums/StreetSuffixEnum.ts +245 -0
- package/lib/models/Enums/index.ts +23 -0
- package/lib/models/Feature/CategoryModel.ts +4 -0
- package/lib/models/Feature/FeatureModel.ts +11 -0
- package/lib/models/Feature/SubCategoryModel.ts +4 -0
- package/lib/models/Feature/index.ts +3 -0
- package/lib/models/Listing/ClusteringFilterRequestBaseModel.ts +17 -0
- package/lib/models/Listing/ClusteringFilterResponseModel.cs +29 -0
- package/lib/models/Listing/GetByAddressRequestModel.cs +21 -0
- package/lib/models/Listing/GetByAgentRequestModel.cs +13 -0
- package/lib/models/Listing/GetByIdRequestModel.cs +7 -0
- package/lib/models/Listing/GetByMlsIdRequestModel.ts +5 -0
- package/lib/models/Listing/GetListingsByFilterRequestModel.ts +19 -0
- package/lib/models/Listing/GetMapListingsRequestModel.cs +16 -0
- package/lib/models/Listing/GetNearByListingsRequestModel.cs +17 -0
- package/lib/models/Listing/GetPhotosByIdsRequestModel.cs +6 -0
- package/lib/models/Listing/ListingDistancedModel.cs +7 -0
- package/lib/models/Listing/ListingModel.ts +88 -0
- package/lib/models/Listing/ListingsLocationQueryModel.cs +16 -0
- package/lib/models/Listing/LocationOptions.cs +8 -0
- package/lib/models/Listing/NearByListingsResponse.cs +37 -0
- package/lib/models/Listing/OpenHouseLiteModel.cs +7 -0
- package/lib/models/Listing/OpenHouseModel.ts +21 -0
- package/lib/models/Listing/PhotoModel.ts +10 -0
- package/lib/models/Listing/PropertyModel.ts +57 -0
- package/lib/models/Listing/RentPriceModel.ts +35 -0
- package/lib/models/Listing/StyleModel.ts +5 -0
- package/lib/models/Listing/WalkScoreModel.ts +10 -0
- package/lib/models/Listing/index.ts +9 -0
- package/lib/models/Mls/MlsInfoModel.ts +9 -0
- package/lib/models/Mls/index.ts +1 -0
- package/lib/models/Polygon/PolygonFilterRequestModel.ts +18 -0
- package/lib/models/Polygon/PolygonFilterResponseModel.cs +9 -0
- package/lib/models/Polygon/PolygonLiteResponseModel.cs +18 -0
- package/lib/models/Polygon/PolygonResponseModel.cs +22 -0
- package/lib/models/Polygon/PolygonsQueryModel.cs +12 -0
- package/lib/models/School/SchoolIdentifierModel.ts +8 -0
- package/lib/models/School/SchoolModel.ts +14 -0
- package/lib/models/School/SchoolsByRadiusBatchRequestModel.cs +6 -0
- package/lib/models/School/SchoolsByRadiusRequestModel.cs +10 -0
- package/lib/models/School/index.ts +1 -0
- package/lib/models/index.ts +8 -0
- package/lib/services/SamlsClient.ts +6 -0
- package/package.json +29 -0
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Copyright (c) 2023-present
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# SAMLS-NODEJS-Integration
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { http } from '../globals/HttpModule';
|
|
2
|
+
import {
|
|
3
|
+
ListingModel,
|
|
4
|
+
GetByMlsIdRequestModel,
|
|
5
|
+
GetListingsByFilterRequestModel,
|
|
6
|
+
} from '../models';
|
|
7
|
+
import { Pagination, IApiResponse } from '../globals/interfaces';
|
|
8
|
+
|
|
9
|
+
export class ListingClient {
|
|
10
|
+
GetListingsByFilter(
|
|
11
|
+
model: GetListingsByFilterRequestModel,
|
|
12
|
+
): Promise<IApiResponse<Pagination<ListingModel>>> {
|
|
13
|
+
return http.post('/api/Listing/filter', model);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
GetByMlsId(model: GetByMlsIdRequestModel) {
|
|
17
|
+
return http.post('/api/Listing/mlsId', model);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { http } from '../globals/HttpModule';
|
|
2
|
+
import { MlsInfoModel } from '../models';
|
|
3
|
+
import { IApiResponse } from '../globals/interfaces';
|
|
4
|
+
|
|
5
|
+
export class MlsClient {
|
|
6
|
+
GetMlsInfos(): Promise<IApiResponse<MlsInfoModel[]>> {
|
|
7
|
+
return http.get('/api/Mls');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
GetMlsInfoById(id: number): Promise<IApiResponse<MlsInfoModel>> {
|
|
11
|
+
return http.get(`/api/Mls/${id}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
package/lib/index.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StreetDirectionEnum, StreetSuffixEnum } from "../Enums";
|
|
2
|
+
|
|
3
|
+
export class AddressDetailModel {
|
|
4
|
+
CoreListingId: number = 0;
|
|
5
|
+
City: string = "";
|
|
6
|
+
Country: string = "";
|
|
7
|
+
County: string = "";
|
|
8
|
+
CrossStreet: string = "";
|
|
9
|
+
Directions: string = "";
|
|
10
|
+
ElementarySchool: string = "";
|
|
11
|
+
ElementarySchoolDistrict: string = "";
|
|
12
|
+
FullAddress: string = "";
|
|
13
|
+
HighSchool: string = "";
|
|
14
|
+
HighSchoolDistrict: string = "";
|
|
15
|
+
Latitude: number | null = null;
|
|
16
|
+
LocationDescription: string = "";
|
|
17
|
+
Longitude: number | null = null;
|
|
18
|
+
MiddleOrJuniorSchool: string = "";
|
|
19
|
+
MiddleOrJuniorSchoolDistrict: string = "";
|
|
20
|
+
Neighborhood: string = "";
|
|
21
|
+
PostalCode: string = "";
|
|
22
|
+
SeniorCommunityYN: boolean | null = null;
|
|
23
|
+
StateOrProvince: string = "";
|
|
24
|
+
StreetDirPrefix: StreetDirectionEnum | null = null;
|
|
25
|
+
StreetDirSuffix: StreetDirectionEnum | null = null;
|
|
26
|
+
StreetName: string = "";
|
|
27
|
+
StreetNumber: string = "";
|
|
28
|
+
StreetSuffix: StreetSuffixEnum | null = null;
|
|
29
|
+
SubDivision: string = "";
|
|
30
|
+
UnitNumber: string = "";
|
|
31
|
+
WaterBodyName: string = "";
|
|
32
|
+
WaterfrontProximity: string = "";
|
|
33
|
+
WaterfrontYN: boolean | null = null;
|
|
34
|
+
Zoning: string = "";
|
|
35
|
+
|
|
36
|
+
SamlsFullAddress: string = "";
|
|
37
|
+
SamlsPartialAddress: string = "";
|
|
38
|
+
|
|
39
|
+
PolygonCollection: number[] = [];
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MLSEnum } from "../Enums";
|
|
2
|
+
|
|
3
|
+
export class AgentInfoModel {
|
|
4
|
+
agentId: number = 0;
|
|
5
|
+
agentAOR: string = '';
|
|
6
|
+
agentDesignation: string = '';
|
|
7
|
+
agentDirectPhone: string = '';
|
|
8
|
+
agentEmail: string = '';
|
|
9
|
+
agentFirstName: string = '';
|
|
10
|
+
agentFullName: string = '';
|
|
11
|
+
agentHomePhone: string = '';
|
|
12
|
+
agentKey: string = '';
|
|
13
|
+
agentLastName: string = '';
|
|
14
|
+
agentLicenseNumber: string = '';
|
|
15
|
+
agentMiddleName: string = '';
|
|
16
|
+
agentMls: MLSEnum | null = null;
|
|
17
|
+
agentMlsId: string = '';
|
|
18
|
+
agentMobilePhone: string = '';
|
|
19
|
+
agentNamePrefix: string = '';
|
|
20
|
+
agentNameSuffix: string = '';
|
|
21
|
+
agentOfficePhone: string = '';
|
|
22
|
+
agentOfficePhoneExt: string = '';
|
|
23
|
+
agentPreferredPhone: string = '';
|
|
24
|
+
agentStateLicense: string = '';
|
|
25
|
+
agentUrl: string = '';
|
|
26
|
+
teamKey: string = '';
|
|
27
|
+
teamName: string = '';
|
|
28
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AgentInfoModel } from './AgentInfoModel';
|
|
2
|
+
import { AgentTypeEnum } from '../Enums';
|
|
3
|
+
import { OfficeModel } from './OfficeModel';
|
|
4
|
+
|
|
5
|
+
export class AgentModel extends AgentInfoModel {
|
|
6
|
+
agentTypeId: AgentTypeEnum | null = null;
|
|
7
|
+
office: OfficeModel | null = null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MLSEnum } from '../Enums';
|
|
2
|
+
|
|
3
|
+
export class OfficeModel {
|
|
4
|
+
officeKey: string = '';
|
|
5
|
+
officeAOR: string = '';
|
|
6
|
+
officeCity: string = '';
|
|
7
|
+
officeEmail: string = '';
|
|
8
|
+
officeLocation: string = '';
|
|
9
|
+
officeMls: MLSEnum | null = null;
|
|
10
|
+
officeMlsId: string = '';
|
|
11
|
+
officeName: string = '';
|
|
12
|
+
officeNeighborhood: string = '';
|
|
13
|
+
officePhone: string = '';
|
|
14
|
+
officePhoneExt: string = '';
|
|
15
|
+
officeState: string = '';
|
|
16
|
+
officeStreetName: string = '';
|
|
17
|
+
officeStreetNumber: string = '';
|
|
18
|
+
officeURL: string = '';
|
|
19
|
+
officeZip: string = '';
|
|
20
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Point } from '../Common';
|
|
2
|
+
import { StreetDirectionEnum, StreetSuffixEnum } from '../Enums';
|
|
3
|
+
import { AddressPolygon } from './AddressPolygon';
|
|
4
|
+
import { Listing } from './Listing';
|
|
5
|
+
|
|
6
|
+
export class AddressDetail {
|
|
7
|
+
CoreListingId: number = 0;
|
|
8
|
+
City: string = '';
|
|
9
|
+
Country: string = '';
|
|
10
|
+
County: string = '';
|
|
11
|
+
CrossStreet: string = '';
|
|
12
|
+
Directions: string = '';
|
|
13
|
+
ElementarySchool: string = '';
|
|
14
|
+
ElementarySchoolDistrict: string = '';
|
|
15
|
+
FullAddress: string = '';
|
|
16
|
+
HighSchool: string = '';
|
|
17
|
+
HighSchoolDistrict: string = '';
|
|
18
|
+
Latitude: number | null = null;
|
|
19
|
+
LocationDescription: string = '';
|
|
20
|
+
Longitude: number | null = null;
|
|
21
|
+
MiddleOrJuniorSchool: string = '';
|
|
22
|
+
MiddleOrJuniorSchoolDistrict: string = '';
|
|
23
|
+
Neighborhood: string = '';
|
|
24
|
+
PostalCode: string = '';
|
|
25
|
+
SeniorCommunityYN: boolean | null = null;
|
|
26
|
+
StateOrProvince: string = '';
|
|
27
|
+
StreetDirPrefix: StreetDirectionEnum | null = null;
|
|
28
|
+
StreetDirSuffix: StreetDirectionEnum | null = null;
|
|
29
|
+
StreetName: string = '';
|
|
30
|
+
StreetNumber: string = '';
|
|
31
|
+
StreetSuffix: StreetSuffixEnum | null = null;
|
|
32
|
+
SubDivision: string = '';
|
|
33
|
+
UnitNumber: string = '';
|
|
34
|
+
WaterBodyName: string = '';
|
|
35
|
+
WaterfrontProximity: string = '';
|
|
36
|
+
WaterfrontYN: boolean | null = null;
|
|
37
|
+
Zoning: string = '';
|
|
38
|
+
|
|
39
|
+
Coordinate: Point = new Point(0, 0);
|
|
40
|
+
|
|
41
|
+
SamlsFullAddress: string = '';
|
|
42
|
+
SamlsPartialAddress: string = '';
|
|
43
|
+
|
|
44
|
+
AddressPolygons: AddressPolygon[] = [];
|
|
45
|
+
CoreListing: Listing = new Listing();
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AddressDetail } from './AddressDetail';
|
|
2
|
+
import { Polygon } from './Polygon';
|
|
3
|
+
|
|
4
|
+
export class AddressPolygon {
|
|
5
|
+
id: number = 0;
|
|
6
|
+
addressId: number = 0;
|
|
7
|
+
polygonId: number = 0;
|
|
8
|
+
createDate: Date | null = null;
|
|
9
|
+
polygon: Polygon | null = null;
|
|
10
|
+
address: AddressDetail | null = null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CurrencyEnum,
|
|
3
|
+
ListingStatusEnum,
|
|
4
|
+
ListingTypeEnum,
|
|
5
|
+
OwnershipTypeEnum,
|
|
6
|
+
} from '../Enums';
|
|
7
|
+
import { ListingSchool } from './ListingSchool';
|
|
8
|
+
import { ListingOpenHouse } from './ListingOpenHouse';
|
|
9
|
+
import { Property } from './Property';
|
|
10
|
+
import { AddressDetail } from './AddressDetail';
|
|
11
|
+
|
|
12
|
+
//TODO need to revisit
|
|
13
|
+
export class Listing {
|
|
14
|
+
availabilityDate?: Date | null;
|
|
15
|
+
buyerAgencyCompensation?: number | null;
|
|
16
|
+
buyerFinancing?: string;
|
|
17
|
+
closePrice?: number | null;
|
|
18
|
+
closeTimestamp?: Date | null;
|
|
19
|
+
cumulativeDaysOnMarket?: number | null;
|
|
20
|
+
currency?: CurrencyEnum;
|
|
21
|
+
daysOnMarket?: number | null;
|
|
22
|
+
disclosures?: string;
|
|
23
|
+
expirationDate?: Date | null;
|
|
24
|
+
internetAddressDisplayYN?: boolean | null;
|
|
25
|
+
internetAutomatedValuationDisplayYN?: boolean | null;
|
|
26
|
+
internetConsumerCommentYN?: boolean | null;
|
|
27
|
+
internetEntireListingDisplayYN?: boolean | null;
|
|
28
|
+
lastModificationTimestamp?: Date | null;
|
|
29
|
+
leaseTerm?: string;
|
|
30
|
+
listingAgreement?: string;
|
|
31
|
+
listingEntryTimestamp?: Date | null;
|
|
32
|
+
listingId?: string;
|
|
33
|
+
listingService?: string;
|
|
34
|
+
listingStatus?: ListingStatusEnum;
|
|
35
|
+
listingTerms?: string;
|
|
36
|
+
listingType?: ListingTypeEnum;
|
|
37
|
+
listPrice?: number | null;
|
|
38
|
+
listPriceOriginal?: number | null;
|
|
39
|
+
lockBoxLocation?: string;
|
|
40
|
+
lockBoxSerialNumber?: string;
|
|
41
|
+
lockBoxType?: string;
|
|
42
|
+
maxPrice?: number | null;
|
|
43
|
+
minPrice?: number | null;
|
|
44
|
+
mlsArea?: string;
|
|
45
|
+
mlsName?: string;
|
|
46
|
+
onMarketTimestamp?: Date | null;
|
|
47
|
+
offMarketTimestamp?: Date | null;
|
|
48
|
+
originalListingSource?: string;
|
|
49
|
+
originatingSystemKey?: string;
|
|
50
|
+
ownerPays?: string;
|
|
51
|
+
ownershipType?: OwnershipTypeEnum | null;
|
|
52
|
+
pendingTimestamp?: Date | null;
|
|
53
|
+
petDeposit?: number | null;
|
|
54
|
+
petsAllowedYN?: boolean | null;
|
|
55
|
+
photosChangeTimestamp?: Date | null;
|
|
56
|
+
photosCount?: number;
|
|
57
|
+
priceChangeTimestamp?: Date | null;
|
|
58
|
+
privateRemarks?: string;
|
|
59
|
+
publicRemarks?: string;
|
|
60
|
+
purchaseContractDate?: Date | null;
|
|
61
|
+
showingContactName?: string;
|
|
62
|
+
showingContactPhone?: string;
|
|
63
|
+
showingContactPhoneExt?: string;
|
|
64
|
+
showingContactType?: string;
|
|
65
|
+
statusChangeTimestamp?: Date | null;
|
|
66
|
+
taxAnnualAmount?: number | null;
|
|
67
|
+
taxAssessedValue?: number | null;
|
|
68
|
+
taxYear?: number | null;
|
|
69
|
+
tenantPays?: string;
|
|
70
|
+
virtualTourURLBranded?: string;
|
|
71
|
+
virtualTourURLUnbranded?: string;
|
|
72
|
+
withdrawnDate?: Date | null;
|
|
73
|
+
pricePerSqFeet?: number | null;
|
|
74
|
+
|
|
75
|
+
sourceMlsId?: number;
|
|
76
|
+
sourceUpdateDate?: Date | null;
|
|
77
|
+
sourcePropertyChangeDate?: Date | null;
|
|
78
|
+
sourceAddressChangeDate?: Date | null;
|
|
79
|
+
sourcePhotosChangeDate?: Date | null;
|
|
80
|
+
sourceAgentsChangeDate?: Date | null;
|
|
81
|
+
sourceDBId?: number;
|
|
82
|
+
|
|
83
|
+
listingSchools?: ListingSchool[];
|
|
84
|
+
listingOpenHouses?: ListingOpenHouse[];
|
|
85
|
+
property?: Property;
|
|
86
|
+
addressDetail?: AddressDetail;
|
|
87
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Listing } from './Listing';
|
|
2
|
+
|
|
3
|
+
//TODO need to revisit
|
|
4
|
+
export class ListingOpenHouse {
|
|
5
|
+
key?: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
modificationTimestamp?: Date | null;
|
|
9
|
+
startTime?: Date | null;
|
|
10
|
+
endTime?: Date | null;
|
|
11
|
+
remarks?: string;
|
|
12
|
+
refreshmentsOrSnacks?: string;
|
|
13
|
+
attendedBy?: string;
|
|
14
|
+
appointmentRequiredYN?: boolean | null;
|
|
15
|
+
liveStreamUri?: string;
|
|
16
|
+
liveStreamDescription?: string;
|
|
17
|
+
liveStreamStart?: Date | null;
|
|
18
|
+
liveStreamEnd?: Date | null;
|
|
19
|
+
showingAgentMlsId?: string;
|
|
20
|
+
showingAgentFirstName?: string;
|
|
21
|
+
showingAgentLastName?: string;
|
|
22
|
+
showingAgentKey?: string;
|
|
23
|
+
hash?: string;
|
|
24
|
+
coreListingId?: number;
|
|
25
|
+
listing?: Listing;
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Listing } from './Listing';
|
|
2
|
+
import { School } from './School';
|
|
3
|
+
|
|
4
|
+
export class ListingSchool {
|
|
5
|
+
schoolId: number = 0;
|
|
6
|
+
coreListingId: number = 0;
|
|
7
|
+
school: School | null = null;
|
|
8
|
+
distance: number | null = null;
|
|
9
|
+
listing: Listing | null = null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// import { Geometry } from "ol/geom"; //TODO
|
|
2
|
+
import { GeometryTypeEnum } from '../Enums';
|
|
3
|
+
import { AddressPolygon } from './AddressPolygon';
|
|
4
|
+
|
|
5
|
+
type Geometry = any;
|
|
6
|
+
//TODO need to revisit
|
|
7
|
+
export class Polygon {
|
|
8
|
+
// id: number;
|
|
9
|
+
// name: string;
|
|
10
|
+
// shortName: string;
|
|
11
|
+
// type: GeometryTypeEnum;
|
|
12
|
+
// geometry: Geometry;
|
|
13
|
+
// urlKey: string;
|
|
14
|
+
// weight: number;
|
|
15
|
+
// fipsCode: string;
|
|
16
|
+
// state: string;
|
|
17
|
+
// stateId?: number | null;
|
|
18
|
+
// city: string;
|
|
19
|
+
// cityId?: number | null;
|
|
20
|
+
// county: string;
|
|
21
|
+
// neighborhood: string;
|
|
22
|
+
// addressPolygons: AddressPolygon[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PropertyLevelEnum,
|
|
3
|
+
DirectionFacesEnum,
|
|
4
|
+
PropertyConditionEnum,
|
|
5
|
+
PhysicalPropertyTypeEnum,
|
|
6
|
+
AssociationFeeFrequencyEnum,
|
|
7
|
+
} from '../Enums';
|
|
8
|
+
import { Listing } from './Listing';
|
|
9
|
+
import { PropertyFeature } from './PropertyFeature';
|
|
10
|
+
|
|
11
|
+
//TODO need to revisit
|
|
12
|
+
export class Property {
|
|
13
|
+
// coreListingId: number;
|
|
14
|
+
// associationFee?: number | null;
|
|
15
|
+
// associationFeeFrequency?: AssociationFeeFrequencyEnum | null;
|
|
16
|
+
// associationFeeIncludes: string;
|
|
17
|
+
// associationName: string;
|
|
18
|
+
// associationPhone: string;
|
|
19
|
+
// basementDetails: string;
|
|
20
|
+
// basementYN?: boolean | null;
|
|
21
|
+
// bathroomsFull?: number | null;
|
|
22
|
+
// bathroomsHalf?: number | null;
|
|
23
|
+
// bathroomsOneQuarter?: number | null;
|
|
24
|
+
// bathroomsPartial?: number | null;
|
|
25
|
+
// bathroomsThreeQuarter?: number | null;
|
|
26
|
+
// bathroomsTotal?: number | null;
|
|
27
|
+
// bedroomsTotal?: number | null;
|
|
28
|
+
// builderModel: string;
|
|
29
|
+
// builderName: string;
|
|
30
|
+
// buildingName: string;
|
|
31
|
+
// directionFaces?: DirectionFacesEnum | null;
|
|
32
|
+
// entryLevel?: number | null;
|
|
33
|
+
// farmYN?: boolean | null;
|
|
34
|
+
// fireplacesTotal?: number | null;
|
|
35
|
+
// garageInBuildingYN?: boolean | null;
|
|
36
|
+
// garageSpaces?: number | null;
|
|
37
|
+
// levels?: PropertyLevelEnum | null;
|
|
38
|
+
// livingAreaSquareFeet?: number | null;
|
|
39
|
+
// livingAreaSquareMeters?: number | null;
|
|
40
|
+
// lotDescription: string;
|
|
41
|
+
// lotSizeAcres?: number | null;
|
|
42
|
+
// lotSizeDimensions: string;
|
|
43
|
+
// lotSizeSquareFeet?: number | null;
|
|
44
|
+
// newConstructionYN?: boolean | null;
|
|
45
|
+
// numberOfUnits?: number | null;
|
|
46
|
+
// parcelNumber: string;
|
|
47
|
+
// parkingTotal?: number | null;
|
|
48
|
+
// physicalPropertyType: PhysicalPropertyTypeEnum;
|
|
49
|
+
// poolPrivateYN?: boolean | null;
|
|
50
|
+
// propertyCondition?: PropertyConditionEnum | null;
|
|
51
|
+
// roofCondition: string;
|
|
52
|
+
// roomsTotal?: number | null;
|
|
53
|
+
// stories?: number | null;
|
|
54
|
+
// universalPropertyId: string;
|
|
55
|
+
// yearBuilt?: number | null;
|
|
56
|
+
// styleId?: number | null;
|
|
57
|
+
//
|
|
58
|
+
// propertyFeatures: PropertyFeature[];
|
|
59
|
+
// coreListing: Listing;
|
|
60
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FeatureSourceEnum } from '../Enums';
|
|
2
|
+
import { Property } from './Property';
|
|
3
|
+
|
|
4
|
+
//TODO need to revisit
|
|
5
|
+
export class PropertyFeature {
|
|
6
|
+
// id: number;
|
|
7
|
+
// featureId: number;
|
|
8
|
+
// sourceId: FeatureSourceEnum;
|
|
9
|
+
// order: string;
|
|
10
|
+
// propertyId: number;
|
|
11
|
+
//
|
|
12
|
+
// property: Property;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ListingSchool } from './ListingSchool';
|
|
2
|
+
|
|
3
|
+
//TODO need to revisit
|
|
4
|
+
export class School {
|
|
5
|
+
// schoolId: string;
|
|
6
|
+
// enhancerSchoolId: number;
|
|
7
|
+
// url: string;
|
|
8
|
+
// name: string;
|
|
9
|
+
// lowGrade: string;
|
|
10
|
+
// highGrade: string;
|
|
11
|
+
// level: number | null;
|
|
12
|
+
// lat: number | null;
|
|
13
|
+
// lng: number | null;
|
|
14
|
+
// state: string;
|
|
15
|
+
// isPrivate: boolean;
|
|
16
|
+
// score: number | null;
|
|
17
|
+
//
|
|
18
|
+
// schoolListings: ListingSchool[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './AddressDetail';
|
|
2
|
+
export * from './AddressPolygon';
|
|
3
|
+
export * from './Entity';
|
|
4
|
+
export * from './Listing';
|
|
5
|
+
export * from './ListingOpenHouse';
|
|
6
|
+
export * from './ListingSchool';
|
|
7
|
+
export * from './Polygon';
|
|
8
|
+
export * from './Property';
|
|
9
|
+
export * from './PropertyFeature';
|
|
10
|
+
export * from './School';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export enum FeatureSourceEnum {
|
|
2
|
+
MLS = 1,
|
|
3
|
+
ImageProcessing = 2,
|
|
4
|
+
NLP = 4,
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Helper function to check if a combination of flags is set
|
|
8
|
+
export function hasFlag(enumValue: number, flag: FeatureSourceEnum): boolean {
|
|
9
|
+
return (enumValue & flag) === flag;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// // Usage example
|
|
13
|
+
// const value: FeatureSourceEnum = FeatureSourceEnum.MLS | FeatureSourceEnum.NLP;
|
|
14
|
+
// console.log(hasFlag(value, FeatureSourceEnum.MLS)); // true
|
|
15
|
+
// console.log(hasFlag(value, FeatureSourceEnum.ImageProcessing)); // false
|