import * as _geenius_adapters from '@geenius/adapters'; import { AdapterHealth as AdapterHealth$1, AdapterListOptions as AdapterListOptions$1, EventEnvelope as EventEnvelope$1, EventPublishInput as EventPublishInput$1, EventSubscribeInput as EventSubscribeInput$1, EventSubscription as EventSubscription$1, EventsAdapter as EventsAdapter$1, EventsContractError as EventsContractError$1, WebhookDelivery as WebhookDelivery$1, WebhookEmitInput as WebhookEmitInput$1 } from '@geenius/adapters'; import * as zod_v4_core from 'zod/v4/core'; import * as zod from 'zod'; /** * Health result returned by event providers after checking pub/sub and webhook * connectivity. * * @example * ```ts * const health: AdapterHealth = await events.getHealth(); * ``` */ type AdapterHealth = AdapterHealth$1; /** * Pagination and topic-prefix options accepted by `EventsAdapter.listEvents()`. * * @example * ```ts * const options: AdapterListOptions = { limit: 25, prefix: "user." }; * ``` */ type AdapterListOptions = AdapterListOptions$1; /** * Serializable event envelope returned by publish, list, and subscription * handlers. * * @example * ```ts * const event: EventEnvelope = { id: "evt_1", topic: "user.created", payload: {}, metadata: {}, createdAt: new Date().toISOString() }; * ``` */ type EventEnvelope = EventEnvelope$1; /** * Provider-neutral publish payload accepted by events adapters. * * @example * ```ts * const input: EventPublishInput = { topic: "user.created", payload: { id: "u1" } }; * ``` */ type EventPublishInput = EventPublishInput$1; /** * Provider-neutral subscribe payload accepted before binding a topic handler. * * @example * ```ts * const input: EventSubscribeInput = { topic: "user.created" }; * ``` */ type EventSubscribeInput = EventSubscribeInput$1; /** * Unsubscribe handle returned by `EventsAdapter.subscribe()`. * * @example * ```ts * await subscription.unsubscribe(); * ``` */ type EventSubscription = EventSubscription$1; /** * Serializable webhook delivery record returned after emitting an event. * * @example * ```ts * const delivery: WebhookDelivery = { id: "del_1", url: "https://example.com", eventId: "evt_1", status: "queued", createdAt: new Date().toISOString() }; * ``` */ type WebhookDelivery = WebhookDelivery$1; /** * Provider-neutral webhook emit payload accepted before invoking a concrete * delivery transport. * * @example * ```ts * const input: WebhookEmitInput = { url: "https://example.com", event }; * ``` */ type WebhookEmitInput = WebhookEmitInput$1; /** * SDK-free pub/sub and webhook adapter contract implemented by downstream * provider packages and app-owned event modules. * * @example * ```ts * const event = await events.publish({ topic: "user.created" }); * ``` */ type EventsAdapter = EventsAdapter$1; /** * Runtime validator for the common events adapter health response. * * @example * ```ts * const health = AdapterHealthSchema.parse({ ok: true, checkedAt: new Date().toISOString() }); * ``` */ declare const AdapterHealthSchema: zod.ZodObject<{ ok: zod.ZodBoolean; checkedAt: zod.ZodString; latencyMs: zod.ZodOptional; message: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Runtime validator for event list pagination and topic-prefix filters. * * @example * ```ts * const options = AdapterListOptionsSchema.parse({ limit: 10, prefix: "user." }); * ``` */ declare const AdapterListOptionsSchema: zod.ZodObject<{ limit: zod.ZodOptional; cursor: zod.ZodOptional; prefix: zod.ZodOptional; }, zod_v4_core.$strip>; /** * Runtime validator for serialized event envelopes returned by providers. * * @example * ```ts * const event = EventEnvelopeSchema.parse({ id: "evt_1", topic: "user.created", payload: {}, createdAt: new Date().toISOString() }); * ``` */ declare const EventEnvelopeSchema: zod.ZodObject<{ id: zod.ZodString; topic: zod.ZodString; payload: zod.ZodType<_geenius_adapters.AdapterJsonValue, unknown, zod_v4_core.$ZodTypeInternals<_geenius_adapters.AdapterJsonValue, unknown>>; metadata: zod.ZodDefault>; createdAt: zod.ZodString; }, zod_v4_core.$strip>; /** * Runtime validator for provider-neutral event publish payloads. * * @example * ```ts * const input = EventPublishInputSchema.parse({ topic: "user.created", payload: { id: "u1" } }); * ``` */ declare const EventPublishInputSchema: zod.ZodObject<{ topic: zod.ZodString; payload: zod.ZodOptional>>; metadata: zod.ZodOptional>; }, zod_v4_core.$strip>; /** * Runtime validator for provider-neutral event subscription payloads. * * @example * ```ts * const input = EventSubscribeInputSchema.parse({ topic: "user.created" }); * ``` */ declare const EventSubscribeInputSchema: zod.ZodObject<{ topic: zod.ZodString; }, zod_v4_core.$strip>; /** * Contract-layer error for invalid event payloads or provider-boundary * violations before a concrete SDK receives the request. * * @example * ```ts * throw new EventsContractError("Event topic is required"); * ``` */ declare const EventsContractError: typeof EventsContractError$1; /** * Runtime validator for provider-neutral webhook emit payloads. * * @example * ```ts * const input = WebhookEmitInputSchema.parse({ url: "https://example.com", event }); * ``` */ declare const WebhookEmitInputSchema: zod.ZodObject<{ url: zod.ZodString; event: zod.ZodObject<{ id: zod.ZodString; topic: zod.ZodString; payload: zod.ZodType<_geenius_adapters.AdapterJsonValue, unknown, zod_v4_core.$ZodTypeInternals<_geenius_adapters.AdapterJsonValue, unknown>>; metadata: zod.ZodDefault>; createdAt: zod.ZodString; }, zod_v4_core.$strip>; }, zod_v4_core.$strip>; /** * Runtime validator for webhook delivery records returned by providers. * * @example * ```ts * const delivery = WebhookDeliverySchema.parse({ id: "del_1", url: "https://example.com", eventId: "evt_1", status: "queued", createdAt: new Date().toISOString() }); * ``` */ declare const WebhookDeliverySchema: zod.ZodObject<{ id: zod.ZodString; url: zod.ZodString; eventId: zod.ZodString; status: zod.ZodEnum<{ queued: "queued"; failed: "failed"; delivered: "delivered"; }>; createdAt: zod.ZodString; }, zod_v4_core.$strip>; export { type AdapterHealth, AdapterHealthSchema, type AdapterListOptions, AdapterListOptionsSchema, type EventEnvelope, EventEnvelopeSchema, type EventPublishInput, EventPublishInputSchema, type EventSubscribeInput, EventSubscribeInputSchema, type EventSubscription, type EventsAdapter, EventsContractError, type WebhookDelivery, WebhookDeliverySchema, type WebhookEmitInput, WebhookEmitInputSchema };