@bringg/dashboard-sdk 9.66.0-pre → 9.67.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.
Files changed (34) hide show
  1. package/dist/Data/storable-realtime-subscriptions.d.ts +3 -5
  2. package/dist/Data/storable-realtime-subscriptions.js +9 -23
  3. package/dist/Data/storable-realtime-subscriptions.js.map +1 -1
  4. package/dist/Data/storable-types.d.ts +0 -9
  5. package/dist/ResourceUtilization/Entity/ResourceUtilizationEntity.d.ts +5 -4
  6. package/dist/ResourceUtilization/Entity/ResourceUtilizationEntity.js +16 -23
  7. package/dist/ResourceUtilization/Entity/ResourceUtilizationEntity.js.map +1 -1
  8. package/dist/ResourceUtilization/ResourceUtilizationApi.d.ts +8 -2
  9. package/dist/ResourceUtilization/ResourceUtilizationApi.js +12 -0
  10. package/dist/ResourceUtilization/ResourceUtilizationApi.js.map +1 -1
  11. package/dist/ResourceUtilization/resource-utilization.consts.d.ts +1 -0
  12. package/dist/ResourceUtilization/resource-utilization.consts.js +2 -1
  13. package/dist/ResourceUtilization/resource-utilization.consts.js.map +1 -1
  14. package/dist/ResourceUtilization/types.d.ts +21 -1
  15. package/dist/ResourceUtilization/types.js +9 -0
  16. package/dist/ResourceUtilization/types.js.map +1 -1
  17. package/dist/Services/Identity/User.d.ts +0 -2
  18. package/dist/Services/Identity/User.js.map +1 -1
  19. package/dist/Services/ServiceRequest.js +1 -1
  20. package/dist/User/v2/users-api.d.ts +2 -2
  21. package/dist/User/v2/users-api.js +3 -3
  22. package/dist/User/v2/users-api.js.map +1 -1
  23. package/dist/bringg-dashboard-sdk-cjs2.js +70 -56
  24. package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
  25. package/dist/bringg-dashboard-sdk.js +23 -12
  26. package/dist/bringg-dashboard-sdk.min.js +1 -1
  27. package/dist/bringg-dashboard-sdk.min.js.map +1 -1
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +3 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/storable-data-service.d.ts +0 -1
  32. package/dist/storable-data-service.js +0 -3
  33. package/dist/storable-data-service.js.map +1 -1
  34. package/package.json +2 -2
@@ -8011,15 +8011,8 @@ var StorableRealtimeSubscriptions = /** @class */ (function () {
8011
8011
  _this.runEventCallbacks(event_1.name, { diff: deletedItem });
8012
8012
  }
8013
8013
  else {
8014
- var skipStoreUpdate = !!(data === null || data === void 0 ? void 0 : data.skipStoreUpdate);
8015
- if (skipStoreUpdate) {
8016
- var mappedStorableItem = _this.storableDataService.mapItem(item, data === null || data === void 0 ? void 0 : data.params);
8017
- _this.runEventCallbacks(event_1.name, mappedStorableItem, { skipStoreUpdate: skipStoreUpdate });
8018
- }
8019
- else {
8020
- var mappedStorableItem = _this.storableDataService.updateInStores(item, undefined, undefined, data === null || data === void 0 ? void 0 : data.params);
8021
- _this.runEventCallbacks(event_1.name, mappedStorableItem);
8022
- }
8014
+ var mappedStorableItem = _this.storableDataService.updateInStores(item, undefined, undefined, data === null || data === void 0 ? void 0 : data.params);
8015
+ _this.runEventCallbacks(event_1.name, mappedStorableItem);
8023
8016
  }
8024
8017
  });
8025
8018
  };
