UNPKG

@river-build/sdk

Version:

For more details, visit the following resources:

31 lines 1.23 kB
import { ChannelMessage, ChannelProperties, EncryptedData, EncryptedDataVersion } from '@river-build/proto'; /************* * EncryptedContent *************/ export interface EncryptedContent { kind: 'text' | 'channelMessage' | 'channelProperties'; content: EncryptedData; } export declare function isEncryptedContentKind(kind: string): kind is EncryptedContent['kind']; /************* * DecryptedContent *************/ export interface DecryptedContent_Text { kind: 'text'; content: string; } export interface DecryptedContent_ChannelMessage { kind: 'channelMessage'; content: ChannelMessage; } export interface DecryptedContent_ChannelProperties { kind: 'channelProperties'; content: ChannelProperties; } export interface DecryptedContent_UnsupportedContent { kind: 'unsupported'; content: string | Uint8Array; } export type DecryptedContent = DecryptedContent_Text | DecryptedContent_ChannelMessage | DecryptedContent_ChannelProperties | DecryptedContent_UnsupportedContent; export declare function toDecryptedContent(kind: EncryptedContent['kind'], dataVersion: EncryptedDataVersion, cleartext: Uint8Array | string): DecryptedContent; //# sourceMappingURL=encryptedContentTypes.d.ts.map