@bringg/dashboard-sdk 10.2.0-pre.60536 → 10.2.0-pre.60537

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.
@@ -249,7 +249,7 @@ export declare class BringgDashboardSDK {
249
249
  /**
250
250
  * Returns the API created by the last `createCheckinDistanceReasons()` call, or undefined before it.
251
251
  */
252
- checkinDistanceReasons: <T extends CheckinDistanceReasonEntity>() => CheckinDistanceReasonsApi<T>;
252
+ checkinDistanceReasons: <T extends CheckinDistanceReasonEntity>() => CheckinDistanceReasonsApi<T> | undefined;
253
253
  runs: RunsApi;
254
254
  uploads: UploadApi;
255
255
  floatingInventories: FloatingInventoriesApiV2;
@@ -15,7 +15,9 @@ export default class CheckinDistanceReasonsApi<T extends CheckinDistanceReasonEn
15
15
  create(checkinDistanceReason: CreateCheckinDistanceReasonRequest, commonOption?: CommonOptions): Promise<T>;
16
16
  /**
17
17
  * Saves a new order. ids: every non-deleted reason id of the merchant, in the new order.
18
- * The server rejects any other list and changes nothing; the store keeps the old order then.
18
+ * The server answers with its full list, which replaces the store, so a reason deleted elsewhere drops out.
19
+ * The server rejects any other list and changes nothing; the store keeps the old order then. A rejection
20
+ * usually means the local list is out of date, so reload it with `loadAll({ useCache: false })` before retrying.
19
21
  */
20
22
  reorder(ids: number[], commonOption?: CommonOptions): Promise<T[]>;
21
23
  get(id: number): T;
@@ -85,12 +85,21 @@ var CheckinDistanceReasonsApi = /** @class */ (function () {
85
85
  };
86
86
  /**
87
87
  * Saves a new order. ids: every non-deleted reason id of the merchant, in the new order.
88
- * The server rejects any other list and changes nothing; the store keeps the old order then.
88
+ * The server answers with its full list, which replaces the store, so a reason deleted elsewhere drops out.
89
+ * The server rejects any other list and changes nothing; the store keeps the old order then. A rejection
90
+ * usually means the local list is out of date, so reload it with `loadAll({ useCache: false })` before retrying.
89
91
  */
90
92
  CheckinDistanceReasonsApi.prototype.reorder = function (ids, commonOption) {
91
- var _this = this;
92
- return this.storableDataService.modifyMany('reorder', function () {
93
- return _this.checkinDistanceReasonsService.reorder(ids, commonOption);
93
+ return __awaiter(this, void 0, void 0, function () {
94
+ var _this = this;
95
+ return __generator(this, function (_a) {
96
+ switch (_a.label) {
97
+ case 0: return [4 /*yield*/, this.storableDataService.loadAll('reorder', function () { return _this.checkinDistanceReasonsService.reorder(ids, commonOption); }, { useCache: false })];
98
+ case 1:
99
+ _a.sent();
100
+ return [2 /*return*/, this.getAll()];
101
+ }
102
+ });
94
103
  });
95
104
  };
96
105
  CheckinDistanceReasonsApi.prototype.get = function (id) {
@@ -1 +1 @@
1
- {"version":3,"file":"checkin-distance-reasons-api.js","sourceRoot":"","sources":["../../../src/CheckinDistanceReason/v2/checkin-distance-reasons-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gEAAyC;AAEzC,sFAA8D;AAC9D,wGAA+E;AAK/E;IAKC,mCAAY,OAAgB,EAAE,MAA4D;QACzF,IAAI,CAAC,2BAA2B,GAAG,IAAI,oBAAS,EAAK,CAAC;QACtD,IAAI,CAAC,6BAA6B,GAAG,IAAI,0CAA6B,CAAC,OAAO,CAAC,CAAC;QAChF,IAAI,CAAC,mBAAmB,GAAG,IAAI,+BAAmB,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;IAC9F,CAAC;IAEM,2CAAO,GAAd,UAAe,OAAqB;QAApC,iBAMC;QALA,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CACtC,SAAS,EACT,cAAM,OAAA,KAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,EAAnD,CAAmD,EACzD,OAAO,CACP,CAAC;IACH,CAAC;IAEY,0CAAM,GAAnB,UAAoB,EAAU,EAAE,YAA4B;;;;;4BAC3D,qBAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CACpC,QAAQ,EACR,cAAM,OAAA,KAAI,CAAC,6BAA6B,CAAC,MAAM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;IAC7F,0CAAM,GAAb;QACC,OAAO,IAAI,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAtC,CAAsC,CAAC,CAAC;IACzG,CAAC;IAEM,6CAAS,GAAhB;QACC,IAAI,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;IACF,gCAAC;AAAD,CAAC,AA3ED,IA2EC"}
1
+ {"version":3,"file":"checkin-distance-reasons-api.js","sourceRoot":"","sources":["../../../src/CheckinDistanceReason/v2/checkin-distance-reasons-api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gEAAyC;AAEzC,sFAA8D;AAC9D,wGAA+E;AAK/E;IAKC,mCAAY,OAAgB,EAAE,MAA4D;QACzF,IAAI,CAAC,2BAA2B,GAAG,IAAI,oBAAS,EAAK,CAAC;QACtD,IAAI,CAAC,6BAA6B,GAAG,IAAI,0CAA6B,CAAC,OAAO,CAAC,CAAC;QAChF,IAAI,CAAC,mBAAmB,GAAG,IAAI,+BAAmB,CAAC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;IAC9F,CAAC;IAEM,2CAAO,GAAd,UAAe,OAAqB;QAApC,iBAMC;QALA,OAAO,IAAI,CAAC,mBAAmB,CAAC,OAAO,CACtC,SAAS,EACT,cAAM,OAAA,KAAI,CAAC,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,EAAnD,CAAmD,EACzD,OAAO,CACP,CAAC;IACH,CAAC;IAEY,0CAAM,GAAnB,UAAoB,EAAU,EAAE,YAA4B;;;;;4BAC3D,qBAAM,IAAI,CAAC,mBAAmB,CAAC,MAAM,CACpC,QAAQ,EACR,cAAM,OAAA,KAAI,CAAC,6BAA6B,CAAC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AW,EAAU;QACpB,OAAO,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,oGAAoG;IAC7F,0CAAM,GAAb;QACC,OAAO,IAAI,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAtC,CAAsC,CAAC,CAAC;IACzG,CAAC;IAEM,6CAAS,GAAhB;QACC,IAAI,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC;IAC9C,CAAC;IACF,gCAAC;AAAD,CAAC,AAjFD,IAiFC"}
@@ -5277,12 +5277,21 @@ var CheckinDistanceReasonsApi = /** @class */ (function () {
5277
5277
  };
5278
5278
  /**
5279
5279
  * Saves a new order. ids: every non-deleted reason id of the merchant, in the new order.
5280
- * The server rejects any other list and changes nothing; the store keeps the old order then.
5280
+ * The server answers with its full list, which replaces the store, so a reason deleted elsewhere drops out.
5281
+ * The server rejects any other list and changes nothing; the store keeps the old order then. A rejection
5282
+ * usually means the local list is out of date, so reload it with `loadAll({ useCache: false })` before retrying.
5281
5283
  */
5282
5284
  CheckinDistanceReasonsApi.prototype.reorder = function (ids, commonOption) {
5283
- var _this = this;
5284
- return this.storableDataService.modifyMany('reorder', function () {
5285
- return _this.checkinDistanceReasonsService.reorder(ids, commonOption);
5285
+ return __awaiter(this, void 0, void 0, function () {
5286
+ var _this = this;
5287
+ return __generator(this, function (_a) {
5288
+ switch (_a.label) {
5289
+ case 0: return [4 /*yield*/, this.storableDataService.loadAll('reorder', function () { return _this.checkinDistanceReasonsService.reorder(ids, commonOption); }, { useCache: false })];
5290
+ case 1:
5291
+ _a.sent();
5292
+ return [2 /*return*/, this.getAll()];
5293
+ }
5294
+ });
5286
5295
  });
5287
5296
  };
5288
5297
  CheckinDistanceReasonsApi.prototype.get = function (id) {
@@ -25298,7 +25307,7 @@ var BringgException_1 = __webpack_require__(43605);
25298
25307
  var client_page_1 = __webpack_require__(16573);
25299
25308
  var Logger_1 = __importDefault(__webpack_require__(55860));
25300
25309
  var abort_1 = __webpack_require__(34179);
25301
- var version = '10.2.0-pre.60536';
25310
+ var version = '10.2.0-pre.60537';
25302
25311
  function logErrorResponse(response) {
25303
25312
  var data = response.data, status = response.status;
25304
25313
  try {