Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Media

import type { Media } from "https://googleapis.deno.dev/v1/walletobjects:v1.ts";

A reference to data stored on the filesystem, on GFS or in blobstore.

interface Media {
algorithm?: string;
bigstoreObjectRef?: Uint8Array;
blobRef?: Uint8Array;
blobstore2Info?: Blobstore2Info;
compositeMedia?: CompositeMedia[];
contentType?: string;
contentTypeInfo?: ContentTypeInfo;
cosmoBinaryReference?: Uint8Array;
crc32cHash?: number;
diffChecksumsResponse?: DiffChecksumsResponse;
diffDownloadResponse?: DiffDownloadResponse;
diffUploadRequest?: DiffUploadRequest;
diffUploadResponse?: DiffUploadResponse;
diffVersionResponse?: DiffVersionResponse;
downloadParameters?: DownloadParameters;
filename?: string;
hash?: string;
hashVerified?: boolean;
inline?: Uint8Array;
isPotentialRetry?: boolean;
length?: bigint;
md5Hash?: Uint8Array;
mediaId?: Uint8Array;
objectId?: ObjectId;
path?: string;
referenceType?:
| "PATH"
| "BLOB_REF"
| "INLINE"
| "GET_MEDIA"
| "COMPOSITE_MEDIA"
| "BIGSTORE_REF"
| "DIFF_VERSION_RESPONSE"
| "DIFF_CHECKSUMS_RESPONSE"
| "DIFF_DOWNLOAD_RESPONSE"
| "DIFF_UPLOAD_REQUEST"
| "DIFF_UPLOAD_RESPONSE"
| "COSMO_BINARY_REFERENCE"
| "ARBITRARY_BYTES";
sha1Hash?: Uint8Array;
sha256Hash?: Uint8Array;
timestamp?: bigint;
token?: string;
}

§Properties

§
algorithm?: string
[src]

Deprecated, use one of explicit hash type fields instead. Algorithm used for calculating the hash. As of 2011/01/21, "MD5" is the only possible value for this field. New values may be added at any time.

§
bigstoreObjectRef?: Uint8Array
[src]

Use object_id instead.

§
blobRef?: Uint8Array
[src]

Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.

§
blobstore2Info?: Blobstore2Info
[src]

Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob.

§
compositeMedia?: CompositeMedia[]
[src]

A composite media composed of one or more media objects, set if reference_type is COMPOSITE_MEDIA. The media length field must be set to the sum of the lengths of all composite media objects. Note: All composite media must have length specified.

§
contentType?: string
[src]

MIME type of the data

§
contentTypeInfo?: ContentTypeInfo
[src]

Extended content type information provided for Scotty uploads.

§
cosmoBinaryReference?: Uint8Array
[src]

A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field.

§
crc32cHash?: number
[src]

For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify the data being downloaded. Currently only supported for inline payloads. Further, only crc32c_hash is currently supported.

§
diffChecksumsResponse?: DiffChecksumsResponse
[src]

Set if reference_type is DIFF_CHECKSUMS_RESPONSE.

§
diffDownloadResponse?: DiffDownloadResponse
[src]

Set if reference_type is DIFF_DOWNLOAD_RESPONSE.

§
diffUploadRequest?: DiffUploadRequest
[src]

Set if reference_type is DIFF_UPLOAD_REQUEST.

§
diffUploadResponse?: DiffUploadResponse
[src]

Set if reference_type is DIFF_UPLOAD_RESPONSE.

§
diffVersionResponse?: DiffVersionResponse
[src]

Set if reference_type is DIFF_VERSION_RESPONSE.

§
downloadParameters?: DownloadParameters
[src]

Parameters for a media download.

§
filename?: string
[src]

Original file name

§
hash?: string
[src]

Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/uploader/service/proto/upload_listener.proto&q=class:Hash Hex encoded hash value of the uploaded media.

§
hashVerified?: boolean
[src]

For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification.

§
inline?: Uint8Array
[src]

Media data, set if reference_type is INLINE

§
isPotentialRetry?: boolean
[src]

|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence.

§
length?: bigint
[src]

Size of the data, in bytes

§
md5Hash?: Uint8Array
[src]

Scotty-provided MD5 hash for an upload.

§
mediaId?: Uint8Array
[src]

Media id to forward to the operation GetMedia. Can be set if reference_type is GET_MEDIA.

§
objectId?: ObjectId
[src]

Reference to a TI Blob, set if reference_type is BIGSTORE_REF.

§
path?: string
[src]

Path to the data, set if reference_type is PATH

§
referenceType?: "PATH" | "BLOB_REF" | "INLINE" | "GET_MEDIA" | "COMPOSITE_MEDIA" | "BIGSTORE_REF" | "DIFF_VERSION_RESPONSE" | "DIFF_CHECKSUMS_RESPONSE" | "DIFF_DOWNLOAD_RESPONSE" | "DIFF_UPLOAD_REQUEST" | "DIFF_UPLOAD_RESPONSE" | "COSMO_BINARY_REFERENCE" | "ARBITRARY_BYTES"
[src]

Describes what the field reference contains.

§
sha1Hash?: Uint8Array
[src]

Scotty-provided SHA1 hash for an upload.

§
sha256Hash?: Uint8Array
[src]

Scotty-provided SHA256 hash for an upload.

§
timestamp?: bigint
[src]

Time at which the media data was last updated, in milliseconds since UNIX epoch

§
token?: string
[src]

A unique fingerprint/version id for the media data