@bringg/dashboard-sdk 8.12.1 → 8.12.2-pre

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.
@@ -5,5 +5,8 @@ declare class CustomerAvailabilityHourApi {
5
5
  private customerAvailabilityHourEntity;
6
6
  constructor(session: Session);
7
7
  getTaskCustomerAvailabilityHours(params: TaskCustomerAvailabilityHoursGetRequest): Promise<CustomerAvailabilityHour[]>;
8
+ getBatchTaskCustomerAvailabilityHours(params: {
9
+ [customerId: string]: number[];
10
+ }): Promise<CustomerAvailabilityHour[]>;
8
11
  }
9
12
  export default CustomerAvailabilityHourApi;
@@ -48,6 +48,13 @@ var CustomerAvailabilityHourApi = /** @class */ (function () {
48
48
  });
49
49
  });
50
50
  };
51
+ CustomerAvailabilityHourApi.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
52
+ return __awaiter(this, void 0, void 0, function () {
53
+ return __generator(this, function (_a) {
54
+ return [2 /*return*/, this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params)];
55
+ });
56
+ });
57
+ };
51
58
  return CustomerAvailabilityHourApi;
52
59
  }());
53
60
  exports.default = CustomerAvailabilityHourApi;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomerAvailabilityHourApi.js","sourceRoot":"","sources":["../../src/CustomerAvailabilityHour/CustomerAvailabilityHourApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,0FAAqF;AAErF;IAGC,qCAAY,OAAgB;QAC3B,IAAI,CAAC,8BAA8B,GAAG,IAAI,wCAA8B,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;IAEY,sEAAgC,GAA7C,UACC,MAA+C;;;gBAE/C,sBAAO,IAAI,CAAC,8BAA8B,CAAC,gCAAgC,CAAC,MAAM,CAAC,EAAC;;;KACpF;IACF,kCAAC;AAAD,CAAC,AAZD,IAYC;AAED,kBAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"CustomerAvailabilityHourApi.js","sourceRoot":"","sources":["../../src/CustomerAvailabilityHour/CustomerAvailabilityHourApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,0FAAqF;AAErF;IAGC,qCAAY,OAAgB;QAC3B,IAAI,CAAC,8BAA8B,GAAG,IAAI,wCAA8B,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;IAEY,sEAAgC,GAA7C,UACC,MAA+C;;;gBAE/C,sBAAO,IAAI,CAAC,8BAA8B,CAAC,gCAAgC,CAAC,MAAM,CAAC,EAAC;;;KACpF;IAEY,2EAAqC,GAAlD,UAAmD,MAA0C;;;gBAC5F,sBAAO,IAAI,CAAC,8BAA8B,CAAC,qCAAqC,CAAC,MAAM,CAAC,EAAC;;;KACzF;IACF,kCAAC;AAAD,CAAC,AAhBD,IAgBC;AAED,kBAAe,2BAA2B,CAAC"}
@@ -4,11 +4,16 @@ import Session from '../../Services/Identity/Session';
4
4
  import { TaskCustomerAvailabilityHoursGetRequest } from '../CustomerAvailabilityHour.consts';
5
5
  export declare const Routes: {
6
6
  GET_AVAILABILITY_HOURS: string;
7
+ BATCH_GET_AVAILABILITY_HOURS: string;
7
8
  };
8
9
  export default class CustomerAvailabilityHourEntity extends StoreEntity<CustomerAvailabilityHour> {
9
10
  private taskCustomerAvailabilityHours;
10
11
  constructor(session: Session);
11
12
  getTaskCustomerAvailabilityHours(params: TaskCustomerAvailabilityHoursGetRequest): Promise<CustomerAvailabilityHour[]>;
13
+ getBatchTaskCustomerAvailabilityHours(params: {
14
+ [customerId: string]: number[];
15
+ }): Promise<CustomerAvailabilityHour[]>;
12
16
  private _getTaskCustomerAvailabilityHours;
13
17
  private _getKey;
18
+ private _getBatchTaskCustomerAvailabilityHours;
14
19
  }
@@ -54,7 +54,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.Routes = void 0;
55
55
  var StoreEntity_1 = require("../../Core/StoreEntity");
