@bringg/dashboard-sdk 9.11.3 → 9.12.0
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/Geocoding/Entity/Geocoding.d.ts +3 -1
- package/dist/Geocoding/Entity/Geocoding.js +21 -1
- package/dist/Geocoding/Entity/Geocoding.js.map +1 -1
- package/dist/Geocoding/GeocodingApi.d.ts +2 -1
- package/dist/Geocoding/GeocodingApi.js +3 -0
- package/dist/Geocoding/GeocodingApi.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +25 -2
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +3 -3
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { AutoCompleteResponse, GetPlaceDetailsResponse } from '@bringg/types';
|
|
1
|
+
import { AutoCompleteResponse, BringgReverseGeocodedAddress, GetPlaceDetailsResponse } from '@bringg/types';
|
|
2
2
|
import Entity from '../../Core/Entity';
|
|
3
3
|
import Session from '../../Services/Identity/Session';
|
|
4
4
|
export declare const Routes: {
|
|
5
5
|
AUTO_COMPLETE: string;
|
|
6
6
|
GET_PLACE_DETAILS: string;
|
|
7
|
+
REVERSE_GEOCODE: string;
|
|
7
8
|
};
|
|
8
9
|
export default class GeocodingEntity extends Entity<GeocodingEntity> {
|
|
9
10
|
constructor(session: Session);
|
|
10
11
|
autoComplete(address: string): Promise<AutoCompleteResponse>;
|
|
11
12
|
getPlaceDetails(placeId: string): Promise<GetPlaceDetailsResponse>;
|
|
13
|
+
reverseGeocode(lat: number, lng: number): Promise<BringgReverseGeocodedAddress>;
|
|
12
14
|
}
|
|
@@ -59,7 +59,8 @@ var Entity_1 = __importDefault(require("../../Core/Entity"));
|
|
|
59
59
|
var ENDPOINT_NAME = '/api/geocoder';
|
|
60
60
|
exports.Routes = {
|
|
61
61
|
AUTO_COMPLETE: "".concat(ENDPOINT_NAME, "/auto_complete"),
|
|
62
|
-
GET_PLACE_DETAILS: "".concat(ENDPOINT_NAME, "/place_details")
|
|
62
|
+
GET_PLACE_DETAILS: "".concat(ENDPOINT_NAME, "/place_details"),
|
|
63
|
+
REVERSE_GEOCODE: "".concat(ENDPOINT_NAME, "/geocode/reverse")
|
|
63
64
|
};
|
|
64
65
|
var GeocodingEntity = /** @class */ (function (_super) {
|
|
65
66
|
__extends(GeocodingEntity, _super);
|
|
@@ -92,6 +93,25 @@ var GeocodingEntity = /** @class */ (function (_super) {
|
|
|
92
93
|
});
|
|
93
94
|
});
|
|
94
95
|
};
|
|
96
|
+
GeocodingEntity.prototype.reverseGeocode = function (lat, lng) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
98
|
+
var request, response;
|
|
99
|
+
return __generator(this, function (_a) {
|
|
100
|
+
switch (_a.label) {
|
|
101
|
+
case 0:
|
|
102
|
+
request = { lat: lat, lng: lng };
|
|
103
|
+
return [4 /*yield*/, this.service.routeGenerator
|
|
104
|
+
.post(exports.Routes.REVERSE_GEOCODE)
|
|
105
|
+
.withPayload(request)
|
|
106
|
+
.setException('Failed to reverse geocode')
|
|
107
|
+
.invoke()];
|
|
108
|
+
case 1:
|
|
109
|
+
response = (_a.sent()).response;
|
|
110
|
+
return [2 /*return*/, response];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
};
|
|
95
115
|
return GeocodingEntity;
|
|
96
116
|
}(Entity_1.default));
|
|
97
117
|
exports.default = GeocodingEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Geocoding.js","sourceRoot":"","sources":["../../../src/Geocoding/Entity/Geocoding.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version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,CAAC,eAAe,CAAC;iCAC5B,WAAW,CAAC,OAAO,CAAC;iCACpB,YAAY,CAAC,2BAA2B,CAAC;iCACzC,MAAM,EAAmE,EAAA;;wBAJnE,QAAQ,GAAK,CAAA,SAIsD,CAAA,SAJ3D;wBAMhB,sBAAO,QAAQ,EAAC;;;;KAChB;IACF,sBAAC;AAAD,CAAC,AApCD,CAA6C,gBAAM,GAoClD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AutoCompleteResponse, GetPlaceDetailsResponse } from '@bringg/types';
|
|
1
|
+
import { AutoCompleteResponse, BringgReverseGeocodedAddress, GetPlaceDetailsResponse } from '@bringg/types';
|
|
2
2
|
import Session from '../Services/Identity/Session';
|
|
3
3
|
export default class GeocodingApi {
|
|
4
4
|
private geocodingEntity;
|
|
5
5
|
constructor(session: Session);
|
|
6
6
|
autoComplete(address: string): Promise<AutoCompleteResponse>;
|
|
7
7
|
getPlaceDetails(placeId: string): Promise<GetPlaceDetailsResponse>;
|
|
8
|
+
reverseGeocode(lat: number, lng: number): Promise<BringgReverseGeocodedAddress>;
|
|
8
9
|
}
|
|
@@ -14,6 +14,9 @@ var GeocodingApi = /** @class */ (function () {
|
|
|
14
14
|
GeocodingApi.prototype.getPlaceDetails = function (placeId) {
|
|
15
15
|
return this.geocodingEntity.getPlaceDetails(placeId);
|
|
16
16
|
};
|
|
17
|
+
GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
|
|
18
|
+
return this.geocodingEntity.reverseGeocode(lat, lng);
|
|
19
|
+
};
|
|
17
20
|
return GeocodingApi;
|
|
18
21
|
}());
|
|
19
22
|
exports.default = GeocodingApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeocodingApi.js","sourceRoot":"","sources":["../../src/Geocoding/GeocodingApi.ts"],"names":[],"mappings":";;;;;AAGA,iEAA2C;AAE3C;IAGC,sBAAY,OAAgB;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAEM,mCAAY,GAAnB,UAAoB,OAAe;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAEM,sCAAe,GAAtB,UAAuB,OAAe;QACrC,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IACF,mBAAC;AAAD,CAAC,
|
|
1
|
+
{"version":3,"file":"GeocodingApi.js","sourceRoot":"","sources":["../../src/Geocoding/GeocodingApi.ts"],"names":[],"mappings":";;;;;AAGA,iEAA2C;AAE3C;IAGC,sBAAY,OAAgB;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAEM,mCAAY,GAAnB,UAAoB,OAAe;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAEM,sCAAe,GAAtB,UAAuB,OAAe;QACrC,OAAO,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAEM,qCAAc,GAArB,UAAsB,GAAW,EAAE,GAAW;QAC7C,OAAO,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;IACF,mBAAC;AAAD,CAAC,AAlBD,IAkBC"}
|
|
@@ -56,7 +56,7 @@ var lodash_1 = require("lodash");
|
|
|
56
56
|
var BringgException_1 = require("../Core/BringgException");
|
|
57
57
|
var Logger_1 = __importDefault(require("../Core/Logger"));
|
|
58
58
|
var abort_1 = require("../utils/abort");
|
|
59
|
-
var version = '9.
|
|
59
|
+
var version = '9.12.0';
|
|
60
60
|
function logErrorResponse(response) {
|
|
61
61
|
var data = response.data, status = response.status;
|
|
62
62
|
try {
|
|
@@ -10819,7 +10819,8 @@ var Entity_1 = __importDefault(__webpack_require__(7483));
|
|
|
10819
10819
|
var ENDPOINT_NAME = '/api/geocoder';
|
|
10820
10820
|
exports.Routes = {
|
|
10821
10821
|
AUTO_COMPLETE: "".concat(ENDPOINT_NAME, "/auto_complete"),
|
|
10822
|
-
GET_PLACE_DETAILS: "".concat(ENDPOINT_NAME, "/place_details")
|
|
10822
|
+
GET_PLACE_DETAILS: "".concat(ENDPOINT_NAME, "/place_details"),
|
|
10823
|
+
REVERSE_GEOCODE: "".concat(ENDPOINT_NAME, "/geocode/reverse")
|
|
10823
10824
|
};
|
|
10824
10825
|
var GeocodingEntity = /** @class */ (function (_super) {
|
|
10825
10826
|
__extends(GeocodingEntity, _super);
|
|
@@ -10852,6 +10853,25 @@ var GeocodingEntity = /** @class */ (function (_super) {
|
|
|
10852
10853
|
});
|
|
10853
10854
|
});
|
|
10854
10855
|
};
|
|
10856
|
+
GeocodingEntity.prototype.reverseGeocode = function (lat, lng) {
|
|
10857
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10858
|
+
var request, response;
|
|
10859
|
+
return __generator(this, function (_a) {
|
|
10860
|
+
switch (_a.label) {
|
|
10861
|
+
case 0:
|
|
10862
|
+
request = { lat: lat, lng: lng };
|
|
10863
|
+
return [4 /*yield*/, this.service.routeGenerator
|
|
10864
|
+
.post(exports.Routes.REVERSE_GEOCODE)
|
|
10865
|
+
.withPayload(request)
|
|
10866
|
+
.setException('Failed to reverse geocode')
|
|
10867
|
+
.invoke()];
|
|
10868
|
+
case 1:
|
|
10869
|
+
response = (_a.sent()).response;
|
|
10870
|
+
return [2 /*return*/, response];
|
|
10871
|
+
}
|
|
10872
|
+
});
|
|
10873
|
+
});
|
|
10874
|
+
};
|
|
10855
10875
|
return GeocodingEntity;
|
|
10856
10876
|
}(Entity_1.default));
|
|
10857
10877
|
exports["default"] = GeocodingEntity;
|
|
@@ -10879,6 +10899,9 @@ var GeocodingApi = /** @class */ (function () {
|
|
|
10879
10899
|
GeocodingApi.prototype.getPlaceDetails = function (placeId) {
|
|
10880
10900
|
return this.geocodingEntity.getPlaceDetails(placeId);
|
|
10881
10901
|
};
|
|
10902
|
+
GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
|
|
10903
|
+
return this.geocodingEntity.reverseGeocode(lat, lng);
|
|
10904
|
+
};
|
|
10882
10905
|
return GeocodingApi;
|
|
10883
10906
|
}());
|
|
10884
10907
|
exports["default"] = GeocodingApi;
|
|
@@ -22266,7 +22289,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
22266
22289
|
var BringgException_1 = __webpack_require__(43605);
|
|
22267
22290
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
22268
22291
|
var abort_1 = __webpack_require__(34179);
|
|
22269
|
-
var version = '9.
|
|
22292
|
+
var version = '9.12.0';
|
|
22270
22293
|
function logErrorResponse(response) {
|
|
22271
22294
|
var data = response.data, status = response.status;
|
|
22272
22295
|
try {
|