@bringg/dashboard-sdk 8.23.1 → 8.25.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.
- package/dist/AsyncOperationStatus/AsyncOperationStatus.d.ts +2 -1
- package/dist/AsyncOperationStatus/AsyncOperationStatus.js +76 -37
- package/dist/AsyncOperationStatus/AsyncOperationStatus.js.map +1 -1
- package/dist/BringgDashboardSDK.d.ts +6 -1
- package/dist/BringgDashboardSDK.js +11 -1
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/PresetViews/preset-views-api.d.ts +15 -0
- package/dist/PresetViews/preset-views-api.js +34 -0
- package/dist/PresetViews/preset-views-api.js.map +1 -0
- package/dist/PresetViews/preset-views-service.d.ts +10 -0
- package/dist/PresetViews/preset-views-service.js +94 -0
- package/dist/PresetViews/preset-views-service.js.map +1 -0
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/UserPresetViews/user-preset-views-api.d.ts +13 -0
- package/dist/UserPresetViews/user-preset-views-api.js +84 -0
- package/dist/UserPresetViews/user-preset-views-api.js.map +1 -0
- package/dist/UserPresetViews/user-preset-views-consts.d.ts +5 -0
- package/dist/UserPresetViews/user-preset-views-consts.js +46 -0
- package/dist/UserPresetViews/user-preset-views-consts.js.map +1 -0
- package/dist/UserPresetViews/user-preset-views-service.d.ts +8 -0
- package/dist/UserPresetViews/user-preset-views-service.js +72 -0
- package/dist/UserPresetViews/user-preset-views-service.js.map +1 -0
- package/dist/bringg-dashboard-sdk-cjs2.js +458 -40
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +59 -4
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USER_PRESET_VIEW_MOCK = exports.UserPresetViewGroupTypes = void 0;
|
|
4
|
+
var types_1 = require("@bringg/types");
|
|
5
|
+
var UserPresetViewGroupTypes;
|
|
6
|
+
(function (UserPresetViewGroupTypes) {
|
|
7
|
+
UserPresetViewGroupTypes["View"] = "view";
|
|
8
|
+
})(UserPresetViewGroupTypes = exports.UserPresetViewGroupTypes || (exports.UserPresetViewGroupTypes = {}));
|
|
9
|
+
exports.USER_PRESET_VIEW_MOCK = [
|
|
10
|
+
{
|
|
11
|
+
id: 1,
|
|
12
|
+
merchant_id: 0,
|
|
13
|
+
user_id: 0,
|
|
14
|
+
view: types_1.PresetViewSupportedView.Dispatch,
|
|
15
|
+
preset_view_id: 1
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 2,
|
|
19
|
+
merchant_id: 0,
|
|
20
|
+
user_id: 0,
|
|
21
|
+
view: types_1.PresetViewSupportedView.Planning,
|
|
22
|
+
preset_view_id: 2
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 3,
|
|
26
|
+
merchant_id: 0,
|
|
27
|
+
user_id: 0,
|
|
28
|
+
view: types_1.PresetViewSupportedView.OrderAlerts,
|
|
29
|
+
preset_view_id: 3
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 4,
|
|
33
|
+
merchant_id: 0,
|
|
34
|
+
user_id: 0,
|
|
35
|
+
view: types_1.PresetViewSupportedView.DriverAlerts,
|
|
36
|
+
preset_view_id: 4
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 5,
|
|
40
|
+
merchant_id: 0,
|
|
41
|
+
user_id: 0,
|
|
42
|
+
view: types_1.PresetViewSupportedView.OptimisationAlerts,
|
|
43
|
+
preset_view_id: 5
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
//# sourceMappingURL=user-preset-views-consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-preset-views-consts.js","sourceRoot":"","sources":["../../src/UserPresetViews/user-preset-views-consts.ts"],"names":[],"mappings":";;;AAAA,uCAA6E;AAE7E,IAAY,wBAEX;AAFD,WAAY,wBAAwB;IACnC,yCAAa,CAAA;AACd,CAAC,EAFW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAEnC;AAEY,QAAA,qBAAqB,GAAqB;IACtD;QACC,EAAE,EAAE,CAAC;QACL,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,+BAAuB,CAAC,QAAQ;QACtC,cAAc,EAAE,CAAC;KACjB;IACD;QACC,EAAE,EAAE,CAAC;QACL,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,+BAAuB,CAAC,QAAQ;QACtC,cAAc,EAAE,CAAC;KACjB;IACD;QACC,EAAE,EAAE,CAAC;QACL,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,+BAAuB,CAAC,WAAW;QACzC,cAAc,EAAE,CAAC;KACjB;IACD;QACC,EAAE,EAAE,CAAC;QACL,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,+BAAuB,CAAC,YAAY;QAC1C,cAAc,EAAE,CAAC;KACjB;IACD;QACC,EAAE,EAAE,CAAC;QACL,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,+BAAuB,CAAC,kBAAkB;QAChD,cAAc,EAAE,CAAC;KACjB;CACD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UpdateUserPresetViewPayload, UserPresetView } from '@bringg/types';
|
|
2
|
+
import Session from '../Services/Identity/Session';
|
|
3
|
+
export declare class UserPresetViewsService {
|
|
4
|
+
private readonly service;
|
|
5
|
+
constructor(session: Session);
|
|
6
|
+
loadAll: () => Promise<UserPresetView[]>;
|
|
7
|
+
update: (id: any, body: UpdateUserPresetViewPayload) => Promise<UserPresetView>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.UserPresetViewsService = void 0;
|
|
40
|
+
var CrudService_1 = require("../Core/CrudService");
|
|
41
|
+
var baseRoute = 'settings-service';
|
|
42
|
+
var UserPresetViewsService = /** @class */ (function () {
|
|
43
|
+
function UserPresetViewsService(session) {
|
|
44
|
+
var _this = this;
|
|
45
|
+
this.loadAll = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
46
|
+
var result;
|
|
47
|
+
return __generator(this, function (_a) {
|
|
48
|
+
switch (_a.label) {
|
|
49
|
+
case 0: return [4 /*yield*/, this.service.getAll()];
|
|
50
|
+
case 1:
|
|
51
|
+
result = _a.sent();
|
|
52
|
+
return [2 /*return*/, result];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}); };
|
|
56
|
+
this.update = function (id, body) { return __awaiter(_this, void 0, void 0, function () {
|
|
57
|
+
var result;
|
|
58
|
+
return __generator(this, function (_a) {
|
|
59
|
+
switch (_a.label) {
|
|
60
|
+
case 0: return [4 /*yield*/, this.service.update(id, body)];
|
|
61
|
+
case 1:
|
|
62
|
+
result = _a.sent();
|
|
63
|
+
return [2 /*return*/, result];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}); };
|
|
67
|
+
this.service = new CrudService_1.default(session, "".concat(baseRoute, "/preset-views/user"));
|
|
68
|
+
}
|
|
69
|
+
return UserPresetViewsService;
|
|
70
|
+
}());
|
|
71
|
+
exports.UserPresetViewsService = UserPresetViewsService;
|
|
72
|
+
//# sourceMappingURL=user-preset-views-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-preset-views-service.js","sourceRoot":"","sources":["../../src/UserPresetViews/user-preset-views-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mDAA8C;AAG9C,IAAM,SAAS,GAAG,kBAAkB,CAAC;AAErC;IAGC,gCAAY,OAAgB;QAA5B,iBAEC;QAEM,YAAO,GAAG;;;;4BACD,qBAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAA;;wBAApC,MAAM,GAAG,SAA2B;wBAE1C,sBAAO,MAAM,EAAC;;;aACd,CAAC;QAEK,WAAM,GAAG,UAAO,EAAE,EAAE,IAAiC;;;;4BAC5C,qBAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,EAAA;;wBAA5C,MAAM,GAAG,SAAmC;wBAElD,sBAAO,MAAM,EAAC;;;aACd,CAAC;QAbD,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAW,CAAC,OAAO,EAAE,UAAG,SAAS,uBAAoB,CAAC,CAAC;IAC3E,CAAC;IAaF,6BAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,wDAAsB"}
|