import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Destination, Destination$Outbound } from "./destination.js"; /** * The attempt status. */ export declare const Status: { readonly Success: "success"; readonly Failed: "failed"; }; /** * The attempt status. */ export type Status = ClosedEnum; /** * Full event object with data (returned when include=event.data). */ export type EventFull = { id?: string | undefined; /** * The tenant this event belongs to. */ tenantId?: string | undefined; /** * The destination this event was delivered to. */ destinationId?: string | undefined; topic?: string | undefined; /** * Time the event was received. */ time?: Date | undefined; /** * Whether this event can be retried. */ eligibleForRetry?: boolean | undefined; metadata?: { [k: string]: string; } | null | undefined; /** * The event payload data. */ data?: { [k: string]: any; } | undefined; }; /** * Event object without data (returned when include=event). */ export type EventSummary = { id?: string | undefined; /** * The tenant this event belongs to. */ tenantId?: string | undefined; /** * The destination this event was delivered to. */ destinationId?: string | undefined; topic?: string | undefined; /** * Time the event was received. */ time?: Date | undefined; /** * Whether this event can be retried. */ eligibleForRetry?: boolean | undefined; metadata?: { [k: string]: string; } | null | undefined; }; /** * The associated event object. Only present when include=event or include=event.data. */ export type EventUnion = EventSummary | EventFull; /** * An attempt represents a single delivery attempt of an event to a destination. */ export type Attempt = { /** * Unique identifier for this attempt. */ id?: string | undefined; /** * The tenant this attempt belongs to. */ tenantId?: string | undefined; /** * The attempt status. */ status?: Status | undefined; /** * Time the attempt was made. */ time?: Date | undefined; /** * Response status code or error code. */ code?: string | undefined; /** * Response data from the attempt. Only included when include=response_data. */ responseData?: { [k: string]: any; } | null | undefined; /** * The attempt number (1 for first attempt, 2+ for retries). */ attemptNumber?: number | undefined; /** * Whether this attempt was manually triggered (e.g., a retry initiated by a user). */ manual?: boolean | undefined; /** * The ID of the associated event. */ eventId?: string | undefined; /** * The destination ID this attempt was sent to. */ destinationId?: string | undefined; /** * The associated event object. Only present when include=event or include=event.data. */ event?: EventSummary | EventFull | null | undefined; destination?: Destination | undefined; }; /** @internal */ export declare const Status$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Status$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const EventFull$inboundSchema: z.ZodType; /** @internal */ export type EventFull$Outbound = { id?: string | undefined; tenant_id?: string | undefined; destination_id?: string | undefined; topic?: string | undefined; time?: string | undefined; eligible_for_retry?: boolean | undefined; metadata?: { [k: string]: string; } | null | undefined; data?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const EventFull$outboundSchema: z.ZodType; export declare function eventFullToJSON(eventFull: EventFull): string; export declare function eventFullFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const EventSummary$inboundSchema: z.ZodType; /** @internal */ export type EventSummary$Outbound = { id?: string | undefined; tenant_id?: string | undefined; destination_id?: string | undefined; topic?: string | undefined; time?: string | undefined; eligible_for_retry?: boolean | undefined; metadata?: { [k: string]: string; } | null | undefined; }; /** @internal */ export declare const EventSummary$outboundSchema: z.ZodType; export declare function eventSummaryToJSON(eventSummary: EventSummary): string; export declare function eventSummaryFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const EventUnion$inboundSchema: z.ZodType; /** @internal */ export type EventUnion$Outbound = EventSummary$Outbound | EventFull$Outbound; /** @internal */ export declare const EventUnion$outboundSchema: z.ZodType; export declare function eventUnionToJSON(eventUnion: EventUnion): string; export declare function eventUnionFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Attempt$inboundSchema: z.ZodType; /** @internal */ export type Attempt$Outbound = { id?: string | undefined; tenant_id?: string | undefined; status?: string | undefined; time?: string | undefined; code?: string | undefined; response_data?: { [k: string]: any; } | null | undefined; attempt_number?: number | undefined; manual?: boolean | undefined; event_id?: string | undefined; destination_id?: string | undefined; event?: EventSummary$Outbound | EventFull$Outbound | null | undefined; destination?: Destination$Outbound | undefined; }; /** @internal */ export declare const Attempt$outboundSchema: z.ZodType; export declare function attemptToJSON(attempt: Attempt): string; export declare function attemptFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=attempt.d.ts.map