47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
export = deleteFile;
|
|
/**
|
|
* @typedef {Object} FunctionReturn
|
|
* @property {boolean} success - Did the function run successfully?
|
|
* @property {{
|
|
* urlPath: string,
|
|
* urlThumbnailPath: string
|
|
* } | null} payload - Payload containing the url for the image and its thumbnail
|
|
* @property {string} [msg] - An optional message
|
|
*/
|
|
/**
|
|
* # Delete File via API
|
|
* @async
|
|
*
|
|
* @param {Object} params - Single Param object containing params
|
|
* @param {String} params.key - *FULL ACCESS API Key
|
|
* @param { string } params.url - File URL
|
|
* @param { string | number } [params.user_id]
|
|
*
|
|
* @returns { Promise<FunctionReturn> } - Image Url
|
|
*/
|
|
declare function deleteFile({ key, url, user_id }: {
|
|
key: string;
|
|
url: string;
|
|
user_id?: string | number;
|
|
}): Promise<FunctionReturn>;
|
|
declare namespace deleteFile {
|
|
export { FunctionReturn };
|
|
}
|
|
type FunctionReturn = {
|
|
/**
|
|
* - Did the function run successfully?
|
|
*/
|
|
success: boolean;
|
|
/**
|
|
* - Payload containing the url for the image and its thumbnail
|
|
*/
|
|
payload: {
|
|
urlPath: string;
|
|
urlThumbnailPath: string;
|
|
} | null;
|
|
/**
|
|
* - An optional message
|
|
*/
|
|
msg?: string;
|
|
};
|