@bringg/dashboard-sdk 8.4.1 → 8.5.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/Addons/Addons.consts.d.ts +6 -0
- package/dist/Addons/Addons.consts.js +11 -0
- package/dist/Addons/Addons.consts.js.map +1 -0
- package/dist/Addons/AddonsApi.d.ts +13 -0
- package/dist/Addons/AddonsApi.js +96 -0
- package/dist/Addons/AddonsApi.js.map +1 -0
- package/dist/Addons/Entity/AddonsEntity.d.ts +13 -0
- package/dist/Addons/Entity/AddonsEntity.js +118 -0
- package/dist/Addons/Entity/AddonsEntity.js.map +1 -0
- package/dist/BringgDashboardSDK.d.ts +2 -0
- package/dist/BringgDashboardSDK.js +2 -0
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +251 -3
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +36 -3
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,252 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
+
/***/ 16638:
|
|
5
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10
|
+
exports.Routes = void 0;
|
|
11
|
+
var baseRoute = '/settings-service';
|
|
12
|
+
exports.Routes = {
|
|
13
|
+
AllTiers: "".concat(baseRoute, "/tiers"),
|
|
14
|
+
AllAccelerators: "".concat(baseRoute, "/accelerators"),
|
|
15
|
+
MerchantTier: "".concat(baseRoute, "/merchant/tier"),
|
|
16
|
+
MerchantAccelerators: "".concat(baseRoute, "/merchant/accelerators")
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=Addons.consts.js.map
|
|
19
|
+
|
|
20
|
+
/***/ }),
|
|
21
|
+
|
|
22
|
+
/***/ 22464:
|
|
23
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
24
|
+
|
|
25
|
+
"use strict";
|
|
26
|
+
|
|
27
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
38
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
+
function step(op) {
|
|
41
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
43
|
+
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;
|
|
44
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
+
switch (op[0]) {
|
|
46
|
+
case 0: case 1: t = op; break;
|
|
47
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
+
default:
|
|
51
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
+
if (t[2]) _.ops.pop();
|
|
56
|
+
_.trys.pop(); continue;
|
|
57
|
+
}
|
|
58
|
+
op = body.call(thisArg, _);
|
|
59
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
64
|
+
var AddonsEntity_1 = __webpack_require__(18304);
|
|
65
|
+
var AddonsApi = /** @class */ (function () {
|
|
66
|
+
function AddonsApi(session) {
|
|
67
|
+
this.addonsEntity = new AddonsEntity_1.default(session);
|
|
68
|
+
}
|
|
69
|
+
AddonsApi.prototype.getAllTiers = function () {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
return [2 /*return*/, this.addonsEntity.getAllTiers()];
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
AddonsApi.prototype.getMerchantTier = function () {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
+
return __generator(this, function (_a) {
|
|
79
|
+
return [2 /*return*/, this.addonsEntity.getMerchantTier()];
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
AddonsApi.prototype.upgradeMerchantTier = function (payload) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
return [2 /*return*/, this.addonsEntity.upgradeMerchantTier(payload)];
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
AddonsApi.prototype.getAllAccelerators = function () {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
+
return __generator(this, function (_a) {
|
|
93
|
+
return [2 /*return*/, this.addonsEntity.getAllAccelerators()];
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
AddonsApi.prototype.getMerchantAccelerators = function () {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
+
return __generator(this, function (_a) {
|
|
100
|
+
return [2 /*return*/, this.addonsEntity.getMerchantAccelerators()];
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
AddonsApi.prototype.requestMerchantAccelerator = function (payload) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
return __generator(this, function (_a) {
|
|
107
|
+
return [2 /*return*/, this.addonsEntity.requestMerchantAccelerator(payload)];
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
AddonsApi.prototype.revokeMerchantAccelerator = function (id) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
113
|
+
return __generator(this, function (_a) {
|
|
114
|
+
return [2 /*return*/, this.addonsEntity.revokeMerchantAccelerator(id)];
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return AddonsApi;
|
|
119
|
+
}());
|
|
120
|
+
exports["default"] = AddonsApi;
|
|
121
|
+
//# sourceMappingURL=AddonsApi.js.map
|
|
122
|
+
|
|
123
|
+
/***/ }),
|
|
124
|
+
|
|
125
|
+
/***/ 18304:
|
|
126
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
127
|
+
|
|
128
|
+
"use strict";
|
|
129
|
+
|
|
130
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
131
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
132
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
133
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
134
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
135
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
136
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
140
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
141
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
142
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
143
|
+
function step(op) {
|
|
144
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
145
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
146
|
+
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;
|
|
147
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
148
|
+
switch (op[0]) {
|
|
149
|
+
case 0: case 1: t = op; break;
|
|
150
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
151
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
152
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
153
|
+
default:
|
|
154
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
155
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
156
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
157
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
158
|
+
if (t[2]) _.ops.pop();
|
|
159
|
+
_.trys.pop(); continue;
|
|
160
|
+
}
|
|
161
|
+
op = body.call(thisArg, _);
|
|
162
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
163
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
167
|
+
var BaseService_1 = __webpack_require__(41992);
|
|
168
|
+
var Addons_consts_1 = __webpack_require__(16638);
|
|
169
|
+
var AddonsEntity = /** @class */ (function () {
|
|
170
|
+
function AddonsEntity(session) {
|
|
171
|
+
this.service = new BaseService_1.default(session, 'addons');
|
|
172
|
+
}
|
|
173
|
+
AddonsEntity.prototype.getAllTiers = function () {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
175
|
+
return __generator(this, function (_a) {
|
|
176
|
+
return [2 /*return*/, this.service.routeGenerator.get(Addons_consts_1.Routes.AllTiers).setException('failed to fetch all tiers').invoke()];
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
AddonsEntity.prototype.getMerchantTier = function () {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
182
|
+
return __generator(this, function (_a) {
|
|
183
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
184
|
+
.get(Addons_consts_1.Routes.MerchantTier)
|
|
185
|
+
.setException('failed to fetch merchant tier')
|
|
186
|
+
.invoke()];
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
AddonsEntity.prototype.upgradeMerchantTier = function (payload) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
+
return __generator(this, function (_a) {
|
|
193
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
194
|
+
.post(Addons_consts_1.Routes.MerchantTier)
|
|
195
|
+
.withPayload(payload)
|
|
196
|
+
.setException('failed to upgrade merchant tier')
|
|
197
|
+
.invoke()];
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
AddonsEntity.prototype.getAllAccelerators = function () {
|
|
202
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
203
|
+
return __generator(this, function (_a) {
|
|
204
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
205
|
+
.get(Addons_consts_1.Routes.AllAccelerators)
|
|
206
|
+
.setException('failed to fetch all accelerators')
|
|
207
|
+
.invoke()];
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
AddonsEntity.prototype.getMerchantAccelerators = function () {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
213
|
+
return __generator(this, function (_a) {
|
|
214
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
215
|
+
.get(Addons_consts_1.Routes.MerchantAccelerators)
|
|
216
|
+
.setException('failed to fetch merchant accelerators')
|
|
217
|
+
.invoke()];
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
AddonsEntity.prototype.requestMerchantAccelerator = function (payload) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
223
|
+
return __generator(this, function (_a) {
|
|
224
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
225
|
+
.post(Addons_consts_1.Routes.MerchantAccelerators)
|
|
226
|
+
.withPayload(payload)
|
|
227
|
+
.setException('failed to request merchant accelerator')
|
|
228
|
+
.invoke()];
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
AddonsEntity.prototype.revokeMerchantAccelerator = function (id) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
234
|
+
return __generator(this, function (_a) {
|
|
235
|
+
return [2 /*return*/, this.service.routeGenerator
|
|
236
|
+
.delete("".concat(Addons_consts_1.Routes.MerchantAccelerators, "/{:id}"))
|
|
237
|
+
.withRouteParams({ id: id })
|
|
238
|
+
.setException('failed to revoke merchant accelerator')
|
|
239
|
+
.invoke()];
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
return AddonsEntity;
|
|
244
|
+
}());
|
|
245
|
+
exports["default"] = AddonsEntity;
|
|
246
|
+
//# sourceMappingURL=AddonsEntity.js.map
|
|
247
|
+
|
|
248
|
+
/***/ }),
|
|
249
|
+
|
|
4
250
|
/***/ 81212:
|
|
5
251
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6
252
|
|
|
@@ -2243,6 +2489,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
2243
2489
|
exports.newConfigurationProvider = exports.getFullConfiguration = exports.setEnvironment = exports.getEnvironment = exports.getGlobals = exports.setGlobals = exports.setConfigurationProvider = exports.getConfigurationProvider = exports.resendConfirmationEmail = exports.login = exports.loginInternal = exports.initWithAuthToken = exports.initWithEmail = exports.initWithSessionCode = exports.setConfigurations = exports.BringgDashboardSDK = void 0;
|
|
2244
2490
|
// eslint-disable-next-line no-restricted-imports
|
|
2245
2491
|
var mobx = __webpack_require__(68949);
|
|
2492
|
+
var AddonsApi_1 = __webpack_require__(22464);
|
|
2246
2493
|
var AlertConfigurationApi_1 = __webpack_require__(81212);
|
|
2247
2494
|
var AlertsApi_1 = __webpack_require__(86776);
|
|
2248
2495
|
var AnalyticsReportsApi_1 = __webpack_require__(80034);
|
|
@@ -2687,6 +2934,7 @@ function init(session) {
|
|
|
2687
2934
|
bringg.parkingSpotApi = new ParkingSpotApi_1.default(session);
|
|
2688
2935
|
bringg.customAttributesApi = new CustomAttributesApi_1.default(session);
|
|
2689
2936
|
bringg.asyncOperationStatus = new AsyncOperationStatus_1.AsyncOperationStatus(session);
|
|
2937
|
+
bringg.addons = new AddonsApi_1.default(session);
|
|
2690
2938
|
// dependent
|
|
2691
2939
|
bringg.crews = new Crew_1.default(session, bringg.users);
|
|
2692
2940
|
bringg.applicationMerchantConfiguration = new ApplicationMerchantConfigurationApi_1.default(session, bringg.merchantConfiguration);
|
|
@@ -19494,7 +19742,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
19494
19742
|
var BringgException_1 = __webpack_require__(43605);
|
|
19495
19743
|
var Logger_1 = __webpack_require__(55860);
|
|
19496
19744
|
var abort_1 = __webpack_require__(34179);
|
|
19497
|
-
var version = '8.
|
|
19745
|
+
var version = '8.5.0';
|
|
19498
19746
|
function logErrorResponse(response) {
|
|
19499
19747
|
var data = response.data, status = response.status;
|
|
19500
19748
|
try {
|
|
@@ -30238,8 +30486,8 @@ exports.__esModule = true;
|
|
|
30238
30486
|
exports.AcceleratorSliderContentType = exports.AcceleratorStatus = void 0;
|
|
30239
30487
|
var AcceleratorStatus;
|
|
30240
30488
|
(function (AcceleratorStatus) {
|
|
30241
|
-
AcceleratorStatus["Pending"] = "
|
|
30242
|
-
AcceleratorStatus["Active"] = "
|
|
30489
|
+
AcceleratorStatus[AcceleratorStatus["Pending"] = 0] = "Pending";
|
|
30490
|
+
AcceleratorStatus[AcceleratorStatus["Active"] = 1] = "Active";
|
|
30243
30491
|
})(AcceleratorStatus = exports.AcceleratorStatus || (exports.AcceleratorStatus = {}));
|
|
30244
30492
|
var AcceleratorSliderContentType;
|
|
30245
30493
|
(function (AcceleratorSliderContentType) {
|