import { type CreatedBy } from "../../../../../lib/graph-write/dist/index.js"; import { type FormSchema, type JsonValue } from "../../../../../lib/task-secrets/dist/index.js"; export interface TaskCreateParams { accountId: string; name: string; description: string; /** * Status enum. `running` is the process-provenance value: the * Task represents an action currently mid-flight (distinct from `active`, * which means the operator has accepted a commitment). When `running` is * passed, `startedAt` is auto-set to now. */ status?: "pending" | "active" | "running" | "completed" | "failed" | "cancelled"; priority?: "low" | "normal" | "high" | "urgent"; dueDate?: string; /** Estate-agent client this task is for. Optional; rendered on the /tasks list. */ clientName?: string; /** Property address this task concerns. Optional; rendered on the /tasks list. */ propertyAddress?: string; /** Agreed fee in GBP major units (e.g. 10 = £10). Optional; recorded only. */ fee?: number; sessionKey?: string; /** Person elementId — creates a RAISED_BY relationship */ raisedBy?: string; /** Entity elementIds — creates AFFECTS relationships */ affects?: string[]; /** * process-provenance kind discriminator (e.g. * "onboarding-establish-owner", "cloudflare-tunnel-login"). Optional; * commitment-tracking callers omit it. When present, the Task is * considered an action record with a lifecycle (started/step/done). */ kind?: string; /** * Property names supplied at action start. Retained as the canonical * "call shape" record alongside the value-bearing `inputs.*` props * (outcome contract). */ inputsProvided?: string[]; /** * outcome contract — the action's form payload. Values are * persisted as `inputs.` props on the Task after `redactSecrets` * strips fields the schema marks as secret. The agent's judgement decides * what's meaningful to record (mode, emailProvided, resolved elementIds); * the contract enforces no-secret leakage centrally via the schema. */ inputs?: Record; /** * Schema for `inputs` declaring which keys carry secret material that must * never land on the Task. Declared at the form definition, * passed through verbatim by the writer. Omit when the action records no * secrets (e.g. onboarding step 9 mode select). */ inputSchema?: FormSchema; /** * Conversation sessionKey for the RAISED_DURING edge. When the * Conversation resolves, write `(:Task)-[:RAISED_DURING]->(:Conversation)` * IN ADDITION TO the existing PART_OF edge (different semantics: * RAISED_DURING is action-provenance; PART_OF is commitment-tracking). * Falls back to params.sessionKey when omitted. */ raisedDuringConversationKey?: string; /** * Task 1982 — userId of a house/platform admin or this account's business * owner to assign the task to, written as (:Task)-[:ASSIGNED_TO]->(:AdminUser). * Validated against the assignable set (house admins ∪ owner); an out-of-set * userId writes no edge. An explicit value wins over the passive-intake env var * `INTAKE_ASSIGNED_ADMIN_USER_ID`. */ assigneeUserId?: string; createdBy: CreatedBy; } export interface TaskCreateResult { taskId: string; } export declare function workCreate(params: TaskCreateParams): Promise; //# sourceMappingURL=work-create.d.ts.map