netstorage
Version:
A TypeScript API and CLI for the Akamai NetStorage REST interface
33 lines (32 loc) • 1.08 kB
TypeScript
import { type RequestOptions, type NetStorageClientConfig } from '../index';
/**
* Response shape for a successful NetStorage `mtime` operation.
*
* @property code - The response status code from the API.
*/
export interface NetStorageMtime {
status: {
code: number;
};
}
/**
* Parameters for updating the modification time.
*
* @property path - The remote file or directory path.
* @property date - The new modification time as a Date instance.
* @property options - Optional per-request settings.
*/
export interface MtimeParams {
path: string;
date: Date;
options?: RequestOptions;
}
/**
* Sets the modification time for a remote file or directory.
*
* @param config - The NetStorage client config.
* @param params - Object containing the target path, date, and optional request options.
* @returns The parsed NetStorage response object.
* @throws {TypeError} If `date` is not a valid Date instance.
*/
export declare function mtime(config: NetStorageClientConfig, { path, date, options }: MtimeParams): Promise<NetStorageMtime>;