@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Interface AsyncHandlerConfig

    Configuration for async handler with typed callbacks

    interface AsyncHandlerConfig {
        onGetProductsStatusChange?: GetProductsStatusChangeHandler;
        onListCreativeFormatsLegacyStatusChange?: (
            data: LegacyListCreativeFormatsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onCreateMediaBuyStatusChange?: CreateMediaBuyStatusChangeHandler;
        onUpdateMediaBuyStatusChange?: UpdateMediaBuyStatusChangeHandler;
        onSyncCreativesStatusChange?: SyncCreativesStatusChangeHandler;
        onListCreativesStatusChange?: (
            response: CanonicalListCreativesResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onPreviewCreativeStatusChange?: (
            response: CanonicalCreativeResponse<LegacyPreviewCreativeResponse>,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onPreviewCreativeLegacyStatusChange?: (
            response: LegacyPreviewCreativeResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onGetMediaBuysStatusChange?: (
            response: {
                context_id?: string;
                context?: {};
                task_id?: string;
                status: TaskStatus;
                message?: string;
                timestamp?: string;
                replayed?: boolean;
                adcp_error?: {
                    code: string;
                    message: string;
                    field?: string;
                    suggestion?: string;
                    retry_after?: number;
                    issues?: {
                        pointer: string;
                        message: string;
                        keyword: string;
                        schemaPath?: string;
                        schema_id?: string;
                        discriminator?: { property_name: ...; value: ... }[];
                    }[];
                    details?: {};
                    recovery?: "transient"
                    | "correctable"
                    | "terminal";
                    source?: "producer" | "sdk";
                    sdk_id?: string;
                };
                push_notification_config?: {
                    url: string;
                    operation_id?: string;
                    token?: string;
                    authentication?: {
                        schemes: [AuthenticationScheme];
                        credentials: string;
                    };
                };
                governance_context?: string;
                payload?: {};
                adcp_version?: string;
                adcp_major_version?: number;
                media_buys: {
                    media_buy_id: string;
                    name?: string;
                    accepted_proposal_id?: string;
                    accepted_proposal_terms_digest?: string;
                    accepted_proposal?: {
                        proposal_id: string;
                        proposal_kind: | "new_media_buy"
                        | "media_buy_update"
                        | "media_buy_cancellation";
                        parent_proposal_id?: string;
                        media_buy_id: string;
                        opportunity_id?: string;
                        base_media_buy_revision?: number;
                        proposal_status: "accepted";
                        accepted_at?: string;
                        expires_at?: string;
                        name: string;
                        description?: string;
                        brief_alignment?: string;
                        commercial_terms: {
                            source_feed_version?: string;
                            source_pricing_version?: string;
                            brand: {
                                domain: string;
                                brand_id?: string;
                                countries?: [(...), ...(...)[]];
                            };
                            advertiser_industry?: AdvertiserIndustry;
                            purchases: [
                                {
                                    product_id: string;
                                    pricing_option_id: string;
                                    pricing?: (...)
                                    | (...);
                                    format_option_refs?: (...) | (...);
                                    catalog_ids?: (...) | (...);
                                    budget?: (...) | (...);
                                    daily_budget_cap?: (...) | (...);
                                    min_spend_target?: (...) | (...);
                                    impressions?: (...) | (...);
                                    start_time?: (...) | (...);
                                    end_time?: (...) | (...);
                                    pacing?: (...) | (...);
                                    bidding?: (...) | (...);
                                    targeting_overlay?: (...) | (...);
                                    optimization_goals?: (...) | (...);
                                    audience_evidence_requirements?: (...) | (...);
                                    audience_evidence_pins?: (...) | (...);
                                    agency_estimate_number?: (...) | (...);
                                    context?: (...) | (...);
                                    ext?: (...) | (...);
                                    measurement_terms?: (...) | (...);
                                    performance_standards?: (...) | (...);
                                },
                                ...{
                                    product_id: string;
                                    pricing_option_id: string;
                                    pricing?: (...)
                                    | (...);
                                    format_option_refs?: (...) | (...);
                                    catalog_ids?: (...) | (...);
                                    budget?: (...) | (...);
                                    daily_budget_cap?: (...) | (...);
                                    min_spend_target?: (...) | (...);
                                    impressions?: (...) | (...);
                                    start_time?: (...) | (...);
                                    end_time?: (...) | (...);
                                    pacing?: (...) | (...);
                                    bidding?: (...) | (...);
                                    targeting_overlay?: (...) | (...);
                                    optimization_goals?: (...) | (...);
                                    audience_evidence_requirements?: (...) | (...);
                                    audience_evidence_pins?: (...) | (...);
                                    agency_estimate_number?: (...) | (...);
                                    context?: (...) | (...);
                                    ext?: (...) | (...);
                                    measurement_terms?: (...) | (...);
                                    performance_standards?: (...) | (...);
                                }[],
                            ];
                            start_time: string;
                            end_time: string;
                            total_budget?: { amount: number; currency: string };
                            daily_budget_cap?: number;
                            budget_cap_timezone?: string;
                            budget_allocation?:
                                | { mode: "fixed" }
                                | {
                                    mode: "seller_optimized";
                                    optimization_goals: [(...), ...(...)[]];
                                };
                            pacing?: Pacing;
                            bidding?: {
                                automatic?: (...)
                                | (...);
                                bid_amount?: (...) | (...);
                                max_bid?: (...) | (...);
                                cost_per?: (...) | (...);
                                roas?: (...) | (...);
                            };
                            invoice_recipient?: {
                                legal_name: string;
                                vat_id?: (...)
                                | (...);
                                tax_id?: (...) | (...);
                                registration_number?: (...) | (...);
                                address?: (...) | (...);
                                contacts?: (...) | (...);
                                bank?: (...) | (...);
                                ext?: (...) | (...);
                            };
                            purchase_order_ref?: string;
                            agency_estimate_number?: string;
                            reporting_commitments?: [
                                { purchase_index: ...; metrics: ... },
                                ...{ purchase_index: ...; metrics: ... }[],
                            ];
                            cancellation_terms?: {
                                effective_at: string;
                                fee?: (...) | (...);
                                reason?: (...) | (...);
                            };
                        };
                        terms_digest: string;
                        insertion_order?: {
                            io_id: string;
                            terms?: {
                                advertiser?: ...;
                                publisher?: ...;
                                total_budget?: ...;
                                flight_start?: ...;
                                flight_end?: ...;
                                payment_terms?: ...;
                            };
                            terms_url?: string;
                            signing_url?: string;
                            requires_signature: boolean;
                        };
                    };
                    account?: {
                        account_id: string;
                        name: string;
                        advertiser?: string;
                        billing_proxy?: string;
                        status: AccountStatus;
                        brand?: {
                            domain: string;
                            brand_id?: string;
                            countries?: (...)[];
                            industries?: (...)[];
                            data_subject_contestation?: {
                                url?: ...;
                                email?: ...;
                                languages?: ...;
                            };
                            brand_kit_override?: {
                                logo?: ...;
                                colors?: ...;
                                voice?: ...;
                                tagline?: ...;
                            };
                        };
                        operator?: string;
                        operator_unit?: { id: string; name?: string };
                        revision?: number;
                        identity_change?:
                            | {
                                status: "pending_approval";
                                requested_operator_identity: {
                                    operator: string;
                                    operator_unit?: (...)
                                    | (...);
                                };
                                requested_at?: string;
                            }
                            | {
                                status: "rejected";
                                requested_operator_identity: {
                                    operator: string;
                                    operator_unit?: (...)
                                    | (...);
                                };
                                requested_at?: string;
                                reason: string;
                            };
                        currency?: string;
                        timezone?: string;
                        billing?: BillingParty;
                        billing_entity?: {
                            legal_name: string;
                            vat_id?: string;
                            tax_id?: string;
                            registration_number?: string;
                            address?: {
                                street: ...;
                                city: ...;
                                postal_code: ...;
                                region?: ...;
                                country: ...;
                            };
                            contacts?: (...)[];
                            bank?: {
                                account_holder: ...;
                                iban?: ...;
                                bic?: ...;
                                routing_number?: ...;
                                account_number?: ...;
                            };
                            ext?: { [key: ...]: ... };
                        };
                        destination_billing_entity?: {};
                        rate_card?: string;
                        payment_terms?: PaymentTerms;
                        credit_limit?: { amount: number; currency: string };
                        setup?: { url?: string; message: string; expires_at?: string };
                        account_scope?: AccountScope;
                        governance_agents?: [{ url: string }];
                        reporting_bucket?: {
                            protocol: CloudStorageProtocol;
                            bucket: string;
                            prefix?: string;
                            region?: string;
                            format?: "jsonl" | "csv" | "parquet" | "avro" | "orc";
                            compression?: "none" | "gzip";
                            file_retention_days: number;
                            setup_instructions?: string;
                        };
                        sandbox?: boolean;
                        notification_configs?: | []
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ]
                        | [
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                            {
                                subscriber_id: string;
                                url: string;
                                event_types: [(...), ...(...)[]];
                                product_payload_view?: (...) | (...) | (...);
                                authentication?: (...) | (...);
                                active?: (...) | (...) | (...);
                                ext?: (...) | (...);
                            },
                        ];
                        webhook_activity?: {
                            idempotency_key: string;
                            notification_id?: (...)
                            | (...);
                            subscriber_id?: (...) | (...);
                            fired_at: string;
                            completed_at?: (...) | (...) | (...);
                            notification_type: NotificationType;
                            sequence_number?: (...) | (...);
                            attempt: number;
                            status: (...) | (...) | (...) | (...) | (...);
                            url: string;
                            http_status_code?: (...) | (...) | (...);
                            response_time_ms?: (...) | (...) | (...);
                            payload_size_bytes?: (...) | (...);
                            error_message?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        }[];
                        ext?: { [key: string]: unknown };
                    };
                    invoice_recipient?: {
                        legal_name: string;
                        vat_id?: string;
                        tax_id?: string;
                        registration_number?: string;
                        address?: {
                            street: string;
                            city: string;
                            postal_code: string;
                            region?: string;
                            country: string;
                        };
                        contacts?: {
                            role: (...)
                            | (...)
                            | (...)
                            | (...);
                            name?: (...) | (...);
                            email?: (...) | (...);
                            phone?: (...) | (...);
                        }[];
                        bank?: {
                            account_holder: string;
                            iban?: string;
                            bic?: string;
                            routing_number?: string;
                            account_number?: string;
                        };
                        ext?: { [key: string]: unknown };
                    };
                    status: MediaBuyStatus;
                    status_as_of?: string
                    | null;
                    health?: "ok" | "impaired";
                    impairments?: {
                        impairment_id: string;
                        resource_type:
                            | "creative"
                            | "property"
                            | "audience"
                            | "catalog_item"
                            | "event_source";
                        resource_id: string;
                        package_ids: [string, ...string[]];
                        transition: { from?: string; to: ImpairmentOfflineState };
                        reason_code: ImpairmentReasonCode;
                        reason?: string;
                        observed_at: string;
                        remediation?: string;
                    }[];
                    rejection_reason?: string;
                    currency: string;
                    total_budget?: number;
                    daily_budget_cap?: number;
                    budget_cap_timezone?: string;
                    budget_allocation?: | { mode: "fixed" }
                    | {
                        mode: "seller_optimized";
                        optimization_goals: [
                            | {
                                kind: "metric";
                                metric: | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                                reach_unit?: (...) | (...);
                                target_frequency?: (...) | (...);
                                view_duration_seconds?: (...) | (...);
                                target?: (...) | (...) | (...);
                                priority?: (...) | (...);
                            }
                            | {
                                kind: "event";
                                event_sources: [(...), ...(...)[]];
                                target?: (...) | (...) | (...) | (...);
                                attribution_window?: (...) | (...);
                                priority?: (...) | (...);
                            }
                            | {
                                kind: "vendor_metric";
                                vendor: {
                                    domain: ...;
                                    brand_id?: ...;
                                    countries?: ...;
                                    industries?: ...;
                                    data_subject_contestation?: ...;
                                    brand_kit_override?: ...;
                                };
                                metric_id: string;
                                target?: (...)
                                | (...)
                                | (...);
                                priority?: (...) | (...);
                            },
                            ...(
                                | {
                                    kind: "metric";
                                    metric: | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...);
                                    reach_unit?: (...) | (...);
                                    target_frequency?: (...) | (...);
                                    view_duration_seconds?: (...) | (...);
                                    target?: (...) | (...) | (...);
                                    priority?: (...) | (...);
                                }
                                | {
                                    kind: "event";
                                    event_sources: [(...), ...(...)[]];
                                    target?: (...) | (...) | (...) | (...);
                                    attribution_window?: (...) | (...);
                                    priority?: (...) | (...);
                                }
                                | {
                                    kind: "vendor_metric";
                                    vendor: {
                                        domain: ...;
                                        brand_id?: ...;
                                        countries?: ...;
                                        industries?: ...;
                                        data_subject_contestation?: ...;
                                        brand_kit_override?: ...;
                                    };
                                    metric_id: string;
                                    target?: (...)
                                    | (...)
                                    | (...);
                                    priority?: (...) | (...);
                                }
                            )[],
                        ];
                    };
                    pacing?: Pacing;
                    bidding?: {
                        automatic?: true;
                        bid_amount?: number;
                        max_bid?: number;
                        cost_per?: { amount: number; strength: "cap"
                        | "target" };
                        roas?: { value: number; strength: "target" | "floor" };
                    };
                    start_time?: string;
                    end_time?: string;
                    creative_deadline?: string;
                    confirmed_at?: string
                    | null;
                    cancellation?: {
                        canceled_at: string;
                        canceled_by: CanceledBy;
                        reason?: string;
                    };
                    revision?: number;
                    created_at?: string;
                    updated_at?: string;
                    context?: {};
                    valid_actions?: MediaBuyValidAction[];
                    available_actions?: (
                        | {
                            action: MediaBuyValidAction;
                            mode: MediaBuyActionMode;
                            task?: "sync_creatives"
                            | "control_media_buy"
                            | "refine_proposals";
                            sla?: { response_max?: ...; completion_max?: ... };
                            terms_ref?: string;
                        }
                        | {
                            task: "control_media_buy";
                            action: | "pause"
                            | "resume"
                            | "cancel"
                            | "increase_budget"
                            | "decrease_budget"
                            | "reallocate_budget"
                            | "update_budget_allocation"
                            | "update_targeting"
                            | "update_pacing"
                            | "update_bidding"
                            | "update_frequency_caps"
                            | "update_catalog_assignments"
                            | "update_keywords"
                            | "update_optimization_goals"
                            | "update_impression_goal"
                            | "update_spend_target"
                            | "update_reporting_webhook"
                            | "remove_packages"
                            | "update_name";
                            mode: CanonicalMediaBuyActionMode;
                            sla?: { response_max?: ...; completion_max?: ... };
                            terms_ref?: string;
                        }
                        | {
                            task: "refine_proposals";
                            action: | "cancel"
                            | "extend_flight"
                            | "shorten_flight"
                            | "update_flight_dates"
                            | "increase_budget"
                            | "decrease_budget"
                            | "reallocate_budget"
                            | "update_budget_allocation"
                            | "update_targeting"
                            | "update_pacing"
                            | "update_bidding"
                            | "update_frequency_caps"
                            | "add_packages"
                            | "remove_packages";
                            mode: CanonicalMediaBuyActionMode;
                            sla?: { response_max?: ...; completion_max?: ... };
                            terms_ref?: string;
                        }
                        | {
                            task: "sync_creatives";
                            action: | "replace_creative"
                            | "update_creative_assignments"
                            | "remove_creative";
                            mode: CanonicalMediaBuyActionMode;
                            sla?: { response_max?: ...; completion_max?: ... };
                            terms_ref?: string;
                        }
                    )[];
                    webhook_activity?: {
                        idempotency_key: string;
                        notification_id?: string;
                        subscriber_id?: string;
                        fired_at: string;
                        completed_at?: string
                        | null;
                        notification_type: NotificationType;
                        sequence_number?: number;
                        attempt: number;
                        status:
                            | "failed"
                            | "pending"
                            | "success"
                            | "timeout"
                            | "connection_error";
                        url: string;
                        http_status_code?: number
                        | null;
                        response_time_ms?: number | null;
                        payload_size_bytes?: number;
                        error_message?: string | null;
                        ext?: { [key: string]: unknown };
                    }[];
                    history?: {
                        revision: number;
                        timestamp: string;
                        actor?: string;
                        action: string;
                        summary?: string;
                        package_id?: string;
                        ext?: { [key: string]: unknown };
                    }[];
                    packages: {
                        package_id: string;
                        product_id?: string;
                        budget?: number;
                        min_spend_target?: number;
                        daily_budget_cap?: number;
                        currency?: string;
                        bid_price?: number;
                        bidding?: {
                            automatic?: true;
                            bid_amount?: number;
                            max_bid?: number;
                            cost_per?: { amount: ...; strength: ... };
                            roas?: { value: ...; strength: ... };
                        };
                        optimization_goals?: (
                            | {
                                kind: ...;
                                metric: ...;
                                reach_unit?: ...;
                                target_frequency?: ...;
                                view_duration_seconds?: ...;
                                target?: ...;
                                priority?: ...;
                            }
                            | {
                                kind: ...;
                                event_sources: ...;
                                target?: ...;
                                attribution_window?: ...;
                                priority?: ...;
                            }
                            | {
                                kind: ...;
                                vendor: ...;
                                metric_id: ...;
                                target?: ...;
                                priority?: ...;
                            }
                        )[];
                        format_option_refs?: (
                            | { scope: ...; publisher_domain: ...; format_option_id: ... }
                            | { scope: ...; format_option_id: ...; publisher_domain?: ... }
                        )[];
                        format_kind?: CanonicalFormatKind;
                        params?: {};
                        impressions?: number;
                        pacing?: Pacing;
                        targeting_overlay?: {
                            geo_countries?: [(...), ...(...)[]];
                            geo_countries_exclude?: [(...), ...(...)[]];
                            geo_regions?: [(...), ...(...)[]];
                            geo_regions_exclude?: [(...), ...(...)[]];
                            geo_metros?: [(...), ...(...)[]];
                            geo_metros_exclude?: [(...), ...(...)[]];
                            geo_postal_areas?: [(...), ...(...)[]];
                            geo_postal_areas_exclude?: [(...), ...(...)[]];
                            geo_places?: [(...), ...(...)[]];
                            geo_places_exclude?: [(...), ...(...)[]];
                            daypart_targets?: [(...), ...(...)[]];
                            axe_include_segment?: string;
                            axe_exclude_segment?: string;
                            audience_include?: [(...), ...(...)[]];
                            audience_exclude?: [(...), ...(...)[]];
                            signal_targeting_groups?: { operator: ...; groups: ... };
                            signal_targeting?: [(...), ...(...)[]];
                            demographics?: { age: ... };
                            frequency_cap?: {
                                suppress?: ...;
                                suppress_minutes?: ...;
                                max_impressions?: ...;
                                per?: ...;
                                window?: ...;
                            };
                            property_list?: { agent_url: ...; list_id: ...; auth_token?: ... };
                            property_list_exclude?: {
                                agent_url: ...;
                                list_id: ...;
                                auth_token?: ...;
                            };
                            collection_list?: { agent_url: ...; list_id: ...; auth_token?: ... };
                            collection_list_exclude?: {
                                agent_url: ...;
                                list_id: ...;
                                auth_token?: ...;
                            };
                            placement_selection?: | { mode: ...; placement_refs: ...; ext?: ... }
                            | { mode: ...; ext?: ... };
                            age_restriction?: {
                                min: ...;
                                verification_required?: ...;
                                accepted_methods?: ...;
                            };
                            device_platform?: [(...), ...(...)[]];
                            device_platform_exclude?: [(...), ...(...)[]];
                            device_type?: [(...), ...(...)[]];
                            device_type_exclude?: [(...), ...(...)[]];
                            browser?: [(...), ...(...)[]];
                            browser_exclude?: [(...), ...(...)[]];
                            store_catchments?: [(...), ...(...)[]];
                            geo_proximity?: [(...), ...(...)[]];
                            language?: [(...), ...(...)[]];
                            keyword_targets?: [(...), ...(...)[]];
                            negative_keywords?: [(...), ...(...)[]];
                        };
                        targeting_resolution?: {
                            demographics: {
                                requested: { age: ... };
                                applied: { age: ... };
                                equivalent: true;
                                execution: (...) | (...) | (...);
                                applied_bases?: (...) | (...);
                                applied_verification_methods?: (...) | (...);
                                ext?: (...) | (...);
                            };
                            ext?: { [key: ...]: ... };
                        };
                        start_time?: string;
                        end_time?: string;
                        paused?: boolean;
                        canceled?: boolean;
                        cancellation?: {
                            canceled_at: string;
                            canceled_by: CanceledBy;
                            reason?: string;
                        };
                        creative_deadline?: string;
                        context?: {};
                        creative_approvals?: {
                            creative_id: string;
                            approval_status?: (...)
                            | (...);
                            rejection_reason?: (...) | (...);
                            approval_scopes?: (...) | (...);
                            indicators?: (...) | (...);
                            indicator_types_evaluated?: (...) | (...);
                            indicators_as_of?: (...) | (...);
                            indicators_evaluated_scope?: (...) | (...);
                        }[];
                        formats_to_provide?: (
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                        )[];
                        formats_pending?: (
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                            | {
                                format_option_id?: ...;
                                publisher_domain?: ...;
                                display_name?: ...;
                                sample_render_url?: ...;
                                applies_to_channels?: ...;
                                seller_preference?: ...;
                                locale_policy?: ...;
                                canonical_formats_only?: ...;
                                experimental?: ...;
                                format_shape?: ...;
                                format_schema?: ...;
                                format_kind: ...;
                                params: ...;
                            }
                        )[];
                        snapshot_unavailable_reason?: SnapshotUnavailableReason;
                        snapshot?: {
                            as_of: string;
                            staleness_seconds: number;
                            impressions: number;
                            spend: number;
                            currency?: string;
                            clicks?: number;
                            pacing_index?: number;
                            delivery_status?: DeliveryStatus;
                            ext?: { [key: ...]: ... };
                        };
                        ext?: { [key: string]: unknown };
                        indicator_types_evaluated?: (
                            | "creative_diversity_low"
                            | "audience_saturation"
                            | "inventory_shortfall_forecast"
                            | "pacing_risk"
                            | "budget_constrained"
                        )[];
                        indicators?: { type?: (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...) }[];
                    }[];
                    ext?: { [key: string]: unknown };
                    indicator_types_evaluated?: "budget_constrained"[];
                    indicators?: { type?: "budget_constrained" }[];
                }[];
                errors?: {
                    code: string;
                    message: string;
                    field?: string;
                    suggestion?: string;
                    retry_after?: number;
                    issues?: {
                        pointer: string;
                        message: string;
                        keyword: string;
                        schemaPath?: string;
                        schema_id?: string;
                        discriminator?: (...)[];
                    }[];
                    details?: {};
                    recovery?: "transient"
                    | "correctable"
                    | "terminal";
                    source?: "producer" | "sdk";
                    sdk_id?: string;
                }[];
                pagination?: { has_more: boolean; cursor?: string; total_count?: number };
                sandbox?: boolean;
                ext?: { [key: string]: unknown };
            },
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onGetMediaBuyDeliveryStatusChange?: (
            response: {
                context_id?: string;
                context?: {};
                task_id?: string;
                status: TaskStatus;
                message?: string;
                timestamp?: string;
                replayed?: boolean;
                adcp_error?: {
                    code: string;
                    message: string;
                    field?: string;
                    suggestion?: string;
                    retry_after?: number;
                    issues?: {
                        pointer: string;
                        message: string;
                        keyword: string;
                        schemaPath?: string;
                        schema_id?: string;
                        discriminator?: { property_name: ...; value: ... }[];
                    }[];
                    details?: {};
                    recovery?: "transient"
                    | "correctable"
                    | "terminal";
                    source?: "producer" | "sdk";
                    sdk_id?: string;
                };
                push_notification_config?: {
                    url: string;
                    operation_id?: string;
                    token?: string;
                    authentication?: {
                        schemes: [AuthenticationScheme];
                        credentials: string;
                    };
                };
                governance_context?: string;
                payload?: {};
                adcp_version?: string;
                adcp_major_version?: number;
                notification_type?: | "scheduled"
                | "final"
                | "delayed"
                | "adjusted"
                | "window_update";
                partial_data?: boolean;
                unavailable_count?: number;
                sequence_number?: number;
                next_expected_at?: string;
                reporting_period: { start: string; end: string };
                currency?: string;
                attribution_window?: {
                    post_click?: {
                        interval: number;
                        unit: "campaign" | "seconds" | "minutes" | "hours" | "days";
                    };
                    post_view?: {
                        interval: number;
                        unit: "campaign"
                        | "seconds"
                        | "minutes"
                        | "hours"
                        | "days";
                    };
                    model?: AttributionModel;
                };
                aggregated_totals?: {
                    impressions: number;
                    spend: number;
                    clicks?: number;
                    completed_views?: number;
                    views?: number;
                    conversions?: number;
                    conversion_value?: number;
                    commissionable_value?: number;
                    roas?: number;
                    new_to_brand_rate?: number;
                    cost_per_acquisition?: number;
                    completion_rate?: number
                    | null;
                    reach?: number;
                    reach_unit?: ReachUnit;
                    frequency?: number;
                    media_buy_count: number;
                    metric_aggregates?: (
                        | {
                            scope: "standard";
                            metric_id: AvailableMetric;
                            qualifier?: {
                                viewability_standard?: ...;
                                completion_source?: ...;
                                attribution_methodology?: ...;
                                attribution_window?: ...;
                                lift_dimension?: ...;
                            };
                            value: number;
                            measurable_impressions?: number;
                            viewable_impressions?: number;
                            impressions?: number;
                            completed_views?: number;
                            spend?: number;
                            conversions?: number;
                            conversion_value?: number;
                            clicks?: number;
                        }
                        | {
                            scope: "vendor";
                            vendor: {
                                domain: string;
                                brand_id?: (...)
                                | (...);
                                countries?: (...) | (...);
                                industries?: (...) | (...);
                                data_subject_contestation?: (...) | (...);
                                brand_kit_override?: (...) | (...);
                            };
                            metric_id: string;
                            qualifier?: {};
                            value: number;
                            measurable_impressions?: number;
                        }
                    )[];
                };
                media_buy_deliveries: {
                    media_buy_id: string;
                    status: | "active"
                    | "rejected"
                    | "failed"
                    | "pending"
                    | "completed"
                    | "pending_creatives"
                    | "pending_start"
                    | "paused"
                    | "canceled"
                    | "reporting_delayed";
                    expected_availability?: string;
                    is_adjusted?: boolean;
                    is_final?: boolean;
                    finalized_at?: string;
                    pricing_model?: PricingModel;
                    pacing_index?: number;
                    totals: {
                        impressions?: number;
                        spend?: number;
                        clicks?: number;
                        ctr?: number;
                        views?: number;
                        completed_views?: number;
                        completion_rate?: number
                        | null;
                        conversions?: number;
                        conversion_value?: number;
                        commissionable_value?: number;
                        roas?: number;
                        cost_per_acquisition?: number;
                        new_to_brand_rate?: number;
                        leads?: number;
                        incremental_sales_lift?: number;
                        brand_lift?: number;
                        foot_traffic?: number;
                        conversion_lift?: number;
                        brand_search_lift?: number;
                        plays?: number;
                        by_event_type?: {
                            event_type: EventType;
                            event_source_id?: string;
                            count: number;
                            value?: number;
                        }[];
                        grps?: number;
                        reach?: number;
                        reach_unit?: ReachUnit;
                        reach_window?: {
                            kind: "cumulative"
                            | "period"
                            | "rolling";
                            period?: {
                                interval: number;
                                unit: (...) | (...) | (...) | (...) | (...);
                            };
                        };
                        frequency?: number;
                        quartile_data?: | {
                            q1_views?: number;
                            q2_views?: number;
                            q3_views?: number;
                            q4_views?: number;
                        }
                        | null;
                        dooh_metrics?: {
                            loop_plays?: number;
                            screens_used?: number;
                            screen_time_seconds?: number;
                            sov_achieved?: number;
                            calculation_notes?: string;
                            venue_breakdown?: {
                                venue_id: ...;
                                venue_name?: ...;
                                venue_type?: ...;
                                impressions: ...;
                                loop_plays?: ...;
                                screens_used?: ...;
                            }[];
                        };
                        viewability?: {
                            vendor?: {
                                domain: string;
                                brand_id?: (...)
                                | (...);
                                countries?: (...) | (...);
                                industries?: (...) | (...);
                                data_subject_contestation?: (...) | (...);
                                brand_kit_override?: (...) | (...);
                            };
                            measurable_impressions?: number;
                            viewable_impressions?: number;
                            viewable_rate?: number;
                            viewed_seconds?: number;
                            standard?: ViewabilityStandard;
                        };
                        engagements?: number;
                        follows?: number;
                        saves?: number;
                        profile_visits?: number;
                        engagement_rate?: number;
                        cost_per_click?: number;
                        cost_per_completed_view?: number;
                        cpm?: number;
                        downloads?: number;
                        units_sold?: number;
                        new_to_brand_units?: number;
                        by_action_source?: {
                            action_source: ActionSource;
                            event_source_id?: string;
                            count: number;
                            value?: number;
                        }[];
                        vendor_metric_values?: {
                            vendor: {
                                domain: string;
                                brand_id?: (...)
                                | (...);
                                countries?: (...) | (...);
                                industries?: (...) | (...);
                                data_subject_contestation?: (...) | (...);
                                brand_kit_override?: (...) | (...);
                            };
                            metric_id: string;
                            value: number;
                            unit?: string;
                            measurable_impressions?: number;
                            breakdown?: {};
                        }[];
                        effective_rate?: number;
                    };
                    by_package: {
                        impressions?: number;
                        spend?: number;
                        clicks?: number;
                        ctr?: number;
                        views?: number;
                        completed_views?: number;
                        completion_rate?: number
                        | null;
                        conversions?: number;
                        conversion_value?: number;
                        commissionable_value?: number;
                        roas?: number;
                        cost_per_acquisition?: number;
                        new_to_brand_rate?: number;
                        leads?: number;
                        incremental_sales_lift?: number;
                        brand_lift?: number;
                        foot_traffic?: number;
                        conversion_lift?: number;
                        brand_search_lift?: number;
                        plays?: number;
                        by_event_type?: {
                            event_type: EventType;
                            event_source_id?: (...) | (...);
                            count: number;
                            value?: (...) | (...);
                        }[];
                        grps?: number;
                        reach?: number;
                        reach_unit?: ReachUnit;
                        reach_window?: {
                            kind: "cumulative"
                            | "period"
                            | "rolling";
                            period?: { interval: ...; unit: ... };
                        };
                        frequency?: number;
                        quartile_data?: | {
                            q1_views?: number;
                            q2_views?: number;
                            q3_views?: number;
                            q4_views?: number;
                        }
                        | null;
                        dooh_metrics?: {
                            loop_plays?: number;
                            screens_used?: number;
                            screen_time_seconds?: number;
                            sov_achieved?: number;
                            calculation_notes?: string;
                            venue_breakdown?: (...)[];
                        };
                        viewability?: {
                            vendor?: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            measurable_impressions?: number;
                            viewable_impressions?: number;
                            viewable_rate?: number;
                            viewed_seconds?: number;
                            standard?: ViewabilityStandard;
                        };
                        engagements?: number;
                        follows?: number;
                        saves?: number;
                        profile_visits?: number;
                        engagement_rate?: number;
                        cost_per_click?: number;
                        cost_per_completed_view?: number;
                        cpm?: number;
                        downloads?: number;
                        units_sold?: number;
                        new_to_brand_units?: number;
                        by_action_source?: {
                            action_source: ActionSource;
                            event_source_id?: (...)
                            | (...);
                            count: number;
                            value?: (...) | (...);
                        }[];
                        vendor_metric_values?: {
                            vendor: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            metric_id: string;
                            value: number;
                            unit?: (...)
                            | (...);
                            measurable_impressions?: (...) | (...);
                            breakdown?: (...) | (...);
                        }[];
                        package_id: string;
                        pacing_index?: number;
                        pricing_model?: PricingModel;
                        rate?: number;
                        currency?: string;
                        delivery_status?: DeliveryStatus;
                        paused?: boolean;
                        is_final?: boolean;
                        finalized_at?: string;
                        measurement_window?: string;
                        supersedes_window?: string;
                        missing_metrics?: (
                            | { scope: ...; metric_id: ...; qualifier?: ... }
                            | { scope: ...; vendor: ...; metric_id: ... }
                        )[];
                        by_catalog_item?: {
                            impressions?: (...) | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            content_id?: (...) | (...);
                            content_id_type?: (...) | (...);
                        }[];
                        by_creative?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            creative_id: string;
                            weight?: (...) | (...);
                        }[];
                        by_keyword?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            keyword?: (...) | (...);
                            match_type?: (...) | (...);
                        }[];
                        by_geo?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            geo_level?: (...) | (...);
                            system?: (...) | (...);
                            country?: (...) | (...);
                            geo_code?: (...) | (...);
                            geo_name?: (...) | (...);
                        }[];
                        by_geo_truncated?: boolean;
                        by_device_type?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            device_type?: (...) | (...);
                        }[];
                        by_device_type_truncated?: boolean;
                        by_device_platform?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            device_platform?: (...) | (...);
                        }[];
                        by_device_platform_truncated?: boolean;
                        by_audience?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            audience_id?: (...) | (...);
                            audience_source?: (...) | (...);
                            audience_name?: (...) | (...);
                        }[];
                        by_audience_truncated?: boolean;
                        by_demographic?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            demographic: string;
                            demographic_system: DemographicSystem;
                            age?: (...) | (...);
                        }[];
                        by_demographic_truncated?: boolean;
                        by_demographic_suppressed?: boolean;
                        by_placement?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            placement_id?: (...) | (...);
                            placement_name?: (...) | (...);
                            publisher_domain?: (...) | (...);
                        }[];
                        by_placement_truncated?: boolean;
                        by_spot?: {
                            impressions?: (...)
                            | (...);
                            spend?: (...) | (...);
                            clicks?: (...) | (...);
                            ctr?: (...) | (...);
                            views?: (...) | (...);
                            completed_views?: (...) | (...);
                            completion_rate?: (...) | (...) | (...);
                            conversions?: (...) | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            cost_per_acquisition?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                            leads?: (...) | (...);
                            incremental_sales_lift?: (...) | (...);
                            brand_lift?: (...) | (...);
                            foot_traffic?: (...) | (...);
                            conversion_lift?: (...) | (...);
                            brand_search_lift?: (...) | (...);
                            plays?: (...) | (...);
                            by_event_type?: (...) | (...);
                            grps?: (...) | (...);
                            reach?: (...) | (...);
                            reach_unit?: (...) | (...);
                            reach_window?: (...) | (...);
                            frequency?: (...) | (...);
                            quartile_data?: (...) | (...) | (...);
                            dooh_metrics?: (...) | (...);
                            viewability?: (...) | (...);
                            engagements?: (...) | (...);
                            follows?: (...) | (...);
                            saves?: (...) | (...);
                            profile_visits?: (...) | (...);
                            engagement_rate?: (...) | (...);
                            cost_per_click?: (...) | (...);
                            cost_per_completed_view?: (...) | (...);
                            cpm?: (...) | (...);
                            downloads?: (...) | (...);
                            units_sold?: (...) | (...);
                            new_to_brand_units?: (...) | (...);
                            by_action_source?: (...) | (...);
                            vendor_metric_values?: (...) | (...);
                            spot_id: string;
                            aired_at: string;
                            network?: (...) | (...);
                            station?: (...) | (...);
                            daypart?: (...) | (...);
                        }[];
                        by_spot_truncated?: boolean;
                        daily_breakdown?: {
                            date: string;
                            impressions: number;
                            spend: number;
                            conversions?: (...)
                            | (...);
                            conversion_value?: (...) | (...);
                            commissionable_value?: (...) | (...);
                            roas?: (...) | (...);
                            new_to_brand_rate?: (...) | (...);
                        }[];
                    }[];
                    windows?: {
                        window_start: string;
                        window_end: string;
                        totals: {
                            impressions?: number;
                            spend?: number;
                            clicks?: number;
                            ctr?: number;
                            views?: number;
                            completed_views?: number;
                            completion_rate?: number
                            | null;
                            conversions?: number;
                            conversion_value?: number;
                            commissionable_value?: number;
                            roas?: number;
                            cost_per_acquisition?: number;
                            new_to_brand_rate?: number;
                            leads?: number;
                            incremental_sales_lift?: number;
                            brand_lift?: number;
                            foot_traffic?: number;
                            conversion_lift?: number;
                            brand_search_lift?: number;
                            plays?: number;
                            by_event_type?: (...)[];
                            grps?: number;
                            reach?: number;
                            reach_unit?: ReachUnit;
                            reach_window?: { kind: ...; period?: ... };
                            frequency?: number;
                            quartile_data?:
                                | {
                                    q1_views?: ...;
                                    q2_views?: ...;
                                    q3_views?: ...;
                                    q4_views?: ...;
                                }
                                | null;
                            dooh_metrics?: {
                                loop_plays?: ...;
                                screens_used?: ...;
                                screen_time_seconds?: ...;
                                sov_achieved?: ...;
                                calculation_notes?: ...;
                                venue_breakdown?: ...;
                            };
                            viewability?: {
                                vendor?: ...;
                                measurable_impressions?: ...;
                                viewable_impressions?: ...;
                                viewable_rate?: ...;
                                viewed_seconds?: ...;
                                standard?: ...;
                            };
                            engagements?: number;
                            follows?: number;
                            saves?: number;
                            profile_visits?: number;
                            engagement_rate?: number;
                            cost_per_click?: number;
                            cost_per_completed_view?: number;
                            cpm?: number;
                            downloads?: number;
                            units_sold?: number;
                            new_to_brand_units?: number;
                            by_action_source?: (...)[];
                            vendor_metric_values?: (...)[];
                        };
                        by_package?: {
                            impressions?: ...;
                            spend?: ...;
                            clicks?: ...;
                            ctr?: ...;
                            views?: ...;
                            completed_views?: ...;
                            completion_rate?: ...;
                            conversions?: ...;
                            conversion_value?: ...;
                            commissionable_value?: ...;
                            roas?: ...;
                            cost_per_acquisition?: ...;
                            new_to_brand_rate?: ...;
                            leads?: ...;
                            incremental_sales_lift?: ...;
                            brand_lift?: ...;
                            foot_traffic?: ...;
                            conversion_lift?: ...;
                            brand_search_lift?: ...;
                            plays?: ...;
                            by_event_type?: ...;
                            grps?: ...;
                            reach?: ...;
                            reach_unit?: ...;
                            reach_window?: ...;
                            frequency?: ...;
                            quartile_data?: ...;
                            dooh_metrics?: ...;
                            viewability?: ...;
                            engagements?: ...;
                            follows?: ...;
                            saves?: ...;
                            profile_visits?: ...;
                            engagement_rate?: ...;
                            cost_per_click?: ...;
                            cost_per_completed_view?: ...;
                            cpm?: ...;
                            downloads?: ...;
                            units_sold?: ...;
                            new_to_brand_units?: ...;
                            by_action_source?: ...;
                            vendor_metric_values?: ...;
                            package_id: ...;
                        }[];
                        is_final?: boolean;
                        measurement_window?: string;
                    }[];
                    daily_breakdown?: {
                        date: string;
                        impressions: number;
                        spend: number;
                        conversions?: number;
                        conversion_value?: number;
                        commissionable_value?: number;
                        roas?: number;
                        new_to_brand_rate?: number;
                    }[];
                }[];
                errors?: {
                    code: string;
                    message: string;
                    field?: string;
                    suggestion?: string;
                    retry_after?: number;
                    issues?: {
                        pointer: string;
                        message: string;
                        keyword: string;
                        schemaPath?: string;
                        schema_id?: string;
                        discriminator?: (...)[];
                    }[];
                    details?: {};
                    recovery?: "transient"
                    | "correctable"
                    | "terminal";
                    source?: "producer" | "sdk";
                    sdk_id?: string;
                }[];
                sandbox?: boolean;
                ext?: { [key: string]: unknown };
            },
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onGetCreativeDeliveryStatusChange?: (
            response: {
                context_id?: string;
                context?: {};
                task_id?: string;
                status: TaskStatus;
                message?: string;
                timestamp?: string;
                replayed?: boolean;
                adcp_error?: {
                    code: string;
                    message: string;
                    field?: string;
                    suggestion?: string;
                    retry_after?: number;
                    issues?: {
                        pointer: string;
                        message: string;
                        keyword: string;
                        schemaPath?: string;
                        schema_id?: string;
                        discriminator?: { property_name: ...; value: ... }[];
                    }[];
                    details?: {};
                    recovery?: "transient"
                    | "correctable"
                    | "terminal";
                    source?: "producer" | "sdk";
                    sdk_id?: string;
                };
                push_notification_config?: {
                    url: string;
                    operation_id?: string;
                    token?: string;
                    authentication?: {
                        schemes: [AuthenticationScheme];
                        credentials: string;
                    };
                };
                governance_context?: string;
                payload?: {};
                adcp_version?: string;
                adcp_major_version?: number;
                account_id?: string;
                media_buy_id?: string;
                currency: string;
                reporting_period: { start: string; end: string; timezone?: string };
                creatives: {
                    creative_id: string;
                    media_buy_id?: string;
                    format_kind?: CanonicalFormatKind;
                    format_option_ref?:
                        | {
                            scope: "publisher";
                            publisher_domain: string;
                            format_option_id: string;
                        }
                        | {
                            scope: "product";
                            format_option_id: string;
                            publisher_domain?: undefined;
                        };
                    totals?: {
                        impressions?: number;
                        spend?: number;
                        clicks?: number;
                        ctr?: number;
                        views?: number;
                        completed_views?: number;
                        completion_rate?: number
                        | null;
                        conversions?: number;
                        conversion_value?: number;
                        commissionable_value?: number;
                        roas?: number;
                        cost_per_acquisition?: number;
                        new_to_brand_rate?: number;
                        leads?: number;
                        incremental_sales_lift?: number;
                        brand_lift?: number;
                        foot_traffic?: number;
                        conversion_lift?: number;
                        brand_search_lift?: number;
                        plays?: number;
                        by_event_type?: {
                            event_type: EventType;
                            event_source_id?: (...) | (...);
                            count: number;
                            value?: (...) | (...);
                        }[];
                        grps?: number;
                        reach?: number;
                        reach_unit?: ReachUnit;
                        reach_window?: {
                            kind: "cumulative"
                            | "period"
                            | "rolling";
                            period?: { interval: ...; unit: ... };
                        };
                        frequency?: number;
                        quartile_data?: | {
                            q1_views?: number;
                            q2_views?: number;
                            q3_views?: number;
                            q4_views?: number;
                        }
                        | null;
                        dooh_metrics?: {
                            loop_plays?: number;
                            screens_used?: number;
                            screen_time_seconds?: number;
                            sov_achieved?: number;
                            calculation_notes?: string;
                            venue_breakdown?: (...)[];
                        };
                        viewability?: {
                            vendor?: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            measurable_impressions?: number;
                            viewable_impressions?: number;
                            viewable_rate?: number;
                            viewed_seconds?: number;
                            standard?: ViewabilityStandard;
                        };
                        engagements?: number;
                        follows?: number;
                        saves?: number;
                        profile_visits?: number;
                        engagement_rate?: number;
                        cost_per_click?: number;
                        cost_per_completed_view?: number;
                        cpm?: number;
                        downloads?: number;
                        units_sold?: number;
                        new_to_brand_units?: number;
                        by_action_source?: {
                            action_source: ActionSource;
                            event_source_id?: (...)
                            | (...);
                            count: number;
                            value?: (...) | (...);
                        }[];
                        vendor_metric_values?: {
                            vendor: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            metric_id: string;
                            value: number;
                            unit?: (...)
                            | (...);
                            measurable_impressions?: (...) | (...);
                            breakdown?: (...) | (...);
                        }[];
                    };
                    variant_count?: number;
                    variants: {
                        impressions?: number;
                        spend?: number;
                        clicks?: number;
                        ctr?: number;
                        views?: number;
                        completed_views?: number;
                        completion_rate?: number
                        | null;
                        conversions?: number;
                        conversion_value?: number;
                        commissionable_value?: number;
                        roas?: number;
                        cost_per_acquisition?: number;
                        new_to_brand_rate?: number;
                        leads?: number;
                        incremental_sales_lift?: number;
                        brand_lift?: number;
                        foot_traffic?: number;
                        conversion_lift?: number;
                        brand_search_lift?: number;
                        plays?: number;
                        by_event_type?: {
                            event_type: EventType;
                            event_source_id?: (...) | (...);
                            count: number;
                            value?: (...) | (...);
                        }[];
                        grps?: number;
                        reach?: number;
                        reach_unit?: ReachUnit;
                        reach_window?: {
                            kind: "cumulative"
                            | "period"
                            | "rolling";
                            period?: { interval: ...; unit: ... };
                        };
                        frequency?: number;
                        quartile_data?: | {
                            q1_views?: number;
                            q2_views?: number;
                            q3_views?: number;
                            q4_views?: number;
                        }
                        | null;
                        dooh_metrics?: {
                            loop_plays?: number;
                            screens_used?: number;
                            screen_time_seconds?: number;
                            sov_achieved?: number;
                            calculation_notes?: string;
                            venue_breakdown?: (...)[];
                        };
                        viewability?: {
                            vendor?: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            measurable_impressions?: number;
                            viewable_impressions?: number;
                            viewable_rate?: number;
                            viewed_seconds?: number;
                            standard?: ViewabilityStandard;
                        };
                        engagements?: number;
                        follows?: number;
                        saves?: number;
                        profile_visits?: number;
                        engagement_rate?: number;
                        cost_per_click?: number;
                        cost_per_completed_view?: number;
                        cpm?: number;
                        downloads?: number;
                        units_sold?: number;
                        new_to_brand_units?: number;
                        by_action_source?: {
                            action_source: ActionSource;
                            event_source_id?: (...)
                            | (...);
                            count: number;
                            value?: (...) | (...);
                        }[];
                        vendor_metric_values?: {
                            vendor: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            metric_id: string;
                            value: number;
                            unit?: (...)
                            | (...);
                            measurable_impressions?: (...) | (...);
                            breakdown?: (...) | (...);
                        }[];
                        variant_id: string;
                        locale_variant_id?: string;
                        manifest?: | {
                            format_kind?: CanonicalFormatKind;
                            format_option_ref?: | {
                                scope: ...;
                                publisher_domain: ...;
                                format_option_id: ...;
                            }
                            | { scope: ...; format_option_id: ...; publisher_domain?: ... };
                            assets: {
                                [key: string]:
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...);
                            };
                            brand?: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            rights?: (...)[];
                            industry_identifiers?: (...)[];
                            provenance?: {
                                digital_source_type?: ...;
                                synthetic_depiction?: ...;
                                ai_tool?: ...;
                                human_oversight?: ...;
                                declared_by?: ...;
                                declared_at?: ...;
                                created_time?: ...;
                                c2pa?: ...;
                                embedded_provenance?: ...;
                                watermarks?: ...;
                                disclosure?: ...;
                                verification?: ...;
                                ext?: ...;
                            };
                            ext?: { [key: ...]: ... };
                        }
                        | {
                            format_kind?: CanonicalFormatKind;
                            format_option_ref?: | {
                                scope: ...;
                                publisher_domain: ...;
                                format_option_id: ...;
                            }
                            | { scope: ...; format_option_id: ...; publisher_domain?: ... };
                            assets: {
                                [key: string]:
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...);
                            };
                            brand?: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            rights?: (...)[];
                            industry_identifiers?: (...)[];
                            provenance?: {
                                digital_source_type?: ...;
                                synthetic_depiction?: ...;
                                ai_tool?: ...;
                                human_oversight?: ...;
                                declared_by?: ...;
                                declared_at?: ...;
                                created_time?: ...;
                                c2pa?: ...;
                                embedded_provenance?: ...;
                                watermarks?: ...;
                                disclosure?: ...;
                                verification?: ...;
                                ext?: ...;
                            };
                            ext?: { [key: ...]: ... };
                        };
                        generation_context?: {
                            context_type?: string;
                            artifact?: { property_id: ...; artifact_id: ... };
                            ext?: { [key: ...]: ... };
                        };
                    }[];
                }[];
                pagination?: {
                    limit: number;
                    offset: number;
                    has_more: boolean;
                    total_count?: number;
                    total?: number;
                };
                errors?: {
                    code: string;
                    message: string;
                    field?: string;
                    suggestion?: string;
                    retry_after?: number;
                    issues?: {
                        pointer: string;
                        message: string;
                        keyword: string;
                        schemaPath?: string;
                        schema_id?: string;
                        discriminator?: (...)[];
                    }[];
                    details?: {};
                    recovery?: "transient"
                    | "correctable"
                    | "terminal";
                    source?: "producer" | "sdk";
                    sdk_id?: string;
                }[];
                ext?: { [key: string]: unknown };
            },
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onProvidePerformanceFeedbackStatusChange?: (
            response: ProvidePerformanceFeedbackResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onGetSignalsStatusChange?: (
            response: GetSignalsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onActivateSignalStatusChange?: (
            response: ActivateSignalResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onBuildCreativeLegacyStatusChange?: (
            response: LegacyBuildCreativeResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onListAccountsStatusChange?: (
            response: ListAccountsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onSyncAccountsStatusChange?: (
            response: SyncAccountsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onSyncAudiencesStatusChange?: (
            response: SyncAudiencesResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onCreatePropertyListStatusChange?: (
            response: CreatePropertyListResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onGetPropertyListStatusChange?: (
            response: GetPropertyListResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onUpdatePropertyListStatusChange?: (
            response: UpdatePropertyListResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onListPropertyListsStatusChange?: (
            response: ListPropertyListsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onDeletePropertyListStatusChange?: (
            response: DeletePropertyListResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onListContentStandardsLegacyStatusChange?: (
            response: LegacyListContentStandardsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onGetContentStandardsLegacyStatusChange?: (
            response: LegacyGetContentStandardsResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onCalibrateContentLegacyStatusChange?: (
            response: LegacyCalibrateContentResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onValidateContentDeliveryLegacyStatusChange?: (
            response: LegacyValidateContentDeliveryResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onSIGetOfferingStatusChange?: (
            response: SIGetOfferingResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onSIInitiateSessionStatusChange?: (
            response: SIInitiateSessionResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onSISendMessageStatusChange?: (
            response: SISendMessageResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onSITerminateSessionStatusChange?: (
            response: SITerminateSessionResponse,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onTaskStatusChange?: (
            response: any,
            metadata: WebhookMetadata,
        ) => void | Promise<void>;
        onActivity?: (activity: Activity) => void | Promise<void>;
        webhookDedup?: { backend: IdempotencyBackend; ttlSeconds?: number };
        onMediaBuyDeliveryNotification?: (
            notification: MediaBuyDeliveryNotification,
            metadata: NotificationMetadata,
        ) => void | Promise<void>;
    }
    Index

    Properties

    onGetProductsStatusChange?: GetProductsStatusChangeHandler
    onListCreativeFormatsLegacyStatusChange?: (
        data: LegacyListCreativeFormatsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onCreateMediaBuyStatusChange?: CreateMediaBuyStatusChangeHandler
    onUpdateMediaBuyStatusChange?: UpdateMediaBuyStatusChangeHandler
    onSyncCreativesStatusChange?: SyncCreativesStatusChangeHandler
    onListCreativesStatusChange?: (
        response: CanonicalListCreativesResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onPreviewCreativeStatusChange?: (
        response: CanonicalCreativeResponse<LegacyPreviewCreativeResponse>,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onPreviewCreativeLegacyStatusChange?: (
        response: LegacyPreviewCreativeResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>

    Use onPreviewCreativeStatusChange.

    onGetMediaBuysStatusChange?: (
        response: {
            context_id?: string;
            context?: {};
            task_id?: string;
            status: TaskStatus;
            message?: string;
            timestamp?: string;
            replayed?: boolean;
            adcp_error?: {
                code: string;
                message: string;
                field?: string;
                suggestion?: string;
                retry_after?: number;
                issues?: {
                    pointer: string;
                    message: string;
                    keyword: string;
                    schemaPath?: string;
                    schema_id?: string;
                    discriminator?: { property_name: ...; value: ... }[];
                }[];
                details?: {};
                recovery?: "transient"
                | "correctable"
                | "terminal";
                source?: "producer" | "sdk";
                sdk_id?: string;
            };
            push_notification_config?: {
                url: string;
                operation_id?: string;
                token?: string;
                authentication?: { schemes: [AuthenticationScheme]; credentials: string };
            };
            governance_context?: string;
            payload?: {};
            adcp_version?: string;
            adcp_major_version?: number;
            media_buys: {
                media_buy_id: string;
                name?: string;
                accepted_proposal_id?: string;
                accepted_proposal_terms_digest?: string;
                accepted_proposal?: {
                    proposal_id: string;
                    proposal_kind: | "new_media_buy"
                    | "media_buy_update"
                    | "media_buy_cancellation";
                    parent_proposal_id?: string;
                    media_buy_id: string;
                    opportunity_id?: string;
                    base_media_buy_revision?: number;
                    proposal_status: "accepted";
                    accepted_at?: string;
                    expires_at?: string;
                    name: string;
                    description?: string;
                    brief_alignment?: string;
                    commercial_terms: {
                        source_feed_version?: string;
                        source_pricing_version?: string;
                        brand: {
                            domain: string;
                            brand_id?: string;
                            countries?: [(...), ...(...)[]];
                        };
                        advertiser_industry?: AdvertiserIndustry;
                        purchases: [
                            {
                                product_id: string;
                                pricing_option_id: string;
                                pricing?: (...)
                                | (...);
                                format_option_refs?: (...) | (...);
                                catalog_ids?: (...) | (...);
                                budget?: (...) | (...);
                                daily_budget_cap?: (...) | (...);
                                min_spend_target?: (...) | (...);
                                impressions?: (...) | (...);
                                start_time?: (...) | (...);
                                end_time?: (...) | (...);
                                pacing?: (...) | (...);
                                bidding?: (...) | (...);
                                targeting_overlay?: (...) | (...);
                                optimization_goals?: (...) | (...);
                                audience_evidence_requirements?: (...) | (...);
                                audience_evidence_pins?: (...) | (...);
                                agency_estimate_number?: (...) | (...);
                                context?: (...) | (...);
                                ext?: (...) | (...);
                                measurement_terms?: (...) | (...);
                                performance_standards?: (...) | (...);
                            },
                            ...{
                                product_id: string;
                                pricing_option_id: string;
                                pricing?: (...)
                                | (...);
                                format_option_refs?: (...) | (...);
                                catalog_ids?: (...) | (...);
                                budget?: (...) | (...);
                                daily_budget_cap?: (...) | (...);
                                min_spend_target?: (...) | (...);
                                impressions?: (...) | (...);
                                start_time?: (...) | (...);
                                end_time?: (...) | (...);
                                pacing?: (...) | (...);
                                bidding?: (...) | (...);
                                targeting_overlay?: (...) | (...);
                                optimization_goals?: (...) | (...);
                                audience_evidence_requirements?: (...) | (...);
                                audience_evidence_pins?: (...) | (...);
                                agency_estimate_number?: (...) | (...);
                                context?: (...) | (...);
                                ext?: (...) | (...);
                                measurement_terms?: (...) | (...);
                                performance_standards?: (...) | (...);
                            }[],
                        ];
                        start_time: string;
                        end_time: string;
                        total_budget?: { amount: number; currency: string };
                        daily_budget_cap?: number;
                        budget_cap_timezone?: string;
                        budget_allocation?:
                            | { mode: "fixed" }
                            | {
                                mode: "seller_optimized";
                                optimization_goals: [(...), ...(...)[]];
                            };
                        pacing?: Pacing;
                        bidding?: {
                            automatic?: (...)
                            | (...);
                            bid_amount?: (...) | (...);
                            max_bid?: (...) | (...);
                            cost_per?: (...) | (...);
                            roas?: (...) | (...);
                        };
                        invoice_recipient?: {
                            legal_name: string;
                            vat_id?: (...)
                            | (...);
                            tax_id?: (...) | (...);
                            registration_number?: (...) | (...);
                            address?: (...) | (...);
                            contacts?: (...) | (...);
                            bank?: (...) | (...);
                            ext?: (...) | (...);
                        };
                        purchase_order_ref?: string;
                        agency_estimate_number?: string;
                        reporting_commitments?: [
                            { purchase_index: ...; metrics: ... },
                            ...{ purchase_index: ...; metrics: ... }[],
                        ];
                        cancellation_terms?: {
                            effective_at: string;
                            fee?: (...) | (...);
                            reason?: (...) | (...);
                        };
                    };
                    terms_digest: string;
                    insertion_order?: {
                        io_id: string;
                        terms?: {
                            advertiser?: ...;
                            publisher?: ...;
                            total_budget?: ...;
                            flight_start?: ...;
                            flight_end?: ...;
                            payment_terms?: ...;
                        };
                        terms_url?: string;
                        signing_url?: string;
                        requires_signature: boolean;
                    };
                };
                account?: {
                    account_id: string;
                    name: string;
                    advertiser?: string;
                    billing_proxy?: string;
                    status: AccountStatus;
                    brand?: {
                        domain: string;
                        brand_id?: string;
                        countries?: (...)[];
                        industries?: (...)[];
                        data_subject_contestation?: { url?: ...; email?: ...; languages?: ... };
                        brand_kit_override?: {
                            logo?: ...;
                            colors?: ...;
                            voice?: ...;
                            tagline?: ...;
                        };
                    };
                    operator?: string;
                    operator_unit?: { id: string; name?: string };
                    revision?: number;
                    identity_change?:
                        | {
                            status: "pending_approval";
                            requested_operator_identity: {
                                operator: string;
                                operator_unit?: (...)
                                | (...);
                            };
                            requested_at?: string;
                        }
                        | {
                            status: "rejected";
                            requested_operator_identity: {
                                operator: string;
                                operator_unit?: (...)
                                | (...);
                            };
                            requested_at?: string;
                            reason: string;
                        };
                    currency?: string;
                    timezone?: string;
                    billing?: BillingParty;
                    billing_entity?: {
                        legal_name: string;
                        vat_id?: string;
                        tax_id?: string;
                        registration_number?: string;
                        address?: {
                            street: ...;
                            city: ...;
                            postal_code: ...;
                            region?: ...;
                            country: ...;
                        };
                        contacts?: (...)[];
                        bank?: {
                            account_holder: ...;
                            iban?: ...;
                            bic?: ...;
                            routing_number?: ...;
                            account_number?: ...;
                        };
                        ext?: { [key: ...]: ... };
                    };
                    destination_billing_entity?: {};
                    rate_card?: string;
                    payment_terms?: PaymentTerms;
                    credit_limit?: { amount: number; currency: string };
                    setup?: { url?: string; message: string; expires_at?: string };
                    account_scope?: AccountScope;
                    governance_agents?: [{ url: string }];
                    reporting_bucket?: {
                        protocol: CloudStorageProtocol;
                        bucket: string;
                        prefix?: string;
                        region?: string;
                        format?: "jsonl" | "csv" | "parquet" | "avro" | "orc";
                        compression?: "none" | "gzip";
                        file_retention_days: number;
                        setup_instructions?: string;
                    };
                    sandbox?: boolean;
                    notification_configs?: | []
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ]
                    | [
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                        {
                            subscriber_id: string;
                            url: string;
                            event_types: [(...), ...(...)[]];
                            product_payload_view?: (...) | (...) | (...);
                            authentication?: (...) | (...);
                            active?: (...) | (...) | (...);
                            ext?: (...) | (...);
                        },
                    ];
                    webhook_activity?: {
                        idempotency_key: string;
                        notification_id?: (...)
                        | (...);
                        subscriber_id?: (...) | (...);
                        fired_at: string;
                        completed_at?: (...) | (...) | (...);
                        notification_type: NotificationType;
                        sequence_number?: (...) | (...);
                        attempt: number;
                        status: (...) | (...) | (...) | (...) | (...);
                        url: string;
                        http_status_code?: (...) | (...) | (...);
                        response_time_ms?: (...) | (...) | (...);
                        payload_size_bytes?: (...) | (...);
                        error_message?: (...) | (...) | (...);
                        ext?: (...) | (...);
                    }[];
                    ext?: { [key: string]: unknown };
                };
                invoice_recipient?: {
                    legal_name: string;
                    vat_id?: string;
                    tax_id?: string;
                    registration_number?: string;
                    address?: {
                        street: string;
                        city: string;
                        postal_code: string;
                        region?: string;
                        country: string;
                    };
                    contacts?: {
                        role: (...)
                        | (...)
                        | (...)
                        | (...);
                        name?: (...) | (...);
                        email?: (...) | (...);
                        phone?: (...) | (...);
                    }[];
                    bank?: {
                        account_holder: string;
                        iban?: string;
                        bic?: string;
                        routing_number?: string;
                        account_number?: string;
                    };
                    ext?: { [key: string]: unknown };
                };
                status: MediaBuyStatus;
                status_as_of?: string
                | null;
                health?: "ok" | "impaired";
                impairments?: {
                    impairment_id: string;
                    resource_type:
                        | "creative"
                        | "property"
                        | "audience"
                        | "catalog_item"
                        | "event_source";
                    resource_id: string;
                    package_ids: [string, ...string[]];
                    transition: { from?: string; to: ImpairmentOfflineState };
                    reason_code: ImpairmentReasonCode;
                    reason?: string;
                    observed_at: string;
                    remediation?: string;
                }[];
                rejection_reason?: string;
                currency: string;
                total_budget?: number;
                daily_budget_cap?: number;
                budget_cap_timezone?: string;
                budget_allocation?: | { mode: "fixed" }
                | {
                    mode: "seller_optimized";
                    optimization_goals: [
                        | {
                            kind: "metric";
                            metric: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                            reach_unit?: (...) | (...);
                            target_frequency?: (...) | (...);
                            view_duration_seconds?: (...) | (...);
                            target?: (...) | (...) | (...);
                            priority?: (...) | (...);
                        }
                        | {
                            kind: "event";
                            event_sources: [(...), ...(...)[]];
                            target?: (...) | (...) | (...) | (...);
                            attribution_window?: (...) | (...);
                            priority?: (...) | (...);
                        }
                        | {
                            kind: "vendor_metric";
                            vendor: {
                                domain: ...;
                                brand_id?: ...;
                                countries?: ...;
                                industries?: ...;
                                data_subject_contestation?: ...;
                                brand_kit_override?: ...;
                            };
                            metric_id: string;
                            target?: (...)
                            | (...)
                            | (...);
                            priority?: (...) | (...);
                        },
                        ...(
                            | {
                                kind: "metric";
                                metric: | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                                reach_unit?: (...) | (...);
                                target_frequency?: (...) | (...);
                                view_duration_seconds?: (...) | (...);
                                target?: (...) | (...) | (...);
                                priority?: (...) | (...);
                            }
                            | {
                                kind: "event";
                                event_sources: [(...), ...(...)[]];
                                target?: (...) | (...) | (...) | (...);
                                attribution_window?: (...) | (...);
                                priority?: (...) | (...);
                            }
                            | {
                                kind: "vendor_metric";
                                vendor: {
                                    domain: ...;
                                    brand_id?: ...;
                                    countries?: ...;
                                    industries?: ...;
                                    data_subject_contestation?: ...;
                                    brand_kit_override?: ...;
                                };
                                metric_id: string;
                                target?: (...)
                                | (...)
                                | (...);
                                priority?: (...) | (...);
                            }
                        )[],
                    ];
                };
                pacing?: Pacing;
                bidding?: {
                    automatic?: true;
                    bid_amount?: number;
                    max_bid?: number;
                    cost_per?: { amount: number; strength: "cap"
                    | "target" };
                    roas?: { value: number; strength: "target" | "floor" };
                };
                start_time?: string;
                end_time?: string;
                creative_deadline?: string;
                confirmed_at?: string
                | null;
                cancellation?: {
                    canceled_at: string;
                    canceled_by: CanceledBy;
                    reason?: string;
                };
                revision?: number;
                created_at?: string;
                updated_at?: string;
                context?: {};
                valid_actions?: MediaBuyValidAction[];
                available_actions?: (
                    | {
                        action: MediaBuyValidAction;
                        mode: MediaBuyActionMode;
                        task?: "sync_creatives"
                        | "control_media_buy"
                        | "refine_proposals";
                        sla?: { response_max?: ...; completion_max?: ... };
                        terms_ref?: string;
                    }
                    | {
                        task: "control_media_buy";
                        action: | "pause"
                        | "resume"
                        | "cancel"
                        | "increase_budget"
                        | "decrease_budget"
                        | "reallocate_budget"
                        | "update_budget_allocation"
                        | "update_targeting"
                        | "update_pacing"
                        | "update_bidding"
                        | "update_frequency_caps"
                        | "update_catalog_assignments"
                        | "update_keywords"
                        | "update_optimization_goals"
                        | "update_impression_goal"
                        | "update_spend_target"
                        | "update_reporting_webhook"
                        | "remove_packages"
                        | "update_name";
                        mode: CanonicalMediaBuyActionMode;
                        sla?: { response_max?: ...; completion_max?: ... };
                        terms_ref?: string;
                    }
                    | {
                        task: "refine_proposals";
                        action: | "cancel"
                        | "extend_flight"
                        | "shorten_flight"
                        | "update_flight_dates"
                        | "increase_budget"
                        | "decrease_budget"
                        | "reallocate_budget"
                        | "update_budget_allocation"
                        | "update_targeting"
                        | "update_pacing"
                        | "update_bidding"
                        | "update_frequency_caps"
                        | "add_packages"
                        | "remove_packages";
                        mode: CanonicalMediaBuyActionMode;
                        sla?: { response_max?: ...; completion_max?: ... };
                        terms_ref?: string;
                    }
                    | {
                        task: "sync_creatives";
                        action: | "replace_creative"
                        | "update_creative_assignments"
                        | "remove_creative";
                        mode: CanonicalMediaBuyActionMode;
                        sla?: { response_max?: ...; completion_max?: ... };
                        terms_ref?: string;
                    }
                )[];
                webhook_activity?: {
                    idempotency_key: string;
                    notification_id?: string;
                    subscriber_id?: string;
                    fired_at: string;
                    completed_at?: string
                    | null;
                    notification_type: NotificationType;
                    sequence_number?: number;
                    attempt: number;
                    status:
                        | "failed"
                        | "pending"
                        | "success"
                        | "timeout"
                        | "connection_error";
                    url: string;
                    http_status_code?: number
                    | null;
                    response_time_ms?: number | null;
                    payload_size_bytes?: number;
                    error_message?: string | null;
                    ext?: { [key: string]: unknown };
                }[];
                history?: {
                    revision: number;
                    timestamp: string;
                    actor?: string;
                    action: string;
                    summary?: string;
                    package_id?: string;
                    ext?: { [key: string]: unknown };
                }[];
                packages: {
                    package_id: string;
                    product_id?: string;
                    budget?: number;
                    min_spend_target?: number;
                    daily_budget_cap?: number;
                    currency?: string;
                    bid_price?: number;
                    bidding?: {
                        automatic?: true;
                        bid_amount?: number;
                        max_bid?: number;
                        cost_per?: { amount: ...; strength: ... };
                        roas?: { value: ...; strength: ... };
                    };
                    optimization_goals?: (
                        | {
                            kind: ...;
                            metric: ...;
                            reach_unit?: ...;
                            target_frequency?: ...;
                            view_duration_seconds?: ...;
                            target?: ...;
                            priority?: ...;
                        }
                        | {
                            kind: ...;
                            event_sources: ...;
                            target?: ...;
                            attribution_window?: ...;
                            priority?: ...;
                        }
                        | {
                            kind: ...;
                            vendor: ...;
                            metric_id: ...;
                            target?: ...;
                            priority?: ...;
                        }
                    )[];
                    format_option_refs?: (
                        | { scope: ...; publisher_domain: ...; format_option_id: ... }
                        | { scope: ...; format_option_id: ...; publisher_domain?: ... }
                    )[];
                    format_kind?: CanonicalFormatKind;
                    params?: {};
                    impressions?: number;
                    pacing?: Pacing;
                    targeting_overlay?: {
                        geo_countries?: [(...), ...(...)[]];
                        geo_countries_exclude?: [(...), ...(...)[]];
                        geo_regions?: [(...), ...(...)[]];
                        geo_regions_exclude?: [(...), ...(...)[]];
                        geo_metros?: [(...), ...(...)[]];
                        geo_metros_exclude?: [(...), ...(...)[]];
                        geo_postal_areas?: [(...), ...(...)[]];
                        geo_postal_areas_exclude?: [(...), ...(...)[]];
                        geo_places?: [(...), ...(...)[]];
                        geo_places_exclude?: [(...), ...(...)[]];
                        daypart_targets?: [(...), ...(...)[]];
                        axe_include_segment?: string;
                        axe_exclude_segment?: string;
                        audience_include?: [(...), ...(...)[]];
                        audience_exclude?: [(...), ...(...)[]];
                        signal_targeting_groups?: { operator: ...; groups: ... };
                        signal_targeting?: [(...), ...(...)[]];
                        demographics?: { age: ... };
                        frequency_cap?: {
                            suppress?: ...;
                            suppress_minutes?: ...;
                            max_impressions?: ...;
                            per?: ...;
                            window?: ...;
                        };
                        property_list?: { agent_url: ...; list_id: ...; auth_token?: ... };
                        property_list_exclude?: {
                            agent_url: ...;
                            list_id: ...;
                            auth_token?: ...;
                        };
                        collection_list?: { agent_url: ...; list_id: ...; auth_token?: ... };
                        collection_list_exclude?: {
                            agent_url: ...;
                            list_id: ...;
                            auth_token?: ...;
                        };
                        placement_selection?: | { mode: ...; placement_refs: ...; ext?: ... }
                        | { mode: ...; ext?: ... };
                        age_restriction?: {
                            min: ...;
                            verification_required?: ...;
                            accepted_methods?: ...;
                        };
                        device_platform?: [(...), ...(...)[]];
                        device_platform_exclude?: [(...), ...(...)[]];
                        device_type?: [(...), ...(...)[]];
                        device_type_exclude?: [(...), ...(...)[]];
                        browser?: [(...), ...(...)[]];
                        browser_exclude?: [(...), ...(...)[]];
                        store_catchments?: [(...), ...(...)[]];
                        geo_proximity?: [(...), ...(...)[]];
                        language?: [(...), ...(...)[]];
                        keyword_targets?: [(...), ...(...)[]];
                        negative_keywords?: [(...), ...(...)[]];
                    };
                    targeting_resolution?: {
                        demographics: {
                            requested: { age: ... };
                            applied: { age: ... };
                            equivalent: true;
                            execution: (...) | (...) | (...);
                            applied_bases?: (...) | (...);
                            applied_verification_methods?: (...) | (...);
                            ext?: (...) | (...);
                        };
                        ext?: { [key: ...]: ... };
                    };
                    start_time?: string;
                    end_time?: string;
                    paused?: boolean;
                    canceled?: boolean;
                    cancellation?: {
                        canceled_at: string;
                        canceled_by: CanceledBy;
                        reason?: string;
                    };
                    creative_deadline?: string;
                    context?: {};
                    creative_approvals?: {
                        creative_id: string;
                        approval_status?: (...)
                        | (...);
                        rejection_reason?: (...) | (...);
                        approval_scopes?: (...) | (...);
                        indicators?: (...) | (...);
                        indicator_types_evaluated?: (...) | (...);
                        indicators_as_of?: (...) | (...);
                        indicators_evaluated_scope?: (...) | (...);
                    }[];
                    formats_to_provide?: (
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                    )[];
                    formats_pending?: (
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                        | {
                            format_option_id?: ...;
                            publisher_domain?: ...;
                            display_name?: ...;
                            sample_render_url?: ...;
                            applies_to_channels?: ...;
                            seller_preference?: ...;
                            locale_policy?: ...;
                            canonical_formats_only?: ...;
                            experimental?: ...;
                            format_shape?: ...;
                            format_schema?: ...;
                            format_kind: ...;
                            params: ...;
                        }
                    )[];
                    snapshot_unavailable_reason?: SnapshotUnavailableReason;
                    snapshot?: {
                        as_of: string;
                        staleness_seconds: number;
                        impressions: number;
                        spend: number;
                        currency?: string;
                        clicks?: number;
                        pacing_index?: number;
                        delivery_status?: DeliveryStatus;
                        ext?: { [key: ...]: ... };
                    };
                    ext?: { [key: string]: unknown };
                    indicator_types_evaluated?: (
                        | "creative_diversity_low"
                        | "audience_saturation"
                        | "inventory_shortfall_forecast"
                        | "pacing_risk"
                        | "budget_constrained"
                    )[];
                    indicators?: { type?: (...)
                    | (...)
                    | (...)
                    | (...)
                    | (...)
                    | (...) }[];
                }[];
                ext?: { [key: string]: unknown };
                indicator_types_evaluated?: "budget_constrained"[];
                indicators?: { type?: "budget_constrained" }[];
            }[];
            errors?: {
                code: string;
                message: string;
                field?: string;
                suggestion?: string;
                retry_after?: number;
                issues?: {
                    pointer: string;
                    message: string;
                    keyword: string;
                    schemaPath?: string;
                    schema_id?: string;
                    discriminator?: (...)[];
                }[];
                details?: {};
                recovery?: "transient"
                | "correctable"
                | "terminal";
                source?: "producer" | "sdk";
                sdk_id?: string;
            }[];
            pagination?: { has_more: boolean; cursor?: string; total_count?: number };
            sandbox?: boolean;
            ext?: { [key: string]: unknown };
        },
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onGetMediaBuyDeliveryStatusChange?: (
        response: {
            context_id?: string;
            context?: {};
            task_id?: string;
            status: TaskStatus;
            message?: string;
            timestamp?: string;
            replayed?: boolean;
            adcp_error?: {
                code: string;
                message: string;
                field?: string;
                suggestion?: string;
                retry_after?: number;
                issues?: {
                    pointer: string;
                    message: string;
                    keyword: string;
                    schemaPath?: string;
                    schema_id?: string;
                    discriminator?: { property_name: ...; value: ... }[];
                }[];
                details?: {};
                recovery?: "transient"
                | "correctable"
                | "terminal";
                source?: "producer" | "sdk";
                sdk_id?: string;
            };
            push_notification_config?: {
                url: string;
                operation_id?: string;
                token?: string;
                authentication?: { schemes: [AuthenticationScheme]; credentials: string };
            };
            governance_context?: string;
            payload?: {};
            adcp_version?: string;
            adcp_major_version?: number;
            notification_type?: | "scheduled"
            | "final"
            | "delayed"
            | "adjusted"
            | "window_update";
            partial_data?: boolean;
            unavailable_count?: number;
            sequence_number?: number;
            next_expected_at?: string;
            reporting_period: { start: string; end: string };
            currency?: string;
            attribution_window?: {
                post_click?: {
                    interval: number;
                    unit: "campaign" | "seconds" | "minutes" | "hours" | "days";
                };
                post_view?: {
                    interval: number;
                    unit: "campaign"
                    | "seconds"
                    | "minutes"
                    | "hours"
                    | "days";
                };
                model?: AttributionModel;
            };
            aggregated_totals?: {
                impressions: number;
                spend: number;
                clicks?: number;
                completed_views?: number;
                views?: number;
                conversions?: number;
                conversion_value?: number;
                commissionable_value?: number;
                roas?: number;
                new_to_brand_rate?: number;
                cost_per_acquisition?: number;
                completion_rate?: number
                | null;
                reach?: number;
                reach_unit?: ReachUnit;
                frequency?: number;
                media_buy_count: number;
                metric_aggregates?: (
                    | {
                        scope: "standard";
                        metric_id: AvailableMetric;
                        qualifier?: {
                            viewability_standard?: ...;
                            completion_source?: ...;
                            attribution_methodology?: ...;
                            attribution_window?: ...;
                            lift_dimension?: ...;
                        };
                        value: number;
                        measurable_impressions?: number;
                        viewable_impressions?: number;
                        impressions?: number;
                        completed_views?: number;
                        spend?: number;
                        conversions?: number;
                        conversion_value?: number;
                        clicks?: number;
                    }
                    | {
                        scope: "vendor";
                        vendor: {
                            domain: string;
                            brand_id?: (...)
                            | (...);
                            countries?: (...) | (...);
                            industries?: (...) | (...);
                            data_subject_contestation?: (...) | (...);
                            brand_kit_override?: (...) | (...);
                        };
                        metric_id: string;
                        qualifier?: {};
                        value: number;
                        measurable_impressions?: number;
                    }
                )[];
            };
            media_buy_deliveries: {
                media_buy_id: string;
                status: | "active"
                | "rejected"
                | "failed"
                | "pending"
                | "completed"
                | "pending_creatives"
                | "pending_start"
                | "paused"
                | "canceled"
                | "reporting_delayed";
                expected_availability?: string;
                is_adjusted?: boolean;
                is_final?: boolean;
                finalized_at?: string;
                pricing_model?: PricingModel;
                pacing_index?: number;
                totals: {
                    impressions?: number;
                    spend?: number;
                    clicks?: number;
                    ctr?: number;
                    views?: number;
                    completed_views?: number;
                    completion_rate?: number
                    | null;
                    conversions?: number;
                    conversion_value?: number;
                    commissionable_value?: number;
                    roas?: number;
                    cost_per_acquisition?: number;
                    new_to_brand_rate?: number;
                    leads?: number;
                    incremental_sales_lift?: number;
                    brand_lift?: number;
                    foot_traffic?: number;
                    conversion_lift?: number;
                    brand_search_lift?: number;
                    plays?: number;
                    by_event_type?: {
                        event_type: EventType;
                        event_source_id?: string;
                        count: number;
                        value?: number;
                    }[];
                    grps?: number;
                    reach?: number;
                    reach_unit?: ReachUnit;
                    reach_window?: {
                        kind: "cumulative"
                        | "period"
                        | "rolling";
                        period?: {
                            interval: number;
                            unit: (...) | (...) | (...) | (...) | (...);
                        };
                    };
                    frequency?: number;
                    quartile_data?: | {
                        q1_views?: number;
                        q2_views?: number;
                        q3_views?: number;
                        q4_views?: number;
                    }
                    | null;
                    dooh_metrics?: {
                        loop_plays?: number;
                        screens_used?: number;
                        screen_time_seconds?: number;
                        sov_achieved?: number;
                        calculation_notes?: string;
                        venue_breakdown?: {
                            venue_id: ...;
                            venue_name?: ...;
                            venue_type?: ...;
                            impressions: ...;
                            loop_plays?: ...;
                            screens_used?: ...;
                        }[];
                    };
                    viewability?: {
                        vendor?: {
                            domain: string;
                            brand_id?: (...)
                            | (...);
                            countries?: (...) | (...);
                            industries?: (...) | (...);
                            data_subject_contestation?: (...) | (...);
                            brand_kit_override?: (...) | (...);
                        };
                        measurable_impressions?: number;
                        viewable_impressions?: number;
                        viewable_rate?: number;
                        viewed_seconds?: number;
                        standard?: ViewabilityStandard;
                    };
                    engagements?: number;
                    follows?: number;
                    saves?: number;
                    profile_visits?: number;
                    engagement_rate?: number;
                    cost_per_click?: number;
                    cost_per_completed_view?: number;
                    cpm?: number;
                    downloads?: number;
                    units_sold?: number;
                    new_to_brand_units?: number;
                    by_action_source?: {
                        action_source: ActionSource;
                        event_source_id?: string;
                        count: number;
                        value?: number;
                    }[];
                    vendor_metric_values?: {
                        vendor: {
                            domain: string;
                            brand_id?: (...)
                            | (...);
                            countries?: (...) | (...);
                            industries?: (...) | (...);
                            data_subject_contestation?: (...) | (...);
                            brand_kit_override?: (...) | (...);
                        };
                        metric_id: string;
                        value: number;
                        unit?: string;
                        measurable_impressions?: number;
                        breakdown?: {};
                    }[];
                    effective_rate?: number;
                };
                by_package: {
                    impressions?: number;
                    spend?: number;
                    clicks?: number;
                    ctr?: number;
                    views?: number;
                    completed_views?: number;
                    completion_rate?: number
                    | null;
                    conversions?: number;
                    conversion_value?: number;
                    commissionable_value?: number;
                    roas?: number;
                    cost_per_acquisition?: number;
                    new_to_brand_rate?: number;
                    leads?: number;
                    incremental_sales_lift?: number;
                    brand_lift?: number;
                    foot_traffic?: number;
                    conversion_lift?: number;
                    brand_search_lift?: number;
                    plays?: number;
                    by_event_type?: {
                        event_type: EventType;
                        event_source_id?: (...) | (...);
                        count: number;
                        value?: (...) | (...);
                    }[];
                    grps?: number;
                    reach?: number;
                    reach_unit?: ReachUnit;
                    reach_window?: {
                        kind: "cumulative"
                        | "period"
                        | "rolling";
                        period?: { interval: ...; unit: ... };
                    };
                    frequency?: number;
                    quartile_data?: | {
                        q1_views?: number;
                        q2_views?: number;
                        q3_views?: number;
                        q4_views?: number;
                    }
                    | null;
                    dooh_metrics?: {
                        loop_plays?: number;
                        screens_used?: number;
                        screen_time_seconds?: number;
                        sov_achieved?: number;
                        calculation_notes?: string;
                        venue_breakdown?: (...)[];
                    };
                    viewability?: {
                        vendor?: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        measurable_impressions?: number;
                        viewable_impressions?: number;
                        viewable_rate?: number;
                        viewed_seconds?: number;
                        standard?: ViewabilityStandard;
                    };
                    engagements?: number;
                    follows?: number;
                    saves?: number;
                    profile_visits?: number;
                    engagement_rate?: number;
                    cost_per_click?: number;
                    cost_per_completed_view?: number;
                    cpm?: number;
                    downloads?: number;
                    units_sold?: number;
                    new_to_brand_units?: number;
                    by_action_source?: {
                        action_source: ActionSource;
                        event_source_id?: (...)
                        | (...);
                        count: number;
                        value?: (...) | (...);
                    }[];
                    vendor_metric_values?: {
                        vendor: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        metric_id: string;
                        value: number;
                        unit?: (...)
                        | (...);
                        measurable_impressions?: (...) | (...);
                        breakdown?: (...) | (...);
                    }[];
                    package_id: string;
                    pacing_index?: number;
                    pricing_model?: PricingModel;
                    rate?: number;
                    currency?: string;
                    delivery_status?: DeliveryStatus;
                    paused?: boolean;
                    is_final?: boolean;
                    finalized_at?: string;
                    measurement_window?: string;
                    supersedes_window?: string;
                    missing_metrics?: (
                        | { scope: ...; metric_id: ...; qualifier?: ... }
                        | { scope: ...; vendor: ...; metric_id: ... }
                    )[];
                    by_catalog_item?: {
                        impressions?: (...) | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        content_id?: (...) | (...);
                        content_id_type?: (...) | (...);
                    }[];
                    by_creative?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        creative_id: string;
                        weight?: (...) | (...);
                    }[];
                    by_keyword?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        keyword?: (...) | (...);
                        match_type?: (...) | (...);
                    }[];
                    by_geo?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        geo_level?: (...) | (...);
                        system?: (...) | (...);
                        country?: (...) | (...);
                        geo_code?: (...) | (...);
                        geo_name?: (...) | (...);
                    }[];
                    by_geo_truncated?: boolean;
                    by_device_type?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        device_type?: (...) | (...);
                    }[];
                    by_device_type_truncated?: boolean;
                    by_device_platform?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        device_platform?: (...) | (...);
                    }[];
                    by_device_platform_truncated?: boolean;
                    by_audience?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        audience_id?: (...) | (...);
                        audience_source?: (...) | (...);
                        audience_name?: (...) | (...);
                    }[];
                    by_audience_truncated?: boolean;
                    by_demographic?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        demographic: string;
                        demographic_system: DemographicSystem;
                        age?: (...) | (...);
                    }[];
                    by_demographic_truncated?: boolean;
                    by_demographic_suppressed?: boolean;
                    by_placement?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        placement_id?: (...) | (...);
                        placement_name?: (...) | (...);
                        publisher_domain?: (...) | (...);
                    }[];
                    by_placement_truncated?: boolean;
                    by_spot?: {
                        impressions?: (...)
                        | (...);
                        spend?: (...) | (...);
                        clicks?: (...) | (...);
                        ctr?: (...) | (...);
                        views?: (...) | (...);
                        completed_views?: (...) | (...);
                        completion_rate?: (...) | (...) | (...);
                        conversions?: (...) | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        cost_per_acquisition?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                        leads?: (...) | (...);
                        incremental_sales_lift?: (...) | (...);
                        brand_lift?: (...) | (...);
                        foot_traffic?: (...) | (...);
                        conversion_lift?: (...) | (...);
                        brand_search_lift?: (...) | (...);
                        plays?: (...) | (...);
                        by_event_type?: (...) | (...);
                        grps?: (...) | (...);
                        reach?: (...) | (...);
                        reach_unit?: (...) | (...);
                        reach_window?: (...) | (...);
                        frequency?: (...) | (...);
                        quartile_data?: (...) | (...) | (...);
                        dooh_metrics?: (...) | (...);
                        viewability?: (...) | (...);
                        engagements?: (...) | (...);
                        follows?: (...) | (...);
                        saves?: (...) | (...);
                        profile_visits?: (...) | (...);
                        engagement_rate?: (...) | (...);
                        cost_per_click?: (...) | (...);
                        cost_per_completed_view?: (...) | (...);
                        cpm?: (...) | (...);
                        downloads?: (...) | (...);
                        units_sold?: (...) | (...);
                        new_to_brand_units?: (...) | (...);
                        by_action_source?: (...) | (...);
                        vendor_metric_values?: (...) | (...);
                        spot_id: string;
                        aired_at: string;
                        network?: (...) | (...);
                        station?: (...) | (...);
                        daypart?: (...) | (...);
                    }[];
                    by_spot_truncated?: boolean;
                    daily_breakdown?: {
                        date: string;
                        impressions: number;
                        spend: number;
                        conversions?: (...)
                        | (...);
                        conversion_value?: (...) | (...);
                        commissionable_value?: (...) | (...);
                        roas?: (...) | (...);
                        new_to_brand_rate?: (...) | (...);
                    }[];
                }[];
                windows?: {
                    window_start: string;
                    window_end: string;
                    totals: {
                        impressions?: number;
                        spend?: number;
                        clicks?: number;
                        ctr?: number;
                        views?: number;
                        completed_views?: number;
                        completion_rate?: number
                        | null;
                        conversions?: number;
                        conversion_value?: number;
                        commissionable_value?: number;
                        roas?: number;
                        cost_per_acquisition?: number;
                        new_to_brand_rate?: number;
                        leads?: number;
                        incremental_sales_lift?: number;
                        brand_lift?: number;
                        foot_traffic?: number;
                        conversion_lift?: number;
                        brand_search_lift?: number;
                        plays?: number;
                        by_event_type?: (...)[];
                        grps?: number;
                        reach?: number;
                        reach_unit?: ReachUnit;
                        reach_window?: { kind: ...; period?: ... };
                        frequency?: number;
                        quartile_data?:
                            | {
                                q1_views?: ...;
                                q2_views?: ...;
                                q3_views?: ...;
                                q4_views?: ...;
                            }
                            | null;
                        dooh_metrics?: {
                            loop_plays?: ...;
                            screens_used?: ...;
                            screen_time_seconds?: ...;
                            sov_achieved?: ...;
                            calculation_notes?: ...;
                            venue_breakdown?: ...;
                        };
                        viewability?: {
                            vendor?: ...;
                            measurable_impressions?: ...;
                            viewable_impressions?: ...;
                            viewable_rate?: ...;
                            viewed_seconds?: ...;
                            standard?: ...;
                        };
                        engagements?: number;
                        follows?: number;
                        saves?: number;
                        profile_visits?: number;
                        engagement_rate?: number;
                        cost_per_click?: number;
                        cost_per_completed_view?: number;
                        cpm?: number;
                        downloads?: number;
                        units_sold?: number;
                        new_to_brand_units?: number;
                        by_action_source?: (...)[];
                        vendor_metric_values?: (...)[];
                    };
                    by_package?: {
                        impressions?: ...;
                        spend?: ...;
                        clicks?: ...;
                        ctr?: ...;
                        views?: ...;
                        completed_views?: ...;
                        completion_rate?: ...;
                        conversions?: ...;
                        conversion_value?: ...;
                        commissionable_value?: ...;
                        roas?: ...;
                        cost_per_acquisition?: ...;
                        new_to_brand_rate?: ...;
                        leads?: ...;
                        incremental_sales_lift?: ...;
                        brand_lift?: ...;
                        foot_traffic?: ...;
                        conversion_lift?: ...;
                        brand_search_lift?: ...;
                        plays?: ...;
                        by_event_type?: ...;
                        grps?: ...;
                        reach?: ...;
                        reach_unit?: ...;
                        reach_window?: ...;
                        frequency?: ...;
                        quartile_data?: ...;
                        dooh_metrics?: ...;
                        viewability?: ...;
                        engagements?: ...;
                        follows?: ...;
                        saves?: ...;
                        profile_visits?: ...;
                        engagement_rate?: ...;
                        cost_per_click?: ...;
                        cost_per_completed_view?: ...;
                        cpm?: ...;
                        downloads?: ...;
                        units_sold?: ...;
                        new_to_brand_units?: ...;
                        by_action_source?: ...;
                        vendor_metric_values?: ...;
                        package_id: ...;
                    }[];
                    is_final?: boolean;
                    measurement_window?: string;
                }[];
                daily_breakdown?: {
                    date: string;
                    impressions: number;
                    spend: number;
                    conversions?: number;
                    conversion_value?: number;
                    commissionable_value?: number;
                    roas?: number;
                    new_to_brand_rate?: number;
                }[];
            }[];
            errors?: {
                code: string;
                message: string;
                field?: string;
                suggestion?: string;
                retry_after?: number;
                issues?: {
                    pointer: string;
                    message: string;
                    keyword: string;
                    schemaPath?: string;
                    schema_id?: string;
                    discriminator?: (...)[];
                }[];
                details?: {};
                recovery?: "transient"
                | "correctable"
                | "terminal";
                source?: "producer" | "sdk";
                sdk_id?: string;
            }[];
            sandbox?: boolean;
            ext?: { [key: string]: unknown };
        },
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onGetCreativeDeliveryStatusChange?: (
        response: {
            context_id?: string;
            context?: {};
            task_id?: string;
            status: TaskStatus;
            message?: string;
            timestamp?: string;
            replayed?: boolean;
            adcp_error?: {
                code: string;
                message: string;
                field?: string;
                suggestion?: string;
                retry_after?: number;
                issues?: {
                    pointer: string;
                    message: string;
                    keyword: string;
                    schemaPath?: string;
                    schema_id?: string;
                    discriminator?: { property_name: ...; value: ... }[];
                }[];
                details?: {};
                recovery?: "transient"
                | "correctable"
                | "terminal";
                source?: "producer" | "sdk";
                sdk_id?: string;
            };
            push_notification_config?: {
                url: string;
                operation_id?: string;
                token?: string;
                authentication?: { schemes: [AuthenticationScheme]; credentials: string };
            };
            governance_context?: string;
            payload?: {};
            adcp_version?: string;
            adcp_major_version?: number;
            account_id?: string;
            media_buy_id?: string;
            currency: string;
            reporting_period: { start: string; end: string; timezone?: string };
            creatives: {
                creative_id: string;
                media_buy_id?: string;
                format_kind?: CanonicalFormatKind;
                format_option_ref?:
                    | {
                        scope: "publisher";
                        publisher_domain: string;
                        format_option_id: string;
                    }
                    | {
                        scope: "product";
                        format_option_id: string;
                        publisher_domain?: undefined;
                    };
                totals?: {
                    impressions?: number;
                    spend?: number;
                    clicks?: number;
                    ctr?: number;
                    views?: number;
                    completed_views?: number;
                    completion_rate?: number
                    | null;
                    conversions?: number;
                    conversion_value?: number;
                    commissionable_value?: number;
                    roas?: number;
                    cost_per_acquisition?: number;
                    new_to_brand_rate?: number;
                    leads?: number;
                    incremental_sales_lift?: number;
                    brand_lift?: number;
                    foot_traffic?: number;
                    conversion_lift?: number;
                    brand_search_lift?: number;
                    plays?: number;
                    by_event_type?: {
                        event_type: EventType;
                        event_source_id?: (...) | (...);
                        count: number;
                        value?: (...) | (...);
                    }[];
                    grps?: number;
                    reach?: number;
                    reach_unit?: ReachUnit;
                    reach_window?: {
                        kind: "cumulative"
                        | "period"
                        | "rolling";
                        period?: { interval: ...; unit: ... };
                    };
                    frequency?: number;
                    quartile_data?: | {
                        q1_views?: number;
                        q2_views?: number;
                        q3_views?: number;
                        q4_views?: number;
                    }
                    | null;
                    dooh_metrics?: {
                        loop_plays?: number;
                        screens_used?: number;
                        screen_time_seconds?: number;
                        sov_achieved?: number;
                        calculation_notes?: string;
                        venue_breakdown?: (...)[];
                    };
                    viewability?: {
                        vendor?: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        measurable_impressions?: number;
                        viewable_impressions?: number;
                        viewable_rate?: number;
                        viewed_seconds?: number;
                        standard?: ViewabilityStandard;
                    };
                    engagements?: number;
                    follows?: number;
                    saves?: number;
                    profile_visits?: number;
                    engagement_rate?: number;
                    cost_per_click?: number;
                    cost_per_completed_view?: number;
                    cpm?: number;
                    downloads?: number;
                    units_sold?: number;
                    new_to_brand_units?: number;
                    by_action_source?: {
                        action_source: ActionSource;
                        event_source_id?: (...)
                        | (...);
                        count: number;
                        value?: (...) | (...);
                    }[];
                    vendor_metric_values?: {
                        vendor: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        metric_id: string;
                        value: number;
                        unit?: (...)
                        | (...);
                        measurable_impressions?: (...) | (...);
                        breakdown?: (...) | (...);
                    }[];
                };
                variant_count?: number;
                variants: {
                    impressions?: number;
                    spend?: number;
                    clicks?: number;
                    ctr?: number;
                    views?: number;
                    completed_views?: number;
                    completion_rate?: number
                    | null;
                    conversions?: number;
                    conversion_value?: number;
                    commissionable_value?: number;
                    roas?: number;
                    cost_per_acquisition?: number;
                    new_to_brand_rate?: number;
                    leads?: number;
                    incremental_sales_lift?: number;
                    brand_lift?: number;
                    foot_traffic?: number;
                    conversion_lift?: number;
                    brand_search_lift?: number;
                    plays?: number;
                    by_event_type?: {
                        event_type: EventType;
                        event_source_id?: (...) | (...);
                        count: number;
                        value?: (...) | (...);
                    }[];
                    grps?: number;
                    reach?: number;
                    reach_unit?: ReachUnit;
                    reach_window?: {
                        kind: "cumulative"
                        | "period"
                        | "rolling";
                        period?: { interval: ...; unit: ... };
                    };
                    frequency?: number;
                    quartile_data?: | {
                        q1_views?: number;
                        q2_views?: number;
                        q3_views?: number;
                        q4_views?: number;
                    }
                    | null;
                    dooh_metrics?: {
                        loop_plays?: number;
                        screens_used?: number;
                        screen_time_seconds?: number;
                        sov_achieved?: number;
                        calculation_notes?: string;
                        venue_breakdown?: (...)[];
                    };
                    viewability?: {
                        vendor?: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        measurable_impressions?: number;
                        viewable_impressions?: number;
                        viewable_rate?: number;
                        viewed_seconds?: number;
                        standard?: ViewabilityStandard;
                    };
                    engagements?: number;
                    follows?: number;
                    saves?: number;
                    profile_visits?: number;
                    engagement_rate?: number;
                    cost_per_click?: number;
                    cost_per_completed_view?: number;
                    cpm?: number;
                    downloads?: number;
                    units_sold?: number;
                    new_to_brand_units?: number;
                    by_action_source?: {
                        action_source: ActionSource;
                        event_source_id?: (...)
                        | (...);
                        count: number;
                        value?: (...) | (...);
                    }[];
                    vendor_metric_values?: {
                        vendor: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        metric_id: string;
                        value: number;
                        unit?: (...)
                        | (...);
                        measurable_impressions?: (...) | (...);
                        breakdown?: (...) | (...);
                    }[];
                    variant_id: string;
                    locale_variant_id?: string;
                    manifest?: | {
                        format_kind?: CanonicalFormatKind;
                        format_option_ref?: | {
                            scope: ...;
                            publisher_domain: ...;
                            format_option_id: ...;
                        }
                        | { scope: ...; format_option_id: ...; publisher_domain?: ... };
                        assets: {
                            [key: string]:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                        };
                        brand?: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        rights?: (...)[];
                        industry_identifiers?: (...)[];
                        provenance?: {
                            digital_source_type?: ...;
                            synthetic_depiction?: ...;
                            ai_tool?: ...;
                            human_oversight?: ...;
                            declared_by?: ...;
                            declared_at?: ...;
                            created_time?: ...;
                            c2pa?: ...;
                            embedded_provenance?: ...;
                            watermarks?: ...;
                            disclosure?: ...;
                            verification?: ...;
                            ext?: ...;
                        };
                        ext?: { [key: ...]: ... };
                    }
                    | {
                        format_kind?: CanonicalFormatKind;
                        format_option_ref?: | {
                            scope: ...;
                            publisher_domain: ...;
                            format_option_id: ...;
                        }
                        | { scope: ...; format_option_id: ...; publisher_domain?: ... };
                        assets: {
                            [key: string]:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                        };
                        brand?: {
                            domain: ...;
                            brand_id?: ...;
                            countries?: ...;
                            industries?: ...;
                            data_subject_contestation?: ...;
                            brand_kit_override?: ...;
                        };
                        rights?: (...)[];
                        industry_identifiers?: (...)[];
                        provenance?: {
                            digital_source_type?: ...;
                            synthetic_depiction?: ...;
                            ai_tool?: ...;
                            human_oversight?: ...;
                            declared_by?: ...;
                            declared_at?: ...;
                            created_time?: ...;
                            c2pa?: ...;
                            embedded_provenance?: ...;
                            watermarks?: ...;
                            disclosure?: ...;
                            verification?: ...;
                            ext?: ...;
                        };
                        ext?: { [key: ...]: ... };
                    };
                    generation_context?: {
                        context_type?: string;
                        artifact?: { property_id: ...; artifact_id: ... };
                        ext?: { [key: ...]: ... };
                    };
                }[];
            }[];
            pagination?: {
                limit: number;
                offset: number;
                has_more: boolean;
                total_count?: number;
                total?: number;
            };
            errors?: {
                code: string;
                message: string;
                field?: string;
                suggestion?: string;
                retry_after?: number;
                issues?: {
                    pointer: string;
                    message: string;
                    keyword: string;
                    schemaPath?: string;
                    schema_id?: string;
                    discriminator?: (...)[];
                }[];
                details?: {};
                recovery?: "transient"
                | "correctable"
                | "terminal";
                source?: "producer" | "sdk";
                sdk_id?: string;
            }[];
            ext?: { [key: string]: unknown };
        },
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onProvidePerformanceFeedbackStatusChange?: (
        response: ProvidePerformanceFeedbackResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onGetSignalsStatusChange?: (
        response: GetSignalsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onActivateSignalStatusChange?: (
        response: ActivateSignalResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onBuildCreativeLegacyStatusChange?: (
        response: LegacyBuildCreativeResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onListAccountsStatusChange?: (
        response: ListAccountsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onSyncAccountsStatusChange?: (
        response: SyncAccountsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onSyncAudiencesStatusChange?: (
        response: SyncAudiencesResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onCreatePropertyListStatusChange?: (
        response: CreatePropertyListResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onGetPropertyListStatusChange?: (
        response: GetPropertyListResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onUpdatePropertyListStatusChange?: (
        response: UpdatePropertyListResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onListPropertyListsStatusChange?: (
        response: ListPropertyListsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onDeletePropertyListStatusChange?: (
        response: DeletePropertyListResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onListContentStandardsLegacyStatusChange?: (
        response: LegacyListContentStandardsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onGetContentStandardsLegacyStatusChange?: (
        response: LegacyGetContentStandardsResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onCalibrateContentLegacyStatusChange?: (
        response: LegacyCalibrateContentResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onValidateContentDeliveryLegacyStatusChange?: (
        response: LegacyValidateContentDeliveryResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onSIGetOfferingStatusChange?: (
        response: SIGetOfferingResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onSIInitiateSessionStatusChange?: (
        response: SIInitiateSessionResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onSISendMessageStatusChange?: (
        response: SISendMessageResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onSITerminateSessionStatusChange?: (
        response: SITerminateSessionResponse,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onTaskStatusChange?: (
        response: any,
        metadata: WebhookMetadata,
    ) => void | Promise<void>
    onActivity?: (activity: Activity) => void | Promise<void>
    webhookDedup?: { backend: IdempotencyBackend; ttlSeconds?: number }

    Receiver-side deduplication of webhook payloads by idempotency_key.

    AdCP webhooks use at-least-once delivery — publishers retry until they see a 2xx, so the same event may arrive more than once. When configured, the first delivery for a given (agent_id, idempotency_key) tuple dispatches to handlers; subsequent deliveries are dropped and surface as a webhook_duplicate activity.

    Reuses IdempotencyBackend from @adcp/sdk/server — you can share the same backend across request-side and webhook-side dedup, or use a dedicated one. Scope is per-agent so keys from different senders are independent, matching the spec's "scoped to authenticated sender identity" rule.

    If a payload arrives without idempotency_key (non-conforming sender, or A2A transport which does not carry the field), dispatch proceeds without dedup and a warning is logged.

    Type Declaration

    • backend: IdempotencyBackend
    • OptionalttlSeconds?: number

      Retention for dedup keys. Defaults to 86_400 (24h).

    onMediaBuyDeliveryNotification?: (
        notification: MediaBuyDeliveryNotification,
        metadata: NotificationMetadata,
    ) => void | Promise<void>