Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
1.6 KiB
Plaintext
1 line
1.6 KiB
Plaintext
{"version":3,"sources":["../../src/query-presets/types.ts"],"sourcesContent":["import type { Field } from '../fields/config/types.js'\nimport type { Access, CollectionSlug } from '../index.js'\nimport type { CollectionPreferences } from '../preferences/types.js'\nimport type { Where } from '../types/index.js'\n\n// Note: order matters here as it will change the rendered order in the UI\nexport const operations = ['read', 'update', 'delete'] as const\n\nexport type ConstraintOperation = (typeof operations)[number]\n\nexport type DefaultConstraint = 'everyone' | 'onlyMe' | 'specificUsers'\n\nexport type Constraint = DefaultConstraint | string // TODO: type `string` as the custom constraints provided by the config\n\nexport type QueryPreset = {\n access: {\n [operation in ConstraintOperation]: {\n constraint: DefaultConstraint\n users?: string[]\n }\n }\n columns: CollectionPreferences['columns']\n groupBy?: string\n id: number | string\n isShared: boolean\n relatedCollection: CollectionSlug\n title: string\n where: Where\n}\n\nexport type QueryPresetConstraint = {\n /**\n * A function that determines the access control rules for this constraint.\n */\n access: Access<QueryPreset>\n /**\n * An array of fields to render when this constraint is selected.\n */\n fields?: Field[]\n /**\n * The label displayed in the dropdown\n */\n label: string\n /**\n * The value to store in the database when this constraint is selected.\n */\n value: string\n}\n\nexport type QueryPresetConstraints = QueryPresetConstraint[]\n"],"names":["operations"],"mappings":"AAKA,0EAA0E;AAC1E,OAAO,MAAMA,aAAa;IAAC;IAAQ;IAAU;CAAS,CAAS"} |