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 { EncryptionOutput, EncryptionOutput$Outbound } from "./encryptionoutput.js"; import { IpfsFileInfo, IpfsFileInfo$Outbound } from "./ipfsfileinfo.js"; import { PlaybackPolicy, PlaybackPolicy$Outbound } from "./playbackpolicy.js"; import { StorageStatus, StorageStatus$Outbound } from "./storagestatus.js"; import { TranscodeProfile, TranscodeProfile$Outbound } from "./transcodeprofile.js"; /** * Type of the asset. */ export declare enum AssetType { Video = "video", Audio = "audio" } export declare enum AssetSchemasSource3Type { DirectUpload = "directUpload", Clip = "clip" } export type Asset3 = { type: AssetSchemasSource3Type; encryption?: EncryptionOutput | undefined; /** * ID of the asset or stream from which this asset was created. */ sourceId?: string | undefined; /** * ID of the session from which this asset was created. */ sessionId?: string | undefined; /** * Playback ID of the asset or stream from which this asset was created. */ playbackId?: string | undefined; /** * ID of the requester from which this asset was created. */ requesterId?: string | undefined; /** * ID of the asset from which this asset was created. */ assetId?: string | undefined; }; export declare enum AssetSchemasSourceType { Recording = "recording" } export type Two = { type: AssetSchemasSourceType; /** * ID of the session from which this asset was created */ sessionId: string; }; export declare enum AssetSchemasType { Url = "url" } export type Asset1 = { type: AssetSchemasType; /** * URL from which the asset was uploaded. */ url: string; /** * Gateway URL from asset if parsed from provided URL on upload. */ gatewayUrl?: string | undefined; encryption?: EncryptionOutput | undefined; }; export type Source = Two | Asset1 | Asset3; /** * Name of the NFT metadata template to export. 'player' * * @remarks * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. */ export declare enum AssetNftMetadataTemplate { File = "file", Player = "player" } /** * Additional data to add to the NFT metadata exported to * * @remarks * IPFS. Will be deep merged with the default metadata * exported. */ export type AssetNftMetadata = {}; export type AssetSpec = { /** * Name of the NFT metadata template to export. 'player' * * @remarks * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. */ nftMetadataTemplate?: AssetNftMetadataTemplate | undefined; /** * Additional data to add to the NFT metadata exported to * * @remarks * IPFS. Will be deep merged with the default metadata * exported. */ nftMetadata?: AssetNftMetadata | undefined; }; export type AssetIpfs = { spec?: AssetSpec | undefined; dollarRef?: any | undefined; nftMetadata?: IpfsFileInfo | undefined; /** * Timestamp (in milliseconds) at which IPFS export task was * * @remarks * updated */ updatedAt?: number | undefined; }; export type AssetStorage = { ipfs?: AssetIpfs | undefined; status?: StorageStatus | undefined; }; /** * Phase of the asset */ export declare enum AssetPhase { Uploading = "uploading", Waiting = "waiting", Processing = "processing", Ready = "ready", Failed = "failed", Deleting = "deleting", Deleted = "deleted" } /** * Status of the asset */ export type AssetStatus = { /** * Phase of the asset */ phase: AssetPhase; /** * Timestamp (in milliseconds) at which the asset was last updated */ updatedAt: number; /** * Current progress of the task creating this asset. */ progress?: number | undefined; /** * Error message if the asset creation failed. */ errorMessage?: string | undefined; }; export type Hash = { /** * Hash of the asset */ hash?: string | undefined; /** * Hash algorithm used to compute the hash */ algorithm?: string | undefined; }; /** * type of track */ export declare enum AssetSchemasVideoSpecType { Video = "video", Audio = "audio" } export type Tracks = { /** * type of track */ type: AssetSchemasVideoSpecType; /** * Codec of the track */ codec: string; /** * Start time of the track in seconds */ startTime?: number | undefined; /** * Duration of the track in seconds */ duration?: number | undefined; /** * Bitrate of the track in bits per second */ bitrate?: number | undefined; /** * Width of the track - only for video tracks */ width?: number | undefined; /** * Height of the track - only for video tracks */ height?: number | undefined; /** * Pixel format of the track - only for video tracks */ pixelFormat?: string | undefined; /** * Frame rate of the track - only for video tracks */ fps?: number | undefined; /** * Amount of audio channels in the track */ channels?: number | undefined; /** * Sample rate of the track in samples per second - only for * * @remarks * audio tracks */ sampleRate?: number | undefined; /** * Bit depth of the track - only for audio tracks */ bitDepth?: number | undefined; }; /** * Video metadata */ export type VideoSpec = { /** * Format of the asset */ format?: string | undefined; /** * Duration of the asset in seconds (float) */ duration?: number | undefined; /** * Bitrate of the video in bits per second */ bitrate?: number | undefined; /** * List of tracks associated with the asset when the format * * @remarks * contemplates them (e.g. mp4) */ tracks?: Array | undefined; }; export type Asset = { id: string; /** * Type of the asset. */ type?: AssetType | undefined; /** * The playback ID to use with the Playback Info endpoint to retrieve playback URLs. */ playbackId?: string | undefined; /** * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ userId?: string | undefined; /** * URL for HLS playback. **It is recommended to not use this URL**, and instead use playback IDs with the Playback Info endpoint to retrieve the playback URLs - this URL format is subject to change (e.g. https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8). */ playbackUrl?: string | undefined; /** * The URL to directly download the asset, e.g. `https://livepeercdn.com/asset/eawrrk06ts2d0mzb/video`. It is not recommended to use this for playback. */ downloadUrl?: string | undefined; /** * Whether the playback policy for an asset or stream is public or signed */ playbackPolicy?: PlaybackPolicy | null | undefined; source: Two | Asset1 | Asset3; creatorId?: CreatorId | undefined; /** * Requested profiles for the asset to be transcoded into. Configured * * @remarks * on the upload APIs payload or through the `stream.recordingSpec` * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. */ profiles?: Array | undefined; storage?: AssetStorage | undefined; /** * Status of the asset */ status?: AssetStatus | undefined; /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. * * @remarks */ name: string; /** * The ID of the project */ projectId?: string | undefined; /** * Timestamp (in milliseconds) at which asset was created */ createdAt?: number | undefined; /** * Name of the token used to create this object */ createdByTokenName?: string | undefined; /** * Size of the asset in bytes */ size?: number | undefined; /** * Hash of the asset */ hash?: Array | null | undefined; /** * Video metadata */ videoSpec?: VideoSpec | undefined; }; /** @internal */ export declare const AssetType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetType$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 AssetType$ { /** @deprecated use `AssetType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const AssetSchemasSource3Type$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetSchemasSource3Type$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 AssetSchemasSource3Type$ { /** @deprecated use `AssetSchemasSource3Type$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetSchemasSource3Type$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const Asset3$inboundSchema: z.ZodType; /** @internal */ export type Asset3$Outbound = { type: string; encryption?: EncryptionOutput$Outbound | undefined; sourceId?: string | undefined; sessionId?: string | undefined; playbackId?: string | undefined; requesterId?: string | undefined; assetId?: string | undefined; }; /** @internal */ export declare const Asset3$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 Asset3$ { /** @deprecated use `Asset3$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Asset3$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Asset3$Outbound` instead. */ type Outbound = Asset3$Outbound; } export declare function asset3ToJSON(asset3: Asset3): string; export declare function asset3FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetSchemasSourceType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetSchemasSourceType$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 AssetSchemasSourceType$ { /** @deprecated use `AssetSchemasSourceType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetSchemasSourceType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const Two$inboundSchema: z.ZodType; /** @internal */ export type Two$Outbound = { type: string; sessionId: string; }; /** @internal */ export declare const Two$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 Two$ { /** @deprecated use `Two$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Two$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Two$Outbound` instead. */ type Outbound = Two$Outbound; } export declare function twoToJSON(two: Two): string; export declare function twoFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetSchemasType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetSchemasType$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 AssetSchemasType$ { /** @deprecated use `AssetSchemasType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetSchemasType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const Asset1$inboundSchema: z.ZodType; /** @internal */ export type Asset1$Outbound = { type: string; url: string; gatewayUrl?: string | undefined; encryption?: EncryptionOutput$Outbound | undefined; }; /** @internal */ export declare const Asset1$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 Asset1$ { /** @deprecated use `Asset1$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Asset1$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Asset1$Outbound` instead. */ type Outbound = Asset1$Outbound; } export declare function asset1ToJSON(asset1: Asset1): string; export declare function asset1FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Source$inboundSchema: z.ZodType; /** @internal */ export type Source$Outbound = Two$Outbound | Asset1$Outbound | Asset3$Outbound; /** @internal */ export declare const Source$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 Source$ { /** @deprecated use `Source$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Source$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Source$Outbound` instead. */ type Outbound = Source$Outbound; } export declare function sourceToJSON(source: Source): string; export declare function sourceFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetNftMetadataTemplate$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetNftMetadataTemplate$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 AssetNftMetadataTemplate$ { /** @deprecated use `AssetNftMetadataTemplate$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetNftMetadataTemplate$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const AssetNftMetadata$inboundSchema: z.ZodType; /** @internal */ export type AssetNftMetadata$Outbound = {}; /** @internal */ export declare const AssetNftMetadata$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 AssetNftMetadata$ { /** @deprecated use `AssetNftMetadata$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AssetNftMetadata$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AssetNftMetadata$Outbound` instead. */ type Outbound = AssetNftMetadata$Outbound; } export declare function assetNftMetadataToJSON(assetNftMetadata: AssetNftMetadata): string; export declare function assetNftMetadataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetSpec$inboundSchema: z.ZodType; /** @internal */ export type AssetSpec$Outbound = { nftMetadataTemplate: string; nftMetadata?: AssetNftMetadata$Outbound | undefined; }; /** @internal */ export declare const AssetSpec$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 AssetSpec$ { /** @deprecated use `AssetSpec$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AssetSpec$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AssetSpec$Outbound` instead. */ type Outbound = AssetSpec$Outbound; } export declare function assetSpecToJSON(assetSpec: AssetSpec): string; export declare function assetSpecFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetIpfs$inboundSchema: z.ZodType; /** @internal */ export type AssetIpfs$Outbound = { spec?: AssetSpec$Outbound | undefined; $ref?: any | undefined; nftMetadata?: IpfsFileInfo$Outbound | undefined; updatedAt?: number | undefined; }; /** @internal */ export declare const AssetIpfs$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 AssetIpfs$ { /** @deprecated use `AssetIpfs$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AssetIpfs$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AssetIpfs$Outbound` instead. */ type Outbound = AssetIpfs$Outbound; } export declare function assetIpfsToJSON(assetIpfs: AssetIpfs): string; export declare function assetIpfsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetStorage$inboundSchema: z.ZodType; /** @internal */ export type AssetStorage$Outbound = { ipfs?: AssetIpfs$Outbound | undefined; status?: StorageStatus$Outbound | undefined; }; /** @internal */ export declare const AssetStorage$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 AssetStorage$ { /** @deprecated use `AssetStorage$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AssetStorage$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AssetStorage$Outbound` instead. */ type Outbound = AssetStorage$Outbound; } export declare function assetStorageToJSON(assetStorage: AssetStorage): string; export declare function assetStorageFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetPhase$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetPhase$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 AssetPhase$ { /** @deprecated use `AssetPhase$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetPhase$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const AssetStatus$inboundSchema: z.ZodType; /** @internal */ export type AssetStatus$Outbound = { phase: string; updatedAt: number; progress?: number | undefined; errorMessage?: string | undefined; }; /** @internal */ export declare const AssetStatus$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 AssetStatus$ { /** @deprecated use `AssetStatus$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `AssetStatus$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `AssetStatus$Outbound` instead. */ type Outbound = AssetStatus$Outbound; } export declare function assetStatusToJSON(assetStatus: AssetStatus): string; export declare function assetStatusFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Hash$inboundSchema: z.ZodType; /** @internal */ export type Hash$Outbound = { hash?: string | undefined; algorithm?: string | undefined; }; /** @internal */ export declare const Hash$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 Hash$ { /** @deprecated use `Hash$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Hash$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Hash$Outbound` instead. */ type Outbound = Hash$Outbound; } export declare function hashToJSON(hash: Hash): string; export declare function hashFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const AssetSchemasVideoSpecType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const AssetSchemasVideoSpecType$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 AssetSchemasVideoSpecType$ { /** @deprecated use `AssetSchemasVideoSpecType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `AssetSchemasVideoSpecType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const Tracks$inboundSchema: z.ZodType; /** @internal */ export type Tracks$Outbound = { type: string; codec: string; startTime?: number | undefined; duration?: number | undefined; bitrate?: number | undefined; width?: number | undefined; height?: number | undefined; pixelFormat?: string | undefined; fps?: number | undefined; channels?: number | undefined; sampleRate?: number | undefined; bitDepth?: number | undefined; }; /** @internal */ export declare const Tracks$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 Tracks$ { /** @deprecated use `Tracks$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Tracks$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Tracks$Outbound` instead. */ type Outbound = Tracks$Outbound; } export declare function tracksToJSON(tracks: Tracks): string; export declare function tracksFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const VideoSpec$inboundSchema: z.ZodType; /** @internal */ export type VideoSpec$Outbound = { format?: string | undefined; duration?: number | undefined; bitrate?: number | undefined; tracks?: Array | undefined; }; /** @internal */ export declare const VideoSpec$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 VideoSpec$ { /** @deprecated use `VideoSpec$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `VideoSpec$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `VideoSpec$Outbound` instead. */ type Outbound = VideoSpec$Outbound; } export declare function videoSpecToJSON(videoSpec: VideoSpec): string; export declare function videoSpecFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Asset$inboundSchema: z.ZodType; /** @internal */ export type Asset$Outbound = { id: string; type?: string | undefined; playbackId?: string | undefined; userId?: string | undefined; playbackUrl?: string | undefined; downloadUrl?: string | undefined; playbackPolicy?: PlaybackPolicy$Outbound | null | undefined; source: Two$Outbound | Asset1$Outbound | Asset3$Outbound; creatorId?: CreatorId$Outbound | undefined; profiles?: Array | undefined; storage?: AssetStorage$Outbound | undefined; status?: AssetStatus$Outbound | undefined; name: string; projectId?: string | undefined; createdAt?: number | undefined; createdByTokenName?: string | undefined; size?: number | undefined; hash?: Array | null | undefined; videoSpec?: VideoSpec$Outbound | undefined; }; /** @internal */ export declare const Asset$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 Asset$ { /** @deprecated use `Asset$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Asset$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Asset$Outbound` instead. */ type Outbound = Asset$Outbound; } export declare function assetToJSON(asset: Asset): string; export declare function assetFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=asset.d.ts.map