@@ -8064,28 +8057,21 @@ var StorableRealtimeSubscriptions = /** @class */ (function () {
8064
8057
  StorableRealtimeSubscriptions.prototype.onAnyEvent = function (event, callback) {
8065
8058
  return this.realtimeSubscriptions.subscribe(event, callback);
8066
8059
  };
8067
- StorableRealtimeSubscriptions.prototype.onEvent = function (event, callback, options) {
8060
+ StorableRealtimeSubscriptions.prototype.onEvent = function (event, callback) {
8068
8061
  var _this = this;
8069
- if (options === void 0) { options = {}; }
8070
8062
  if (!this.eventCallbacks[event]) {
8071
8063
  this.eventCallbacks[event] = [];
8072
8064
  }
8073
- var entry = { callback: callback, options: options };
8074
- this.eventCallbacks[event].push(entry);
8065
+ this.eventCallbacks[event].push(callback);
8075
8066
  return function () {
8076
- var index = _this.eventCallbacks[event].indexOf(entry);
8077
- if (index > -1) {
8078
- _this.eventCallbacks[event].splice(index, 1);
8067
+ var indexOfCallback = _this.eventCallbacks[event].indexOf(callback);
8068
+ if (indexOfCallback > -1) {
8069
+ _this.eventCallbacks[event].splice(indexOfCallback, 1);
8079
8070
  }
8080
8071
  };
8081
8072
  };
8082
- StorableRealtimeSubscriptions.prototype.runEventCallbacks = function (event, data, meta) {
8083
- (this.eventCallbacks[event] || []).forEach(function (entry) {
8084
- if ((meta === null || meta === void 0 ? void 0 : meta.skipStoreUpdate) && entry.options.notifyOnSkippedStoreUpdate !== true) {
8085
- return;
8086
- }
8087
- entry.callback(data);
8088
- });
8073
+ StorableRealtimeSubscriptions.prototype.runEventCallbacks = function (event, data) {
8074
+ (this.eventCallbacks[event] || []).forEach(function (callback) { return callback(data); });
8089
8075
  };
8090
8076
  StorableRealtimeSubscriptions.prototype.changeSubEntity = function (subEntity, idField, parentField, containerField, isDelete) {
8091
8077
  var _a, _b, _c;
@@ -19081,21 +19067,6 @@ exports["default"] = ResourceUploadType;
19081
19067
 
19082
19068
  "use strict";
19083
19069
 
19084
- var __extends = (this && this.__extends) || (function () {
19085
- var extendStatics = function (d, b) {
19086
- extendStatics = Object.setPrototypeOf ||
19087
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19088
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
19089
- return extendStatics(d, b);
19090
- };
19091
- return function (d, b) {
19092
- if (typeof b !== "function" && b !== null)
19093
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
19094
- extendStatics(d, b);
19095
- function __() { this.constructor = d; }
19096
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19097
- };
19098
- })();
19099
19070
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
19100
19071
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19101
19072
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -19136,15 +19107,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19136
19107
  return (mod && mod.__esModule) ? mod : { "default": mod };
19137
19108
  };
19138
19109
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19139
- var Entity_1 = __importDefault(__webpack_require__(7483));
19110
+ var BaseService_1 = __importDefault(__webpack_require__(41992));
19140
19111
  var resource_utilization_consts_1 = __webpack_require__(94254);
19141
- var ResourceUtilizationEntity = /** @class */ (function (_super) {
19142
- __extends(ResourceUtilizationEntity, _super);
19112
+ var ResourceUtilizationEntity = /** @class */ (function () {
19143
19113
  function ResourceUtilizationEntity(session) {
19144
- return _super.call(this, {
19145
- session: session,
19146
- entityName: 'resource-utilization'
19147
- }) || this;
19114
+ this.service = new BaseService_1.default(session, 'resource-utilization');
19148
19115
  }
19149
19116
  ResourceUtilizationEntity.prototype.getResourceUtilization = function (params) {
19150
19117
  return __awaiter(this, void 0, void 0, function () {
@@ -19163,8 +19130,20 @@ var ResourceUtilizationEntity = /** @class */ (function (_super) {
19163
19130
  });
19164
19131
  });
19165
19132
  };
19133
+ ResourceUtilizationEntity.prototype.getResourceUtilizationTeamRatingsByMetric = function (params) {
19134
+ return __awaiter(this, void 0, void 0, function () {
19135
+ return __generator(this, function (_a) {
19136
+ return [2 /*return*/, this.service.routeGenerator
19137
+ .post(resource_utilization_consts_1.Routes.GET_RESOURCE_UTILIZATION_TEAM_RATINGS_BY_METRIC)
19138
+ .withPayload(params)
19139
+ .withExtractor(function (response) { return response.data; })
19140
+ .setException('Failed to fetch resource utilization team ratings by metric')
19141
+ .invoke()];
19142
+ });
19143
+ });
19144
+ };
19166
19145
  return ResourceUtilizationEntity;
19167
- }(Entity_1.default));
19146
+ }());
19168
19147
  exports["default"] = ResourceUtilizationEntity;
19169
19148
  //# sourceMappingURL=ResourceUtilizationEntity.js.map
19170
19149
 
@@ -19227,6 +19206,18 @@ var ResourceUtilizationApi = /** @class */ (function () {
19227
19206
  });
19228
19207
  });
19229
19208
  };
19209
+ /**
19210
+ * Fetches team ratings for a specific resource utilization metric, sorted and limited.
19211
+ * @param params - The metric to rate by, date range, sort order, and max number of results.
19212
+ * @returns Teams ranked by the requested metric.
19213
+ */
19214
+ ResourceUtilizationApi.prototype.getResourceUtilizationTeamRatingsByMetric = function (params) {
19215
+ return __awaiter(this, void 0, void 0, function () {
19216
+ return __generator(this, function (_a) {
19217
+ return [2 /*return*/, this.resourceUtilizationEntity.getResourceUtilizationTeamRatingsByMetric(params)];
19218
+ });
19219
+ });
19220
+ };
19230
19221
  return ResourceUtilizationApi;
19231
19222
  }());
