@bringg/dashboard-sdk 5.16.0-pre.1 → 5.17.0-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,3 +1,4 @@
1
+ import { CommonOptions } from '../../Core/RouteGenerator';
1
2
  import StoreEntity from '../../Core/StoreEntity';
2
3
  import Session from '../../Services/Identity/Session';
3
4
  import { PlannedRoutesResponse } from '../PlannedRoutes.consts';
@@ -5,8 +6,8 @@ export declare const extractor: (response: PlannedRoutesResponse) => import("@br
5
6
  declare class PlannedRoutesEntity extends StoreEntity<Bringg.PlannedRoute> {
6
7
  constructor(session: Session);
7
8
  getAll(): Promise<any>;
8
- getAllByTeam(teamId: number): Promise<Bringg.PlannedRoute[]>;
9
- getBatch(ids: number[]): Promise<Bringg.PlannedRoute[]>;
10
- getBatchByTeamIds(team_ids: number[]): Promise<Bringg.PlannedRoute[]>;
9
+ getAllByTeam(teamId: number, commonOptions?: CommonOptions): Promise<Bringg.PlannedRoute[]>;
10
+ getBatch(ids: number[], commonOptions?: CommonOptions): Promise<Bringg.PlannedRoute[]>;
11
+ getBatchByTeamIds(team_ids: number[], commonOptions?: CommonOptions): Promise<Bringg.PlannedRoute[]>;
11
12
  }
12
13
  export default PlannedRoutesEntity;
@@ -37,25 +37,31 @@ var PlannedRoutesEntity = /** @class */ (function (_super) {
37
37
  PlannedRoutesEntity.prototype.getAll = function () {
38
38
  return this.getAllOrFetch(null, exports.extractor, exports.extractor);
39
39
  };
40
- PlannedRoutesEntity.prototype.getAllByTeam = function (teamId) {
40
+ PlannedRoutesEntity.prototype.getAllByTeam = function (teamId, commonOptions) {
41
+ if (commonOptions === void 0) { commonOptions = {}; }
41
42
  return this.service.routeGenerator
42
43
  .get(Routes.GET_PLANNED_ROUTES_BY_TEAM)
44
+ .withCommonOptions(commonOptions)
43
45
  .withExtractor(exports.extractor)
44
46
  .setException("Could not fetch planned routes of the team #".concat(teamId))
45
47
  .withRouteParams({ teamId: teamId })
46
48
  .invoke();
47
49
  };
48
- PlannedRoutesEntity.prototype.getBatch = function (ids) {
50
+ PlannedRoutesEntity.prototype.getBatch = function (ids, commonOptions) {
51
+ if (commonOptions === void 0) { commonOptions = {}; }
49
52
  return this.service.routeGenerator
50
53
  .get(Routes.GET_BATCH)
54
+ .withCommonOptions(commonOptions)
51
55
  .withExtractor(exports.extractor)
52
56
  .setException("Could not fetch planned routes with ids ".concat(ids.toString()))
53
57
  .withQueryString({ ids: ids })
54
58
  .invoke();
55
59
  };
56
- PlannedRoutesEntity.prototype.getBatchByTeamIds = function (team_ids) {
60
+ PlannedRoutesEntity.prototype.getBatchByTeamIds = function (team_ids, commonOptions) {
61
+ if (commonOptions === void 0) { commonOptions = {}; }
57
62
  return this.service.routeGenerator
58
63
  .get(Routes.GET_BATCH_BY_TEAM_IDS)
64
+ .withCommonOptions(commonOptions)
59
65
  .withExtractor(exports.extractor)
60
66
  .setException("Could not fetch planned routes for the teams ".concat(team_ids.toString()))
61
67
  .withQueryString({ team_ids: team_ids })
@@ -1 +1 @@
1
- {"version":3,"file":"PlannedRoutesEntity.js","sourceRoot":"","sources":["../../../src/PlannedRoutes/Entity/PlannedRoutesEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA+C;AAC/C,sDAAiD;AAI1C,IAAM,SAAS,GAAG,UAAC,QAA+B,IAAK,OAAA,QAAQ,CAAC,cAAc,EAAvB,CAAuB,CAAC;AAAzE,QAAA,SAAS,aAAgE;AAEtF,IAAM,MAAM,GAAG;IACd,0BAA0B,EAAE,iCAAiC;IAC7D,qBAAqB,EAAE,2BAA2B;IAClD,SAAS,EAAE,kCAAkC;CAC7C,CAAC;AAEF;IAAkC,uCAAgC;IACjE,6BAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,EAAE,gBAAgB;YAC5B,MAAM,EAAE,CAAC,mBAAU,CAAC,MAAM,CAAC;SAC3B,CAAC;IACH,CAAC;IAED,o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C;IACZ,CAAC;IAEM,+CAAiB,GAAxB,UAAyB,QAAkB,EAAE,aAAiC;QAAjC,8BAAA,EAAA,kBAAiC;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc;aAChC,GAAG,CAAC,MAAM,CAAC,qBAAqB,CAAC;aACjC,iBAAiB,CAAC,aAAa,CAAC;aAChC,aAAa,CAAC,iBAAS,CAAC;aACxB,YAAY,CAAC,uDAAgD,QAAQ,CAAC,QAAQ,EAAE,CAAE,CAAC;aACnF,eAAe,CAAC,EAAE,QAAQ,UAAA,EAAE,CAAC;aAC7B,MAAM,EAAE,CAAC;IACZ,CAAC;IACF,0BAAC;AAAD,CAAC,AA1CD,CAAkC,qBAAW,GA0C5C;AAED,kBAAe,mBAAmB,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { PlannedRoute } from '@bringg/types';
2
+ import { CommonOptions } from '../Core/RouteGenerator';
2
3
  import Session from '../Services/Identity/Session';
3
4
  export default class PlannedRoutes {
4
5
  private plannedRoutesEntity;
5
6
  constructor(session: Session);
6
- getAllByTeam(teamId: number): Promise<PlannedRoute[]>;
7
+ getAllByTeam(teamId: number, commonOptions?: CommonOptions): Promise<PlannedRoute[]>;
7
8
  getAll(): Promise<PlannedRoute[]>;
8
- getBatchByTeamIds(teamIds: number[]): Promise<PlannedRoute[]>;
9
- getBatch(ids: number[]): Promise<PlannedRoute[]>;
9
+ getBatchByTeamIds(teamIds: number[], commonOptions?: CommonOptions): Promise<PlannedRoute[]>;
10
+ getBatch(ids: number[], options?: CommonOptions): Promise<PlannedRoute[]>;
10
11
  }
@@ -5,17 +5,17 @@ var PlannedRoutes = /** @class */ (function () {
5
5
  function PlannedRoutes(session) {
6
6
  this.plannedRoutesEntity = new PlannedRoutesEntity_1.default(session);
7
7
  }
8
- PlannedRoutes.prototype.getAllByTeam = function (teamId) {
9
- return this.plannedRoutesEntity.getAllByTeam(teamId);
8
+ PlannedRoutes.prototype.getAllByTeam = function (teamId, commonOptions) {
9
+ return this.plannedRoutesEntity.getAllByTeam(teamId, commonOptions);
10
10
  };
11
11
  PlannedRoutes.prototype.getAll = function () {
12
12
  return this.plannedRoutesEntity.getAll();
13
13
  };
14
- PlannedRoutes.prototype.getBatchByTeamIds = function (teamIds) {
15
- return this.plannedRoutesEntity.getBatchByTeamIds(teamIds);
14
+ PlannedRoutes.prototype.getBatchByTeamIds = function (teamIds, commonOptions) {
15
+ return this.plannedRoutesEntity.getBatchByTeamIds(teamIds, commonOptions);
16
16
  };
17
- PlannedRoutes.prototype.getBatch = function (ids) {
18
- return this.plannedRoutesEntity.getBatch(ids);
17
+ PlannedRoutes.prototype.getBatch = function (ids, options) {
18
+ return this.plannedRoutesEntity.getBatch(ids, options);
19
19
  };
20
20
  return PlannedRoutes;
21
21
  }());
@@ -1 +1 @@
1
- {"version":3,"file":"PlannedRoutesApi.js","sourceRoot":"","sources":["../../src/PlannedRoutes/PlannedRoutesApi.ts"],"names":[],"mappings":";;AAGA,oEAA+D;AAE/D;IAGC,uBAAY,OAAgB;QAC3B,IAAI,CAAC,mBAAmB,GAAG,IAAI,6BAAmB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAEM,oCAAY,GAAnB,UAAoB,MAAc;QACjC,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IAEM,8BAAM,GAAb;QACC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;IAC1C,CAAC;IAEM,yCAAiB,GAAxB,UAAyB,OAAiB;QACzC,OAAO,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAEM,gCAAQ,GAAf,UAAgB,GAAa;QAC5B,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IACF,oBAAC;AAAD,CAAC,AAtBD,IAsBC"}
1
+ {"version":3,"file":"PlannedRoutesApi.js","sourceRoot":"","sources":["../../src/PlannedRoutes/PlannedRoutesApi.ts"],"names":[],"mappings":";;AAIA,oEAA+D;AAE/D;IAGC,uBAAY,OAAgB;QAC3B,IAAI,CAAC,mBAAmB,GAAG,IAAI,6BAAmB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAEM,oCAAY,GAAnB,UAAoB,MAAc,EAAE,aAA6B;QAChE,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrE,CAAC;IAEM,8BAAM,GAAb;QACC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;IAC1C,CAAC;IAEM,yCAAiB,GAAxB,UAAyB,OAAiB,EAAE,aAA6B;QACxE,OAAO,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC3E,CAAC;IAEM,gCAAQ,GAAf,UAAgB,GAAa,EAAE,OAAuB;QACrD,OAAO,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IACF,oBAAC;AAAD,CAAC,AAtBD,IAsBC"}
@@ -53,7 +53,7 @@ var lodash_1 = require("lodash");
53
53
  var BringgException_1 = require("../Core/BringgException");
54
54
  var Logger_1 = require("../Core/Logger");
55
55
  var abort_1 = require("../utils/abort");
56
- var version = '5.16.0-pre.1';
56
+ var version = '5.17.0-pre.1';
57
57
  function logErrorResponse(response) {
58
58
  var data = response.data, status = response.status;
59
59
  try {
@@ -35747,7 +35747,7 @@ var lodash_1 = __webpack_require__(10);
35747
35747
  var BringgException_1 = __webpack_require__(15);
35748
35748
  var Logger_1 = __webpack_require__(50);
35749
35749
  var abort_1 = __webpack_require__(173);
35750
- var version = '5.16.0-pre.1';
35750
+ var version = '5.17.0-pre.1';
35751
35751
  function logErrorResponse(response) {
35752
35752
  var data = response.data, status = response.status;
35753
35753
  try {
@@ -80026,17 +80026,17 @@ var PlannedRoutes = /** @class */ (function () {
80026
80026
  function PlannedRoutes(session) {
80027
80027
  this.plannedRoutesEntity = new PlannedRoutesEntity_1.default(session);
80028
80028
  }
80029
- PlannedRoutes.prototype.getAllByTeam = function (teamId) {
80030
- return this.plannedRoutesEntity.getAllByTeam(teamId);
80029
+ PlannedRoutes.prototype.getAllByTeam = function (teamId, commonOptions) {
80030
+ return this.plannedRoutesEntity.getAllByTeam(teamId, commonOptions);
80031
80031
  };
80032
80032
  PlannedRoutes.prototype.getAll = function () {
80033
80033
  return this.plannedRoutesEntity.getAll();
80034
80034
  };
80035
- PlannedRoutes.prototype.getBatchByTeamIds = function (teamIds) {
80036
- return this.plannedRoutesEntity.getBatchByTeamIds(teamIds);
80035
+ PlannedRoutes.prototype.getBatchByTeamIds = function (teamIds, commonOptions) {
80036
+ return this.plannedRoutesEntity.getBatchByTeamIds(teamIds, commonOptions);
80037
80037
  };
80038
- PlannedRoutes.prototype.getBatch = function (ids) {
80039
- return this.plannedRoutesEntity.getBatch(ids);
80038
+ PlannedRoutes.prototype.getBatch = function (ids, options) {
80039
+ return this.plannedRoutesEntity.getBatch(ids, options);
80040
80040
  };
80041
80041
  return PlannedRoutes;
80042
80042
  }());
@@ -80087,25 +80087,31 @@ var PlannedRoutesEntity = /** @class */ (function (_super) {
80087
80087
  PlannedRoutesEntity.prototype.getAll = function () {
80088
80088
  return this.getAllOrFetch(null, exports.extractor, exports.extractor);
80089
80089
  };
80090
- PlannedRoutesEntity.prototype.getAllByTeam = function (teamId) {
80090
+ PlannedRoutesEntity.prototype.getAllByTeam = function (teamId, commonOptions) {
80091
+ if (commonOptions === void 0) { commonOptions = {}; }
80091
80092
  return this.service.routeGenerator
80092
80093
  .get(Routes.GET_PLANNED_ROUTES_BY_TEAM)
80094
+ .withCommonOptions(commonOptions)
80093
80095
  .withExtractor(exports.extractor)
80094
80096
  .setException("Could not fetch planned routes of the team #".concat(teamId))
80095
80097
  .withRouteParams({ teamId: teamId })
80096
80098
  .invoke();
80097
80099
  };
80098
- PlannedRoutesEntity.prototype.getBatch = function (ids) {
80100
+ PlannedRoutesEntity.prototype.getBatch = function (ids, commonOptions) {
80101
+ if (commonOptions === void 0) { commonOptions = {}; }
80099
80102
  return this.service.routeGenerator
80100
80103
  .get(Routes.GET_BATCH)
80104
+ .withCommonOptions(commonOptions)
80101
80105
  .withExtractor(exports.extractor)
80102
80106
  .setException("Could not fetch planned routes with ids ".concat(ids.toString()))
80103
80107
  .withQueryString({ ids: ids })
80104
80108
  .invoke();
80105
80109
  };
80106
- PlannedRoutesEntity.prototype.getBatchByTeamIds = function (team_ids) {
80110
+ PlannedRoutesEntity.prototype.getBatchByTeamIds = function (team_ids, commonOptions) {
80111
+ if (commonOptions === void 0) { commonOptions = {}; }
80107
80112
  return this.service.routeGenerator
80108
80113
  .get(Routes.GET_BATCH_BY_TEAM_IDS)
80114
+ .withCommonOptions(commonOptions)
80109
80115
  .withExtractor(exports.extractor)
80110
80116
  .setException("Could not fetch planned routes for the teams ".concat(team_ids.toString()))
80111
80117
  .withQueryString({ team_ids: team_ids })