/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; import * as ActorDefs from "../../../app/bsky/actor/defs.defs.js"; import * as MediaTrack from "./track.defs.js"; const $nsid = "place.stream.media.getVideo"; export { $nsid }; export const $params = /*#__PURE__*/ l.params({"uri":/*#__PURE__*/ l.string({"format":"at-uri"})}); export type $Params = l.InferOutput; export const $output = /*#__PURE__*/ l.payload("application/json", /*#__PURE__*/ l.ref((() => videoView) as any)); export type $Output = l.InferPayload; export type $OutputBody = l.InferPayloadBody; /** Get a hydrated view of a place.stream.video record — the record itself plus author info plus aggregated view counts summed across every reporting node we've indexed. View counts come from place.stream.media.viewCount records; consumers see one number per metric, with the underlying multi-reporter detail collapsed away. */ const main = /*#__PURE__*/ l.query($nsid, $params, $output, ["VideoNotFound"]); export { main }; export const $lxm = $nsid; type VideoView = { $type?: "place.stream.media.getVideo#videoView";"uri":l.AtUriString;"cid":l.CidString;"author":ActorDefs.ProfileViewBasic;"record":l.LexMap; /** * Total number of place.stream.like records whose subject is this video. Always present; zero when none, so consumers can render a count unconditionally. */ "likeCount":number; /** * Aggregated view counts across every indexed reporter. Always present; zero-valued (count=0, reporters=0) when no place.stream.media.viewCount records have been observed yet, so consumers can render a count unconditionally. */ "viewCounts":ViewCountSummary;"tracks"?:(MediaTrack.TrackView)[] }; export type { VideoView }; const videoView = /*#__PURE__*/ l.typedObject($nsid, "videoView", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"cid":/*#__PURE__*/ l.string({"format":"cid"}),"author":/*#__PURE__*/ l.ref((() => ActorDefs.profileViewBasic) as any),"record":/*#__PURE__*/ l.lexMap(),"likeCount":/*#__PURE__*/ l.integer({"minimum":0}),"viewCounts":/*#__PURE__*/ l.ref((() => viewCountSummary) as any),"tracks":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => MediaTrack.trackView) as any), ))})); export { videoView }; /** Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total. */ type ViewCountSummary = { $type?: "place.stream.media.getVideo#viewCountSummary"; /** * Sum of `count` across every indexed report. */ "count":number; /** * Sum of bytes transferred across every track row in every indexed report. */ "bytes":number; /** * Sum of playback duration (ms) across every track row in every indexed report. */ "durationMs":number; /** * Number of distinct streamplace nodes that have contributed at least one viewCount record for this video. */ "reporters":number }; export type { ViewCountSummary }; /** Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total. */ const viewCountSummary = /*#__PURE__*/ l.typedObject($nsid, "viewCountSummary", /*#__PURE__*/ l.object({"count":/*#__PURE__*/ l.integer({"minimum":0}),"bytes":/*#__PURE__*/ l.integer({"minimum":0}),"durationMs":/*#__PURE__*/ l.integer({"minimum":0}),"reporters":/*#__PURE__*/ l.integer({"minimum":0})})); export { viewCountSummary };