UNPKG

tsonik

Version:

A TypeScript client library for the Iconik API based on Swagger documentation

53 lines 2.37 kB
import { BaseResource } from './base'; import { Tsonik } from '../client'; import { ApiResponse, PaginatedResponse } from '../types'; import { Format, AssetFormatsListParams, CreateFormatRequest, UpdateFormatRequest, ReplaceFormatRequest } from '../types/formats'; /** * Format resource for managing formats in Iconik */ export declare class FormatResource extends BaseResource { constructor(client: Tsonik); /** * Get all formats for a specific asset * * @param assetId - The ID of the asset * @param params - Optional parameters for the request * @returns Promise with the response containing asset formats */ getAssetFormats(assetId: string, params?: AssetFormatsListParams): Promise<ApiResponse<PaginatedResponse<Format>>>; /** * Get a specific format for an asset * * @param assetId - The ID of the asset * @param formatId - The ID of the format to retrieve * @returns Promise with the response containing the format */ getAssetFormat(assetId: string, formatId: string): Promise<ApiResponse<Format>>; /** * Update an existing format for an asset * * @param assetId - The ID of the asset * @param formatId - The ID of the format to update * @param formatData - The format data to update * @returns Promise with the response containing the updated format */ updateAssetFormat(assetId: string, formatId: string, formatData: UpdateFormatRequest): Promise<ApiResponse<Format>>; /** * Replace an existing format for an asset (complete replacement) * * @param assetId - The ID of the asset * @param formatId - The ID of the format to replace * @param formatData - The format data to replace with * @returns Promise with the response containing the replaced format */ replaceAssetFormat(assetId: string, formatId: string, formatData: ReplaceFormatRequest): Promise<ApiResponse<Format>>; /** * Create a new format and associate it to an asset * * @param assetId - The ID of the asset to associate the format with * @param formatData - The format data to create * @returns Promise with the response containing the created format */ createAssetFormat(assetId: string, formatData: CreateFormatRequest): Promise<ApiResponse<Format>>; } //# sourceMappingURL=formats.d.ts.map