UNPKG

@simplito/privmx-webendpoint

Version:

PrivMX Web Endpoint library

32 lines (29 loc) 1.88 kB
/*! 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. */ import { PagingQuery, PagingList, UserWithPubKey, Thread, Message, ContainerPolicy } from "../Types"; import { BaseNative } from "./BaseNative"; export declare class ThreadApiNative extends BaseNative { newApi(connectionPtr: number): Promise<number>; deleteApi(ptr: number): Promise<void>; create(ptr: number, args: []): Promise<void>; createThread(ptr: number, args: [string, UserWithPubKey[], UserWithPubKey[], Uint8Array, Uint8Array, ContainerPolicy | undefined]): Promise<string>; updateThread(ptr: number, args: [string, UserWithPubKey[], UserWithPubKey[], Uint8Array, Uint8Array, number, boolean, boolean, ContainerPolicy | undefined]): Promise<void>; deleteThread(ptr: number, args: [string]): Promise<void>; getThread(ptr: number, args: [string]): Promise<Thread>; listThreads(ptr: number, args: [string, PagingQuery]): Promise<PagingList<Thread>>; getMessage(ptr: number, args: [string]): Promise<Message>; listMessages(ptr: number, args: [string, PagingQuery]): Promise<PagingList<Message>>; sendMessage(ptr: number, args: [string, Uint8Array, Uint8Array, Uint8Array]): Promise<string>; deleteMessage(ptr: number, args: [string]): Promise<void>; updateMessage(ptr: number, args: [string, Uint8Array, Uint8Array, Uint8Array]): Promise<void>; subscribeForThreadEvents(ptr: number, args: []): Promise<void>; unsubscribeFromThreadEvents(ptr: number, args: []): Promise<void>; subscribeForMessageEvents(ptr: number, args: [string]): Promise<void>; unsubscribeFromMessageEvents(ptr: number, args: [string]): Promise<void>; }