netstorage
Version:
A TypeScript API and CLI for the Akamai NetStorage REST interface
34 lines (33 loc) • 1.21 kB
TypeScript
import { type RequestOptions, type NetStorageClientConfig } from '../index';
/**
* Parsed response returned from a NetStorage rename operation.
*
* @property code - HTTP-style status code indicating the result of the rename operation.
*/
export interface NetStorageRename {
status: {
code: number;
};
}
/**
* Parameters required to perform a rename operation.
*
* @property pathFrom - Full path of the source file or directory.
* @property pathTo - Full destination path for the renamed file or directory.
* @property options - Optional request-level configuration (e.g., timeout, abort signal).
*/
export interface RenameParams {
pathFrom: string;
pathTo: string;
options?: RequestOptions;
}
/**
* Renames a file or directory within NetStorage.
*
* Performs a PUT request with the `rename` action and destination path.
*
* @param config - NetStorage client config with credentials and configuration.
* @param param1 - Object containing rename parameters.
* @returns A promise resolving to a parsed NetStorageRename result.
*/
export declare function rename(config: NetStorageClientConfig, { pathFrom, pathTo, options }: RenameParams): Promise<NetStorageRename>;