UNPKG

icebird

Version:

Apache Iceberg client for javascript

43 lines 1.94 kB
/** * Fetches the iceberg metadata version using the version hint file. * If the version hint file is not found, tries to list S3 to find the latest metadata file. * * @param {object} options * @param {string} options.tableUrl - Base URL of the table (e.g. "s3://my-bucket/path/to/table") * @param {RequestInit} [options.requestInit] - Optional fetch request initialization * @returns {Promise<string>} The snapshot version */ export function icebergLatestVersion({ tableUrl, requestInit }: { tableUrl: string; requestInit?: RequestInit | undefined; }): Promise<string>; /** * Returns a list of iceberg metadata versions. * * @param {object} options * @param {string} options.tableUrl - Base URL of the table (e.g. "s3://my-bucket/path/to/table") * @param {RequestInit} [options.requestInit] - Optional fetch request initialization * @returns {Promise<string[]>} A list of iceberg table versions */ export function icebergListVersions({ tableUrl, requestInit }: { tableUrl: string; requestInit?: RequestInit | undefined; }): Promise<string[]>; /** * Fetches the iceberg table metadata. * If metadataFileName is not provided, uses icebergLatestVersion to get the version hint. * * @import {TableMetadata} from '../src/types.js' * @param {object} options * @param {string} options.tableUrl - Base URL of the table (e.g. "s3://my-bucket/path/to/table") * @param {string} [options.metadataFileName] - Name of the metadata JSON file * @param {RequestInit} [options.requestInit] - Optional fetch request initialization * @returns {Promise<TableMetadata>} The table metadata as a JSON object */ export function icebergMetadata({ tableUrl, metadataFileName, requestInit }: { tableUrl: string; metadataFileName?: string | undefined; requestInit?: RequestInit | undefined; }): Promise<TableMetadata>; import type { TableMetadata } from '../src/types.js'; //# sourceMappingURL=metadata.d.ts.map