@bringg/dashboard-sdk 9.50.13 → 9.50.14-pre.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.
@@ -2,8 +2,11 @@ import { AutoCompleteResponse, BringgReverseGeocodedAddress, GetPlaceDetailsResp
2
2
  import Session from '../Services/Identity/Session';
3
3
  export default class GeocodingApi {
4
4
  private geocodingEntity;
5
+ private realTime;
5
6
  constructor(session: Session);
6
7
  autoComplete(address: string): Promise<AutoCompleteResponse>;
7
8
  getPlaceDetails(placeId: string): Promise<GetPlaceDetailsResponse>;
8
9
  reverseGeocode(lat: number, lng: number): Promise<BringgReverseGeocodedAddress>;
10
+ subscribeToEvent(eventHandle: any): void;
11
+ unsubscribeToEvent(eventHandle: any): void;
9
12
  }
@@ -3,10 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ var types_1 = require("@bringg/types");
7
+ var StoreEntity_1 = require("../Core/StoreEntity");
6
8
  var Geocoding_1 = __importDefault(require("./Entity/Geocoding"));
7
9
  var GeocodingApi = /** @class */ (function () {
8
10
  function GeocodingApi(session) {
9
11
  this.geocodingEntity = new Geocoding_1.default(session);
12
+ this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
10
13
  }
11
14
  GeocodingApi.prototype.autoComplete = function (address) {
12
15
  return this.geocodingEntity.autoComplete(address);
@@ -17,6 +20,12 @@ var GeocodingApi = /** @class */ (function () {
17
20
  GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
18
21
  return this.geocodingEntity.reverseGeocode(lat, lng);
19
22
  };
23
+ GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
24
+ return this.realTime.on(types_1.RealtimeEvent.WaypointGeocodingStatusChanged, eventHandle);
25
+ };
26
+ GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
27
+ this.realTime.off(types_1.RealtimeEvent.WaypointGeocodingStatusChanged, eventHandle);
28
+ };
20
29
  return GeocodingApi;
21
30
  }());
22
31
  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;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"}
1
+ {"version":3,"file":"GeocodingApi.js","sourceRoot":"","sources":["../../src/Geocoding/GeocodingApi.ts"],"names":[],"mappings":";;;;;AAAA,uCAOuB;AAEvB,mDAAsD;AAItD,iEAA2C;AAE3C;IAIC,sBAAY,OAAgB;QAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,6BAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnE,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;IAEM,uCAAgB,GAAvB,UAAwB,WAAgB;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,qBAAa,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC;IACpF,CAAC;IAEM,yCAAkB,GAAzB,UAA0B,WAAgB;QACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAa,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC;IACF,mBAAC;AAAD,CAAC,AA5BD,IA4BC"}
@@ -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.50.13';
59
+ var version = '9.50.14-pre.0';
60
60
  function logErrorResponse(response) {
61
61
  var data = response.data, status = response.status;
62
62
  try {
@@ -10802,10 +10802,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10802
10802
  return (mod && mod.__esModule) ? mod : { "default": mod };
10803
10803
  };
10804
10804
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10805
+ var types_1 = __webpack_require__(63127);
10806
+ var StoreEntity_1 = __webpack_require__(95574);
10805
10807
  var Geocoding_1 = __importDefault(__webpack_require__(84431));
10806
10808
  var GeocodingApi = /** @class */ (function () {
10807
10809
  function GeocodingApi(session) {
10808
10810
  this.geocodingEntity = new Geocoding_1.default(session);
10811
+ this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
10809
10812
  }
10810
10813
  GeocodingApi.prototype.autoComplete = function (address) {
10811
10814
  return this.geocodingEntity.autoComplete(address);
@@ -10816,6 +10819,12 @@ var GeocodingApi = /** @class */ (function () {
10816
10819
  GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
10817
10820
  return this.geocodingEntity.reverseGeocode(lat, lng);
10818
10821
  };
10822
+ GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
10823
+ return this.realTime.on(types_1.RealtimeEvent.WaypointGeocodingStatusChanged, eventHandle);
10824
+ };
10825
+ GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
10826
+ this.realTime.off(types_1.RealtimeEvent.WaypointGeocodingStatusChanged, eventHandle);
10827
+ };
10819
10828
  return GeocodingApi;
10820
10829
  }());
10821
10830
  exports["default"] = GeocodingApi;
@@ -22401,7 +22410,7 @@ var lodash_1 = __webpack_require__(96486);
22401
22410
  var BringgException_1 = __webpack_require__(43605);
22402
22411
  var Logger_1 = __importDefault(__webpack_require__(55860));
22403
22412
  var abort_1 = __webpack_require__(34179);
22404
- var version = '9.50.13';
22413
+ var version = '9.50.14-pre.0';
22405
22414
  function logErrorResponse(response) {
22406
22415
  var data = response.data, status = response.status;
22407
22416
  try {
@@ -38920,6 +38929,7 @@ var PrivilegeTypes;
38920
38929
  PrivilegeTypes["ALLOW_DISPATCHERS_TO_ADD_DISPATCHER"] = "allow_dispatchers_to_add_dispatcher";
38921
38930
  PrivilegeTypes["CHANGE_SKILLS"] = "change_skills";
38922
38931
  PrivilegeTypes["CREATE_SKILLS"] = "create_skills";
38932
+ PrivilegeTypes["ALLOW_USING_ROUTE_SIMULATOR"] = "allow_using_route_simulator";
38923
38933
  })(PrivilegeTypes || (exports.PrivilegeTypes = PrivilegeTypes = {}));
38924
38934
  exports.PRIVILEGES_DEFAULTS = (_a = {},
38925
38935
  _a[PrivilegeTypes.CANCEL_TASK] = true,
@@ -39108,6 +39118,7 @@ var RealtimeEvent;
39108
39118
  RealtimeEvent["ZipCodesImportDone"] = "zip_codes_import:done";
39109
39119
  RealtimeEvent["ServiceAreasImportDone"] = "service_areas_import:done";
39110
39120
  RealtimeEvent["AsyncOperationStatus"] = "async_operation_status";
39121
+ RealtimeEvent["WaypointGeocodingStatusChanged"] = "waypoint_geocoding:status_changed";
39111
39122
  })(RealtimeEvent || (exports.RealtimeEvent = RealtimeEvent = {}));
39112
39123
  //# sourceMappingURL=realtime_event.js.map
39113
39124