import { KnexAdapter } from '@feathersjs/knex'; import type { Application } from '../../declarations'; import type { Paginated, Params } from '@feathersjs/feathers'; import type { KnexAdapterParams, KnexAdapterOptions } from '@feathersjs/knex'; import type { SpellData, SpellPatch, SpellQuery } from './spells.schema'; import { SpellInterface } from '@magickml/agent-server-schemas'; /** * Interface and Types */ export type SpellParams = KnexAdapterParams; export type SaveDiffData = { name: string; diff: Record; projectId: string; spellReleaseId?: string; spellId: string; }; /** * Spell Service * By default calls the standard Knex adapter service methods but can be customized with your own functionality. */ export declare class SpellService extends KnexAdapter { /** * @description Gets a spell by id or a versioned spell by spellReleaseId * @param spellId * @param params * @returns */ get(spellId: string, params: ServiceParams): Promise; find(params: ServiceParams): Promise>; update(spellId: string, params: SpellData): Promise; create(params: SpellData): Promise; patch(spellId: string, params: SpellPatch): Promise; remove(spellId: string | null, params: ServiceParams): Promise; /** * Saves the diff of a spell */ saveDiff(data: SaveDiffData): Promise; } /** * Returns options for KnexAdapter */ export declare const getOptions: (app: Application) => KnexAdapterOptions;