19232
19223
  exports["default"] = ResourceUtilizationApi;
@@ -19243,12 +19234,32 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
19243
19234
  exports.Routes = void 0;
19244
19235
  var SERVICE_PREFIX = '/analytics-service/v1/capacity-planning';
19245
19236
  exports.Routes = {
19246
- GET_RESOURCE_UTILIZATION: "".concat(SERVICE_PREFIX, "/resource-utilization")
19237
+ GET_RESOURCE_UTILIZATION: "".concat(SERVICE_PREFIX, "/resource-utilization"),
19238
+ GET_RESOURCE_UTILIZATION_TEAM_RATINGS_BY_METRIC: "".concat(SERVICE_PREFIX, "/resource-utilization/ratings")
19247
19239
  };
19248
19240
  //# sourceMappingURL=resource-utilization.consts.js.map
19249
19241
 
19250
19242
  /***/ }),
19251
19243
 
19244
+ /***/ 40699:
19245
+ /***/ ((__unused_webpack_module, exports) => {
19246
+
19247
+ "use strict";
19248
+
19249
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
19250
+ exports.ResourceUtilizationRateableMetric = void 0;
19251
+ var ResourceUtilizationRateableMetric;
19252
+ (function (ResourceUtilizationRateableMetric) {
19253
+ ResourceUtilizationRateableMetric["AVG_TIME_UTILIZATION_PERCENT"] = "avgTimeUtilizationPercent";
19254
+ ResourceUtilizationRateableMetric["AVG_WEIGHT_UTILIZATION_PERCENT"] = "avgWeightUtilizationPercent";
19255
+ ResourceUtilizationRateableMetric["AVG_HANDLING_UNITS_UTILIZATION_PERCENT"] = "avgHandlingUnitsUtilizationPercent";
19256
+ ResourceUtilizationRateableMetric["AVG_DELIVERIES_PER_HOUR"] = "avgDeliveriesPerHour";
19257
+ ResourceUtilizationRateableMetric["AVG_DISTANCE_PER_DELIVERY"] = "avgDistancePerDelivery";
19258
+ })(ResourceUtilizationRateableMetric = exports.ResourceUtilizationRateableMetric || (exports.ResourceUtilizationRateableMetric = {}));
19259
+ //# sourceMappingURL=types.js.map
19260
+
19261
+ /***/ }),
19262
+
19252
19263
  /***/ 60904:
19253
19264
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
19254
19265
 
@@ -23329,7 +23340,7 @@ var lodash_1 = __webpack_require__(96486);
23329
23340
  var BringgException_1 = __webpack_require__(43605);
23330
23341
  var Logger_1 = __importDefault(__webpack_require__(55860));
23331
23342
  var abort_1 = __webpack_require__(34179);
