import { IDenormalizeDelegate, INormalizeDelegate, PolymorphicInterface, IQueryDelegate, Mergeable } from '../interface.js'; import type { Values as ValuesType, Array as ArrayType } from '../schema.js'; import type { DefaultArgs } from '../schemaTypes.js'; /** Collection merge that places incoming items at the start. * * @see https://dataclient.io/rest/api/Collection#moveWith */ export declare const unshift: (existing: any, incoming: any) => any[]; /** * Entities but for Arrays instead of classes * @see https://dataclient.io/rest/api/Collection */ export default class CollectionSchema implements Mergeable { protected nestKey?: (parent: any, key: string) => Record; protected argsKey: (...args: any) => Record; readonly schema: S; readonly key: string; push: S extends ArrayType ? CollectionSchema : undefined; unshift: S extends ArrayType ? CollectionSchema : undefined; assign: S extends ValuesType ? CollectionSchema : undefined; remove: CollectionSchema; move: CollectionSchema; addWith

(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record) => boolean): CollectionSchema; moveWith

(merge: (existing: any, incoming: any) => any): CollectionSchema; protected createCollectionFilter(...args: Args): (collectionKey: Record) => boolean; protected nonFilterArgumentKeys(key: string): boolean; constructor(schema: S, options?: CollectionOptions); get cacheWith(): object; toString(): string; toJSON(): { key: string; schema: any; }; pk(value: any, parent: any, key: string, args: readonly any[], parentEntity?: any): string; normalize(input: any, parent: Parent, key: string, delegate: INormalizeDelegate, parentEntity?: any): string; merge(existing: any, incoming: any): any; shouldReorder(existingMeta: { date: number; fetchedAt: number; }, incomingMeta: { date: number; fetchedAt: number; }, existing: any, incoming: any): boolean; mergeWithStore(existingMeta: { date: number; fetchedAt: number; }, incomingMeta: { date: number; fetchedAt: number; }, existing: any, incoming: any): any; mergeMetaWithStore(existingMeta: { fetchedAt: number; date: number; expiresAt: number; }, incomingMeta: { fetchedAt: number; date: number; expiresAt: number; }, existing: any, incoming: any): { fetchedAt: number; date: number; expiresAt: number; }; queryKey(args: Args, unvisit: unknown, delegate: IQueryDelegate): any; createIfValid: (value: any) => any | undefined; denormalize(input: any, delegate: IDenormalizeDelegate): ReturnType; } export type CollectionOptions = { /** Defines lookups for Collections nested in other schemas. * * @see https://dataclient.io/rest/api/Collection#nestKey */ nestKey?: (parent: Parent, key: string) => Record; /** Defines lookups top-level Collections using ...args. * * @see https://dataclient.io/rest/api/Collection#argsKey */ argsKey?: (...args: Args) => Record; } & ({ /** Sets a default createCollectionFilter for addWith(), push, unshift, and assign. * * @see https://dataclient.io/rest/api/Collection#createcollectionfilter */ createCollectionFilter?: (...args: Args) => (collectionKey: Record) => boolean; } | { /** Test to determine which arg keys should **not** be used for filtering results. * * @see https://dataclient.io/rest/api/Collection#nonfilterargumentkeys */ nonFilterArgumentKeys?: ((key: string) => boolean) | string[] | RegExp; }); //# sourceMappingURL=Collection.d.ts.map