samls-js-integration 1.0.32 → 1.0.34

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/README.md CHANGED
@@ -1 +1 @@
1
- # SAMLS-NODEJS-Integration
1
+ # Samls-integration
@@ -2,33 +2,56 @@
2
2
  var samls = (function (exports, axios) {
3
3
  'use strict';
4
4
 
5
- const requestConfig = {
6
- baseURL: 'https://samls-providerapi.purlin.vision/',
5
+ const URL = {
6
+ domain: 'https://samls-providerapi.purlin.tech/api/',
7
+ pathPrefix: '',
7
8
  };
9
+
10
+ const requestConfig = { baseURL: URL.domain };
8
11
  const http = axios.create(requestConfig);
9
12
 
13
+ const PATH_SEGMENT$3 = 'AddressDetail';
10
14
  class MlsClient {
11
15
  GetMlsInfos() {
12
- return http.get('/api/Mls');
16
+ return http.get(`${PATH_SEGMENT$3}/Mls`);
13
17
  }
14
18
  GetMlsInfoById(id) {
15
- return http.get(`/api/Mls/${id}`);
19
+ return http.get(`${PATH_SEGMENT$3}/Mls/${id}`);
16
20
  }
17
21
  }
18
22
 
19
- class ListingClient {
20
- GetListingsByFilter(model) {
21
- return http.post('/api/Listing/filter', model);
23
+ const PATH_SEGMENT$2 = 'Listing';
24
+ class ListingsClient {
25
+ getListingsByFilter(model) {
26
+ return http.post(`${PATH_SEGMENT$2}/filter`, model);
22
27
  }
23
28
  GetByMlsId(model) {
24
- return http.post('/api/Listing/mlsId', model);
29
+ return http.post(`${PATH_SEGMENT$2}/mlsId`, model);
25
30
  }
26
31
  }
27
32
 
33
+ const PATH_SEGMENT$1 = 'AddressDetail';
34
+ let AddressDetail$1 = class AddressDetail {
35
+ getByQuery(queryModel) {
36
+ return http.post(`${PATH_SEGMENT$1}/query`, queryModel);
37
+ }
38
+ };
39
+
40
+ const PATH_SEGMENT = 'Polygon';
41
+ class PolygonClient {
42
+ filter(model) {
43
+ return http.post(`${PATH_SEGMENT}/filter`, model);
44
+ }
45
+ }
46
+
47
+ //TODO build is not completed
48
+ //TODO and separate types in one file and remove src codes from library
28
49
  class SamlsClient {
29
50
  constructor() {
30
51
  this.Mls = new MlsClient();
31
- this.Listing = new ListingClient();
52
+ this.Polygons = new PolygonClient();
53
+ this.Listings = new ListingsClient();
54
+ this.AddressDetails = new AddressDetail$1();
32
55
  }
33
56
  }
34
57
 
@@ -40,8 +63,16 @@ var samls = (function (exports, axios) {
40
63
  }
41
64
  }
42
65
 
43
- //TODO
44
- class GlobalQueryModel /*extends Query*/ {
66
+ class GlobalQueryModel {
67
+ constructor() {
68
+ this.skip = 0;
69
+ this.take = 10;
70
+ this.filter = '';
71
+ this.fields = [];
72
+ this.count = false;
73
+ this.orderings = [];
74
+ this.conditions = [];
75
+ }
45
76
  }
46
77
 
47
78
  class LocationModel {
@@ -59,44 +90,48 @@ var samls = (function (exports, axios) {
59
90
  }
60
91
 
61
92
  class AddressQueryModel extends GlobalQueryModel {
93
+ constructor() {
94
+ super(...arguments);
95
+ this.fullAddress = '';
96
+ }
62
97
  }
63
98
 
64
99
  class AddressDetailModel {
65
100
  constructor() {
66
- this.CoreListingId = 0;
67
- this.City = "";
68
- this.Country = "";
69
- this.County = "";
70
- this.CrossStreet = "";
71
- this.Directions = "";
72
- this.ElementarySchool = "";
73
- this.ElementarySchoolDistrict = "";
74
- this.FullAddress = "";
75
- this.HighSchool = "";
76
- this.HighSchoolDistrict = "";
77
- this.Latitude = null;
78
- this.LocationDescription = "";
79
- this.Longitude = null;
80
- this.MiddleOrJuniorSchool = "";
81
- this.MiddleOrJuniorSchoolDistrict = "";
82
- this.Neighborhood = "";
83
- this.PostalCode = "";
84
- this.SeniorCommunityYN = null;
85
- this.StateOrProvince = "";
86
- this.StreetDirPrefix = null;
87
- this.StreetDirSuffix = null;
88
- this.StreetName = "";
89
- this.StreetNumber = "";
90
- this.StreetSuffix = null;
91
- this.SubDivision = "";
92
- this.UnitNumber = "";
93
- this.WaterBodyName = "";
94
- this.WaterfrontProximity = "";
95
- this.WaterfrontYN = null;
96
- this.Zoning = "";
97
- this.SamlsFullAddress = "";
98
- this.SamlsPartialAddress = "";
99
- this.PolygonCollection = [];
101
+ this.coreListingId = 0;
102
+ this.city = '';
103
+ this.country = '';
104
+ this.county = '';
105
+ this.crossStreet = '';
106
+ this.directions = '';
107
+ this.elementarySchool = '';
108
+ this.elementarySchoolDistrict = '';
109
+ this.fullAddress = '';
110
+ this.highSchool = '';
111
+ this.highSchoolDistrict = '';
112
+ this.latitude = null;
113
+ this.locationDescription = '';
114
+ this.longitude = null;
115
+ this.middleOrJuniorSchool = '';
116
+ this.middleOrJuniorSchoolDistrict = '';
117
+ this.neighborhood = '';
118
+ this.postalCode = '';
119
+ this.seniorCommunityYN = null;
120
+ this.stateOrProvince = '';
121
+ this.streetDirPrefix = null;
122
+ this.streetDirSuffix = null;
123
+ this.streetName = '';
124
+ this.streetNumber = '';
125
+ this.streetSuffix = null;
126
+ this.subDivision = '';
127
+ this.unitNumber = '';
128
+ this.waterBodyName = '';
129
+ this.waterfrontProximity = '';
130
+ this.waterfrontYN = null;
131
+ this.zoning = '';
132
+ this.samlsFullAddress = '';
133
+ this.samlsPartialAddress = '';
134
+ this.polygonCollection = [];
100
135
  }
101
136
  }
102
137
 
@@ -901,76 +936,76 @@ var samls = (function (exports, axios) {
901
936
 
902
937
  class ListingModel {
903
938
  constructor() {
904
- this.Id = 0;
905
- this.AvailabilityDate = null;
906
- this.BuyerAgencyCompensation = null;
907
- this.BuyerFinancing = '';
908
- this.ClosePrice = null;
909
- this.CloseTimestamp = null;
910
- this.CumulativeDaysOnMarket = null;
911
- this.Currency = null;
912
- this.DaysOnMarket = null;
913
- this.Disclosures = '';
914
- this.ExpirationDate = null;
915
- this.InternetAddressDisplayYN = null;
916
- this.InternetAutomatedValuationDisplayYN = null;
917
- this.InternetConsumerCommentYN = null;
918
- this.InternetEntireListingDisplayYN = null;
919
- this.LastModificationTimestamp = null;
920
- this.LeaseTerm = '';
921
- this.ListingAgreement = '';
922
- this.ListingEntryTimestamp = null;
923
- this.ListingId = '';
924
- this.ListingService = '';
925
- this.ListingStatus = null;
926
- this.ListingTerms = '';
927
- this.ListingType = null;
928
- this.ListPrice = null;
929
- this.PricePerSqFeet = null;
930
- this.ListPriceOriginal = null;
931
- this.LockBoxLocation = '';
932
- this.LockBoxSerialNumber = '';
933
- this.LockBoxType = '';
934
- this.MaxPrice = null;
935
- this.MinPrice = null;
936
- this.MlsArea = '';
937
- this.MlsName = '';
938
- this.OnMarketTimestamp = null;
939
- this.OffMarketTimestamp = null;
940
- this.OriginalListingSource = '';
941
- this.OriginatingSystemKey = '';
942
- this.OwnerPays = '';
943
- this.OwnershipType = null;
944
- this.PendingTimestamp = null;
945
- this.PetDeposit = null;
946
- this.PetsAllowedYN = null;
947
- this.PhotosChangeTimestamp = null;
948
- this.PhotosCount = 0;
949
- this.PriceChangeTimestamp = null;
950
- this.PrivateRemarks = '';
951
- this.PublicRemarks = '';
952
- this.PurchaseContractDate = null;
953
- this.ShowingContactName = '';
954
- this.ShowingContactPhone = '';
955
- this.ShowingContactPhoneExt = '';
956
- this.ShowingContactType = '';
957
- this.StatusChangeTimestamp = null;
958
- this.TaxAnnualAmount = null;
959
- this.TaxAssessedValue = null;
960
- this.TaxYear = null;
961
- this.TenantPays = '';
962
- this.VirtualTourURLBranded = ' ';
963
- this.VirtualTourURLUnbranded = '';
964
- this.WithdrawnDate = null;
965
- this.SourceMlsId = null;
966
- this.Property = null;
967
- this.AddressDetail = null;
968
- this.RentPrices = null;
969
- this.WalkScores = null;
970
- this.OpenHouses = null;
971
- this.Photos = null;
972
- this.Schools = null;
973
- this.Agents = null;
939
+ this.id = 0;
940
+ this.availabilityDate = null;
941
+ this.buyerAgencyCompensation = null;
942
+ this.buyerFinancing = '';
943
+ this.closePrice = null;
944
+ this.closeTimestamp = null;
945
+ this.cumulativeDaysOnMarket = null;
946
+ this.currency = null;
947
+ this.daysOnMarket = null;
948
+ this.disclosures = '';
949
+ this.expirationDate = null;
950
+ this.internetAddressDisplayYN = null;
951
+ this.internetAutomatedValuationDisplayYN = null;
952
+ this.internetConsumerCommentYN = null;
953
+ this.internetEntireListingDisplayYN = null;
954
+ this.lastModificationTimestamp = null;
955
+ this.leaseTerm = '';
956
+ this.listingAgreement = '';
957
+ this.listingEntryTimestamp = null;
958
+ this.listingId = '';
959
+ this.listingService = '';
960
+ this.listingStatus = null;
961
+ this.listingTerms = '';
962
+ this.listingType = null;
963
+ this.listPrice = null;
964
+ this.pricePerSqFeet = null;
965
+ this.listPriceOriginal = null;
966
+ this.lockBoxLocation = '';
967
+ this.lockBoxSerialNumber = '';
968
+ this.lockBoxType = '';
969
+ this.maxPrice = null;
970
+ this.minPrice = null;
971
+ this.mlsArea = '';
972
+ this.mlsName = '';
973
+ this.onMarketTimestamp = null;
974
+ this.offMarketTimestamp = null;
975
+ this.originalListingSource = '';
976
+ this.originatingSystemKey = '';
977
+ this.ownerPays = '';
978
+ this.ownershipType = null;
979
+ this.pendingTimestamp = null;
980
+ this.petDeposit = null;
981
+ this.petsAllowedYN = null;
982
+ this.photosChangeTimestamp = null;
983
+ this.photosCount = 0;
984
+ this.priceChangeTimestamp = null;
985
+ this.privateRemarks = '';
986
+ this.publicRemarks = '';
987
+ this.purchaseContractDate = null;
988
+ this.showingContactName = '';
989
+ this.showingContactPhone = '';
990
+ this.showingContactPhoneExt = '';
991
+ this.showingContactType = '';
992
+ this.statusChangeTimestamp = null;
993
+ this.taxAnnualAmount = null;
994
+ this.taxAssessedValue = null;
995
+ this.taxYear = null;
996
+ this.tenantPays = '';
997
+ this.virtualTourURLBranded = ' ';
998
+ this.virtualTourURLUnbranded = '';
999
+ this.withdrawnDate = null;
1000
+ this.sourceMlsId = null;
1001
+ this.property = null;
1002
+ this.addressDetail = null;
1003
+ this.rentPrices = null;
1004
+ this.walkScores = null;
1005
+ this.openHouses = null;
1006
+ this.photos = null;
1007
+ this.schools = null;
1008
+ this.agents = null;
974
1009
  }
975
1010
  }
976
1011
 
@@ -1038,11 +1073,10 @@ var samls = (function (exports, axios) {
1038
1073
  }
1039
1074
  }
1040
1075
 
1041
- //Fully cleaned
1042
1076
  class GetByMlsIdRequestModel {
1043
1077
  constructor() {
1044
- this.MlsId = '';
1045
- this.Fields = null;
1078
+ this.mlsId = '';
1079
+ this.fields = [];
1046
1080
  }
1047
1081
  }
1048
1082
 
@@ -1140,6 +1174,51 @@ var samls = (function (exports, axios) {
1140
1174
  }
1141
1175
  }
1142
1176
 
1177
+ class LimitModel {
1178
+ constructor(data) {
1179
+ this.count = 0;
1180
+ this.type = null;
1181
+ Object.assign(this, data);
1182
+ }
1183
+ }
1184
+
1185
+ class PolygonLiteResponseModel {
1186
+ constructor() {
1187
+ this.id = 0;
1188
+ this.name = '';
1189
+ this.shortName = '';
1190
+ this.urlKey = '';
1191
+ this.city = '';
1192
+ this.county = '';
1193
+ this.cityId = null;
1194
+ this.state = '';
1195
+ this.stateId = null;
1196
+ this.neighborhood = '';
1197
+ this.zip = '';
1198
+ this.weight = 0;
1199
+ this.stateShortName = '';
1200
+ }
1201
+ }
1202
+
1203
+ class PolygonFilterRequestModel {
1204
+ constructor(data) {
1205
+ this.text = '';
1206
+ this.states = [];
1207
+ this.skipNullUrlKey = false;
1208
+ this.skipNullGeometry = false;
1209
+ this.limits = [];
1210
+ Object.assign(this, data);
1211
+ }
1212
+ }
1213
+
1214
+ class PolygonFilterResponseModel {
1215
+ constructor(data) {
1216
+ this.type = null;
1217
+ this.polygons = [];
1218
+ Object.assign(this, data);
1219
+ }
1220
+ }
1221
+
1143
1222
  exports.AddressDetail = AddressDetail;
1144
1223
  exports.AddressDetailModel = AddressDetailModel;
1145
1224
  exports.AddressPolygon = AddressPolygon;
@@ -1154,6 +1233,7 @@ var samls = (function (exports, axios) {
1154
1233
  exports.GetByMlsIdRequestModel = GetByMlsIdRequestModel;
1155
1234
  exports.GetListingsByFilterRequestModel = GetListingsByFilterRequestModel;
1156
1235
  exports.GlobalQueryModel = GlobalQueryModel;
1236
+ exports.LimitModel = LimitModel;
1157
1237
  exports.Listing = Listing;
1158
1238
  exports.ListingModel = ListingModel;
1159
1239
  exports.ListingOpenHouse = ListingOpenHouse;
@@ -1166,6 +1246,9 @@ var samls = (function (exports, axios) {
1166
1246
  exports.PhotoModel = PhotoModel;
1167
1247
  exports.Point = Point;
1168
1248
  exports.Polygon = Polygon;
1249
+ exports.PolygonFilterRequestModel = PolygonFilterRequestModel;
1250
+ exports.PolygonFilterResponseModel = PolygonFilterResponseModel;
1251
+ exports.PolygonLiteResponseModel = PolygonLiteResponseModel;
1169
1252
  exports.Property = Property;
1170
1253
  exports.PropertyFeature = PropertyFeature;
1171
1254
  exports.PropertyModel = PropertyModel;