import type { Column, SchemaInspector } from '@db-studio/db-schema'; import type { Accountability, Field, RawField, SchemaOverview, Type } from '@db-studio/types'; import type Keyv from 'keyv'; import type { Knex } from 'knex'; import type { Helpers } from '../database/helpers/index.js'; import { ItemsService } from '../services/items.js'; import { PayloadService } from '../services/payload.js'; import type { AbstractServiceOptions, MutationOptions } from '../types/index.js'; export declare class FieldsService { knex: Knex; helpers: Helpers; accountability: Accountability | null; itemsService: ItemsService; payloadService: PayloadService; schemaInspector: SchemaInspector; schema: SchemaOverview; cache: Keyv | null; systemCache: Keyv; constructor(options: AbstractServiceOptions); private get hasReadAccess(); readAll(collection?: string): Promise; readOne(collection: string, field: string): Promise>; createField(collection: string, field: Partial & { field: string; type: Type | null; }, table?: Knex.CreateTableBuilder, // allows collection creation to opts?: MutationOptions): Promise; updateField(collection: string, field: RawField, opts?: MutationOptions): Promise; deleteField(collection: string, field: string, opts?: MutationOptions): Promise; addColumnToTable(table: Knex.CreateTableBuilder, field: RawField | Field, alter?: Column | null): void; }