Represents a DocumentMessage.

Hierarchy

  • DocumentMessage

Implements

Constructors

Properties

caption: string

DocumentMessage caption.

contactVcard: boolean

DocumentMessage contactVcard.

contextInfo?: null | IContextInfo

DocumentMessage contextInfo.

directPath: string

DocumentMessage directPath.

fileEncSha256: Uint8Array

DocumentMessage fileEncSha256.

fileLength: number | Long

DocumentMessage fileLength.

fileName: string

DocumentMessage fileName.

fileSha256: Uint8Array

DocumentMessage fileSha256.

jpegThumbnail: Uint8Array

DocumentMessage jpegThumbnail.

mediaKey: Uint8Array

DocumentMessage mediaKey.

mediaKeyTimestamp: number | Long

DocumentMessage mediaKeyTimestamp.

mimetype: string

DocumentMessage mimetype.

pageCount: number

DocumentMessage pageCount.

thumbnailDirectPath: string

DocumentMessage thumbnailDirectPath.

thumbnailEncSha256: Uint8Array

DocumentMessage thumbnailEncSha256.

thumbnailHeight: number

DocumentMessage thumbnailHeight.

thumbnailSha256: Uint8Array

DocumentMessage thumbnailSha256.

thumbnailWidth: number

DocumentMessage thumbnailWidth.

title: string

DocumentMessage title.

url: string

DocumentMessage url.

Methods

  • Converts this DocumentMessage to JSON.

    Returns {
        [k: string]: any;
    }

    JSON object

    • [k: string]: any
  • Decodes a DocumentMessage message from the specified reader or buffer.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • Optional length: number

      Message length if known beforehand

    Returns DocumentMessage

    DocumentMessage

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Decodes a DocumentMessage message from the specified reader or buffer, length delimited.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns DocumentMessage

    DocumentMessage

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Encodes the specified DocumentMessage message. Does not implicitly verify messages.

    Parameters

    • message: IDocumentMessage

      DocumentMessage message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Encodes the specified DocumentMessage message, length delimited. Does not implicitly verify messages.

    Parameters

    • message: IDocumentMessage

      DocumentMessage message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Creates a DocumentMessage message from a plain object. Also converts values to their respective internal types.

    Parameters

    • object: {
          [k: string]: any;
      }

      Plain object

      • [k: string]: any

    Returns DocumentMessage

    DocumentMessage

  • Creates a plain object from a DocumentMessage message. Also converts values to other types if specified.

    Parameters

    • message: DocumentMessage

      DocumentMessage

    • Optional options: IConversionOptions

      Conversion options

    Returns {
        [k: string]: any;
    }

    Plain object

    • [k: string]: any
  • Verifies a DocumentMessage message.

    Parameters

    • message: {
          [k: string]: any;
      }

      Plain object to verify

      • [k: string]: any

    Returns null | string

    null if valid, otherwise the reason why it is not

Generated using TypeDoc