import type { Kysely } from 'kysely'; import type { VirtualUserScheduleInput, VirtualUserScheduleRecord, VirtualUserScheduleStore } from '@pikku/core/virtual-user'; import type { KyselyPikkuDB } from './kysely-tables.js'; /** * Keeps each persona's cadence in a `virtualUserSchedule` table. * * Wiring this is what turns virtual users from something a person triggers into * something that happens: without it, {@link KyselyVirtualUserRunStore} still * records every run, and every run still had someone behind it. Two services * rather than one so that an app can want the history without wanting the bill. * * Reads and writes the same way the run store does — JSON as text, timestamps * as ISO strings, flags as 0/1 — so a project on SQLite and one on Postgres * hold the same bytes and `SerializePlugin` is optional on both. */ export declare class KyselyVirtualUserScheduleStore implements VirtualUserScheduleStore { private db; private initialized; constructor(db: Kysely); init(): Promise; set(schedule: VirtualUserScheduleInput): Promise; get(persona: string): Promise; list(): Promise; due(now: Date): Promise; claim(persona: string, claim: { from: Date; nextRunAt: Date; runId: string | null; at: Date; }): Promise; remove(persona: string): Promise; private toRecord; }