import { ConnectClientConfig, ConnectClientConfigDeprecated, ConnectClientWithOptionalConfig } from "@amazon-connect/core"; import { Attachment, BatchGetAttachedFileMetadataResponse, ContentDisposition, DownloadableAttachment, NewAttachment, RelatedAttachments, UploadableAttachment } from "./types"; export declare class FileClient extends ConnectClientWithOptionalConfig { /** * Creates a new FileClient instance with the specified configuration. * * @param config - The configuration for the client. Can be provided as: * - An AmazonConnectProvider instance directly: `new FileClient(provider)` * - An object with provider: `new FileClient({ provider })` * * @example * ```typescript * // Recommended: Pass provider directly * const client = new FileClient(provider); * * // Alternative: Pass as object * const client = new FileClient({ provider }); * ``` */ constructor(config: ConnectClientConfig); /** * @deprecated Calling FileClient without AmazonConnectProvider is deprecated and will be removed in a future version. * Please provide an AmazonConnectProvider instance: `new FileClient(provider)` */ constructor(config?: ConnectClientConfigDeprecated); /** * Get metadata for files that are all associated with the same contact. * Does not return urls for downloading the file. * * @param {Object} request the request data * @param {RelatedAttachments} request.relatedAttachments the attachments to get the metadata for * @param {string} request.activeContactId the contact id the agent is actively handling * @returns {Promise} a promise that resolves to the metadata for the files */ batchGetAttachedFileMetadata({ relatedAttachments, activeContactId, }: { relatedAttachments: RelatedAttachments; activeContactId: string; }): Promise; /** * Start uploading a file to Amazon Connect. * * Don't forget to call completeFileUpload() after uploading the file. * * @param {NewAttachment} data the attachment to upload * @returns {Promise} a promise that resolves to the file data and a presigned s3 url to upload the file to */ startAttachedFileUpload(data: NewAttachment): Promise; /** * Tell Amazon Connect that the file has finished uploading. To confirm that file is done sending, * use batchGetAttachedFileMetadata to check the file status. * * @param {Attachment} attachment the attachment to complete the upload for * @returns {Promise} a promise that resolves to void when the file upload is complete */ completeAttachedFileUpload(attachment: Attachment): Promise; /** * Retrieve an S3 url for the file. Also includes file metadata. * * @param {Object} request the request data * @param {Attachment} request.attachment the attachment to get the url for * @param {string} [request.activeContactId] the contact the agent is actively handling; omit for closed/historical contacts * @param {ContentDisposition} [request.contentDisposition] "INLINE" to render the file in the browser, "ATTACHMENT" to download it; omit to download (default) * @returns {Promise} a promise that resolves to the file data and a url to access the file */ getAttachedFileUrl({ attachment, activeContactId, contentDisposition, }: { attachment: Attachment; /** The contact the agent is actively handling. Optional for closed/historical contacts. */ activeContactId?: string; /** How the browser handles the file at the returned url. Defaults to download. */ contentDisposition?: ContentDisposition; }): Promise; /** * Permanently delete the attached file. * * @param {Attachment} data the attachment to delete * @returns {Promise} a promise that resolves to void when the file is deleted */ deleteAttachedFile(data: Attachment): Promise; } //# sourceMappingURL=file-client.d.ts.map