import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * An individual metric about viewership of a stream/asset. Necessarily, at least * * @remarks * 1 of playbackId and dStorageUrl will be present, depending on the query. */ export type ViewershipMetric = { /** * The playback ID associated with the metric. */ playbackId?: string | undefined; /** * The ID of the creator associated with the metric. */ creatorId?: string | undefined; /** * The ID of the viewer associated with the metric. */ viewerId?: string | undefined; /** * The URL of the distributed storage used for the asset */ dStorageUrl?: string | undefined; /** * Timestamp (in milliseconds) when the metric was recorded. If the * * @remarks * query contains a time step, this timestamp will point to the * beginning of the time step period. */ timestamp?: number | undefined; /** * The device used by the viewer. */ device?: string | undefined; /** * The type of the device used by the viewer. */ deviceType?: string | undefined; /** * The CPU used by the viewer's device. */ cpu?: string | undefined; /** * The operating system used by the viewer. */ os?: string | undefined; /** * The browser used by the viewer. */ browser?: string | undefined; /** * The browser engine used by the viewer's browser. */ browserEngine?: string | undefined; /** * The continent where the viewer is located. */ continent?: string | undefined; /** * The country where the viewer is located. */ country?: string | undefined; /** * The subdivision (e.g., state or province) where the viewer is * * @remarks * located. */ subdivision?: string | undefined; /** * The timezone where the viewer is located. */ timezone?: string | undefined; /** * Geographic encoding of the viewers location. Accurate to 3 digits. */ geohash?: string | undefined; /** * The number of views for the stream/asset. */ viewCount: number; /** * The total playtime in minutes for the stream/asset. */ playtimeMins: number; /** * The time-to-first-frame (TTFF) in milliseconds. */ ttffMs?: number | undefined; /** * The rebuffering ratio for the asset. */ rebufferRatio?: number | undefined; /** * The error rate for the stream/asset. */ errorRate?: number | undefined; /** * The percentage of sessions that existed before the asset started * * @remarks * playing. */ exitsBeforeStart?: number | undefined; }; /** @internal */ export declare const ViewershipMetric$inboundSchema: z.ZodType; /** @internal */ export type ViewershipMetric$Outbound = { playbackId?: string | undefined; creatorId?: string | undefined; viewerId?: string | undefined; dStorageUrl?: string | undefined; timestamp?: number | undefined; device?: string | undefined; deviceType?: string | undefined; cpu?: string | undefined; os?: string | undefined; browser?: string | undefined; browserEngine?: string | undefined; continent?: string | undefined; country?: string | undefined; subdivision?: string | undefined; timezone?: string | undefined; geohash?: string | undefined; viewCount: number; playtimeMins: number; ttffMs?: number | undefined; rebufferRatio?: number | undefined; errorRate?: number | undefined; exitsBeforeStart?: number | undefined; }; /** @internal */ export declare const ViewershipMetric$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 ViewershipMetric$ { /** @deprecated use `ViewershipMetric$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `ViewershipMetric$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `ViewershipMetric$Outbound` instead. */ type Outbound = ViewershipMetric$Outbound; } export declare function viewershipMetricToJSON(viewershipMetric: ViewershipMetric): string; export declare function viewershipMetricFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=viewershipmetric.d.ts.map