@resistdesign/voltra
    Preparing search index...

    Class S3FileItemDBDriver

    Use S3 as a DataItemDBDriver for BaseFileItems.

    Implements

    Index

    Constructors

    Methods

    • List @BaseFileItems by a given criteria.

      Parameters

      • config: ListItemsConfig

        List configuration and criteria.

      • OptionalselectFields: (
            | "id"
            | "updatedOn"
            | "mimeType"
            | "sizeInBytes"
            | "isDirectory"
            | (keyof BaseFileLocationInfo)
            | "uploadUrl"
            | "downloadUrl"
        )[]

        Optional fields to select from each file item.

      Returns Promise<{ cursor: string | undefined; items: Partial<BaseFileItem>[] }>

      List results with items and cursor.

    • Read a @BaseFileItem by its id.

      Parameters

      • id: string

        Unique identifier value for the file.

      • OptionalselectFields: (
            | "id"
            | "updatedOn"
            | "mimeType"
            | "sizeInBytes"
            | "isDirectory"
            | (keyof BaseFileLocationInfo)
            | "uploadUrl"
            | "downloadUrl"
        )[]

        Optional fields to select from the file item.

      Returns Promise<BaseFileItem>

      File item payload (partial when selected fields are used).

    Properties

    Driver configuration including S3 settings.

    readItemStronglyConsistent: (
        id: string,
        selectFields?: (
            | "id"
            | "updatedOn"
            | "mimeType"
            | "sizeInBytes"
            | "isDirectory"
            | (keyof BaseFileLocationInfo)
            | "uploadUrl"
            | "downloadUrl"
        )[],
    ) => Promise<BaseFileItem> = ...

    Strongly consistent maintenance read.

    Amazon S3 object reads are strongly consistent after successful writes.

    Type Declaration

      • (
            id: string,
            selectFields?: (
                | "id"
                | "updatedOn"
                | "mimeType"
                | "sizeInBytes"
                | "isDirectory"
                | (keyof BaseFileLocationInfo)
                | "uploadUrl"
                | "downloadUrl"
            )[],
        ): Promise<BaseFileItem>
      • Read a @BaseFileItem by its id.

        Parameters

        • id: string

          Unique identifier value for the file.

        • OptionalselectFields: (
              | "id"
              | "updatedOn"
              | "mimeType"
              | "sizeInBytes"
              | "isDirectory"
              | (keyof BaseFileLocationInfo)
              | "uploadUrl"
              | "downloadUrl"
          )[]

          Optional fields to select from the file item.

        Returns Promise<BaseFileItem>

        File item payload (partial when selected fields are used).