@lancom/shared 0.0.135 → 0.0.136
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/assets/js/api/admin.js +24 -0
- package/package.json +1 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -142,6 +142,18 @@ export default {
|
|
|
142
142
|
removeTaskType(id) {
|
|
143
143
|
return _delete(`admin/task-types/${id}`);
|
|
144
144
|
},
|
|
145
|
+
fetchAccessTokens() {
|
|
146
|
+
return _get('admin/access-tokens');
|
|
147
|
+
},
|
|
148
|
+
fetchAccessTokenById(id) {
|
|
149
|
+
return _get(`admin/access-tokens/${id}`);
|
|
150
|
+
},
|
|
151
|
+
saveAccessToken(item) {
|
|
152
|
+
return item._id ? _put(`admin/access-tokens/${item._id}`, item) : _post('admin/access-tokens', item);
|
|
153
|
+
},
|
|
154
|
+
removeAccessToken(id) {
|
|
155
|
+
return _delete(`admin/access-tokens/${id}`);
|
|
156
|
+
},
|
|
145
157
|
fetchFAQ() {
|
|
146
158
|
return _get('admin/faq');
|
|
147
159
|
},
|
|
@@ -305,6 +317,18 @@ export default {
|
|
|
305
317
|
removeDecorator(id) {
|
|
306
318
|
return _delete(`admin/decorators/${id}`);
|
|
307
319
|
},
|
|
320
|
+
async fetchWebhooks(params) {
|
|
321
|
+
return sortByName(await _get('admin/webhooks', params));
|
|
322
|
+
},
|
|
323
|
+
fetchWebhookById(id) {
|
|
324
|
+
return _get(`admin/webhooks/${id}`);
|
|
325
|
+
},
|
|
326
|
+
saveWebhook(webhook) {
|
|
327
|
+
return webhook._id ? _put(`admin/webhooks/${webhook._id}`, webhook) : _post('admin/webhooks', webhook);
|
|
328
|
+
},
|
|
329
|
+
removeWebhook(id) {
|
|
330
|
+
return _delete(`admin/webhooks/${id}`);
|
|
331
|
+
},
|
|
308
332
|
async fetchWarehouses(params) {
|
|
309
333
|
return sortByName(await _get('admin/warehouse', params));
|
|
310
334
|
},
|