UNPKG

woodwing-assets

Version:

TypeScript client for interacting with the WoodWing Assets Server API

31 lines (30 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssetsServerAdmin = void 0; class AssetsServerAdmin { constructor(base) { this.base = base; } async currentState() { return this.base.post('/controller/admin/activation/currentState'); } async activeUsers() { return this.base.get('/private-api/system/active-users'); } async createWebhook(payload) { return this.base.post('/services/admin/webhook/', payload, true); } async updateWebhook(webhookId, payload) { return this.base.put(`/services/admin/webhook/${webhookId}`, payload, true); } async disabledWebhook(webhookId) { return this.base.put(`services/admin/webhook/${webhookId}/disable`); } async enabledWebhook(webhookId) { return this.base.put(`services/admin/webhook/${webhookId}/enable`); } async deleteWebhook(webhookId) { return this.base.delete(`/services/admin/webhook/${webhookId}`); } } exports.AssetsServerAdmin = AssetsServerAdmin;