import { LogContext } from '@balena/jellyfish-logger'; import type { AutumnDBSession, Kernel } from 'autumndb'; import type { PostResults } from './consumer'; import type { ActionRequestContract } from '../types'; /** * @summary Mark action-request contract as executed * @function * @public * * @param logContext - log context * @param kernel - kernel instance * @param session - session id * @param slug - action-request contract versioned slug * @param results - execution results * @returns updated action-request contract * * @example * await events.post(logContext, kernel, session, 'action-request-414f2345-4f5e-4571-820f-28a49731733d@1.0.0', { * data: { * ... * }, * error: false, * }); */ export declare const post: (logContext: LogContext, kernel: Kernel, session: AutumnDBSession, slug: string, results: PostResults) => Promise; export interface WaitOptions { id: string; actor: string; action?: string; card?: string; } /** * @summary Wait for an execution request event * @function * @public * * @param logContext - log context * @param kernel - kernel instance * @param session - session id * @param actionRequestId - action-request id * @returns executed action-request contract * * @example * await wait(logContext, kernel, session, '4a962ad9-20b5-4dd8-a707-bf819593cc84'); */ export declare const wait: (logContext: LogContext, kernel: Kernel, session: AutumnDBSession, actionRequestId: string) => Promise;