tsonik
Version:
A TypeScript client library for the Iconik API based on Swagger documentation
35 lines • 1.52 kB
TypeScript
import { BaseResource } from './base';
import { ApiResponse, PaginatedResponse } from '../types';
import { AssetFile, AssetFilesListParams, AssetFileParams, CreateFileRequest } from '../types/files';
/**
* File resource for managing files in Iconik
*/
export declare class FileResource extends BaseResource {
constructor(client: import('../client').Tsonik);
/**
* Get all files for an asset
*
* @param assetId - The ID of the asset
* @param options - Optional parameters for the request
* @returns Promise with the response containing asset files
*/
getAssetFiles(assetId: string, options?: AssetFilesListParams): Promise<ApiResponse<PaginatedResponse<AssetFile>>>;
/**
* Get a specific file for an asset by file ID
*
* @param assetId - The ID of the asset
* @param fileId - The ID of the file to retrieve
* @param options - Optional parameters for the request
* @returns Promise with the response containing the file
*/
getAssetFile(assetId: string, fileId: string, options?: AssetFileParams): Promise<ApiResponse<AssetFile>>;
/**
* Create a new file and associate it to an asset
*
* @param assetId - The ID of the asset to associate the file with
* @param fileData - The file data to create
* @returns Promise with the response containing the created file
*/
createAssetFile(assetId: string, fileData: CreateFileRequest): Promise<ApiResponse<AssetFile>>;
}
//# sourceMappingURL=files.d.ts.map