56
56
  exports.Routes = {
57
- GET_AVAILABILITY_HOURS: '/customer_availability_hours'
57
+ GET_AVAILABILITY_HOURS: '/customer_availability_hours',
58
+ BATCH_GET_AVAILABILITY_HOURS: '/batch_customer_availability_hours/batch_get'
58
59
  };
59
60
  var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
60
61
  __extends(CustomerAvailabilityHourEntity, _super);
@@ -85,6 +86,19 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
85
86
  });
86
87
  });
87
88
  };
89
+ CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
90
+ return __awaiter(this, void 0, void 0, function () {
91
+ var response;
92
+ return __generator(this, function (_a) {
93
+ switch (_a.label) {
94
+ case 0: return [4 /*yield*/, this._getBatchTaskCustomerAvailabilityHours(params)];
95
+ case 1:
96
+ response = _a.sent();
97
+ return [2 /*return*/, response];
98
+ }
99
+ });
100
+ });
101
+ };
88
102
  CustomerAvailabilityHourEntity.prototype._getTaskCustomerAvailabilityHours = function (params) {
89
103
  return __awaiter(this, void 0, void 0, function () {
90
104
  return __generator(this, function (_a) {
@@ -99,6 +113,17 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
99
113
  CustomerAvailabilityHourEntity.prototype._getKey = function (customerId, taskId) {
100
114
  return "customer_id:".concat(customerId, ":task_id:").concat(taskId);
101
115
  };
116
+ CustomerAvailabilityHourEntity.prototype._getBatchTaskCustomerAvailabilityHours = function (params) {
117
+ return __awaiter(this, void 0, void 0, function () {
118
+ return __generator(this, function (_a) {
119
+ return [2 /*return*/, this.service.routeGenerator
120
+ .get(exports.Routes.BATCH_GET_AVAILABILITY_HOURS)
121
+ .withQueryString(params)
122
+ .withExtractor(function (response) { return response.availability_hours; })
123
+ .invoke()];
124
+ });
125
+ });
126
+ };
102
127
  return CustomerAvailabilityHourEntity;
103
128
  }(StoreEntity_1.default));
104
129
  exports.default = CustomerAvailabilityHourEntity;
@@ -1 +1 @@
1
- {"version":3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IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC;wBAE5G,sBAAO,QAAQ,EAAC;;;;KAChB;IAEa,0EAAiC,GAA/C,UACC,MAA+C;;;gBAE/C,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,GAAG,CAAC,cAAM,CAAC,sBAAsB,CAAC;yBAClC,eAAe,CAAC,MAAM,CAAC;yBACvB,aAAa,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,kBAAkB,EAA3B,CAA2B,CAAC;yBACtD,MAAM,EAAwE,EAAC;;;KACjF;IAEO,gDAAO,GAAf,UAAgB,UAAkB,EAAE,MAAc;QACjD,OAAO,sBAAe,UAAU,sBAAY,MAAM,CAAE,CAAC;IACtD,CAAC;IACF,qCAAC;AAAD,CAAC,AAxCD,CAA4D,qBAAW,GAwCtE"}
1
+ {"version":3,"file":"CustomerAvailabilityHourEntity.js","sourceRoot":"","sources":["../../../src/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sDAAiD;AAOpC,QAAA,MAAM,GAAG;IACrB,sBAAsB,EAAE,8BAA8B;IACtD,4BAA4B,EAAE,8CAA8C;CAC5E,CAAC;AAEF;IAA4D,kDAAqC;IAGhG,wCAAY,OAAgB;QAA5B,YACC,kBAAM,EAAE,OAAO,SAAA,EAAE,UAAU,EAAE,6BAA6B,EAAE,CAAC,SAC7D;QAJO,mCAA6B,GAA0B,IAAI,GAAG,EAAoB,CAAC;;IAI3F,CAAC;IAEY,yEAAgC,GAA7C,UACC,MAA+C;;;;;;;wBAEzC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;wBAE7D,IAAI,IAAI,CAAC,6BA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gB,UAAkB,EAAE,MAAc;QACjD,OAAO,sBAAe,UAAU,sBAAY,MAAM,CAAE,CAAC;IACtD,CAAC;IAEa,+EAAsC,GAApD,UAAqD,MAA0C;;;gBAC9F,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,GAAG,CAAC,cAAM,CAAC,4BAA4B,CAAC;yBACxC,eAAe,CAAC,MAAM,CAAC;yBACvB,aAAa,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,kBAAkB,EAA3B,CAA2B,CAAC;yBACtD,MAAM,EAAwE,EAAC;;;KACjF;IACF,qCAAC;AAAD,CAAC,AAtDD,CAA4D,qBAAW,GAsDtE"}
@@ -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 = '8.12.1';
56
+ var version = '8.12.2-pre';
57
57
  function logErrorResponse(response) {
58
58
  var data = response.data, status = response.status;
59
59
  try {
@@ -6733,6 +6733,13 @@ var CustomerAvailabilityHourApi = /** @class */ (function () {
6733
6733
  });
6734
6734
  });
6735
6735
  };
6736
+ CustomerAvailabilityHourApi.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
6737
+ return __awaiter(this, void 0, void 0, function () {
6738
+ return __generator(this, function (_a) {
6739
+ return [2 /*return*/, this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params)];
6740
+ });
6741
+ });
6742
+ };
6736
6743
  return CustomerAvailabilityHourApi;
6737
6744
  }());
