/** * Represents a file that is attached to a resource. */ export interface Attached { /** * ARN of the resource that the file is attached to. * Could be a Connect Contact ARN or a Connect Case ARN. */ associatedResourceArn: string; } /** * Base type for a file that is attached to a resource. */ export interface Attachment extends Attached { /** * Identifier in Connect's File record */ fileId: string; } export declare enum FileStatus { APPROVED = "APPROVED", REJECTED = "REJECTED", PROCESSING = "PROCESSING", PENDING_UPLOAD = "PENDING_UPLOAD", UPLOAD_EXPIRED = "UPLOAD_EXPIRED", FAILED = "FAILED", DELETED = "DELETED" } export interface AttachmentMetadata extends Attachment { fileArn: string; fileName: string; fileStatus: FileStatus; fileSizeInBytes: number; creationTime: string; } export interface AttachmentError { errorCode: string; errorMessage: string; fileId: string; } export interface BatchGetAttachedFileMetadataResponse { files: AttachmentMetadata[]; errors: AttachmentError[]; } /** * A group of files that are associated to the same resource */ export interface RelatedAttachments extends Attached { fileIds: string[]; } export interface NewAttachment extends Attached { fileName: string; fileSizeInBytes: number; fileUseCaseType: "ATTACHMENT"; } export interface UploadableAttachment extends Attachment { /** * Include the file in a PUT request to this url */ uploadUrl: string; /** * Send these required headers along with the file to the uploadUrl. */ uploadHeaders: Record; /** * The upload request must be a PUT. */ uploadMethod: "PUT"; /** * The status of the file upload. */ fileStatus: FileStatus; } export interface DownloadableAttachment extends AttachmentMetadata { downloadUrl: string; } /** * How the browser handles the file at the returned url. * - INLINE: render the file in the browser (for preview) * - ATTACHMENT: download the file (default) */ export type ContentDisposition = "INLINE" | "ATTACHMENT"; //# sourceMappingURL=types.d.ts.map