@bringg/dashboard-sdk 9.62.1-pre.2 → 9.62.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.
@@ -3,13 +3,10 @@ import Session from '../Services/Identity/Session';
3
3
  export default class GeocodingApi {
4
4
  private geocodingEntity;
5
5
  private realTime;
6
- private eventHandlers;
7
- private isGeocodingChangedSubscribed;
8
- private onGeocodingChanged;
9
6
  constructor(session: Session);
10
7
  autoComplete(address: string): Promise<AutoCompleteResponse>;
11
8
  getPlaceDetails(placeId: string): Promise<GetPlaceDetailsResponse>;
12
9
  reverseGeocode(lat: number, lng: number): Promise<BringgReverseGeocodedAddress>;
13
- subscribeToEvent(eventHandle: (event: any) => void): void;
14
- unsubscribeToEvent(eventHandle: (event: any) => void): void;
10
+ subscribeToEvent(eventHandle: any): void;
11
+ unsubscribeToEvent(eventHandle: any): void;
15
12
  }
@@ -8,12 +8,6 @@ var Geocoding_1 = __importDefault(require("./Entity/Geocoding"));
8
8
  var Geocoding_consts_1 = require("./Geocoding.consts");
9
9
  var GeocodingApi = /** @class */ (function () {
10
10
  function GeocodingApi(session) {
11
- var _this = this;
12
- this.eventHandlers = new Set();
13
- this.isGeocodingChangedSubscribed = false;
14
- this.onGeocodingChanged = function (event) {
15
- _this.eventHandlers.forEach(function (handler) { return handler(event); });
16
- };
17
11
  this.geocodingEntity = new Geocoding_1.default(session);
18
12
  this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
19
13
  }
@@ -27,14 +21,10 @@ var GeocodingApi = /** @class */ (function () {
27
21
  return this.geocodingEntity.reverseGeocode(lat, lng);
28
22
  };
29
23
  GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
30
- this.eventHandlers.add(eventHandle);
31
- if (!this.isGeocodingChangedSubscribed) {
32
- this.realTime.on(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, this.onGeocodingChanged);
33
- this.isGeocodingChangedSubscribed = true;
34
- }
24
+ return this.realTime.on(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
35
25
  };
36
26
  GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
37
- this.eventHandlers.delete(eventHandle);
27
+ this.realTime.off(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
38
28
  };
39
29
  return GeocodingApi;
40
30
  }());
@@ -1 +1 @@
1
- {"version":3,"file":"GeocodingApi.js","sourceRoot":"","sources":["../../src/Geocoding/GeocodingApi.ts"],"names":[],"mappings":";;;;;AAEA,mDAAsD;AAEtD,iEAA2C;AAC3C,uDAA6D;AAE7D;IAUC,sBAAY,OAAgB;QAA5B,iBAGC;QAVO,kBAAa,GAAkC,IAAI,GAAG,EAAE,CAAC;QACzD,iCAA4B,GAAG,KAAK,CAAC;QAErC,uBAAkB,GAAG,UAAC,KAAc;YAC3C,KAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAA,OAAO,IAAI,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc,CAAC,CAAC;QACvD,CAAC,CAAC;QAGD,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,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EAAE,WAAW,CAAC,CAAC;IACjF,CAAC;IAEM,yCAAkB,GAAzB,UAA0B,WAAgB;QACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,0CAAuB,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC;IACF,mBAAC;AAAD,CAAC,AA5BD,IA4BC"}
@@ -11,6 +11,6 @@ export interface ResourceUtilizationApiResponse {
11
11
  avgHandlingUnitsUtilizationPercent: ResourceUtilizationWidgetData;
12
12
  }
13
13
  export interface GetResourceUtilizationParams {
14
- teamIds: number[];
14
+ teamIds?: number[];
15
15
  dateRange: [string, string];
16
16
  }
@@ -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.62.1-pre.2';
59
+ var version = '9.62.1';
60
60
  function logErrorResponse(response) {
61
61
  var data = response.data, status = response.status;
62
62
  try {
@@ -11221,12 +11221,6 @@ var Geocoding_1 = __importDefault(__webpack_require__(84431));
11221
11221
  var Geocoding_consts_1 = __webpack_require__(29091);
11222
11222
  var GeocodingApi = /** @class */ (function () {
11223
11223
  function GeocodingApi(session) {
11224
- var _this = this;
11225
- this.eventHandlers = new Set();
11226
- this.isGeocodingChangedSubscribed = false;
11227
- this.onGeocodingChanged = function (event) {
11228
- _this.eventHandlers.forEach(function (handler) { return handler(event); });
11229
- };
11230
11224
  this.geocodingEntity = new Geocoding_1.default(session);
11231
11225
  this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);
11232
11226
  }
@@ -11240,14 +11234,10 @@ var GeocodingApi = /** @class */ (function () {
11240
11234
  return this.geocodingEntity.reverseGeocode(lat, lng);
11241
11235
  };
11242
11236
  GeocodingApi.prototype.subscribeToEvent = function (eventHandle) {
11243
- this.eventHandlers.add(eventHandle);
11244
- if (!this.isGeocodingChangedSubscribed) {
11245
- this.realTime.on(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, this.onGeocodingChanged);
11246
- this.isGeocodingChangedSubscribed = true;
11247
- }
11237
+ return this.realTime.on(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
11248
11238
  };
11249
11239
  GeocodingApi.prototype.unsubscribeToEvent = function (eventHandle) {
11250
- this.eventHandlers.delete(eventHandle);
11240
+ this.realTime.off(Geocoding_consts_1.RealTimeGeocodingEvents.GEOCODING_CHANGED, eventHandle);
11251
11241
  };
11252
11242
  return GeocodingApi;
11253
11243
  }());
@@ -23301,7 +23291,7 @@ var lodash_1 = __webpack_require__(96486);
23301
23291
  var BringgException_1 = __webpack_require__(43605);
23302
23292
  var Logger_1 = __importDefault(__webpack_require__(55860));
23303
23293
  var abort_1 = __webpack_require__(34179);
23304
- var version = '9.62.1-pre.2';
23294
+ var version = '9.62.1';
23305
23295
  function logErrorResponse(response) {
23306
23296
  var data = response.data, status = response.status;
23307
23297
  try {