@simplito/privmx-webendpoint
Version:
PrivMX Web Endpoint library
91 lines (88 loc) • 4 kB
JavaScript
"use strict";
/*!
PrivMX Web Endpoint.
Copyright © 2024 Simplito sp. z o.o.
This file is part of the PrivMX Platform (https://privmx.dev).
This software is Licensed under the PrivMX Free License.
See the License for the specific language governing permissions and
limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.InboxApiNative = void 0;
const BaseNative_1 = require("./BaseNative");
class InboxApiNative extends BaseNative_1.BaseNative {
async newApi(connectionPtr, threadApiPtr, storeApiPtr) {
return this.runAsync((taskId) => this.api.lib.InboxApi_newInboxApi(taskId, connectionPtr, threadApiPtr, storeApiPtr));
}
async deleteApi(ptr) {
await this.runAsync((taskId) => this.api.lib.InboxApi_deleteInboxApi(taskId, ptr));
this.deleteApiRef();
}
async create(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_create(taskId, ptr, args));
}
async createInbox(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_createInbox(taskId, ptr, args));
}
async updateInbox(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_updateInbox(taskId, ptr, args));
}
async getInbox(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_getInbox(taskId, ptr, args));
}
async listInboxes(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_listInboxes(taskId, ptr, args));
}
async getInboxPublicView(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_getInboxPublicView(taskId, ptr, args));
}
async deleteInbox(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_deleteInbox(taskId, ptr, args));
}
async prepareEntry(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_prepareEntry(taskId, ptr, args));
}
async sendEntry(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_sendEntry(taskId, ptr, args));
}
async readEntry(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_readEntry(taskId, ptr, args));
}
async deleteEntry(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_deleteEntry(taskId, ptr, args));
}
async listEntries(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_listEntries(taskId, ptr, args));
}
async createFileHandle(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_createFileHandle(taskId, ptr, args));
}
async writeToFile(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_writeToFile(taskId, ptr, args));
}
async openFile(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_openFile(taskId, ptr, args));
}
async readFromFile(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_readFromFile(taskId, ptr, args));
}
async seekInFile(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_seekInFile(taskId, ptr, args));
}
async closeFile(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_closeFile(taskId, ptr, args));
}
async subscribeForInboxEvents(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_subscribeForInboxEvents(taskId, ptr, args));
}
async unsubscribeFromInboxEvents(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_unsubscribeFromInboxEvents(taskId, ptr, args));
}
async subscribeForEntryEvents(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_subscribeForEntryEvents(taskId, ptr, args));
}
async unsubscribeFromEntryEvents(ptr, args) {
return this.runAsync((taskId) => this.api.lib.InboxApi_unsubscribeFromEntryEvents(taskId, ptr, args));
}
}
exports.InboxApiNative = InboxApiNative;