@bringg/dashboard-sdk 8.12.1 → 8.12.3-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,16 @@ 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
+ var a;
54
+ return __generator(this, function (_a) {
55
+ a = this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params);
56
+ console.log('a', a);
57
+ return [2 /*return*/, this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params)];
58
+ });
59
+ });
60
+ };
51
61
  return CustomerAvailabilityHourApi;
52
62
  }());
53
63
  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;;;;gBACtF,CAAC,GAAG,IAAI,CAAC,8BAA8B,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC;gBAE5F,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;gBAEpB,sBAAO,IAAI,CAAC,8BAA8B,CAAC,qCAAqC,CAAC,MAAM,CAAC,EAAC;;;KACzF;IACF,kCAAC;AAAD,CAAC,AApBD,IAoBC;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,"file":"CustomerAvailabilityHourEntity.js","sourceRoot":"","sources":["../../../src/CustomerAvailabilityHour/Entity/CustomerAvailabilityHourEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sDAAiD;AAOpC,QAAA,MAAM,GAAG;IACrB,sBAAsB,EAAE,8BAA8B;CACtD,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,6BAA6B,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;4BAChD,sBAAO,IAAI,CAAC,6BAA6B,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,EAAE,IAAI,OAAA,KAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,EAAtB,CAAsB,CAAC,EAAC;yBACrF;wBAEgB,qBAAM,IAAI,CAAC,iCAAiC,CAAC,MAAM,CAAC,EAAA;;wBAA/D,QAAQ,GAAG,SAAoD;wBAErE,QAAQ,CAAC,OAAO,CAAC,UAAA,gBAAgB,IAAI,OAAA,KAAI,CAAC,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAvC,CAAuC,CAAC,CAAC;wBAExE,iBAAiB,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAA,gBAAgB,IAAI,OAAA,gBAAgB,CAAC,EAAE,EAAnB,CAAmB,CAAC,CAAC;wBAEhF,IAAI,CAAC,6BAA6B,CAAC,GAAG,CAAC,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,mCAA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BAChC,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;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.3-pre';
57
57
  function logErrorResponse(response) {
58
58
  var data = response.data, status = response.status;
59
59
  try {
@@ -6733,6 +6733,16 @@ 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
+ var a;
6739
+ return __generator(this, function (_a) {
6740
+ a = this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params);
6741
+ console.log('a', a);
6742
+ return [2 /*return*/, this.customerAvailabilityHourEntity.getBatchTaskCustomerAvailabilityHours(params)];
6743
+ });
6744
+ });
6745
+ };
6736
6746
  return CustomerAvailabilityHourApi;
6737
6747
  }());
6738
6748
  exports["default"] = CustomerAvailabilityHourApi;
@@ -6800,7 +6810,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
6800
6810
  exports.Routes = void 0;
6801
6811
  var StoreEntity_1 = __webpack_require__(95574);
6802
6812
  exports.Routes = {
6803
- GET_AVAILABILITY_HOURS: '/customer_availability_hours'
6813
+ GET_AVAILABILITY_HOURS: '/customer_availability_hours',
6814
+ BATCH_GET_AVAILABILITY_HOURS: '/batch_customer_availability_hours/batch_get'
6804
6815
  };
6805
6816
  var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
6806
6817
  __extends(CustomerAvailabilityHourEntity, _super);
@@ -6831,6 +6842,19 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
6831
6842
  });
6832
6843
  });
6833
6844
  };
6845
+ CustomerAvailabilityHourEntity.prototype.getBatchTaskCustomerAvailabilityHours = function (params) {
6846
+ return __awaiter(this, void 0, void 0, function () {
6847
+ var response;
6848
+ return __generator(this, function (_a) {
6849
+ switch (_a.label) {
6850
+ case 0: return [4 /*yield*/, this._getBatchTaskCustomerAvailabilityHours(params)];
6851
+ case 1:
6852
+ response = _a.sent();
6853
+ return [2 /*return*/, response];
6854
+ }
6855
+ });
6856
+ });
6857
+ };
6834
6858
  CustomerAvailabilityHourEntity.prototype._getTaskCustomerAvailabilityHours = function (params) {
6835
6859
  return __awaiter(this, void 0, void 0, function () {
6836
6860
  return __generator(this, function (_a) {
@@ -6845,6 +6869,17 @@ var CustomerAvailabilityHourEntity = /** @class */ (function (_super) {
6845
6869
  CustomerAvailabilityHourEntity.prototype._getKey = function (customerId, taskId) {
6846
6870
  return "customer_id:".concat(customerId, ":task_id:").concat(taskId);
6847
6871
  };
6872
+ CustomerAvailabilityHourEntity.prototype._getBatchTaskCustomerAvailabilityHours = function (params) {
6873
+ return __awaiter(this, void 0, void 0, function () {
6874
+ return __generator(this, function (_a) {
6875
+ return [2 /*return*/, this.service.routeGenerator
6876
+ .get(exports.Routes.BATCH_GET_AVAILABILITY_HOURS)
6877
+ .withQueryString(params)
6878
+ .withExtractor(function (response) { return response.availability_hours; })
6879
+ .invoke()];
6880
+ });
6881
+ });
6882
+ };
6848
6883
  return CustomerAvailabilityHourEntity;
6849
6884
  }(StoreEntity_1.default));
6850
6885
  exports["default"] = CustomerAvailabilityHourEntity;
@@ -20346,7 +20381,7 @@ var lodash_1 = __webpack_require__(96486);
20346
20381
  var BringgException_1 = __webpack_require__(43605);
20347
20382
  var Logger_1 = __webpack_require__(55860);
20348
20383
  var abort_1 = __webpack_require__(34179);
20349
- var version = '8.12.1';
20384
+ var version = '8.12.3-pre';
20350
20385
  function logErrorResponse(response) {
20351
20386
  var data = response.data, status = response.status;
20352
20387
  try {