23332
- var version = '9.66.0-pre';
23343
+ var version = '9.67.0';
23333
23344
  function logErrorResponse(response) {
23334
23345
  var data = response.data, status = response.status;
23335
23346
  try {
@@ -31229,7 +31240,7 @@ var UsersApi = /** @class */ (function () {
31229
31240
  name: User_consts_1.RealtimeEvents.Update,
31230
31241
  isDelete: false,
31231
31242
  extraDataFunc: function (user) {
31232
- return { skipStoreUpdate: !_this.userStore.get(user.id) };
31243
+ return { ignore: !_this.userStore.get(user.id) };
31233
31244
  }
31234
31245
  },
31235
31246
  { name: User_consts_1.RealtimeEvents.Create, isDelete: false },
@@ -31553,8 +31564,8 @@ var UsersApi = /** @class */ (function () {
31553
31564
  UsersApi.prototype.onCreate = function (callback) {
31554
31565
  return this.storableRealtimeSubscriptions.onEvent(User_consts_1.RealtimeEvents.Create, callback);
31555
31566
  };
31556
- UsersApi.prototype.onUpdate = function (callback, options) {
31557
- return this.storableRealtimeSubscriptions.onEvent(User_consts_1.RealtimeEvents.Update, callback, options);
31567
+ UsersApi.prototype.onUpdate = function (callback) {
31568
+ return this.storableRealtimeSubscriptions.onEvent(User_consts_1.RealtimeEvents.Update, callback);
31558
31569
  };
31559
31570
  UsersApi.prototype.onDelete = function (callback) {
31560
31571
  return this.storableRealtimeSubscriptions.onEvent(User_consts_1.RealtimeEvents.Delete, callback);
@@ -34697,7 +34708,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34697
34708
  return (mod && mod.__esModule) ? mod : { "default": mod };
34698
34709
  };
34699
34710
  Object.defineProperty(exports, "__esModule", ({ value: true }));
34700
- exports.WorkflowsApi = exports.VehicleTypeConsts = exports.VehicleCategoryConsts = exports.VehicleGroup = exports.VehiclesApi = exports.AbortUtils = exports.UsersApi = exports.UserGroupValues = exports.UserGroupTypes = exports.UploadApi = exports.UploadConsts = exports.TasksExplorerApi = exports.TaskRejectReasonsApi = exports.TaskInventoryConsts = exports.TasksApi = exports.TaskGroupValues = exports.TaskGroupTypes = exports.TagConsts = exports.ServiceAreaApi = exports.ServiceAreaFilterGroups = exports.RunsApi = exports.RunStatus = exports.RunConsts = exports.ResourceUploadType = exports.ReasonToChangeInventory = exports.PrivilegesConsts = exports.PlannedRoutesConsts = exports.PlannedDeliveryWindowsApi = exports.RecurrenceType = exports.PlannedDeliveryWindowsFilterGroups = exports.OptimizationResultApi = exports.NotificationTypesConsts = exports.NotificationTemplateConsts = exports.LookupConsts = exports.LanguageConsts = exports.ExclusionWindowApiV2 = exports.ExclusionWindowsFilterGroups = exports.DeliveryWindowsApi = exports.DeliveryBlockConsts = exports.CrewConsts = exports.Responses = exports.ChatMessageConsts = exports.ChatConversationConsts = void 0;
34711
+ exports.WorkflowsApi = exports.VehicleTypeConsts = exports.VehicleCategoryConsts = exports.VehicleGroup = exports.VehiclesApi = exports.AbortUtils = exports.UsersApi = exports.UserGroupValues = exports.UserGroupTypes = exports.UploadApi = exports.UploadConsts = exports.TasksExplorerApi = exports.TaskRejectReasonsApi = exports.TaskInventoryConsts = exports.TasksApi = exports.TaskGroupValues = exports.TaskGroupTypes = exports.TagConsts = exports.ServiceAreaApi = exports.ServiceAreaFilterGroups = exports.RunsApi = exports.RunStatus = exports.RunConsts = exports.ResourceUtilizationRateableMetric = exports.ResourceUploadType = exports.ReasonToChangeInventory = exports.PrivilegesConsts = exports.PlannedRoutesConsts = exports.PlannedDeliveryWindowsApi = exports.RecurrenceType = exports.PlannedDeliveryWindowsFilterGroups = exports.OptimizationResultApi = exports.NotificationTypesConsts = exports.NotificationTemplateConsts = exports.LookupConsts = exports.LanguageConsts = exports.ExclusionWindowApiV2 = exports.ExclusionWindowsFilterGroups = exports.DeliveryWindowsApi = exports.DeliveryBlockConsts = exports.CrewConsts = exports.Responses = exports.ChatMessageConsts = exports.ChatConversationConsts = void 0;
34701
34712
  __exportStar(__webpack_require__(37360), exports);
34702
34713
  __exportStar(__webpack_require__(5655), exports);
34703
34714
  exports.ChatConversationConsts = __importStar(__webpack_require__(44448));
@@ -34728,6 +34739,8 @@ exports.PrivilegesConsts = __importStar(__webpack_require__(82585));
34728
34739
  exports.ReasonToChangeInventory = __importStar(__webpack_require__(95809));
34729
34740
  var ResourceUploadType_1 = __webpack_require__(6587);
34730
34741
  Object.defineProperty(exports, "ResourceUploadType", ({ enumerable: true, get: function () { return __importDefault(ResourceUploadType_1).default; } }));
34742
+ var types_1 = __webpack_require__(40699);
34743
+ Object.defineProperty(exports, "ResourceUtilizationRateableMetric", ({ enumerable: true, get: function () { return types_1.ResourceUtilizationRateableMetric; } }));
34731
34744
  exports.RunConsts = __importStar(__webpack_require__(4669));
34732
34745
  var runs_consts_1 = __webpack_require__(4669);
34733
34746
  Object.defineProperty(exports, "RunStatus", ({ enumerable: true, get: function () { return runs_consts_1.RunStatus; } }));
@@ -35087,9 +35100,6 @@ var StorableDataService = /** @class */ (function () {
35087
35100
  });
35088
35101
  });
35089
35102
  };
35090
- StorableDataService.prototype.mapItem = function (item, extraMapperParams) {
35091
- return this.mapper(item, __assign({}, extraMapperParams));
35092
- };
35093
35103
  StorableDataService.prototype.updateInStores = function (item, action, fields, extraMapperParams) {
35094
35104
  return this.updateManyInStores([item], action, fields, extraMapperParams)[0];
35095
35105
  };
@@ -36940,6 +36950,9 @@ var ActionType;
36940
36950
  ActionType[ActionType["DELIVERY_WINDOW_WEBHOOK"] = 28] = "DELIVERY_WINDOW_WEBHOOK";
36941
36951
  ActionType[ActionType["RESTORE_PREVIOUSLY_REMOVED_WAYPOINT"] = 29] = "RESTORE_PREVIOUSLY_REMOVED_WAYPOINT";
36942
36952
  ActionType[ActionType["REALTIME_DRIVER_LOCATION_WEBHOOK"] = 30] = "REALTIME_DRIVER_LOCATION_WEBHOOK";
36953
+ ActionType[ActionType["REASSIGN_FROM_SCRATCH"] = 31] = "REASSIGN_FROM_SCRATCH";
36954
+ ActionType[ActionType["ASSIGN_NEXT_CARRIER"] = 32] = "ASSIGN_NEXT_CARRIER";
36955
+ ActionType[ActionType["RESET_FLEET_ROUTING"] = 33] = "RESET_FLEET_ROUTING";
36943
36956
  })(ActionType || (exports.ActionType = ActionType = {}));
36944
36957
  var ActionKey;
36945
36958
  (function (ActionKey) {
@@ -39238,6 +39251,7 @@ var RouteOrderByField;
39238
39251
  (function (RouteOrderByField) {
39239
39252
  RouteOrderByField["Name"] = "Name";
39240
39253
  RouteOrderByField["StartTime"] = "StartTime";
39254
+ RouteOrderByField["ScheduledStartTime"] = "ScheduledStartTime";
39241
39255
  })(RouteOrderByField || (exports.RouteOrderByField = RouteOrderByField = {}));
39242
39256
  //# sourceMappingURL=index.js.map
39243
39257
 
@@ -39522,6 +39536,7 @@ var AvailabilityCalculationOrigin;
39522
39536
  AvailabilityCalculationOrigin["AUTOMATION_PLATFORM"] = "AUTOMATION_PLATFORM";
39523
39537
  AvailabilityCalculationOrigin["SIMULATOR"] = "SIMULATOR";
39524
39538
  AvailabilityCalculationOrigin["ADMIN_BCONTROL"] = "ADMIN_BCONTROL";
39539
+ AvailabilityCalculationOrigin["BACKGROUND_EVENTS"] = "BACKGROUND_EVENTS";
39525
39540
  })(AvailabilityCalculationOrigin || (exports.AvailabilityCalculationOrigin = AvailabilityCalculationOrigin = {}));
39526
39541
  //# sourceMappingURL=event.js.map
39527
39542
 
@@ -42452,7 +42467,6 @@ var AuthorizationType;
42452
42467
  (function (AuthorizationType) {
42453
42468
  AuthorizationType[AuthorizationType["JWT_TOKEN"] = 0] = "JWT_TOKEN";
42454
42469
  AuthorizationType[AuthorizationType["OAUTH2"] = 1] = "OAUTH2";
42455
- AuthorizationType[AuthorizationType["STATIC_HEADER"] = 2] = "STATIC_HEADER";
42456
42470
  })(AuthorizationType || (exports.AuthorizationType = AuthorizationType = {}));
42457
42471
  var JWTAlgorithm;
42458
42472
  (function (JWTAlgorithm) {