UNPKG

@data-client/endpoint

Version:

Declarative Network Interface Definitions

47 lines (46 loc) 1.95 kB
import { EntityInterface, SchemaSimple } from '../interface.js'; import { AbstractInstanceType } from '../normal.js'; /** * Marks entity as Invalid. * * This triggers suspense for all endpoints requiring it. * Optional (like variable sized Array and Values) will simply remove the item. * @see https://dataclient.io/rest/api/Invalidate */ export default class Invalidate<E extends EntityInterface & { process: any; }> implements SchemaSimple { protected _entity: E; /** * Marks entity as Invalid. * * This triggers suspense for all endpoints requiring it. * Optional (like variable sized Array and Values) will simply remove the item. * @see https://dataclient.io/rest/api/Invalidate */ constructor(entity: E); readonly key: string; /** Normalize lifecycles **/ normalize(input: any, parent: any, key: string | undefined, args: any[], visit: (...args: any) => any, addEntity: (...args: any) => any, getEntity: any, checkLoop: any): string | number | undefined; merge(existing: any, incoming: any): any; mergeWithStore(existingMeta: any, incomingMeta: any, existing: any, incoming: any): any; mergeMetaWithStore(existingMeta: { expiresAt: number; date: number; fetchedAt: number; }, incomingMeta: { expiresAt: number; date: number; fetchedAt: number; }, existing: any, incoming: any): { expiresAt: number; date: number; fetchedAt: number; }; /** /End Normalize lifecycles **/ queryKey(args: any, queryKey: unknown, getEntity: unknown, getIndex: unknown): undefined; denormalize(id: string, args: readonly any[], unvisit: (schema: any, input: any) => any): AbstractInstanceType<E>; _denormalizeNullable(): AbstractInstanceType<E> | undefined; _normalizeNullable(): string | undefined; } //# sourceMappingURL=Invalidate.d.ts.map