@simplito/privmx-webendpoint
Version:
PrivMX Web Endpoint library
51 lines (48 loc) • 2.3 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, Kvdb, KvdbEntry, ContainerPolicy, DeleteEntriesResult, KvdbEventSelectorType, KvdbEventType } from "../Types";
import { BaseNative } from "./BaseNative";
export declare class KvdbApiNative extends BaseNative {
newApi(connectionPtr: number): Promise<number>;
deleteApi(ptr: number): Promise<void>;
create(ptr: number, args: []): Promise<void>;
createKvdb(ptr: number, args: [
string,
UserWithPubKey[],
UserWithPubKey[],
Uint8Array,
Uint8Array,
ContainerPolicy | undefined
]): Promise<string>;
updateKvdb(ptr: number, args: [
string,
UserWithPubKey[],
UserWithPubKey[],
Uint8Array,
Uint8Array,
number,
boolean,
boolean,
ContainerPolicy | undefined
]): Promise<void>;
deleteKvdb(ptr: number, args: [string]): Promise<void>;
getKvdb(ptr: number, args: [string]): Promise<Kvdb>;
listKvdbs(ptr: number, args: [string, PagingQuery]): Promise<PagingList<Kvdb>>;
hasEntry(ptr: number, args: [string, string]): Promise<boolean>;
getEntry(ptr: number, args: [string, string]): Promise<KvdbEntry>;
listEntriesKeys(ptr: number, args: [string, PagingQuery]): Promise<PagingList<string>>;
listEntries(ptr: number, args: [string, PagingQuery]): Promise<PagingList<KvdbEntry>>;
setEntry(ptr: number, args: [string, string, Uint8Array, Uint8Array, Uint8Array, number]): Promise<void>;
deleteEntry(ptr: number, args: [string, string]): Promise<void>;
deleteEntries(ptr: number, args: [string, string[]]): Promise<DeleteEntriesResult>;
subscribeFor(ptr: number, args: [string[]]): Promise<string[]>;
unsubscribeFrom(ptr: number, args: [string[]]): Promise<void>;
buildSubscriptionQuery(ptr: number, args: [KvdbEventType, KvdbEventSelectorType, string]): Promise<string>;
buildSubscriptionQueryForSelectedEntry(ptr: number, args: [KvdbEventType, string, string]): Promise<string>;
}