import type { WebhookProjection } from './types.js'; import type { OasWebhook } from '../../oas/webhook/Webhook.js'; import type { ContentSettings } from '../ContentSettings.js'; import type { GeneratedDefinition } from '../GeneratedValue.js'; import type { GeneratedValue } from '../GeneratedValue.js'; import type { GenerateContextType, InsertWebhookArgs } from '../../context/generateTypes.js'; /** * The `insertWebhook` call plus the context. The Driver defaults `variant` * to `'main'` and `noExport` to `false`, and reads the caller's options * once for the identity statics and the constructor. */ type CreateWebhookArgs = InsertWebhookArgs & { context: GenerateContextType; }; /** * Driver for the webhook insertion lifecycle. * * Sibling of `OasOperationDriver`. Resolves the projection's identifier and * export path, looks up an existing `Definition` in the target file, * instantiates the projection (constructing its value) when no cache hit * exists, registers the new definition, and stitches an import into * `destinationPath` if it differs from the projection's `exportPath`. */ export declare class WebhookDriver { context: GenerateContextType; projection: WebhookProjection; webhook: OasWebhook; settings: ContentSettings; destinationPath?: string; definition: GeneratedDefinition; noExport: boolean; variant: string; /** The caller's options, as passed to `insertWebhook`. */ options: ProjectionOptions; constructor(args: CreateWebhookArgs); private apply; /** * Ensure the file at `path` exists, creating it on first write through the * projection's language. Returns the normalized path. */ private ensureFile; private getDefinition; private affirmDefinition; } export {};