6738
6745
  exports["default"] = CustomerAvailabilityHourApi;
@@ -6800,7 +6807,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
6800
6807
  exports.Routes = void 0;
6801
6808
  var StoreEntity_1 = __webpack_require__(95574);
6802
6809
  exports.Routes = {
6803
- GET_AVAILABILITY_HOURS: '/customer_availability_hours'
6810
+ GET_AVAILABILITY_HOURS: '/customer_availability_hours',
6811
+ BATCH_GET_AVAILABILITY_HOURS: '/batch_customer_availability_hours/batch_get'
6804
6812
  };
6805
6813
  var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
6806
6814
  __extends(CustomerAvailabilityHourEntity, _super);
@@ -6831,6 +6839,19 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
6831
6839
  });
6832
6840
  });
6833
6841
  };
6842
+ CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
6843
+ return __awaiter(this, void 0, void 0, function () {
6844
+ var response;
6845
+ return __generator(this, function (_a) {
6846
+ switch (_a.label) {
6847
+ case 0: return [4 /*yield*/, this._getBatchTaskCustomerAvailabilityHours(params)];
6848
+ case 1:
6849
+ response = _a.sent();
6850
+ return [2 /*return*/, response];
6851
+ }
6852
+ });
6853
+ });
6854
+ };
6834
6855
  CustomerAvailabilityHourEntity.prototype._getTaskCustomerAvailabilityHours = function (params) {
6835
6856
  return __awaiter(this, void 0, void 0, function () {
6836
6857
  return __generator(this, function (_a) {
@@ -6845,6 +6866,17 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
6845
6866
  CustomerAvailabilityHourEntity.prototype._getKey = function (customerId, taskId) {
6846
6867
  return "customer_id:".concat(customerId, ":task_id:").concat(taskId);
6847
6868
  };
6869
+ CustomerAvailabilityHourEntity.prototype._getBatchTaskCustomerAvailabilityHours = function (params) {
6870
+ return __awaiter(this, void 0, void 0, function () {
6871
+ return __generator(this, function (_a) {
6872
+ return [2 /*return*/, this.service.routeGenerator
6873
+ .get(exports.Routes.BATCH_GET_AVAILABILITY_HOURS)
6874
+ .withQueryString(params)
6875
+ .withExtractor(function (response) { return response.availability_hours; })
6876
+ .invoke()];
6877
+ });
6878
+ });
6879
+ };
6848
6880
  return CustomerAvailabilityHourEntity;
6849
6881
  }(StoreEntity_1.default));
6850
6882
  exports["default"] = CustomerAvailabilityHourEntity;
@@ -20346,7 +20378,7 @@ var lodash_1 = __webpack_require__(96486);
20346
20378
  var BringgException_1 = __webpack_require__(43605);
20347
20379
  var Logger_1 = __webpack_require__(55860);
20348
20380
  var abort_1 = __webpack_require__(34179);
20349
- var version = '8.12.1';
20381
+ var version = '8.12.2-pre';
20350
20382
  function logErrorResponse(response) {
20351
20383
  var data = response.data, status = response.status;
20352
20384
  try {