import * as z from "zod"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Start timestamp for the query range (inclusive) */ export type From = Date | number; /** * End timestamp for the query range (exclusive) */ export type To = Date | number; /** * The time step to aggregate viewership metrics by */ export declare enum TimeStep { Hour = "hour", Day = "day", Week = "week", Month = "month", Year = "year" } export declare enum QueryParamBreakdownBy { PlaybackId = "playbackId", DeviceType = "deviceType", Device = "device", Cpu = "cpu", Os = "os", Browser = "browser", BrowserEngine = "browserEngine", Continent = "continent", Country = "country", Subdivision = "subdivision", Timezone = "timezone", Geohash = "geohash", ViewerId = "viewerId", CreatorId = "creatorId" } export type GetViewershipMetricsRequest = { /** * The playback ID to filter the query results. This can be a canonical * * @remarks * playback ID from Livepeer assets or streams, or dStorage identifiers * for assets */ playbackId?: string | undefined; /** * Start timestamp for the query range (inclusive) */ from?: Date | number | undefined; /** * End timestamp for the query range (exclusive) */ to?: Date | number | undefined; /** * The time step to aggregate viewership metrics by */ timeStep?: TimeStep | undefined; /** * The asset ID to filter metrics for */ assetId?: string | undefined; /** * The stream ID to filter metrics for */ streamId?: string | undefined; /** * The creator ID to filter the query results */ creatorId?: string | undefined; /** * The list of fields to break down the query results. Specify this * * @remarks * query-string multiple times to break down by multiple fields. */ breakdownBy?: Array | undefined; }; export type GetViewershipMetricsResponse = { /** * HTTP response content type for this operation */ contentType: string; /** * HTTP response status code for this operation */ statusCode: number; /** * Raw HTTP response; suitable for custom response parsing */ rawResponse: Response; /** * A list of Metric objects */ data?: Array | undefined; /** * Error */ error?: components.ErrorT | undefined; }; /** @internal */ export declare const From$inboundSchema: z.ZodType; /** @internal */ export type From$Outbound = string | number; /** @internal */ export declare const From$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 From$ { /** @deprecated use `From$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `From$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `From$Outbound` instead. */ type Outbound = From$Outbound; } export declare function fromToJSON(from: From): string; export declare function fromFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const To$inboundSchema: z.ZodType; /** @internal */ export type To$Outbound = string | number; /** @internal */ export declare const To$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 To$ { /** @deprecated use `To$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `To$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `To$Outbound` instead. */ type Outbound = To$Outbound; } export declare function toToJSON(to: To): string; export declare function toFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TimeStep$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const TimeStep$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 TimeStep$ { /** @deprecated use `TimeStep$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `TimeStep$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const QueryParamBreakdownBy$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const QueryParamBreakdownBy$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 QueryParamBreakdownBy$ { /** @deprecated use `QueryParamBreakdownBy$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum; /** @deprecated use `QueryParamBreakdownBy$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum; } /** @internal */ export declare const GetViewershipMetricsRequest$inboundSchema: z.ZodType; /** @internal */ export type GetViewershipMetricsRequest$Outbound = { playbackId?: string | undefined; from?: string | number | undefined; to?: string | number | undefined; timeStep?: string | undefined; assetId?: string | undefined; streamId?: string | undefined; creatorId?: string | undefined; "breakdownBy[]"?: Array | undefined; }; /** @internal */ export declare const GetViewershipMetricsRequest$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 GetViewershipMetricsRequest$ { /** @deprecated use `GetViewershipMetricsRequest$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `GetViewershipMetricsRequest$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `GetViewershipMetricsRequest$Outbound` instead. */ type Outbound = GetViewershipMetricsRequest$Outbound; } export declare function getViewershipMetricsRequestToJSON(getViewershipMetricsRequest: GetViewershipMetricsRequest): string; export declare function getViewershipMetricsRequestFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const GetViewershipMetricsResponse$inboundSchema: z.ZodType; /** @internal */ export type GetViewershipMetricsResponse$Outbound = { ContentType: string; StatusCode: number; RawResponse: never; data?: Array | undefined; error?: components.ErrorT$Outbound | undefined; }; /** @internal */ export declare const GetViewershipMetricsResponse$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 GetViewershipMetricsResponse$ { /** @deprecated use `GetViewershipMetricsResponse$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `GetViewershipMetricsResponse$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `GetViewershipMetricsResponse$Outbound` instead. */ type Outbound = GetViewershipMetricsResponse$Outbound; } export declare function getViewershipMetricsResponseToJSON(getViewershipMetricsResponse: GetViewershipMetricsResponse): string; export declare function getViewershipMetricsResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=getviewershipmetrics.d.ts.map