import * as P from '../api/fileUploadViaPostTypes'; import * as F from '../api/filesAPITypes'; import { Match } from '../request/requestBuidler'; import { URLString } from '../api/aliases'; /** * upload a file to canvas. * This function implement the entire process of canvas upload policy. * @param folderId the folder id. * @param file the binary representation of the file. * @param config config for "/api/v1/folders/:folder_id/files" endpoint. * @return a Promise of confirmed response from canvas server. */ export declare function uploadAFile(folderId: Match["folder_id"], fileContent: ArrayBuffer, config: Match): Promise<{ id: number; url: string; "content-type": string; display_name: string; szie: number; }>; /** * post bianry value * @param url where we post our data to. It's a url string received from * UploadAFileENDPOINT endpoint request. * @param config contains key get from UploadAFileENDPOINT request and * binary file content. * note the file is mandatory. * @return confirm url */ export declare function fileUploadViaPost(url: URLString, config: Match): Promise>; /** * confirm data is uploaded * @param url the url string returned from `fileUploadViaPost`. The url is * used to confirm if file is uploaded. * Note, if the previous response has status 3xx this confirmation is * necessary for file to be stored. * @return confirmed message */ export declare function fileUploadConfirm(url: URLString): Promise>;