@simplito/privmx-webendpoint
Version:
PrivMX Web Endpoint library
48 lines (45 loc) • 2.02 kB
TypeScript
/*!
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, ThreadEventSelectorType, ThreadEventType } 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>;
subscribeFor(ptr: number, args: [string[]]): Promise<string[]>;
unsubscribeFrom(ptr: number, args: [string[]]): Promise<void>;
buildSubscriptionQuery(ptr: number, args: [ThreadEventType, ThreadEventSelectorType, string]): Promise<string>;
}