Types
FilesConfig
Configuration settings for file uploads.
interface FilesConfig{
maxCount: number;
maxFileSize: number;
maxWholeUploadSize: number;
minCount: number;
}
Fields
Name | Type | Description |
---|---|---|
maxCount | number | Max. number of files allowed. |
maxFileSize | number | Max. allowed size for a single file, in bytes. |
maxWholeUploadSize | number | Max. allowed size for the entire upload, in bytes. |
minCount | number | Min. 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
Name | Type | Description |
---|---|---|
contextId | string | Unique identifier of the Context to which the Inbox belongs. |
createDate | number | The timestamp when the Inbox was created. |
creator | string | ID of the user who created the Inbox. |
filesConfig | FilesConfig | Optional configuration settings for file uploads within the Inbox. |
inboxId | string | Unique identifier of the Inbox. |
lastModificationDate | number | The timestamp when the Inbox was last modified. |
lastModifier | string | ID of the user who last modified the Inbox. |
managers | string[] | An array of user IDs who manage the Inbox. |
privateMeta | Uint8Array | Private metadata associated with the Inbox, stored as a byte array. |
publicMeta | Uint8Array | Public metadata associated with the Inbox, stored as a byte array. |
statusCode | number | Total number of entries in the Inbox. |
users | string[] | An array of user IDs who are participants in the Inbox. |
version | number | The 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
Name | Type | Description |
---|---|---|
inboxId | string | Unique 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
Name | Type | Description |
---|---|---|
authorPubKey | string | The public key of the author who created the entry, used for verification. |
createDate | number | The timestamp when the entry was created. |
data | Uint8Array | The content of the entry, stored as a byte array. |
entryId | string | Unique identifier of the entry. |
files | PrivmxFile[] | An array of files associated with this entry. |
inboxId | string | Unique identifier of the Inbox to which this entry belongs. |
statusCode | number | The 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
Name | Type | Description |
---|---|---|
entryId | string | Unique identifier of the deleted entry within the Inbox. |
inboxId | string | Unique 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
Name | Type | Description |
---|---|---|
data | Uint8Array | Content 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
Name | Type | Description |
---|---|---|
inboxId | string | Unique identifier of the Inbox. |
publicMeta | Uint8Array | Public metadata associated with the Inbox, stored as a byte array. |
version | number | Version number of the Inbox, used for concurrency control. |