UNPKG

payload

Version:

Node, React, Headless CMS and Application Framework built on Next.js

30 lines 1.07 kB
import type { Field } from '../fields/config/types.js'; import type { Access, CollectionSlug } from '../index.js'; import type { ListPreferences } from '../preferences/types.js'; import type { Where } from '../types/index.js'; export declare const operations: readonly ["read", "update", "delete"]; export type ConstraintOperation = (typeof operations)[number]; export type DefaultConstraint = 'everyone' | 'onlyMe' | 'specificUsers'; export type Constraint = DefaultConstraint | string; export type QueryPreset = { access: { [operation in ConstraintOperation]: { constraint: DefaultConstraint; users?: string[]; }; }; columns: ListPreferences['columns']; id: number | string; isShared: boolean; relatedCollection: CollectionSlug; title: string; where: Where; }; export type QueryPresetConstraint = { access: Access<QueryPreset>; fields?: Field[]; label: string; value: string; }; export type QueryPresetConstraints = QueryPresetConstraint[]; //# sourceMappingURL=types.d.ts.map