Skip to main content
reference

Types

FilesConfig

Configuration settings for file uploads.

interface FilesConfig{
maxCount: number;
maxFileSize: number;
maxWholeUploadSize: number;
minCount: number;
}

Fields

NameTypeDescription
maxCountnumberMax. number of files allowed.
maxFileSizenumberMax. allowed size for a single file, in bytes.
maxWholeUploadSizenumberMax. allowed size for the entire upload, in bytes.
minCountnumberMin. number of files required.

Inbox

Information about Inbox

interface Inbox{
contextId: string;
createDate: number;
creator: string;
filesConfig: FilesConfig;
inboxId: string;
lastModificationDate: number;
lastModifier: string;
managers: string[];
privateMeta: Uint8Array;
publicMeta: Uint8Array;
statusCode: number;
users: string[];
version: number;
}

Fields

NameTypeDescription
contextIdstringUnique identifier of the Context to which the Inbox belongs.
createDatenumberThe timestamp when the Inbox was created.
creatorstringID of the user who created the Inbox.
filesConfigFilesConfigOptional configuration settings for file uploads within the Inbox.
inboxIdstringUnique identifier of the Inbox.
lastModificationDatenumberThe timestamp when the Inbox was last modified.
lastModifierstringID of the user who last modified the Inbox.
managersstring[]An array of user IDs who manage the Inbox.
privateMetaUint8ArrayPrivate metadata associated with the Inbox, stored as a byte array.
publicMetaUint8ArrayPublic metadata associated with the Inbox, stored as a byte array.
statusCodenumberTotal number of entries in the Inbox.
usersstring[]An array of user IDs who are participants in the Inbox.
versionnumberThe current version of the Inbox, used for concurrency control.

InboxDeletedEventData

Represents the data for an event where an Inbox is deleted.

interface InboxDeletedEventData{
inboxId: string;
}

Fields

NameTypeDescription
inboxIdstringUnique identifier of the deleted Inbox.

InboxEntry

Represents an entry within an Inbox, including its content and associated files.

interface InboxEntry{
authorPubKey: string;
createDate: number;
data: Uint8Array;
entryId: string;
files: PrivmxFile[];
inboxId: string;
statusCode: number;
}

Fields

NameTypeDescription
authorPubKeystringThe public key of the author who created the entry, used for verification.
createDatenumberThe timestamp when the entry was created.
dataUint8ArrayThe content of the entry, stored as a byte array.
entryIdstringUnique identifier of the entry.
filesPrivmxFile[]An array of files associated with this entry.
inboxIdstringUnique identifier of the Inbox to which this entry belongs.
statusCodenumberThe status code of the message, indicating its current state.

InboxEntryDeletedEventData

Represents the data for an event where an entry within an Inbox is deleted.

interface InboxEntryDeletedEventData{
entryId: string;
inboxId: string;
}

Fields

NameTypeDescription
entryIdstringUnique identifier of the deleted entry within the Inbox.
inboxIdstringUnique identifier of the Inbox containing the deleted entry.

InboxEntryPayload

Represents payload that is sent to an Inbox.

interface InboxEntryPayload{
data: Uint8Array;
files: {
data: Uint8Array | File;
privateMeta: Uint8Array;
publicMeta: Uint8Array;
}[];
}

Fields

NameTypeDescription
dataUint8ArrayContent of the entry.
files{ data: Uint8Array | File; privateMeta: Uint8Array; publicMeta: Uint8Array; }[]Optional files associated with the entry.

InboxPublicView

Represents a public view of an Inbox, including basic metadata.

interface InboxPublicView{
inboxId: string;
publicMeta: Uint8Array;
version: number;
}

Fields

NameTypeDescription
inboxIdstringUnique identifier of the Inbox.
publicMetaUint8ArrayPublic metadata associated with the Inbox, stored as a byte array.
versionnumberVersion number of the Inbox, used for concurrency control.