import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The dimension to group traffic data by. */ export declare const GetAnalyticsMediasMediaIdTrafficGroupBy: { readonly UtmCampaign: "utm_campaign"; readonly UtmSource: "utm_source"; readonly UtmMedium: "utm_medium"; readonly ReferrerDomain: "referrer_domain"; readonly ViewerScreenSize: "viewer_screen_size"; }; /** * The dimension to group traffic data by. */ export type GetAnalyticsMediasMediaIdTrafficGroupBy = ClosedEnum; /** * The metric to sort results by. */ export declare const GetAnalyticsMediasMediaIdTrafficSortBy: { readonly Plays: "plays"; readonly Loads: "loads"; readonly EngagementRate: "engagement_rate"; }; /** * The metric to sort results by. */ export type GetAnalyticsMediasMediaIdTrafficSortBy = ClosedEnum; /** * The sort direction. */ export declare const GetAnalyticsMediasMediaIdTrafficSortDirection: { readonly Asc: "asc"; readonly Desc: "desc"; }; /** * The sort direction. */ export type GetAnalyticsMediasMediaIdTrafficSortDirection = ClosedEnum; export type GetAnalyticsMediasMediaIdTrafficRequest = { /** * The hashed ID of the video. */ mediaId: string; /** * Start date for the analytics period in ISO 8601 format (YYYY-MM-DD). Inclusive — the range starts at the beginning of this date. */ startDate: RFCDate; /** * End date for the analytics period in ISO 8601 format (YYYY-MM-DD). Exclusive — the range ends before the beginning of this date. */ endDate: RFCDate; /** * The dimension to group traffic data by. */ groupBy: GetAnalyticsMediasMediaIdTrafficGroupBy; /** * The metric to sort results by. */ sortBy?: GetAnalyticsMediasMediaIdTrafficSortBy | undefined; /** * The sort direction. */ sortDirection?: GetAnalyticsMediasMediaIdTrafficSortDirection | undefined; /** * Number of results to return (max 100). */ perPage?: number | undefined; }; /** * Each item contains the group_by field and associated metrics. */ export type GetAnalyticsMediasMediaIdTrafficResponse = { /** * The UTM campaign value (present when group_by is utm_campaign). */ utmCampaign?: string | undefined; /** * The UTM source value (present when group_by is utm_source). */ utmSource?: string | undefined; /** * The UTM medium value (present when group_by is utm_medium). */ utmMedium?: string | undefined; /** * The referrer domain (present when group_by is referrer_domain). */ referrerDomain?: string | undefined; /** * The viewer screen size (present when group_by is viewer_screen_size). */ viewerScreenSize?: string | undefined; /** * The number of video loads for this group. */ loads?: number | undefined; /** * The number of video plays for this group. */ plays?: number | undefined; /** * The average engagement rate for this group (between 0 and 1). */ engagementRate?: number | undefined; }; /** @internal */ export declare const GetAnalyticsMediasMediaIdTrafficGroupBy$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const GetAnalyticsMediasMediaIdTrafficSortBy$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const GetAnalyticsMediasMediaIdTrafficSortDirection$outboundSchema: z.ZodNativeEnum; /** @internal */ export type GetAnalyticsMediasMediaIdTrafficRequest$Outbound = { mediaId: string; start_date: string; end_date: string; group_by: string; sort_by: string; sort_direction: string; per_page: number; }; /** @internal */ export declare const GetAnalyticsMediasMediaIdTrafficRequest$outboundSchema: z.ZodType; export declare function getAnalyticsMediasMediaIdTrafficRequestToJSON(getAnalyticsMediasMediaIdTrafficRequest: GetAnalyticsMediasMediaIdTrafficRequest): string; /** @internal */ export declare const GetAnalyticsMediasMediaIdTrafficResponse$inboundSchema: z.ZodType; export declare function getAnalyticsMediasMediaIdTrafficResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=getanalyticsmediasmediaidtraffic.d.ts.map