import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export declare enum Events { StreamStarted = "stream.started", StreamDetection = "stream.detection", StreamIdle = "stream.idle", RecordingReady = "recording.ready", RecordingStarted = "recording.started", RecordingWaiting = "recording.waiting", MultistreamConnected = "multistream.connected", MultistreamError = "multistream.error", MultistreamDisconnected = "multistream.disconnected", PlaybackUserNew = "playback.user.new", PlaybackAccessControl = "playback.accessControl", AssetCreated = "asset.created", AssetUpdated = "asset.updated", AssetFailed = "asset.failed", AssetReady = "asset.ready", AssetDeleted = "asset.deleted", TaskSpawned = "task.spawned", TaskUpdated = "task.updated", TaskCompleted = "task.completed", TaskFailed = "task.failed" } /** * failure timestamp and error message with status code */ export type LastFailure = { /** * Timestamp (in milliseconds) at which the webhook last failed */ timestamp?: number | undefined; /** * Webhook failure error message */ error?: string | undefined; /** * Webhook failure response */ response?: string | undefined; /** * Webhook failure status code */ statusCode?: number | undefined; }; /** * status of webhook */ export type Status = { /** * failure timestamp and error message with status code */ lastFailure?: LastFailure | undefined; /** * Timestamp (in milliseconds) at which the webhook last was * * @remarks * triggered */ lastTriggeredAt?: number | undefined; }; export type Webhook = { id?: string | undefined; name: string; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ kind?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ userId?: string | undefined; /** * The ID of the project */ projectId?: string | undefined; /** * Timestamp (in milliseconds) at which stream object was created */ createdAt?: number | undefined; events?: Array | undefined; url: string; /** * streamId of the stream on which the webhook is applied */ streamId?: string | undefined; /** * status of webhook */ status?: Status | undefined; }; export type WebhookInput = { name: string; /** * The ID of the project */ projectId?: string | undefined; events?: Array | undefined; url: string; /** * shared secret used to sign the webhook payload */ sharedSecret?: string | undefined; /** * streamId of the stream on which the webhook is applied */ streamId?: string | undefined; }; /** @internal */ export declare const Events$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Events$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Events$ { /** @deprecated use `Events$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `Events$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const LastFailure$inboundSchema: z.ZodType; /** @internal */ export type LastFailure$Outbound = { timestamp?: number | undefined; error?: string | undefined; response?: string | undefined; statusCode?: number | undefined; }; /** @internal */ export declare const LastFailure$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace LastFailure$ { /** @deprecated use `LastFailure$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `LastFailure$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `LastFailure$Outbound` instead. */ type Outbound = LastFailure$Outbound; } export declare function lastFailureToJSON(lastFailure: LastFailure): string; export declare function lastFailureFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Status$inboundSchema: z.ZodType; /** @internal */ export type Status$Outbound = { lastFailure?: LastFailure$Outbound | undefined; lastTriggeredAt?: number | undefined; }; /** @internal */ export declare const Status$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Status$ { /** @deprecated use `Status$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Status$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Status$Outbound` instead. */ type Outbound = Status$Outbound; } export declare function statusToJSON(status: Status): string; export declare function statusFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Webhook$inboundSchema: z.ZodType; /** @internal */ export type Webhook$Outbound = { id?: string | undefined; name: string; kind?: string | undefined; userId?: string | undefined; projectId?: string | undefined; createdAt?: number | undefined; events?: Array | undefined; url: string; streamId?: string | undefined; status?: Status$Outbound | undefined; }; /** @internal */ export declare const Webhook$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Webhook$ { /** @deprecated use `Webhook$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Webhook$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Webhook$Outbound` instead. */ type Outbound = Webhook$Outbound; } export declare function webhookToJSON(webhook: Webhook): string; export declare function webhookFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const WebhookInput$inboundSchema: z.ZodType; /** @internal */ export type WebhookInput$Outbound = { name: string; projectId?: string | undefined; events?: Array | undefined; url: string; sharedSecret?: string | undefined; streamId?: string | undefined; }; /** @internal */ export declare const WebhookInput$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace WebhookInput$ { /** @deprecated use `WebhookInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `WebhookInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `WebhookInput$Outbound` instead. */ type Outbound = WebhookInput$Outbound; } export declare function webhookInputToJSON(webhookInput: WebhookInput): string; export declare function webhookInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=webhook.d.ts.map