import type { InterfaceHolder } from "../../../object/convertWireToOsdkObjects/InterfaceHolder.js";
import type { ObjectHolder } from "../../../object/convertWireToOsdkObjects/ObjectHolder.js";
import type { Status } from "../../ObservableClient/common.js";
import { type ObjectCacheKey } from "../object/ObjectCacheKey.js";
/**
* Abstract base for ListQuery and SpecificLinkQuery.
* - Stores object references, not duplicates
* - Implements shared pagination and reference counting
* - Template method pattern for collection operations
*/
export interface CollectionStorageData {
	data: ObjectCacheKey[];
}
/**
* Base interface for collection-based payloads (lists and links)
* Contains the common properties shared by all collection payload types
*/
export interface BaseCollectionPayload {
	/**
	* The resolved collection of objects
	*/
	resolvedList: Array<ObjectHolder | InterfaceHolder>;
	/**
	* Whether the data is from an optimistic update
	*/
	isOptimistic: boolean;
	/**
	* Function to fetch more items when available
	*/
	fetchMore: () => Promise<void>;
	/**
	* Whether there are more items available to fetch
	*/
	hasMore: boolean;
	/**
	* Current loading status
	*/
	status: Status;
	/**
	* Timestamp of when the data was last updated
	*/
	lastUpdated: number;
}
/**
* Common parameters available for constructing a collection payload
*/
export interface CollectionConnectableParams {
	/**
	* Array of resolved objects
	*/
	resolvedData: any[];
	/**
	* Whether the data is from an optimistic update
	*/
	isOptimistic: boolean;
	/**
	* Current loading status
	*/
	status: Status;
	/**
	* Timestamp of the last update
	*/
	lastUpdated: number;
}
