import { Id } from '../id.js'; import { type PublishImageParams } from '../ipfs-core.js'; import type { CreateImageResult } from '../types.js'; import type { GeoClientContext } from './context.js'; export type CreateImageParams = PublishImageParams & { name?: string; description?: string; id?: Id | string; alternativeGateway?: boolean; }; /** * Uploads an image and builds the corresponding image entity ops. * * This is the context-aware image workflow used by `geo.images.create(...)`. * It uploads the image through the configured API origin, attempts to read * image dimensions, then creates image entity ops. * * @example * ```ts * const { id, cid, dimensions, ops } = await geo.images.create({ * url: 'https://example.com/cover.png', * name: 'Cover image', * description: 'Image used as the space cover.', * }); * * console.log(id, cid, dimensions); * ``` * * @param context Client context containing network and fetch configuration. * @param params Image source plus optional entity metadata. * @returns Created image entity ID, uploaded CID, dimensions when detected, and ops. * @throws When the optional ID is invalid, fetch is unavailable, upload fails, or the CID response is invalid. */ export declare function create(context: GeoClientContext, params: CreateImageParams): Promise; //# sourceMappingURL=images.d.ts.map