@bringg/dashboard-sdk 9.50.13 → 9.50.14-pre.1

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.
@@ -1,9 +1,15 @@
1
1
  import { AutoCompleteResponse, BringgReverseGeocodedAddress, GetPlaceDetailsResponse } from '@bringg/types';
2
2
  import Session from '../Services/Identity/Session';
3
+ export declare enum RealTimeGeocodingEvents {
4
+ GEOCODING_CHANGED = "geocoding status changed"
5
+ }
3
6
  export default class GeocodingApi {
4
7
  private geocodingEntity;
8
+ private realTime;
5
9
  constructor(session: Session);
6
10
  autoComplete(address: string): Promise<AutoCompleteResponse>;
7
11
  getPlaceDetails(placeId: string): Promise<GetPlaceDetailsResponse>;
8
12
  reverseGeocode(lat: number, lng: number): Promise<BringgReverseGeocodedAddress>;
13
+ subscribeToEvent(eventHandle: any): void;
14
+ unsubscribeToEvent(eventHandle: any): void;
9
15
  }
@@ -3,10 +3,17 @@ 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
+ exports.RealTimeGeocodingEvents = void 0;
7
+ var StoreEntity_1 = require("../Core/StoreEntity");
6
8
  var Geocoding_1 = __importDefault(require("./Entity/Geocoding"));
9
+ var RealTimeGeocodingEvents;
10
+ (function (RealTimeGeocodingEvents) {
11
+ RealTimeGeocodingEvents["GEOCODING_CHANGED"] = "geocoding status changed";
12
+ })(RealTimeGeocodingEvents = exports.RealTimeGeocodingEvents || (exports.RealTimeGeocodingEvents = {}));
7
13
  var GeocodingApi = /** @class */ (function () {
8
14
  function GeocodingApi(session) {
9
15
  this.geocodingEntity = new Geocoding_1.default(session);
16
+ this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
10
17
  }
11
18
  GeocodingApi.prototype.autoComplete = function (address) {
12
19
  return this.geocodingEntity.autoComplete(address);
@@ -17,6 +24,12 @@ var GeocodingApi = /** @class */ (function () {
17
24
  GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
18
25
  return this.geocodingEntity.reverseGeocode(lat, lng);
19
26
  };
27
+ GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
28
+ return this.realTime.on(RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
29
+ };
30
+ GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
31
+ this.realTime.off(RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
32
+ };
20
33
  return GeocodingApi;
21
34
  }());
22
35
  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":";;;;;;AASA,mDAAsD;AAItD,iEAA2C;AAE3C,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IAClC,yEAA8C,CAAA;AAC/C,CAAC,EAFW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAElC;AAED;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,uBAAuB,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACjF,CAAC;IAEM,yCAAkB,GAAzB,UAA0B,WAAgB;QACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAC3E,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.1';
60
60
  function logErrorResponse(response) {
61
61
  var data = response.data, status = response.status;
62
62
  try {
@@ -10802,10 +10802,17 @@ 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
+ exports.RealTimeGeocodingEvents = void 0;
10806
+ var StoreEntity_1 = __webpack_require__(95574);
10805
10807
  var Geocoding_1 = __importDefault(__webpack_require__(84431));
10808
+ var RealTimeGeocodingEvents;
10809
+ (function (RealTimeGeocodingEvents) {
10810
+ RealTimeGeocodingEvents["GEOCODING_CHANGED"] = "geocoding status changed";
10811
+ })(RealTimeGeocodingEvents = exports.RealTimeGeocodingEvents || (exports.RealTimeGeocodingEvents = {}));
10806
10812
  var GeocodingApi = /** @class */ (function () {
10807
10813
  function GeocodingApi(session) {
10808
10814
  this.geocodingEntity = new Geocoding_1.default(session);
10815
+ this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
10809
10816
  }
10810
10817
  GeocodingApi.prototype.autoComplete = function (address) {
10811
10818
  return this.geocodingEntity.autoComplete(address);
@@ -10816,6 +10823,12 @@ var GeocodingApi = /** @class */ (function () {
10816
10823
  GeocodingApi.prototype.reverseGeocode = function (lat, lng) {
10817
10824
  return this.geocodingEntity.reverseGeocode(lat, lng);
10818
10825
  };
10826
+ GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
10827
+ return this.realTime.on(RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
10828
+ };
10829
+ GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
10830
+ this.realTime.off(RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
10831
+ };
10819
10832
  return GeocodingApi;
10820
10833
  }());
10821
10834
  exports["default"] = GeocodingApi;
@@ -22401,7 +22414,7 @@ var lodash_1 = __webpack_require__(96486);
22401
22414
  var BringgException_1 = __webpack_require__(43605);
22402
22415
  var Logger_1 = __importDefault(__webpack_require__(55860));
22403
22416
  var abort_1 = __webpack_require__(34179);
22404
- var version = '9.50.13';
22417
+ var version = '9.50.14-pre.1';
22405
22418
  function logErrorResponse(response) {
22406
22419
  var data = response.data, status = response.status;
22407
22420
  try {
@@ -38920,6 +38933,7 @@ var PrivilegeTypes;
38920
38933
  PrivilegeTypes["ALLOW_DISPATCHERS_TO_ADD_DISPATCHER"] = "allow_dispatchers_to_add_dispatcher";
38921
38934
  PrivilegeTypes["CHANGE_SKILLS"] = "change_skills";
38922
38935
  PrivilegeTypes["CREATE_SKILLS"] = "create_skills";
38936
+ PrivilegeTypes["ALLOW_USING_ROUTE_SIMULATOR"] = "allow_using_route_simulator";
38923
38937
  })(PrivilegeTypes || (exports.PrivilegeTypes = PrivilegeTypes = {}));
38924
38938
  exports.PRIVILEGES_DEFAULTS = (_a = {},
38925
38939
  _a[PrivilegeTypes.CANCEL_TASK] = true,
@@ -39108,6 +39122,7 @@ var RealtimeEvent;
39108
39122
  RealtimeEvent["ZipCodesImportDone"] = "zip_codes_import:done";
39109
39123
  RealtimeEvent["ServiceAreasImportDone"] = "service_areas_import:done";
39110
39124
  RealtimeEvent["AsyncOperationStatus"] = "async_operation_status";
39125
+ RealtimeEvent["WaypointGeocodingStatusChanged"] = "waypoint_geocoding:status_changed";
39111
39126
  })(RealtimeEvent || (exports.RealtimeEvent = RealtimeEvent = {}));
39112
39127
  //# sourceMappingURL=realtime_event.js.map
39113
39128