import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CreatorId, CreatorId$Outbound } from "./creatorid.js"; import { FfmpegProfile, FfmpegProfile$Outbound } from "./ffmpegprofile.js"; import { PlaybackPolicy, PlaybackPolicy$Outbound } from "./playbackpolicy.js"; import { TargetOutput, TargetOutput$Outbound } from "./targetoutput.js"; import { TranscodeProfile, TranscodeProfile$Outbound } from "./transcodeprofile.js"; export type Stream3 = string | number; export type StreamUserTags = string | number | Array; /** * 0: not mobile, 1: mobile screen share, 2: mobile camera. */ export declare enum Stream1 { Zero = 0, One = 1, Two = 2 } /** * Indicates whether the stream will be pulled from a mobile source. */ export type StreamIsMobile = Stream1 | boolean; /** * Approximate location of the pull source. The location is used to * * @remarks * determine the closest Livepeer region to pull the stream from. */ export type StreamLocation = { /** * Latitude of the pull source in degrees. North is positive, * * @remarks * south is negative. */ lat: number; /** * Longitude of the pull source in degrees. East is positive, * * @remarks * west is negative. */ lon: number; }; /** * Configuration for a stream that should be actively pulled from an * * @remarks * external source, rather than pushed to Livepeer. If specified, the * stream will not have a streamKey. */ export type StreamPull = { /** * URL from which to pull from. */ source: string; /** * Headers to be sent with the request to the pull source. */ headers?: { [k: string]: string; } | undefined; /** * Indicates whether the stream will be pulled from a mobile source. */ isMobile?: Stream1 | boolean | undefined; /** * Approximate location of the pull source. The location is used to * * @remarks * determine the closest Livepeer region to pull the stream from. */ location?: StreamLocation | undefined; }; /** * Configuration for recording the stream. This can only be set if * * @remarks * `record` is true. */ export type StreamRecordingSpec = { /** * Profiles to process the recording of this stream into. If not * * @remarks * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. */ profiles?: Array | undefined; }; export type StreamMultistream = { /** * References to targets where this stream will be simultaneously * * @remarks * streamed to */ targets?: Array | undefined; }; export type Renditions = {}; export type Stream = { 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; creatorId?: CreatorId | undefined; /** * User input tags associated with the stream */ userTags?: { [k: string]: string | number | Array; } | undefined; lastSeen?: number | undefined; sourceSegments?: number | undefined; transcodedSegments?: number | undefined; /** * Duration of all the source segments, sec */ sourceSegmentsDuration?: number | undefined; /** * Duration of all the transcoded segments, sec */ transcodedSegmentsDuration?: number | undefined; sourceBytes?: number | undefined; transcodedBytes?: number | undefined; /** * Rate at which sourceBytes increases (bytes/second) */ ingestRate?: number | undefined; /** * Rate at which transcodedBytes increases (bytes/second) */ outgoingRate?: number | undefined; /** * If currently active */ isActive?: boolean | undefined; /** * Indicates whether the stream is healthy or not. */ isHealthy?: boolean | null | undefined; /** * A string array of human-readable errors describing issues affecting the stream, if any. */ issues?: Array | null | undefined; /** * Name of the token used to create this object */ createdByTokenName?: string | undefined; /** * Timestamp (in milliseconds) at which stream object was created */ createdAt?: number | undefined; /** * Points to parent stream object */ parentId?: string | undefined; /** * Used to form RTMP ingest URL */ streamKey?: string | undefined; /** * Configuration for a stream that should be actively pulled from an * * @remarks * external source, rather than pushed to Livepeer. If specified, the * stream will not have a streamKey. */ pull?: StreamPull | undefined; /** * The playback ID to use with the Playback Info endpoint to retrieve playback URLs. */ playbackId?: string | undefined; /** * Whether the playback policy for an asset or stream is public or signed */ playbackPolicy?: PlaybackPolicy | null | undefined; /** * Profiles to transcode the stream into. If not specified, a default * * @remarks * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. */ profiles?: Array | undefined; /** * The ID of the project */ projectId?: string | undefined; /** * Should this stream be recorded? Uses default settings. For more * * @remarks * customization, create and configure an object store. */ record?: boolean | undefined; /** * Configuration for recording the stream. This can only be set if * * @remarks * `record` is true. */ recordingSpec?: StreamRecordingSpec | undefined; multistream?: StreamMultistream | undefined; /** * If currently suspended */ suspended?: boolean | undefined; /** * Timestamp (in milliseconds) when the stream was last terminated */ lastTerminatedAt?: number | null | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ userId?: string | undefined; renditions?: Renditions | undefined; }; /** @internal */ export declare const Stream3$inboundSchema: z.ZodType; /** @internal */ export type Stream3$Outbound = string | number; /** @internal */ export declare const Stream3$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 Stream3$ { /** @deprecated use `Stream3$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Stream3$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Stream3$Outbound` instead. */ type Outbound = Stream3$Outbound; } export declare function stream3ToJSON(stream3: Stream3): string; export declare function stream3FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const StreamUserTags$inboundSchema: z.ZodType; /** @internal */ export type StreamUserTags$Outbound = string | number | Array; /** @internal */ export declare const StreamUserTags$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 StreamUserTags$ { /** @deprecated use `StreamUserTags$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `StreamUserTags$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `StreamUserTags$Outbound` instead. */ type Outbound = StreamUserTags$Outbound; } export declare function streamUserTagsToJSON(streamUserTags: StreamUserTags): string; export declare function streamUserTagsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Stream1$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Stream1$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 Stream1$ { /** @deprecated use `Stream1$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `Stream1$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const StreamIsMobile$inboundSchema: z.ZodType; /** @internal */ export type StreamIsMobile$Outbound = number | boolean; /** @internal */ export declare const StreamIsMobile$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 StreamIsMobile$ { /** @deprecated use `StreamIsMobile$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `StreamIsMobile$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `StreamIsMobile$Outbound` instead. */ type Outbound = StreamIsMobile$Outbound; } export declare function streamIsMobileToJSON(streamIsMobile: StreamIsMobile): string; export declare function streamIsMobileFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const StreamLocation$inboundSchema: z.ZodType; /** @internal */ export type StreamLocation$Outbound = { lat: number; lon: number; }; /** @internal */ export declare const StreamLocation$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 StreamLocation$ { /** @deprecated use `StreamLocation$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `StreamLocation$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `StreamLocation$Outbound` instead. */ type Outbound = StreamLocation$Outbound; } export declare function streamLocationToJSON(streamLocation: StreamLocation): string; export declare function streamLocationFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const StreamPull$inboundSchema: z.ZodType; /** @internal */ export type StreamPull$Outbound = { source: string; headers?: { [k: string]: string; } | undefined; isMobile?: number | boolean | undefined; location?: StreamLocation$Outbound | undefined; }; /** @internal */ export declare const StreamPull$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 StreamPull$ { /** @deprecated use `StreamPull$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `StreamPull$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `StreamPull$Outbound` instead. */ type Outbound = StreamPull$Outbound; } export declare function streamPullToJSON(streamPull: StreamPull): string; export declare function streamPullFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const StreamRecordingSpec$inboundSchema: z.ZodType; /** @internal */ export type StreamRecordingSpec$Outbound = { profiles?: Array | undefined; }; /** @internal */ export declare const StreamRecordingSpec$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 StreamRecordingSpec$ { /** @deprecated use `StreamRecordingSpec$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `StreamRecordingSpec$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `StreamRecordingSpec$Outbound` instead. */ type Outbound = StreamRecordingSpec$Outbound; } export declare function streamRecordingSpecToJSON(streamRecordingSpec: StreamRecordingSpec): string; export declare function streamRecordingSpecFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const StreamMultistream$inboundSchema: z.ZodType; /** @internal */ export type StreamMultistream$Outbound = { targets?: Array | undefined; }; /** @internal */ export declare const StreamMultistream$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 StreamMultistream$ { /** @deprecated use `StreamMultistream$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `StreamMultistream$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `StreamMultistream$Outbound` instead. */ type Outbound = StreamMultistream$Outbound; } export declare function streamMultistreamToJSON(streamMultistream: StreamMultistream): string; export declare function streamMultistreamFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Renditions$inboundSchema: z.ZodType; /** @internal */ export type Renditions$Outbound = {}; /** @internal */ export declare const Renditions$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 Renditions$ { /** @deprecated use `Renditions$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Renditions$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Renditions$Outbound` instead. */ type Outbound = Renditions$Outbound; } export declare function renditionsToJSON(renditions: Renditions): string; export declare function renditionsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Stream$inboundSchema: z.ZodType; /** @internal */ export type Stream$Outbound = { id?: string | undefined; name: string; kind?: string | undefined; creatorId?: CreatorId$Outbound | undefined; userTags?: { [k: string]: string | number | Array; } | undefined; lastSeen?: number | undefined; sourceSegments?: number | undefined; transcodedSegments?: number | undefined; sourceSegmentsDuration?: number | undefined; transcodedSegmentsDuration?: number | undefined; sourceBytes?: number | undefined; transcodedBytes?: number | undefined; ingestRate?: number | undefined; outgoingRate?: number | undefined; isActive?: boolean | undefined; isHealthy?: boolean | null | undefined; issues?: Array | null | undefined; createdByTokenName?: string | undefined; createdAt?: number | undefined; parentId?: string | undefined; streamKey?: string | undefined; pull?: StreamPull$Outbound | undefined; playbackId?: string | undefined; playbackPolicy?: PlaybackPolicy$Outbound | null | undefined; profiles?: Array | undefined; projectId?: string | undefined; record?: boolean | undefined; recordingSpec?: StreamRecordingSpec$Outbound | undefined; multistream?: StreamMultistream$Outbound | undefined; suspended?: boolean | undefined; lastTerminatedAt?: number | null | undefined; userId?: string | undefined; renditions?: Renditions$Outbound | undefined; }; /** @internal */ export declare const Stream$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 Stream$ { /** @deprecated use `Stream$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Stream$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Stream$Outbound` instead. */ type Outbound = Stream$Outbound; } export declare function streamToJSON(stream: Stream): string; export declare function streamFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=stream.d.ts.map