import { BaseApi } from "../base-api"; import type { ApiRecords, PaginationOptions, SearchParams } from "../types"; import type { ArrayAttribute, Attribute, AttributeSearchOptions, ObjectAttribute, PrimitiveAttribute, RefAttribute, ShallowAttribute, SubAttribute } from "./types"; /** * A class for accessing the Attribute API. * @extends BaseApi */ declare class AttributeApi extends BaseApi { /** * Gets a list of attributes from the API. * * @returns {Promise>} A promise that resolves with the list of attributes. */ getAttributes(): Promise>; } /** * A class for accessing the Attribute API. * @extends BaseApi */ declare class AttributeApiV2 extends BaseApi { /** * Gets a list of attributes from the API. Note: the API does not return * pagination metadata for this endpoint (only `records`), so the response * is not further paginated beyond what `page`/`per_page` select. * * @param {PaginationOptions} [paginationOptions] - Optional pagination parameters. * @param {SearchParams} [searchParams] - Optional search parameters. * @param {AttributeSearchOptions} [options] - Optional `resolve`/`min_score` filters. * @returns {Promise>} A promise that resolves with the list of attributes. */ getAttributesV2(paginationOptions?: PaginationOptions, searchParams?: SearchParams, options?: AttributeSearchOptions): Promise>; /** * Gets a single attribute from the API by its ID or name. * * @param {number | string} attributeId - The ID or unique name of the attribute to retrieve. * @returns {Promise} A promise that resolves with the attribute. */ getAttribute(attributeId: number | string): Promise; /** * Deletes a single attribute from the API by its ID or name. * * @param {number | string} attributeId - The ID or unique name of the attribute to delete. * @returns {Promise} A promise that resolves when the delete operation is complete. */ deleteAttribute(attributeId: number | string): Promise; /** * Creates a new attribute on the API. * * @param {Attribute} data - The data for the new attribute. * @returns {Promise} A promise that resolves with the newly created attribute. */ createAttribute(data: Attribute): Promise; } export { type ArrayAttribute, type Attribute, AttributeApi, AttributeApiV2, type AttributeSearchOptions, type ObjectAttribute, type PrimitiveAttribute, type RefAttribute, type ShallowAttribute, type SubAttribute, };