Interface OpenApiComponents

interface OpenApiComponents {
    headers: never;
    parameters: {
        AiPlansfromDate: string;
        AiPlansidAiPlan: string;
        AiPlansidClient: string;
        AiPlansidOrganization: string;
        AiPlanstoDate: string;
        AppsidApp: string;
        AppsidClient: string;
        Appslimit: number;
        Appsoffset: number;
        CommentsidAccount: string;
        CommentsidComment: string;
        CommentsidOrganization: string;
        CommentsidPublication: string;
        CommentsthreadLimit: number;
        CommentsthreadOffset: string;
        ContactsidContact: string;
        ContactsidOrganization: string;
        Contactslimit: number;
        Contactsoffset: number;
        DashboardfromDate: string;
        DashboardidOrganization: string;
        DashboardtoDate: string;
        IntegrationsidIntegration: string;
        IntegrationsidOrganization: string;
        MessagesfromDate: string;
        MessagesgroupBy: "day" | "month" | "year";
        MessagesidAccount: string;
        MessagesidContact: string;
        MessagesidOrganization: string;
        Messageslimit: number;
        Messagesoffset: number;
        MessagestoDate: string;
        OrganizationsRolesidOrganization: string;
        OrganizationsRolesidRol: string;
        OrganizationsRolesidUser: string;
        OrganizationsRoleslimit: number;
        OrganizationsRolesoffset: number;
        ProductsidAccount: string;
        ProductsidOrganization: string;
        Productslimit: number;
        Productsoffset: number;
    };
    pathItems: never;
    requestBodies: never;
    responses: {
        AppsError: {
            content: {
                "application/json": {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
            };
            headers: { [name: string]: unknown };
        };
        CommentsCommentError: {
            content: {
                "application/json": {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
            };
            headers: { [name: string]: unknown };
        };
        ContactsError: {
            content: {
                "application/json": {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
            };
            headers: { [name: string]: unknown };
        };
        DashboardError: {
            content: {
                "application/json": {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
            };
            headers: { [name: string]: unknown };
        };
        MessagesError: {
            content: {
                "application/json": {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
            };
            headers: { [name: string]: unknown };
        };
        ProductsError: {
            content: {
                "application/json": {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
            };
            headers: { [name: string]: unknown };
        };
    };
    schemas: {
        Account: {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
        AccountsAccountList: {
            accounts: {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            }[];
            total: number;
        };
        AccountsAccountOne: {
            account: {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
        };
        AccountsConnectSession: {
            _id: string;
            accounts: (
                {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                } & { already_enabled: boolean }
            )[];
            accounts_limit: number;
            accounts_used: number;
            creation_date?: string;
            expires_at: string;
            id_client?: string;
            id_organization?: string;
            keycloak_client_idenfifier?: string;
            redirect_uri?: string;
            social_network:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            status: "pending"
            | "returned"
            | "confirmed";
        };
        AccountsConnectSessionAccount: {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        } & { already_enabled: boolean };
        AccountsMetricList: (
            | "reach"
            | "impressions"
            | "comments"
            | "likes"
            | "shares"
            | "saves"
            | "profile_views"
            | "page_impressions"
            | "page_total_actions"
            | "page_call_phone_clicks_logged_in_unique"
            | "page_get_directions_clicks_logged_in_unique"
            | "page_website_clicks_logged_in_unique"
            | "page_post_engagements"
            | "page_consumptions_unique"
            | "page_negative_feedback"
            | "page_negative_feedback_unique"
            | "page_fans_online_per_day"
            | "page_impressions_unique"
            | "page_impressions_paid"
            | "page_impressions_paid_unique"
            | "page_impressions_organic_v2"
            | "page_impressions_organic_unique_v2"
            | "page_impressions_viral"
            | "page_impressions_viral_unique"
            | "page_impressions_nonviral"
            | "page_impressions_nonviral_unique"
            | "page_posts_impressions"
            | "page_posts_impressions_unique"
            | "page_posts_impressions_paid"
            | "page_posts_impressions_paid_unique"
            | "page_posts_impressions_organic"
            | "page_posts_impressions_organic_unique"
            | "page_posts_served_impressions_organic_unique"
            | "page_posts_impressions_viral"
            | "page_posts_impressions_viral_unique"
            | "page_posts_impressions_nonviral"
            | "page_posts_impressions_nonviral_unique"
            | "total_interactions"
            | "accounts_engaged"
            | "replies"
            | "follows_and_unfollows"
            | "profile_links_taps"
            | "website_clicks"
            | "paidFollowers"
            | "organicFollowerGain"
            | "careersPageBannerPromoClicks"
            | "careersPagePromoLinksClicks"
            | "careersPageEmployeesClicks"
            | "careersPageJobsClicks"
            | "careersPageViewsUnique"
            | "careersPageViews"
            | "overviewPageViewsUnique"
            | "overviewPageViews"
            | "allPageViews"
            | "follows"
            | "share"
            | "views"
        )[];
        AccountsMetricModel: {
            group: "day"
            | "month"
            | "year";
            stats: {
                date: string;
                group: "day" | "month" | "year";
                group_value: number;
                name: string;
                value: number;
            }[];
        };
        AccountsPersistentMenu: {
            call_to_actions?: { [key: string]: unknown }[];
            composer_input_disabled?: boolean;
            locale?: string;
        }[];
        AccountsSocialAuthorizationMethod: {
            add_to_group_link?: string;
            app_id?: string;
            bot_username?: string;
            config_id?: string;
            feature_type?: string;
            graph_version?: string;
            session_info_version?: string;
            state?: string;
            type: "telegram_bot"
            | "redirect"
            | "meta_embedded_signup";
        };
        AccountsSocialLinksList: {
            links: {
                authorization: {
                    add_to_group_link?: string;
                    app_id?: string;
                    bot_username?: string;
                    config_id?: string;
                    feature_type?: string;
                    graph_version?: string;
                    session_info_version?: string;
                    state?: string;
                    type: "telegram_bot"
                    | "redirect"
                    | "meta_embedded_signup";
                };
                link: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
        };
        AiContext: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        };
        AiImageOrigin: {
            generated_at: string;
            id_ai_plan?: string;
            model: string;
            provider: string;
        };
        AiPlanResult: {
            accounts: number;
            archived_date?: string;
            creation_date: string;
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            id_ai_plan: string;
            id_organization: string;
            last_publish_date?: string;
            maturing: boolean;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            prompt: string;
            publications: {
                failed: number;
                measured: number;
                published: number;
                scheduled: number;
                total: number;
            };
            ranked: boolean;
            social_networks: (
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest"
            )[];
            state: "generated"
            | "validated";
            template:
                | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            week_start: string;
        };
        AiPlanResultsGroup: {
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            plans: number;
            publications: { measured: number; published: number };
            ranked_plans: number;
        };
        AiPlansAiPlan: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: string;
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: (...)
                        | (...)
                        | (...) } & { [key: string]: unknown };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        };
        AiPlansAiPlanCostEstimate: {
            available_credits: number;
            base_cost: number;
            estimated_cost: number;
            images_target: number;
            texts_target: number;
        };
        AiPlansAiPlanCreateRequest: {
            accounts: string[];
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            options?: {
                allow_images?: boolean;
                gallery_uploads?: string[];
                language?: string;
                link?: string;
                max_images?: number;
                publish_days?: number[];
                shared?: boolean;
                timezone?: string;
                tone?: string;
                use_organization_context?: boolean;
                week_start?: string;
            };
            prompt: string;
            source?: {
                event_date?: string;
                event_name?: string;
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description: string; id_upload: string }[];
                product_catalog_id?: string;
                products?: string[];
                text?: string;
                url?: string;
            };
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
        };
        AiPlansAiPlanCreateResponse: {
            ai_plan: {
                _id: string;
                accounts: string[];
                archived_date?: string;
                attempts: number;
                creation_date: string;
                credits_spent: number;
                destinations?: {
                    destination: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    id_account: string;
                }[];
                error?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
                generation_end_date?: string;
                id_client: string;
                id_organization: string;
                keycloak_identifier?: string;
                options: {
                    allow_images: boolean;
                    gallery_uploads: string[];
                    language: string;
                    link?: string;
                    max_images?: number;
                    publish_days: number[];
                    shared: boolean;
                    timezone: string;
                    tone?: string;
                    use_organization_context: boolean;
                    week_start: string;
                };
                orchestrator_result?: Record<string, never>;
                organization_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                prompt: string;
                publications: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: { image: boolean; text: boolean };
                        creation_date: string;
                        destination?: {
                            id?: string;
                            name?: string;
                            section_id?: string;
                            section_name?: string;
                        };
                        engagement_base?: "reach"
                        | "impressions"
                        | "followers";
                        external_identifier?: string;
                        extra_data?: { [key: string]: unknown };
                        files: {
                            _id: string;
                            ai_generated?: {
                                generated_at: string;
                                id_ai_plan?: (...) | (...);
                                model: string;
                                provider: string;
                            };
                            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                            cover_offset?: number;
                            creation_date: string;
                            file_externals: {
                                external_identifier: string;
                                external_url: string;
                                social_network: | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            }[];
                            file_format: "mp4"
                            | "jpeg"
                            | "gif"
                            | "png"
                            | "jpg";
                            file_properties: {
                                allowed_social_networks: string[];
                                aspect_ratio: { text: string; value: number };
                                duration: number;
                                height: number;
                                size_in_bytes: number;
                                width: number;
                            };
                            file_type: "video"
                            | "image";
                            id_organization: string;
                            is_temporal: boolean;
                            name: string;
                            public_path: string;
                        }[];
                        id_account: | string
                        | {
                            _id: string;
                            creation_date: string;
                            error_code: number;
                            extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                            followers_count?: number;
                            id_client: string;
                            id_organization: string;
                            image?: string;
                            name: string;
                            next_comments_update?: string;
                            next_stats_update?: string;
                            private_message_link?: string;
                            social_network:
                                | "facebook"
                                | "instagram"
                                | "linkedin"
                                | "tiktok"
                                | "twitter"
                                | "whatsapp"
                                | "youtube"
                                | "google_business"
                                | "bluesky"
                                | "discord"
                                | "telegram"
                                | "threads"
                                | "slack"
                                | "pinterest";
                            username?: string;
                        };
                        id_integration?: string;
                        id_organization: string;
                        link?: string;
                        made_for_kids?: boolean;
                        metrics?: {
                            clicks?: number;
                            comments?: number;
                            engagement?: number;
                            followers?: number;
                            followers_gained?: number;
                            impressions?: number;
                            likes?: number;
                            profile_views?: number;
                            reach?: number;
                            saves?: number;
                            shares?: number;
                            video_views?: number;
                        };
                        name?: string;
                        next_stats_update?: string;
                        pending_publish?: {
                            data?: { [key: string]: unknown };
                            deadline?: string;
                            next_check?: string;
                            temp_keys?: string[];
                        };
                        publication_errors: {
                            code: number;
                            data?: { [key: string]: unknown };
                            message: string;
                        }[];
                        publication_type: | "profile"
                        | "page"
                        | "group"
                        | "reels"
                        | "stories"
                        | "message";
                        publication_warnings?: {
                            code: number;
                            data?: { [key: ...]: ... };
                            message: string;
                        }[];
                        publish_date?: string;
                        reply_control?: | "everyone"
                        | "accounts_you_follow"
                        | "mentioned_only"
                        | "followers_only";
                        retries: number;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                        state: "ready"
                        | "withErrors"
                        | "sended"
                        | "draft"
                        | "publishing";
                        statistics?: {
                            angers?: number;
                            bookmarks?: number;
                            clicks?: number;
                            comments?: number;
                            engagement?: number;
                            follows?: number;
                            hahas?: number;
                            impressions?: number;
                            likes?: number;
                            loves?: number;
                            negative_feedback?: number;
                            outbound_clicks?: number;
                            page_likes?: number;
                            pin_clicks?: number;
                            playback_0_count?: number;
                            playback_100_count?: number;
                            playback_25_count?: number;
                            playback_50_count?: number;
                            playback_75_count?: number;
                            profile_activity?: number;
                            profile_visits?: number;
                            quotes?: number;
                            reach?: number;
                            reactions?: number;
                            reactions_by_emoji?: { [key: string]: number };
                            replys?: number;
                            retwets?: number;
                            saved?: number;
                            saves?: number;
                            share?: number;
                            shareMentions?: number;
                            shares?: number;
                            sorrys?: number;
                            url_link_clicks?: number;
                            user_profile_clicks?: number;
                            video_views?: number;
                            views?: number;
                            wows?: number;
                        };
                        stats_updated_date?: string;
                        text?: string;
                        title?: string;
                        url?: string;
                        visibility?: "public"
                        | "unlisted"
                        | "private";
                    }
                )[];
                source?: {
                    event?: { date?: string; name?: string };
                    id_account_catalog?: string;
                    id_integration_catalog?: string;
                    images?: { description?: string; id_upload?: string }[];
                    products?: {
                        description?: string;
                        external_id?: string;
                        id_upload?: string;
                        name?: string;
                        permalink?: string;
                        price?: string;
                    }[];
                    text?: string;
                    url?: string;
                };
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
                template?: | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
                warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
            };
            estimate: {
                available_credits: number;
                base_cost: number;
                estimated_cost: number;
                images_target: number;
                texts_target: number;
            };
            estimated_cost: number;
        };
        AiPlansAiPlanDestination: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        };
        AiPlansAiPlanList: {
            ai_plans: {
                _id: string;
                accounts: string[];
                archived_date?: string;
                attempts: number;
                creation_date: string;
                credits_spent: number;
                destinations?: {
                    destination: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    id_account: string;
                }[];
                error?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
                generation_end_date?: string;
                id_client: string;
                id_organization: string;
                keycloak_identifier?: string;
                options: {
                    allow_images: boolean;
                    gallery_uploads: string[];
                    language: string;
                    link?: string;
                    max_images?: number;
                    publish_days: number[];
                    shared: boolean;
                    timezone: string;
                    tone?: string;
                    use_organization_context: boolean;
                    week_start: string;
                };
                orchestrator_result?: Record<string, never>;
                organization_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                prompt: string;
                publications: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: { image: boolean; text: boolean };
                        creation_date: string;
                        destination?: {
                            id?: string;
                            name?: string;
                            section_id?: string;
                            section_name?: string;
                        };
                        engagement_base?: "reach"
                        | "impressions"
                        | "followers";
                        external_identifier?: string;
                        extra_data?: { [key: string]: unknown };
                        files: {
                            _id: string;
                            ai_generated?: {
                                generated_at: ...;
                                id_ai_plan?: ...;
                                model: ...;
                                provider: ...;
                            };
                            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                            cover_offset?: number;
                            creation_date: string;
                            file_externals: {
                                external_identifier: ...;
                                external_url: ...;
                                social_network: ...;
                            }[];
                            file_format: "mp4"
                            | "jpeg"
                            | "gif"
                            | "png"
                            | "jpg";
                            file_properties: {
                                allowed_social_networks: (...)[];
                                aspect_ratio: { text: ...; value: ... };
                                duration: number;
                                height: number;
                                size_in_bytes: number;
                                width: number;
                            };
                            file_type: "video"
                            | "image";
                            id_organization: string;
                            is_temporal: boolean;
                            name: string;
                            public_path: string;
                        }[];
                        id_account: | string
                        | {
                            _id: string;
                            creation_date: string;
                            error_code: number;
                            extra_data?: (...) & (...);
                            followers_count?: number;
                            id_client: string;
                            id_organization: string;
                            image?: string;
                            name: string;
                            next_comments_update?: string;
                            next_stats_update?: string;
                            private_message_link?: string;
                            social_network:
                                | "facebook"
                                | "instagram"
                                | "linkedin"
                                | "tiktok"
                                | "twitter"
                                | "whatsapp"
                                | "youtube"
                                | "google_business"
                                | "bluesky"
                                | "discord"
                                | "telegram"
                                | "threads"
                                | "slack"
                                | "pinterest";
                            username?: string;
                        };
                        id_integration?: string;
                        id_organization: string;
                        link?: string;
                        made_for_kids?: boolean;
                        metrics?: {
                            clicks?: number;
                            comments?: number;
                            engagement?: number;
                            followers?: number;
                            followers_gained?: number;
                            impressions?: number;
                            likes?: number;
                            profile_views?: number;
                            reach?: number;
                            saves?: number;
                            shares?: number;
                            video_views?: number;
                        };
                        name?: string;
                        next_stats_update?: string;
                        pending_publish?: {
                            data?: { [key: ...]: ... };
                            deadline?: string;
                            next_check?: string;
                            temp_keys?: (...)[];
                        };
                        publication_errors: {
                            code: number;
                            data?: { [key: ...]: ... };
                            message: string;
                        }[];
                        publication_type: | "profile"
                        | "page"
                        | "group"
                        | "reels"
                        | "stories"
                        | "message";
                        publication_warnings?: {
                            code: number;
                            data?: (...)
                            | (...);
                            message: string;
                        }[];
                        publish_date?: string;
                        reply_control?: | "everyone"
                        | "accounts_you_follow"
                        | "mentioned_only"
                        | "followers_only";
                        retries: number;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                        state: "ready"
                        | "withErrors"
                        | "sended"
                        | "draft"
                        | "publishing";
                        statistics?: {
                            angers?: number;
                            bookmarks?: number;
                            clicks?: number;
                            comments?: number;
                            engagement?: number;
                            follows?: number;
                            hahas?: number;
                            impressions?: number;
                            likes?: number;
                            loves?: number;
                            negative_feedback?: number;
                            outbound_clicks?: number;
                            page_likes?: number;
                            pin_clicks?: number;
                            playback_0_count?: number;
                            playback_100_count?: number;
                            playback_25_count?: number;
                            playback_50_count?: number;
                            playback_75_count?: number;
                            profile_activity?: number;
                            profile_visits?: number;
                            quotes?: number;
                            reach?: number;
                            reactions?: number;
                            reactions_by_emoji?: { [key: ...]: ... };
                            replys?: number;
                            retwets?: number;
                            saved?: number;
                            saves?: number;
                            share?: number;
                            shareMentions?: number;
                            shares?: number;
                            sorrys?: number;
                            url_link_clicks?: number;
                            user_profile_clicks?: number;
                            video_views?: number;
                            views?: number;
                            wows?: number;
                        };
                        stats_updated_date?: string;
                        text?: string;
                        title?: string;
                        url?: string;
                        visibility?: "public"
                        | "unlisted"
                        | "private";
                    }
                )[];
                source?: {
                    event?: { date?: string; name?: string };
                    id_account_catalog?: string;
                    id_integration_catalog?: string;
                    images?: { description?: string; id_upload?: string }[];
                    products?: {
                        description?: string;
                        external_id?: string;
                        id_upload?: string;
                        name?: string;
                        permalink?: string;
                        price?: string;
                    }[];
                    text?: string;
                    url?: string;
                };
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
                template?: | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
                warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
            }[];
            total: number;
        };
        AiPlansAiPlanNotice: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        };
        AiPlansAiPlanOne: {
            ai_plan: {
                _id: string;
                accounts: string[];
                archived_date?: string;
                attempts: number;
                creation_date: string;
                credits_spent: number;
                destinations?: {
                    destination: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    id_account: string;
                }[];
                error?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
                generation_end_date?: string;
                id_client: string;
                id_organization: string;
                keycloak_identifier?: string;
                options: {
                    allow_images: boolean;
                    gallery_uploads: string[];
                    language: string;
                    link?: string;
                    max_images?: number;
                    publish_days: number[];
                    shared: boolean;
                    timezone: string;
                    tone?: string;
                    use_organization_context: boolean;
                    week_start: string;
                };
                orchestrator_result?: Record<string, never>;
                organization_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                prompt: string;
                publications: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: { image: boolean; text: boolean };
                        creation_date: string;
                        destination?: {
                            id?: string;
                            name?: string;
                            section_id?: string;
                            section_name?: string;
                        };
                        engagement_base?: "reach"
                        | "impressions"
                        | "followers";
                        external_identifier?: string;
                        extra_data?: { [key: string]: unknown };
                        files: {
                            _id: string;
                            ai_generated?: {
                                generated_at: string;
                                id_ai_plan?: (...) | (...);
                                model: string;
                                provider: string;
                            };
                            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                            cover_offset?: number;
                            creation_date: string;
                            file_externals: {
                                external_identifier: string;
                                external_url: string;
                                social_network: | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            }[];
                            file_format: "mp4"
                            | "jpeg"
                            | "gif"
                            | "png"
                            | "jpg";
                            file_properties: {
                                allowed_social_networks: string[];
                                aspect_ratio: { text: string; value: number };
                                duration: number;
                                height: number;
                                size_in_bytes: number;
                                width: number;
                            };
                            file_type: "video"
                            | "image";
                            id_organization: string;
                            is_temporal: boolean;
                            name: string;
                            public_path: string;
                        }[];
                        id_account: | string
                        | {
                            _id: string;
                            creation_date: string;
                            error_code: number;
                            extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                            followers_count?: number;
                            id_client: string;
                            id_organization: string;
                            image?: string;
                            name: string;
                            next_comments_update?: string;
                            next_stats_update?: string;
                            private_message_link?: string;
                            social_network:
                                | "facebook"
                                | "instagram"
                                | "linkedin"
                                | "tiktok"
                                | "twitter"
                                | "whatsapp"
                                | "youtube"
                                | "google_business"
                                | "bluesky"
                                | "discord"
                                | "telegram"
                                | "threads"
                                | "slack"
                                | "pinterest";
                            username?: string;
                        };
                        id_integration?: string;
                        id_organization: string;
                        link?: string;
                        made_for_kids?: boolean;
                        metrics?: {
                            clicks?: number;
                            comments?: number;
                            engagement?: number;
                            followers?: number;
                            followers_gained?: number;
                            impressions?: number;
                            likes?: number;
                            profile_views?: number;
                            reach?: number;
                            saves?: number;
                            shares?: number;
                            video_views?: number;
                        };
                        name?: string;
                        next_stats_update?: string;
                        pending_publish?: {
                            data?: { [key: string]: unknown };
                            deadline?: string;
                            next_check?: string;
                            temp_keys?: string[];
                        };
                        publication_errors: {
                            code: number;
                            data?: { [key: string]: unknown };
                            message: string;
                        }[];
                        publication_type: | "profile"
                        | "page"
                        | "group"
                        | "reels"
                        | "stories"
                        | "message";
                        publication_warnings?: {
                            code: number;
                            data?: { [key: ...]: ... };
                            message: string;
                        }[];
                        publish_date?: string;
                        reply_control?: | "everyone"
                        | "accounts_you_follow"
                        | "mentioned_only"
                        | "followers_only";
                        retries: number;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                        state: "ready"
                        | "withErrors"
                        | "sended"
                        | "draft"
                        | "publishing";
                        statistics?: {
                            angers?: number;
                            bookmarks?: number;
                            clicks?: number;
                            comments?: number;
                            engagement?: number;
                            follows?: number;
                            hahas?: number;
                            impressions?: number;
                            likes?: number;
                            loves?: number;
                            negative_feedback?: number;
                            outbound_clicks?: number;
                            page_likes?: number;
                            pin_clicks?: number;
                            playback_0_count?: number;
                            playback_100_count?: number;
                            playback_25_count?: number;
                            playback_50_count?: number;
                            playback_75_count?: number;
                            profile_activity?: number;
                            profile_visits?: number;
                            quotes?: number;
                            reach?: number;
                            reactions?: number;
                            reactions_by_emoji?: { [key: string]: number };
                            replys?: number;
                            retwets?: number;
                            saved?: number;
                            saves?: number;
                            share?: number;
                            shareMentions?: number;
                            shares?: number;
                            sorrys?: number;
                            url_link_clicks?: number;
                            user_profile_clicks?: number;
                            video_views?: number;
                            views?: number;
                            wows?: number;
                        };
                        stats_updated_date?: string;
                        text?: string;
                        title?: string;
                        url?: string;
                        visibility?: "public"
                        | "unlisted"
                        | "private";
                    }
                )[];
                source?: {
                    event?: { date?: string; name?: string };
                    id_account_catalog?: string;
                    id_integration_catalog?: string;
                    images?: { description?: string; id_upload?: string }[];
                    products?: {
                        description?: string;
                        external_id?: string;
                        id_upload?: string;
                        name?: string;
                        permalink?: string;
                        price?: string;
                    }[];
                    text?: string;
                    url?: string;
                };
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
                template?: | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
                warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
            };
        };
        AiPlansAiPlanOptions: {
            allow_images: boolean;
            gallery_uploads: string[];
            language: string;
            link?: string;
            max_images?: number;
            publish_days: number[];
            shared: boolean;
            timezone: string;
            tone?: string;
            use_organization_context: boolean;
            week_start: string;
        };
        AiPlansAiPlanOptionsInput: {
            allow_images?: boolean;
            gallery_uploads?: string[];
            language?: string;
            link?: string;
            max_images?: number;
            publish_days?: number[];
            shared?: boolean;
            timezone?: string;
            tone?: string;
            use_organization_context?: boolean;
            week_start?: string;
        };
        AiPlansAiPlanResults: {
            ai_plans: {
                accounts: number;
                archived_date?: string;
                creation_date: string;
                credits_per_engagement?: number;
                credits_spent: number;
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                expected_engagement_per_publication?: number;
                id_ai_plan: string;
                id_organization: string;
                last_publish_date?: string;
                maturing: boolean;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                prompt: string;
                publications: {
                    failed: number;
                    measured: number;
                    published: number;
                    scheduled: number;
                    total: number;
                };
                ranked: boolean;
                social_networks: (
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest"
                )[];
                state: "generated"
                | "validated";
                template:
                    | "standard"
                    | "from_images"
                    | "from_text"
                    | "from_catalog"
                    | "campaign";
                week_start: string;
            }[];
            by_template: (
                {
                    credits_per_engagement?: number;
                    credits_spent: number;
                    engagement_per_publication?: number;
                    engagement_vs_average?: number;
                    expected_engagement_per_publication?: number;
                    metrics: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    plans: number;
                    publications: { measured: number; published: number };
                    ranked_plans: number;
                } & {
                    template: | "standard"
                    | "from_images"
                    | "from_text"
                    | "from_catalog"
                    | "campaign";
                }
            )[];
            range: {
                from_date: string;
                previous_from_date?: string;
                previous_to_date?: string;
                to_date: string;
            };
            sort: string;
            total: number;
            totals: {
                credits_per_engagement?: number;
                credits_spent: number;
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                expected_engagement_per_publication?: number;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                plans: number;
                publications: { measured: number; published: number };
                ranked_plans: number;
            };
        };
        AiPlansAiPlanResultsTemplateGroup: {
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            plans: number;
            publications: { measured: number; published: number };
            ranked_plans: number;
        } & {
            template: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
        };
        AiPlansAiPlanSource: {
            event?: { date?: string; name?: string };
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description?: string; id_upload?: string }[];
            products?: {
                description?: string;
                external_id?: string;
                id_upload?: string;
                name?: string;
                permalink?: string;
                price?: string;
            }[];
            text?: string;
            url?: string;
        };
        AiPlansAiPlanSourceImageInput: { description: string; id_upload: string };
        AiPlansAiPlanSourceInput: {
            event_date?: string;
            event_name?: string;
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description: string; id_upload: string }[];
            product_catalog_id?: string;
            products?: string[];
            text?: string;
            url?: string;
        };
        AiPlansAiPlanSourceProduct: {
            description?: string;
            external_id?: string;
            id_upload?: string;
            name?: string;
            permalink?: string;
            price?: string;
        };
        AppsClientApp: {
            _id: string;
            allowed_domains: string[];
            creation_date: string;
            deleted: boolean;
            deleted_date?: string;
            id_client: string;
            id_user?: string;
            keycloak_client_idenfifier: string;
            name: string;
            redirect_urls: string[];
            webhook_url?: string;
        };
        AppsClientAppInput: {
            allowed_domains?: string[];
            keycloak_client_idenfifier: string;
            name: string;
            redirect_urls?: string[];
            webhook_url?: string;
        };
        AppsOAuthError: {
            error: | "server_error"
            | "invalid_client"
            | "slow_down"
            | "invalid_request"
            | "unsupported_grant_type";
            error_description?: string;
        };
        AppsTokenRequest: {
            client_id?: string;
            client_secret?: string;
            grant_type: "client_credentials";
            scope?: string;
        };
        AppsTokenResponse: {
            access_token: string;
            expires_in: number;
            scope?: string;
            token_type: string;
        };
        CatalogAspectRatios: { text: string[]; values: number[] };
        CatalogPlannerTemplate: {
            allows_gallery?: boolean;
            allows_shared?: boolean;
            generates_images?: boolean;
            max_source_items?: number;
            orchestration_cost?: number;
            orchestration_cost_per_source_item?: number;
            regenerate?: { image?: boolean; text?: boolean };
            source_fields?: {
                default?: unknown;
                max?: number;
                min?: number;
                name?: string;
                options?: string[];
                required?: boolean;
                type?:
                    | "boolean"
                    | "text"
                    | "textarea"
                    | "url"
                    | "select"
                    | "date"
                    | "uploads_with_description"
                    | "catalog_products";
            }[];
            source_requires_any?: string[];
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            unsupported_networks?: (
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest"
            )[];
        };
        CatalogPlannerTemplateField: {
            default?: unknown;
            max?: number;
            min?: number;
            name?: string;
            options?: string[];
            required?: boolean;
            type?: | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "date"
            | "uploads_with_description"
            | "catalog_products";
        };
        CatalogSocialLimits: {
            characters: { [key: string]: number };
            comment_characters: { [key: string]: number };
            max_file_size_mb: { [key: string]: number };
            max_post_bytes: { [key: string]: number };
            title_characters: { [key: string]: number };
            total_images: { [key: string]: number };
            video_duration_in_seconds: { [key: string]: number };
        };
        CatalogSocialLimitsMap: { [key: string]: number };
        ClientsAiScopeSetting: {
            api_key?: string;
            has_api_key?: boolean;
            model: string;
            provider: "openrouter" | "openai" | "google" | "anthropic";
        };
        ClientsAiSettings: {
            image?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            orchestrator?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            text?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
        };
        ClientsClient: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_settings?: {
                image?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                orchestrator?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                text?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
            };
            client_type?: "personal"
            | "company";
            creation_date: string;
            name: string;
            trial_tested?: boolean;
        };
        ClientsClientList: {
            clients: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_plan: {
                    current_period_end?: string;
                    current_period_start?: string;
                    enabled: boolean;
                    isEnabled: boolean;
                    plan_data: {
                        accounts: number;
                        ai_credits?: number;
                        apps?: number;
                        integrations: number;
                        space: number;
                        twitter_credits?: number;
                    };
                    plan_identifier: "basic"
                    | "free"
                    | "pro"
                    | "custom";
                    require_action?: boolean;
                    status: string;
                    stripe_customer_id?: string;
                };
                actual_use?: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                ai_settings?: {
                    image?: | null
                    | {
                        api_key?: string;
                        has_api_key?: boolean;
                        model: string;
                        provider: "openrouter"
                        | "openai"
                        | "google"
                        | "anthropic";
                    };
                    orchestrator?: | null
                    | {
                        api_key?: string;
                        has_api_key?: boolean;
                        model: string;
                        provider: "openrouter"
                        | "openai"
                        | "google"
                        | "anthropic";
                    };
                    text?: | null
                    | {
                        api_key?: string;
                        has_api_key?: boolean;
                        model: string;
                        provider: "openrouter"
                        | "openai"
                        | "google"
                        | "anthropic";
                    };
                };
                client_type?: "personal"
                | "company";
                creation_date: string;
                name: string;
                trial_tested?: boolean;
            }[];
            total: number;
        };
        ClientsClientOne: {
            client: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_plan: {
                    current_period_end?: string;
                    current_period_start?: string;
                    enabled: boolean;
                    isEnabled: boolean;
                    plan_data: {
                        accounts: number;
                        ai_credits?: number;
                        apps?: number;
                        integrations: number;
                        space: number;
                        twitter_credits?: number;
                    };
                    plan_identifier: "basic"
                    | "free"
                    | "pro"
                    | "custom";
                    require_action?: boolean;
                    status: string;
                    stripe_customer_id?: string;
                };
                actual_use?: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                ai_settings?: {
                    image?: | null
                    | {
                        api_key?: string;
                        has_api_key?: boolean;
                        model: string;
                        provider: "openrouter"
                        | "openai"
                        | "google"
                        | "anthropic";
                    };
                    orchestrator?: | null
                    | {
                        api_key?: string;
                        has_api_key?: boolean;
                        model: string;
                        provider: "openrouter"
                        | "openai"
                        | "google"
                        | "anthropic";
                    };
                    text?: | null
                    | {
                        api_key?: string;
                        has_api_key?: boolean;
                        model: string;
                        provider: "openrouter"
                        | "openai"
                        | "google"
                        | "anthropic";
                    };
                };
                client_type?: "personal"
                | "company";
                creation_date: string;
                name: string;
                trial_tested?: boolean;
            };
        };
        ClientsOrganizationCreate: {
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            name: string;
        };
        ClientsOrganizationList: {
            organizations: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_use?: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                ai_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                creation_date: string;
                id_client: string;
                name: string;
                parent_organization?: string;
                social_credentials?: {
                    discord?: {
                        application_name?: string;
                        client_id?: string;
                        has_bot_token?: boolean;
                        has_client_secret?: boolean;
                        verified_date?: string;
                    };
                };
                stats_settings?: { auto_refresh_twitter: boolean };
            }[];
            total: number;
        };
        ClientsOrganizationOne: {
            organization: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_use?: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                ai_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                creation_date: string;
                id_client: string;
                name: string;
                parent_organization?: string;
                social_credentials?: {
                    discord?: {
                        application_name?: string;
                        client_id?: string;
                        has_bot_token?: boolean;
                        has_client_secret?: boolean;
                        verified_date?: string;
                    };
                };
                stats_settings?: { auto_refresh_twitter: boolean };
            };
        };
        ClientsOrganizationUpdate: {
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
        ClientsPlan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            plan_identifier: "basic"
            | "free"
            | "pro"
            | "custom";
            require_action?: boolean;
            status: string;
            stripe_customer_id?: string;
        };
        ClientsRolesClientPermissions: | "client:update"
        | "client:read"
        | "client:delete"
        | "client_app:create"
        | "client_app:update"
        | "client_app:read"
        | "client_app:delete"
        | "client_roles:create"
        | "client_roles:update"
        | "client_roles:read"
        | "client_roles:delete"
        | "client_roles_users:read"
        | "client_roles_users:create"
        | "client_roles_users:delete"
        | "client_organization:create"
        | "client_organization:update"
        | "client_organization:read"
        | "client_organization:delete"
        | "client_organization_roles:read"
        | "client_organization_roles:create"
        | "client_organization_roles:update"
        | "client_organization_roles:delete"
        | "client_organization_users_roles:read"
        | "client_organization_users_roles:create"
        | "client_organization_users_roles:delete"
        | "client_organization_accounts:read"
        | "client_organization_accounts:create"
        | "client_organization_accounts:update"
        | "client_organization_accounts:delete"
        | "client_organization_files:read"
        | "client_organization_files:create"
        | "client_organization_files:update"
        | "client_organization_files:delete"
        | "client_organization_publications:read"
        | "client_organization_publications:create"
        | "client_organization_publications:update"
        | "client_organization_publications:delete"
        | "client_organization_publications_stats:read"
        | "client_organization_account_stats:read";
        ClientsRolesClientPermissionsList: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
        )[];
        ClientsRolesClientPermissionsOne: {
            permissions?: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
            )[];
        };
        ClientsRolesRole: {
            name?: string;
            permissions?: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
            )[];
        };
        ClientsRolesRoleInput: {
            name: string;
            permissions: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
                | "client_organization_products:create"
                | "client_organization_products:update"
                | "client_organization_products:read"
                | "client_organization_products:delete"
                | "client_organization_messages:create"
                | "client_organization_messages:read"
                | "client_organization_messages:delete"
                | "client_organization_contacts:create"
                | "client_organization_contacts:read"
                | "client_organization_contacts:update"
                | "client_organization_contacts:delete"
                | "client_organization_ai_plans:create"
                | "client_organization_ai_plans:read"
                | "client_organization_ai_plans:update"
                | "client_organization_ai_plans:delete"
            )[];
        };
        ClientsRolesRoleList: {
            roles?: {
                name?: string;
                permissions?: (
                    | "client:update"
                    | "client:read"
                    | "client:delete"
                    | "client_app:create"
                    | "client_app:update"
                    | "client_app:read"
                    | "client_app:delete"
                    | "client_roles:create"
                    | "client_roles:update"
                    | "client_roles:read"
                    | "client_roles:delete"
                    | "client_roles_users:read"
                    | "client_roles_users:create"
                    | "client_roles_users:delete"
                    | "client_organization:create"
                    | "client_organization:update"
                    | "client_organization:read"
                    | "client_organization:delete"
                    | "client_organization_roles:read"
                    | "client_organization_roles:create"
                    | "client_organization_roles:update"
                    | "client_organization_roles:delete"
                    | "client_organization_users_roles:read"
                    | "client_organization_users_roles:create"
                    | "client_organization_users_roles:delete"
                    | "client_organization_accounts:read"
                    | "client_organization_accounts:create"
                    | "client_organization_accounts:update"
                    | "client_organization_accounts:delete"
                    | "client_organization_files:read"
                    | "client_organization_files:create"
                    | "client_organization_files:update"
                    | "client_organization_files:delete"
                    | "client_organization_publications:read"
                    | "client_organization_publications:create"
                    | "client_organization_publications:update"
                    | "client_organization_publications:delete"
                    | "client_organization_publications_stats:read"
                    | "client_organization_account_stats:read"
                )[];
            }[];
            total?: number;
        };
        ClientsRolesRoleOne: {
            rol?: {
                name?: string;
                permissions?: (
                    | "client:update"
                    | "client:read"
                    | "client:delete"
                    | "client_app:create"
                    | "client_app:update"
                    | "client_app:read"
                    | "client_app:delete"
                    | "client_roles:create"
                    | "client_roles:update"
                    | "client_roles:read"
                    | "client_roles:delete"
                    | "client_roles_users:read"
                    | "client_roles_users:create"
                    | "client_roles_users:delete"
                    | "client_organization:create"
                    | "client_organization:update"
                    | "client_organization:read"
                    | "client_organization:delete"
                    | "client_organization_roles:read"
                    | "client_organization_roles:create"
                    | "client_organization_roles:update"
                    | "client_organization_roles:delete"
                    | "client_organization_users_roles:read"
                    | "client_organization_users_roles:create"
                    | "client_organization_users_roles:delete"
                    | "client_organization_accounts:read"
                    | "client_organization_accounts:create"
                    | "client_organization_accounts:update"
                    | "client_organization_accounts:delete"
                    | "client_organization_files:read"
                    | "client_organization_files:create"
                    | "client_organization_files:update"
                    | "client_organization_files:delete"
                    | "client_organization_publications:read"
                    | "client_organization_publications:create"
                    | "client_organization_publications:update"
                    | "client_organization_publications:delete"
                    | "client_organization_publications_stats:read"
                    | "client_organization_account_stats:read"
                )[];
            };
        };
        ClientsRolesUser: {
            email?: string;
            firstname?: string;
            id?: string;
            lastname?: string;
            username?: string;
        };
        ClientsRolesUserList: {
            total?: number;
            users?: {
                email?: string;
                firstname?: string;
                id?: string;
                lastname?: string;
                username?: string;
            }[];
        };
        CommentsAiPlanWebhookChange: {
            credits_spent: number;
            error?: { code: number; message: string };
            field: "ai_plan_generated" | "ai_plan_failed";
            id_ai_plan: string;
            id_organization: string;
            state: "generated" | "failed";
            template:
                | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            total_publications: number;
            warnings: number;
        };
        CommentsAiPlanWebhookError: { code: number; message: string };
        CommentsComment: {
            _id: string;
            author: {
                external_id: string;
                is_own: boolean;
                name?: string;
                profile_pic?: string;
            };
            collected_date: string;
            creation_date: string;
            deleted: boolean;
            external_id: string;
            hidden: boolean;
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
            like_count?: number;
            our_reply_external_id?: string;
            parent_external_id?: string;
            publication_external_id: string;
            rating?: number;
            read: boolean;
            replied: boolean;
            reply_count?: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "twitter"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads";
            text: string;
        };
        CommentsCommentActions: {
            delete_others: boolean;
            delete_own: boolean;
            hide: boolean;
            reply: boolean;
        };
        CommentsCommentAuthor: {
            external_id: string;
            is_own: boolean;
            name?: string;
            profile_pic?: string;
        };
        CommentsCommentNetworkName: | "facebook"
        | "instagram"
        | "linkedin"
        | "twitter"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads";
        CommentsCommentThread: {
            comments: {
                _id: string;
                author: {
                    external_id: string;
                    is_own: boolean;
                    name?: string;
                    profile_pic?: string;
                };
                collected_date: string;
                creation_date: string;
                deleted: boolean;
                external_id: string;
                hidden: boolean;
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                };
                id_organization: string;
                id_publication?: | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...) | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                };
                like_count?: number;
                our_reply_external_id?: string;
                parent_external_id?: string;
                publication_external_id: string;
                rating?: number;
                read: boolean;
                replied: boolean;
                reply_count?: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "twitter"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads";
                text: string;
            }[];
            credits_consumed: number;
            next_cursor?: string;
            total: number;
        };
        CommentsIntegrationWebhookChange: {
            error_code: number;
            field: "integration_error";
            id_integration: string;
            id_organization: string;
            provider: string;
        };
        CommentsSocialCapabilities: {
            comments: boolean;
            destinations: boolean;
            link: boolean;
            made_for_kids: boolean;
            messages: boolean;
            persistent_menu: boolean;
            products: boolean;
            publications: boolean;
            reply_control: boolean;
            visibility: boolean;
            webhooks: boolean;
        };
        CommentsWebhookChange: {
            commentObj?: {
                _id: string;
                author: {
                    external_id: string;
                    is_own: boolean;
                    name?: string;
                    profile_pic?: string;
                };
                collected_date: string;
                creation_date: string;
                deleted: boolean;
                external_id: string;
                hidden: boolean;
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                };
                id_organization: string;
                id_publication?: | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...) | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                };
                like_count?: number;
                our_reply_external_id?: string;
                parent_external_id?: string;
                publication_external_id: string;
                rating?: number;
                read: boolean;
                replied: boolean;
                reply_count?: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "twitter"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads";
                text: string;
            };
            field: | "comments"
            | "messages"
            | "new_account"
            | "change_state_account"
            | "messaging_postbacks"
            | "messaging_seen"
            | "messaging_error";
            id_account: string;
            id_contact?: string;
            id_organization: string;
            messageObj?: {
                _id: string;
                contact_id?: | string
                | {
                    _id: string;
                    creation_date: string;
                    creator_keycloak_identifier?: string;
                    extra_data?: {
                        address?: string;
                        boolean_property?: boolean;
                        boolean_property2?: boolean;
                        building?: string
                        | number;
                        city?: string;
                        coords?: number[];
                        country?: string;
                        country_code?: string;
                        door?: string | number;
                        floor?: string | number;
                        number?: string | number;
                        number_property?: number;
                        number_property2?: number;
                        place_id?: string;
                        state?: string;
                        string_property?: string;
                        string_property2?: string;
                        zip_code?: string | number;
                    };
                    id_organization: string;
                    last_contact_update: string;
                    name?: string;
                    profile_image?: string;
                    social_identifiers: {
                        _id: string;
                        external_identifier?: string;
                        last_send_date?: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "email";
                    }[];
                };
                creation_date: string;
                element_external_id?: string;
                from_contact_id?: | string
                | {
                    _id: string;
                    creation_date: string;
                    creator_keycloak_identifier?: string;
                    extra_data?: {
                        address?: string;
                        boolean_property?: boolean;
                        boolean_property2?: boolean;
                        building?: string
                        | number;
                        city?: string;
                        coords?: number[];
                        country?: string;
                        country_code?: string;
                        door?: string | number;
                        floor?: string | number;
                        number?: string | number;
                        number_property?: number;
                        number_property2?: number;
                        place_id?: string;
                        state?: string;
                        string_property?: string;
                        string_property2?: string;
                        zip_code?: string | number;
                    };
                    id_organization: string;
                    last_contact_update: string;
                    name?: string;
                    profile_image?: string;
                    social_identifiers: {
                        _id: string;
                        external_identifier?: string;
                        last_send_date?: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "email";
                    }[];
                };
                id_account: string;
                in_response_external_id?: string;
                in_response_to?: string;
                message_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                message_options: {
                    files: (
                        | string
                        | {
                            _id: string;
                            ai_generated?: {
                                generated_at: string;
                                id_ai_plan?: (...)
                                | (...);
                                model: string;
                                provider: string;
                            };
                            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                            cover_offset?: number;
                            creation_date: string;
                            file_externals: {
                                external_identifier: string;
                                external_url: string;
                                social_network: | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            }[];
                            file_format: "mp4"
                            | "jpeg"
                            | "gif"
                            | "png"
                            | "jpg";
                            file_properties: {
                                allowed_social_networks: string[];
                                aspect_ratio: { text: string; value: number };
                                duration: number;
                                height: number;
                                size_in_bytes: number;
                                width: number;
                            };
                            file_type: "video"
                            | "image";
                            id_organization: string;
                            is_temporal: boolean;
                            name: string;
                            public_path: string;
                        }
                    )[];
                    files_urls: { mime_type?: string; url?: string }[];
                    metaElements?: { [key: string]: unknown }[];
                    metaQuickReplies?: { [key: string]: unknown }[];
                    payload?: string;
                    template_language?: string;
                    template_name?: string;
                    template_parameters?: string[];
                    whatsappInteractive?: { [key: string]: unknown };
                };
                message_type: | "simple_message"
                | "file_message"
                | "comment_message"
                | "publication_message"
                | "quick_reply_message"
                | "button_message"
                | "elements_message"
                | "postback_message"
                | "template_message"
                | "interactive_message";
                read: boolean;
                text?: string;
            };
            originalChange?: { [key: string]: unknown };
            social_network:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
        };
        Contact: {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        ContactChannel: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "email";
        ContactExtraData: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string
            | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        ContactsContactCreate: {
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id?: string;
                external_identifier?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        ContactsContactUpdate: {
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            name?: string;
            profile_image?: string;
            social_identifiers?: {
                _id?: string;
                external_identifier?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        ContactsSocialIdentifierInput: {
            _id?: string;
            external_identifier?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        };
        DashboardAccountWithError: {
            _id: string;
            error_code: number;
            image?: string;
            name: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
        DashboardDashboard: {
            account_metrics?: {
                by_day: {
                    group: null
                    | string;
                    name:
                        | "reach"
                        | "impressions"
                        | "followers"
                        | "comments"
                        | "engagement"
                        | "likes"
                        | "shares"
                        | "saves"
                        | "clicks"
                        | "video_views"
                        | "profile_views"
                        | "followers_gained";
                    value: number;
                }[];
                by_network: {
                    group: null
                    | string;
                    name:
                        | "reach"
                        | "impressions"
                        | "followers"
                        | "comments"
                        | "engagement"
                        | "likes"
                        | "shares"
                        | "saves"
                        | "clicks"
                        | "video_views"
                        | "profile_views"
                        | "followers_gained";
                    value: number;
                }[];
                previous_total: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                total: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
            };
            ai_plan_results?: {
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                plans: number;
                ranked_plans: number;
                top: {
                    accounts: number;
                    archived_date?: string;
                    creation_date: string;
                    credits_per_engagement?: number;
                    credits_spent: number;
                    engagement_per_publication?: number;
                    engagement_vs_average?: number;
                    expected_engagement_per_publication?: number;
                    id_ai_plan: string;
                    id_organization: string;
                    last_publish_date?: string;
                    maturing: boolean;
                    metrics: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    prompt: string;
                    publications: {
                        failed: number;
                        measured: number;
                        published: number;
                        scheduled: number;
                        total: number;
                    };
                    ranked: boolean;
                    social_networks: (
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest"
                    )[];
                    state: "generated"
                    | "validated";
                    template:
                        | "standard"
                        | "from_images"
                        | "from_text"
                        | "from_catalog"
                        | "campaign";
                    week_start: string;
                }[];
            };
            ai_plans?: {
                by_state: { state?: string; total?: number }[];
                credits_spent: number;
                generated_publications: number;
                last_plan?: {
                    _id: string;
                    creation_date: string;
                    credits_spent?: number;
                    error?: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    };
                    generation_end_date?: string;
                    prompt?: string;
                    publications?: string[];
                    state: | "pending"
                    | "generating"
                    | "generated"
                    | "validated"
                    | "failed"
                    | "cancelled";
                };
                pending_validation: number;
                total: number;
            };
            available_blocks: {
                account_metrics: boolean;
                ai_plan_results: boolean;
                ai_plans: boolean;
                health: boolean;
                messages: boolean;
                plan_use: boolean;
                publication_metrics: boolean;
                publications: boolean;
            };
            health?: {
                accounts_with_errors?: {
                    _id: string;
                    error_code: number;
                    image?: string;
                    name: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                }[];
                publications_with_errors?: {
                    _id: string;
                    creation_date?: string;
                    name?: string;
                    publication_errors?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publication_warnings?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publish_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    text?: string;
                }[];
                total_drafts?: number;
                upcoming_publications?: {
                    _id: string;
                    creation_date?: string;
                    name?: string;
                    publication_errors?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publication_warnings?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publish_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    text?: string;
                }[];
            };
            messages?: { unread: number };
            plan_use?: {
                actual_asigned: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_use: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                limits: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
            };
            publication_metrics?: {
                by_network: {
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    publications?: number;
                    social_network?: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                previous_total: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                top: {
                    collected_date?: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    id_publication: string;
                    metrics: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    publication: {
                        external_identifier?: string;
                        files?: {
                            _id: string;
                            ai_generated?: (...)
                            | (...);
                            cover_image?: (...) | (...);
                            cover_offset?: (...) | (...);
                            creation_date: string;
                            file_externals: (...)[];
                            file_format: (...) | (...) | (...) | (...) | (...);
                            file_properties: {
                                allowed_social_networks: ...;
                                aspect_ratio: ...;
                                duration: ...;
                                height: ...;
                                size_in_bytes: ...;
                                width: ...;
                            };
                            file_type: (...)
                            | (...);
                            id_organization: string;
                            is_temporal: boolean;
                            name: string;
                            public_path: string;
                        }[];
                        publication_type?: string;
                        text?: string;
                        title?: string;
                        url?: string;
                    };
                    publish_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                total: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
            };
            publications?: {
                by_day: { day?: string; state?: string; total?: number }[];
                by_network: {
                    social_network?:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    total?: number;
                }[];
                by_state: { state?: string; total?: number }[];
                published_by_day: {
                    day?: string;
                    social_network?:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    total?: number;
                }[];
                total: number;
            } & { previous_total?: number };
            range: {
                from_date: string;
                previous_from_date: string;
                previous_to_date: string;
                to_date: string;
            };
        };
        DashboardDashboardAiPlanRef: {
            _id: string;
            creation_date: string;
            credits_spent?: number;
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            prompt?: string;
            publications?: string[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        };
        DashboardDashboardPublicationRef: {
            _id: string;
            creation_date?: string;
            name?: string;
            publication_errors?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            text?: string;
        };
        DashboardDashboardRange: {
            from_date: string;
            previous_from_date: string;
            previous_to_date: string;
            to_date: string;
        };
        DashboardMetricName: | "reach"
        | "impressions"
        | "followers"
        | "comments"
        | "engagement"
        | "likes"
        | "shares"
        | "saves"
        | "clicks"
        | "video_views"
        | "profile_views"
        | "followers_gained";
        DashboardMetricRow: {
            group: null
            | string;
            name:
                | "reach"
                | "impressions"
                | "followers"
                | "comments"
                | "engagement"
                | "likes"
                | "shares"
                | "saves"
                | "clicks"
                | "video_views"
                | "profile_views"
                | "followers_gained";
            value: number;
        };
        DashboardPlanUse: {
            actual_asigned: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            limits: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
        };
        DashboardPublicationsSummary: {
            by_day: { day?: string; state?: string; total?: number }[];
            by_network: {
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                total?: number;
            }[];
            by_state: { state?: string; total?: number }[];
            published_by_day: {
                day?: string;
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                total?: number;
            }[];
            total: number;
        };
        DashboardTopPublication: {
            collected_date?: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            id_publication: string;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            publication: {
                external_identifier?: string;
                files?: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                publication_type?: string;
                text?: string;
                title?: string;
                url?: string;
            };
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        };
        Error: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        };
        FileProperties: {
            allowed_social_networks: string[];
            aspect_ratio: { text: string; value: number };
            duration: number;
            height: number;
            size_in_bytes: number;
            width: number;
        };
        IntegrationsGoogleDriveConnectRequest: {
            code: string;
            provider: "google_drive";
        };
        IntegrationsIntegration: {
            _id: string;
            config: {
                api_base?: "wp-json"
                | "rest_route";
                auth_mode?: "query" | "basic";
                auto_publish?: boolean;
                currency?: string;
                id_accounts?: string[];
                import_image?: boolean;
                key_ending?: string;
                last_checked?: string;
                publication_type?: string;
                seen_guids?: string[];
                tax_location_missing?: boolean;
                template?: string;
                url?: string;
            };
            connected: boolean;
            creation_date: string;
            enabled: boolean;
            error_code?: null
            | number;
            external_identifier?: string;
            id_client: string;
            id_organization: string;
            last_used_date?: string;
            name: string;
            provider: "google_drive" | "rss" | "woocommerce";
        };
        IntegrationsIntegrationCatalogPage: {
            items: {
                available: boolean;
                description?: string;
                external_id: string;
                image_url?: string;
                name: string;
                permalink?: string;
                price?: string;
            }[];
            next_cursor?: string;
        };
        IntegrationsIntegrationCatalogProduct: {
            available: boolean;
            description?: string;
            external_id: string;
            image_url?: string;
            name: string;
            permalink?: string;
            price?: string;
        };
        IntegrationsIntegrationConfig: {
            api_base?: "wp-json"
            | "rest_route";
            auth_mode?: "query" | "basic";
            auto_publish?: boolean;
            currency?: string;
            id_accounts?: string[];
            import_image?: boolean;
            key_ending?: string;
            last_checked?: string;
            publication_type?: string;
            seen_guids?: string[];
            tax_location_missing?: boolean;
            template?: string;
            url?: string;
        };
        IntegrationsIntegrationFormField: {
            default?: unknown;
            name: string;
            options?: string[];
            required: boolean;
            type: | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "accounts"
            | "secret";
        };
        IntegrationsIntegrationProvider: {
            accepted_formats: string[];
            catalog: boolean;
            config_fields: {
                default?: unknown;
                name: string;
                options?: string[];
                required: boolean;
                type: | "boolean"
                | "text"
                | "textarea"
                | "url"
                | "select"
                | "accounts"
                | "secret";
            }[];
            connect_link: boolean;
            connect_link_fields: {
                default?: unknown;
                name: string;
                options?: string[];
                required: boolean;
                type: | "boolean"
                | "text"
                | "textarea"
                | "url"
                | "select"
                | "accounts"
                | "secret";
            }[];
            content_feed: boolean;
            file_import: boolean;
            provider: "google_drive"
            | "rss"
            | "woocommerce";
            requires_oauth: boolean;
        };
        IntegrationsIntegrationProviderName: | "google_drive"
        | "rss"
        | "woocommerce";
        IntegrationsRssConfig: {
            auto_publish?: boolean;
            id_accounts?: string[];
            import_image?: boolean;
            last_checked?: string;
            publication_type?: string;
            seen_guids?: string[];
            template?: string;
            url?: string;
        };
        IntegrationsRssConnectRequest: {
            auto_publish?: boolean;
            id_accounts: string[];
            import_image?: boolean;
            provider: "rss";
            publication_type?: string;
            template?: string;
            url: string;
        };
        IntegrationsWooCommerceConnectRequest: {
            consumer_key: string;
            consumer_secret: string;
            provider: "woocommerce";
            url: string;
        };
        Message: {
            _id: string;
            contact_id?: | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            creation_date: string;
            element_external_id?: string;
            from_contact_id?: | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            id_account: string;
            in_response_external_id?: string;
            in_response_to?: string;
            message_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            message_options: {
                files: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: string;
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }
                )[];
                files_urls: { mime_type?: string; url?: string }[];
                metaElements?: { [key: string]: unknown }[];
                metaQuickReplies?: { [key: string]: unknown }[];
                payload?: string;
                template_language?: string;
                template_name?: string;
                template_parameters?: string[];
                whatsappInteractive?: { [key: string]: unknown };
            };
            message_type: | "simple_message"
            | "file_message"
            | "comment_message"
            | "publication_message"
            | "quick_reply_message"
            | "button_message"
            | "elements_message"
            | "postback_message"
            | "template_message"
            | "interactive_message";
            read: boolean;
            text?: string;
        };
        MessageOptions: {
            files: (
                | string
                | {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }
            )[];
            files_urls: { mime_type?: string; url?: string }[];
            metaElements?: { [key: string]: unknown }[];
            metaQuickReplies?: { [key: string]: unknown }[];
            payload?: string;
            template_language?: string;
            template_name?: string;
            template_parameters?: string[];
            whatsappInteractive?: { [key: string]: unknown };
        };
        MessagesConversation: {
            contact: {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            date: string;
            unread_messages: number;
        };
        MessagesConversationTotals: | { total: number }
        | {
            group: "day" | "month" | "year";
            stats: { groupValue: number; totalConversations: number }[];
        };
        MessagesMessageInput: {
            in_response_external_id?: string;
            message_options?: {
                files: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: string;
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }
                )[];
                files_urls: { mime_type?: string; url?: string }[];
                metaElements?: { [key: string]: unknown }[];
                metaQuickReplies?: { [key: string]: unknown }[];
                payload?: string;
                template_language?: string;
                template_name?: string;
                template_parameters?: string[];
                whatsappInteractive?: { [key: string]: unknown };
            };
            message_type: | "simple_message"
            | "file_message"
            | "comment_message"
            | "publication_message"
            | "quick_reply_message"
            | "button_message"
            | "elements_message"
            | "postback_message"
            | "template_message"
            | "interactive_message";
            text?: string;
        };
        MessageType: | "simple_message"
        | "file_message"
        | "comment_message"
        | "publication_message"
        | "quick_reply_message"
        | "button_message"
        | "elements_message"
        | "postback_message"
        | "template_message"
        | "interactive_message";
        NormalizedMetrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        Organization: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
        OrganizationsLimit: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        OrganizationsOrganizationCreate: {
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            name: string;
        };
        OrganizationsOrganizationList: {
            organizations: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_use?: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                ai_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                creation_date: string;
                id_client: string;
                name: string;
                parent_organization?: string;
                social_credentials?: {
                    discord?: {
                        application_name?: string;
                        client_id?: string;
                        has_bot_token?: boolean;
                        has_client_secret?: boolean;
                        verified_date?: string;
                    };
                };
                stats_settings?: { auto_refresh_twitter: boolean };
            }[];
            total: number;
        };
        OrganizationsOrganizationOne: {
            organization: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                actual_use?: { publications?: number; users?: number } & {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                ai_context?: {
                    audience?: string;
                    avoid?: string;
                    blog_url?: string;
                    brand_name?: string;
                    default_tone?: string;
                    description?: string;
                    keywords?: string[];
                    notes?: string;
                    products?: string;
                    sector?: string;
                    shop_url?: string;
                    social_urls?: string[];
                    value_proposition?: string;
                    website?: string;
                };
                creation_date: string;
                id_client: string;
                name: string;
                parent_organization?: string;
                social_credentials?: {
                    discord?: {
                        application_name?: string;
                        client_id?: string;
                        has_bot_token?: boolean;
                        has_client_secret?: boolean;
                        verified_date?: string;
                    };
                };
                stats_settings?: { auto_refresh_twitter: boolean };
            };
        };
        OrganizationsOrganizationUpdate: {
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
        OrganizationsRolesOrganizationRole: {
            _id?: string;
            creation_date?: string;
            default?: boolean;
            id_organization?: string;
            name?: string;
            permissions?: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
            total_users?: number;
        };
        OrganizationsRolesOrganizationRoleInput: {
            name: string;
            permissions: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
        };
        OrganizationsRolesOrganizationRoleList: {
            roles?: {
                _id?: string;
                creation_date?: string;
                default?: boolean;
                id_organization?: string;
                name?: string;
                permissions?: (
                    | "organization:create"
                    | "organization:update"
                    | "organization:read"
                    | "organization:delete"
                    | "organization_roles:create"
                    | "organization_roles:update"
                    | "organization_roles:read"
                    | "organization_roles:delete"
                    | "organization_users_roles:read"
                    | "organization_users_roles:create"
                    | "organization_users_roles:delete"
                    | "accounts:create"
                    | "accounts:update"
                    | "accounts:read"
                    | "accounts:delete"
                    | "products:create"
                    | "products:update"
                    | "products:read"
                    | "products:delete"
                    | "files:create"
                    | "files:update"
                    | "files:read"
                    | "files:delete"
                    | "publications:create"
                    | "publications:update"
                    | "publications:read"
                    | "publications:delete"
                    | "account_stats:read"
                    | "publication_stats:read"
                    | "messages:create"
                    | "messages:read"
                    | "messages:delete"
                    | "contacts:create"
                    | "contacts:read"
                    | "contacts:update"
                    | "contacts:delete"
                    | "ai_plans:create"
                    | "ai_plans:read"
                    | "ai_plans:update"
                    | "ai_plans:delete"
                )[];
                total_users?: number;
            }[];
            total?: number;
        };
        OrganizationsRolesOrganizationRoleOne: {
            rol?: {
                _id?: string;
                creation_date?: string;
                default?: boolean;
                id_organization?: string;
                name?: string;
                permissions?: (
                    | "organization:create"
                    | "organization:update"
                    | "organization:read"
                    | "organization:delete"
                    | "organization_roles:create"
                    | "organization_roles:update"
                    | "organization_roles:read"
                    | "organization_roles:delete"
                    | "organization_users_roles:read"
                    | "organization_users_roles:create"
                    | "organization_users_roles:delete"
                    | "accounts:create"
                    | "accounts:update"
                    | "accounts:read"
                    | "accounts:delete"
                    | "products:create"
                    | "products:update"
                    | "products:read"
                    | "products:delete"
                    | "files:create"
                    | "files:update"
                    | "files:read"
                    | "files:delete"
                    | "publications:create"
                    | "publications:update"
                    | "publications:read"
                    | "publications:delete"
                    | "account_stats:read"
                    | "publication_stats:read"
                    | "messages:create"
                    | "messages:read"
                    | "messages:delete"
                    | "contacts:create"
                    | "contacts:read"
                    | "contacts:update"
                    | "contacts:delete"
                    | "ai_plans:create"
                    | "ai_plans:read"
                    | "ai_plans:update"
                    | "ai_plans:delete"
                )[];
                total_users?: number;
            };
        };
        OrganizationsRolesPermissionList: {
            permissions?: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
        };
        OrganizationsRolesUserInOrganization: {
            email?: string;
            enabled?: boolean;
            firstname?: string;
            id?: string;
            lastname?: string;
            roles?: { _id?: string; name?: string }[];
            username?: string;
        };
        OrganizationsRolesUserInOrganizationList: {
            total?: number;
            users?: {
                email?: string;
                enabled?: boolean;
                firstname?: string;
                id?: string;
                lastname?: string;
                roles?: { _id?: string; name?: string }[];
                username?: string;
            }[];
        };
        OrganizationsSocialCredentialsInput: {
            bot_token?: string;
            client_id?: string;
            client_secret?: string;
        };
        OrganizationsUser: {
            email?: string;
            firstname?: string;
            id?: string;
            lastname?: string;
            username?: string;
        };
        OrganizationsUserList: {
            total?: number;
            users?: {
                email?: string;
                firstname?: string;
                id?: string;
                lastname?: string;
                username?: string;
            }[];
        };
        PlanData: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        PlanUseData: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        ProductsProduct: {
            additional_image_urls?: string[];
            availability?: | "pending"
            | "in stock"
            | "out of stock"
            | "preorder"
            | "available for order"
            | "discontinued"
            | "mark_as_sold";
            brand?: string;
            category?: string;
            color?: string;
            condition?: | "new"
            | "refurbished"
            | "used"
            | "used_like_new"
            | "used_good"
            | "used_fair"
            | "cpo"
            | "open_box_new";
            currency: string;
            description?: string;
            id?: string;
            image_url: string;
            name: string;
            price: number;
            retailer_id: string;
            url?: string;
        } & { [key: string]: unknown };
        ProductsProductCatalog: {
            default_image_url?: string;
            feed_count?: number;
            id?: string;
            is_catalog_segment?: boolean;
            is_local_catalog?: boolean;
            name?: string;
            product_count?: number;
        } & { [key: string]: unknown };
        ProductsProductCatalogInput: { name: string };
        ProductsProductInput: {
            additional_image_urls?: string[];
            availability?:
                | "pending"
                | "in stock"
                | "out of stock"
                | "preorder"
                | "available for order"
                | "discontinued"
                | "mark_as_sold";
            brand?: string;
            category?: string;
            color?: string;
            condition?: | "new"
            | "refurbished"
            | "used"
            | "used_like_new"
            | "used_good"
            | "used_fair"
            | "cpo"
            | "open_box_new";
            currency: string;
            description?: string;
            id?: string;
            image_url: string;
            name: string;
            price: number;
            retailer_id: string;
            url?: string;
        } & { [key: string]: unknown };
        Publication: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
        PublicationAiGenerated: { image: boolean; text: boolean };
        PublicationDestination: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        PublicationPending: {
            data?: { [key: string]: unknown };
            deadline?: string;
            next_check?: string;
            temp_keys?: string[];
        };
        PublicationsDestination: {
            description?: string;
            id: string;
            image?: string;
            name: string;
            privacy?: string;
            sections?: { id: string; name: string }[];
        };
        PublicationsPublicationInput: {
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            files?: string[];
            link?: string;
            made_for_kids?: boolean;
            name?: string;
            publication_type?: "profile"
            | "page"
            | "group"
            | "reels"
            | "stories";
            publish_date?: string;
            reply_control?:
                | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
            social_network?: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state?: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            text?: string;
            title?: string;
            visibility?: "public" | "unlisted" | "private";
        };
        PublicationsPublicationList: {
            publications: {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }[];
            total: number;
        };
        PublicationsPublicationOne: {
            publication: {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
        };
        PublicationsPublicationRetry: {
            max_retries: number;
            publication: {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: boolean } & {
                        [key: string]: unknown;
                    };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
        };
        PublicationsPublicationsStatsList: {
            metric?: string;
            publications?: {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: (...)
                    | (...)
                    | (...) } & { [key: string]: unknown };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }[];
            range?: {
                from_date?: string;
                previous_from_date?: string;
                previous_to_date?: string;
                to_date?: string;
            };
            summary?: {
                by_network?: {
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    publications?: number;
                    social_network?: string;
                }[];
                previous_total?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                total?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
            };
            total?: number;
        };
        PublicationsPublicationStatsHistory: {
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            id_publication: string;
            latest?: {
                collected_date: string;
                engagement_base?: "reach" | "impressions" | "followers";
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                raw?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
            };
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            next_stats_update?: string;
            publish_date?: string;
            series: {
                collected_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
            }[];
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
        };
        PublicationsPublicationStatsPoint: {
            collected_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        PublicationStats: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        };
        SocialCredentials: {
            application_name?: string;
            client_id?: string;
            has_bot_token?: boolean;
            has_client_secret?: boolean;
            verified_date?: string;
        };
        SocialIdentifier: {
            _id: string;
            external_identifier?: string;
            last_send_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        };
        SocialNetwork: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        StatsSettings: { auto_refresh_twitter: boolean };
        Success: { success: boolean };
        Upload: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        };
        UploadsUploadList: {
            total: number;
            uploads: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
        };
        UploadsUploadOne: {
            upload: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            };
        };
    };
}

Properties

headers: never
parameters: {
    AiPlansfromDate: string;
    AiPlansidAiPlan: string;
    AiPlansidClient: string;
    AiPlansidOrganization: string;
    AiPlanstoDate: string;
    AppsidApp: string;
    AppsidClient: string;
    Appslimit: number;
    Appsoffset: number;
    CommentsidAccount: string;
    CommentsidComment: string;
    CommentsidOrganization: string;
    CommentsidPublication: string;
    CommentsthreadLimit: number;
    CommentsthreadOffset: string;
    ContactsidContact: string;
    ContactsidOrganization: string;
    Contactslimit: number;
    Contactsoffset: number;
    DashboardfromDate: string;
    DashboardidOrganization: string;
    DashboardtoDate: string;
    IntegrationsidIntegration: string;
    IntegrationsidOrganization: string;
    MessagesfromDate: string;
    MessagesgroupBy: "day" | "month" | "year";
    MessagesidAccount: string;
    MessagesidContact: string;
    MessagesidOrganization: string;
    Messageslimit: number;
    Messagesoffset: number;
    MessagestoDate: string;
    OrganizationsRolesidOrganization: string;
    OrganizationsRolesidRol: string;
    OrganizationsRolesidUser: string;
    OrganizationsRoleslimit: number;
    OrganizationsRolesoffset: number;
    ProductsidAccount: string;
    ProductsidOrganization: string;
    Productslimit: number;
    Productsoffset: number;
}

Type declaration

  • AiPlansfromDate: string

    Start of the range, ISO 8601. Defaults to 30 days before to_date. A range longer than 366 days answers error 1003.

  • AiPlansidAiPlan: string

    AI plan identifier

  • AiPlansidClient: string

    Client identifier

  • AiPlansidOrganization: string

    Organization identifier

  • AiPlanstoDate: string

    End of the range, ISO 8601. Defaults to now.

  • AppsidApp: string

    App identifier

  • AppsidClient: string

    Client identifier

  • Appslimit: number

    Records per page (pagination)

  • Appsoffset: number

    Records to skip (pagination)

  • CommentsidAccount: string

    Connected account identifier

  • CommentsidComment: string

    Comment identifier (PlanVortex's _id, not the network's external_id)

  • CommentsidOrganization: string

    Organization identifier

  • CommentsidPublication: string

    Publication identifier

  • CommentsthreadLimit: number

    How many to read from the network. On X it is capped regardless of what you send: a page there is a spending ceiling, not a pagination preference.

  • CommentsthreadOffset: string

    Page cursor. Pass back the next_cursor of the previous response — it is an opaque token from the network, not a numeric offset.

  • ContactsidContact: string

    Contact identifier

  • ContactsidOrganization: string

    Organization identifier

  • Contactslimit: number

    Records per page (pagination)

  • Contactsoffset: number

    Records to skip (pagination)

  • DashboardfromDate: string

    Start of the range, ISO 8601. Defaults to 30 days before to_date. A range longer than 366 days answers error 1003.

  • DashboardidOrganization: string

    Organization identifier

  • DashboardtoDate: string

    End of the range, ISO 8601. Defaults to now.

  • IntegrationsidIntegration: string

    Integration identifier

  • IntegrationsidOrganization: string

    Organization identifier

  • MessagesfromDate: string

    Start of the range, ISO 8601. Defaults to the start of the current month.

  • MessagesgroupBy: "day" | "month" | "year"

    Group the count into a series. Omit it and the answer is a single total instead.

  • MessagesidAccount: string

    Connected account identifier

  • MessagesidContact: string

    Contact identifier

  • MessagesidOrganization: string

    Organization identifier

  • Messageslimit: number

    Records per page (pagination)

  • Messagesoffset: number

    Records to skip (pagination)

  • MessagestoDate: string

    End of the range, ISO 8601. Defaults to the end of the current month.

  • OrganizationsRolesidOrganization: string

    Organization identifier

  • OrganizationsRolesidRol: string

    Role identifier

  • OrganizationsRolesidUser: string

    User identifier

  • OrganizationsRoleslimit: number

    Maximum number of records returned (pagination)

  • OrganizationsRolesoffset: number

    Number of records to skip (pagination)

  • ProductsidAccount: string

    Connected account identifier

  • ProductsidOrganization: string

    Organization identifier

  • Productslimit: number

    Records per page (pagination)

  • Productsoffset: number

    Records to skip (pagination)

pathItems: never
requestBodies: never
responses: {
    AppsError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    };
    CommentsCommentError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    };
    ContactsError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    };
    DashboardError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    };
    MessagesError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    };
    ProductsError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    };
}

Type declaration

  • AppsError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    }

    Error. Classify by code in the body, never by the HTTP status.

  • CommentsCommentError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    }

    The request failed. The body carries the PlanVortex error code in code:

    | Code | Meaning |
    | --- | --- |
    | `516` | Comments require a paid plan. Every endpoint here returns this on the free plan. |
    | `700` | The account is not connected — no valid token, or nothing to ask the network about. |
    | `936` | The publication was never sent, so it has no thread to read. |
    | `940` | The client's monthly X credits are exhausted. Only X. |
    | `945` | This network has no comments (TikTok, WhatsApp). Carries `social_network` in `data`. |
    | `946` | The network has comments but does not allow **this action**: hiding on LinkedIn or Google Business, deleting someone else's on Instagram or X, deleting a review. Carries `social_network` and `action` in `data`. See `GET /social_comment_actions`. |
    | `947` | The comment no longer exists on the network. What is stored is a photograph; the network always wins. Carries `external_id` in `data`. |
    | `948` | The reply is empty or longer than the network allows. Carries the limit in `data.max`; the same number is published in `comment_characters` of `GET /social_limits`. |
    | `951` | The Google Business listing is not verified, so it cannot reply to its reviews. It is the state of the customer's profile, not of your token. |
    | `952` | PlanVortex's Google Cloud project has no approved access to the Google Business API yet. Until it does, reviews cannot be read or replied to. |
    | `965` | This Telegram channel has no linked discussion group, so it has no comments. The network gate says `true`; what is missing is a setting of **that channel**, which its owner fixes in two taps. Carries `chat_id` in `data`. |
    | `969` | The PlanVortex bot is not allowed to delete messages in this Telegram discussion group. The network allows it; this installation does not. Carries `chat_id` in `data`. |
    | `970` | Telegram is rate limiting the bot and the wait was longer than PlanVortex is willing to hold the request for. Carries `retry_after_seconds` in `data`: retry after it. |
    | `1101` | Invalid organization. |
    | `1501` | The comment's account could not be resolved. |
    | `2600` | The network has comments but **this account** has none: a LinkedIn personal profile. LinkedIn does not let any app read a member's comments, so only pages have an inbox. Carries `social_network` and `id_account` in `data`. |
    
  • ContactsError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    }

    Error. Classify by code in the body, never by the HTTP status.

  • DashboardError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    }

    Error. Classify by code in the body, never by the HTTP status.

  • MessagesError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    }

    Error. Classify by code in the body, never by the HTTP status.

  • ProductsError: {
        content: {
            "application/json": {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
        };
        headers: { [name: string]: unknown };
    }

    Error. Classify by code in the body, never by the HTTP status.

schemas: {
    Account: {
        _id: string;
        creation_date: string;
        error_code: number;
        extra_data?: { is_personal_profile?: boolean } & {
            [key: string]: unknown;
        };
        followers_count?: number;
        id_client: string;
        id_organization: string;
        image?: string;
        name: string;
        next_comments_update?: string;
        next_stats_update?: string;
        private_message_link?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        username?: string;
    };
    AccountsAccountList: {
        accounts: {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        }[];
        total: number;
    };
    AccountsAccountOne: {
        account: {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
    };
    AccountsConnectSession: {
        _id: string;
        accounts: (
            {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            } & { already_enabled: boolean }
        )[];
        accounts_limit: number;
        accounts_used: number;
        creation_date?: string;
        expires_at: string;
        id_client?: string;
        id_organization?: string;
        keycloak_client_idenfifier?: string;
        redirect_uri?: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        status: "pending"
        | "returned"
        | "confirmed";
    };
    AccountsConnectSessionAccount: {
        _id: string;
        creation_date: string;
        error_code: number;
        extra_data?: { is_personal_profile?: boolean } & {
            [key: string]: unknown;
        };
        followers_count?: number;
        id_client: string;
        id_organization: string;
        image?: string;
        name: string;
        next_comments_update?: string;
        next_stats_update?: string;
        private_message_link?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        username?: string;
    } & { already_enabled: boolean };
    AccountsMetricList: (
        | "reach"
        | "impressions"
        | "comments"
        | "likes"
        | "shares"
        | "saves"
        | "profile_views"
        | "page_impressions"
        | "page_total_actions"
        | "page_call_phone_clicks_logged_in_unique"
        | "page_get_directions_clicks_logged_in_unique"
        | "page_website_clicks_logged_in_unique"
        | "page_post_engagements"
        | "page_consumptions_unique"
        | "page_negative_feedback"
        | "page_negative_feedback_unique"
        | "page_fans_online_per_day"
        | "page_impressions_unique"
        | "page_impressions_paid"
        | "page_impressions_paid_unique"
        | "page_impressions_organic_v2"
        | "page_impressions_organic_unique_v2"
        | "page_impressions_viral"
        | "page_impressions_viral_unique"
        | "page_impressions_nonviral"
        | "page_impressions_nonviral_unique"
        | "page_posts_impressions"
        | "page_posts_impressions_unique"
        | "page_posts_impressions_paid"
        | "page_posts_impressions_paid_unique"
        | "page_posts_impressions_organic"
        | "page_posts_impressions_organic_unique"
        | "page_posts_served_impressions_organic_unique"
        | "page_posts_impressions_viral"
        | "page_posts_impressions_viral_unique"
        | "page_posts_impressions_nonviral"
        | "page_posts_impressions_nonviral_unique"
        | "total_interactions"
        | "accounts_engaged"
        | "replies"
        | "follows_and_unfollows"
        | "profile_links_taps"
        | "website_clicks"
        | "paidFollowers"
        | "organicFollowerGain"
        | "careersPageBannerPromoClicks"
        | "careersPagePromoLinksClicks"
        | "careersPageEmployeesClicks"
        | "careersPageJobsClicks"
        | "careersPageViewsUnique"
        | "careersPageViews"
        | "overviewPageViewsUnique"
        | "overviewPageViews"
        | "allPageViews"
        | "follows"
        | "share"
        | "views"
    )[];
    AccountsMetricModel: {
        group: "day"
        | "month"
        | "year";
        stats: {
            date: string;
            group: "day" | "month" | "year";
            group_value: number;
            name: string;
            value: number;
        }[];
    };
    AccountsPersistentMenu: {
        call_to_actions?: { [key: string]: unknown }[];
        composer_input_disabled?: boolean;
        locale?: string;
    }[];
    AccountsSocialAuthorizationMethod: {
        add_to_group_link?: string;
        app_id?: string;
        bot_username?: string;
        config_id?: string;
        feature_type?: string;
        graph_version?: string;
        session_info_version?: string;
        state?: string;
        type: "telegram_bot"
        | "redirect"
        | "meta_embedded_signup";
    };
    AccountsSocialLinksList: {
        links: {
            authorization: {
                add_to_group_link?: string;
                app_id?: string;
                bot_username?: string;
                config_id?: string;
                feature_type?: string;
                graph_version?: string;
                session_info_version?: string;
                state?: string;
                type: "telegram_bot"
                | "redirect"
                | "meta_embedded_signup";
            };
            link: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        }[];
    };
    AiContext: {
        audience?: string;
        avoid?: string;
        blog_url?: string;
        brand_name?: string;
        default_tone?: string;
        description?: string;
        keywords?: string[];
        notes?: string;
        products?: string;
        sector?: string;
        shop_url?: string;
        social_urls?: string[];
        value_proposition?: string;
        website?: string;
    };
    AiImageOrigin: {
        generated_at: string;
        id_ai_plan?: string;
        model: string;
        provider: string;
    };
    AiPlanResult: {
        accounts: number;
        archived_date?: string;
        creation_date: string;
        credits_per_engagement?: number;
        credits_spent: number;
        engagement_per_publication?: number;
        engagement_vs_average?: number;
        expected_engagement_per_publication?: number;
        id_ai_plan: string;
        id_organization: string;
        last_publish_date?: string;
        maturing: boolean;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        prompt: string;
        publications: {
            failed: number;
            measured: number;
            published: number;
            scheduled: number;
            total: number;
        };
        ranked: boolean;
        social_networks: (
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"
        )[];
        state: "generated"
        | "validated";
        template:
            | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
        week_start: string;
    };
    AiPlanResultsGroup: {
        credits_per_engagement?: number;
        credits_spent: number;
        engagement_per_publication?: number;
        engagement_vs_average?: number;
        expected_engagement_per_publication?: number;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        plans: number;
        publications: { measured: number; published: number };
        ranked_plans: number;
    };
    AiPlansAiPlan: {
        _id: string;
        accounts: string[];
        archived_date?: string;
        attempts: number;
        creation_date: string;
        credits_spent: number;
        destinations?: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        }[];
        error?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        };
        generation_end_date?: string;
        id_client: string;
        id_organization: string;
        keycloak_identifier?: string;
        options: {
            allow_images: boolean;
            gallery_uploads: string[];
            language: string;
            link?: string;
            max_images?: number;
            publish_days: number[];
            shared: boolean;
            timezone: string;
            tone?: string;
            use_organization_context: boolean;
            week_start: string;
        };
        orchestrator_result?: Record<string, never>;
        organization_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        };
        prompt: string;
        publications: (
            | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: (...)
                    | (...)
                    | (...) } & { [key: string]: unknown };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }
        )[];
        source?: {
            event?: { date?: string; name?: string };
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description?: string; id_upload?: string }[];
            products?: {
                description?: string;
                external_id?: string;
                id_upload?: string;
                name?: string;
                permalink?: string;
                price?: string;
            }[];
            text?: string;
            url?: string;
        };
        state: | "pending"
        | "generating"
        | "generated"
        | "validated"
        | "failed"
        | "cancelled";
        template?: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
        warnings?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
    };
    AiPlansAiPlanCostEstimate: {
        available_credits: number;
        base_cost: number;
        estimated_cost: number;
        images_target: number;
        texts_target: number;
    };
    AiPlansAiPlanCreateRequest: {
        accounts: string[];
        destinations?: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        }[];
        options?: {
            allow_images?: boolean;
            gallery_uploads?: string[];
            language?: string;
            link?: string;
            max_images?: number;
            publish_days?: number[];
            shared?: boolean;
            timezone?: string;
            tone?: string;
            use_organization_context?: boolean;
            week_start?: string;
        };
        prompt: string;
        source?: {
            event_date?: string;
            event_name?: string;
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description: string; id_upload: string }[];
            product_catalog_id?: string;
            products?: string[];
            text?: string;
            url?: string;
        };
        template?: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
    };
    AiPlansAiPlanCreateResponse: {
        ai_plan: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...) | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        };
        estimate: {
            available_credits: number;
            base_cost: number;
            estimated_cost: number;
            images_target: number;
            texts_target: number;
        };
        estimated_cost: number;
    };
    AiPlansAiPlanDestination: {
        destination: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        id_account: string;
    };
    AiPlansAiPlanList: {
        ai_plans: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: ...;
                            id_ai_plan?: ...;
                            model: ...;
                            provider: ...;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: ...;
                            external_url: ...;
                            social_network: ...;
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: (...)[];
                            aspect_ratio: { text: ...; value: ... };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: (...) & (...);
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: ...]: ... };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: (...)[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: ...]: ... };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        }[];
        total: number;
    };
    AiPlansAiPlanNotice: {
        code: number;
        data?: { [key: string]: unknown };
        message: string;
    };
    AiPlansAiPlanOne: {
        ai_plan: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...) | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        };
    };
    AiPlansAiPlanOptions: {
        allow_images: boolean;
        gallery_uploads: string[];
        language: string;
        link?: string;
        max_images?: number;
        publish_days: number[];
        shared: boolean;
        timezone: string;
        tone?: string;
        use_organization_context: boolean;
        week_start: string;
    };
    AiPlansAiPlanOptionsInput: {
        allow_images?: boolean;
        gallery_uploads?: string[];
        language?: string;
        link?: string;
        max_images?: number;
        publish_days?: number[];
        shared?: boolean;
        timezone?: string;
        tone?: string;
        use_organization_context?: boolean;
        week_start?: string;
    };
    AiPlansAiPlanResults: {
        ai_plans: {
            accounts: number;
            archived_date?: string;
            creation_date: string;
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            id_ai_plan: string;
            id_organization: string;
            last_publish_date?: string;
            maturing: boolean;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            prompt: string;
            publications: {
                failed: number;
                measured: number;
                published: number;
                scheduled: number;
                total: number;
            };
            ranked: boolean;
            social_networks: (
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest"
            )[];
            state: "generated"
            | "validated";
            template:
                | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            week_start: string;
        }[];
        by_template: (
            {
                credits_per_engagement?: number;
                credits_spent: number;
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                expected_engagement_per_publication?: number;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                plans: number;
                publications: { measured: number; published: number };
                ranked_plans: number;
            } & {
                template: | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            }
        )[];
        range: {
            from_date: string;
            previous_from_date?: string;
            previous_to_date?: string;
            to_date: string;
        };
        sort: string;
        total: number;
        totals: {
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            plans: number;
            publications: { measured: number; published: number };
            ranked_plans: number;
        };
    };
    AiPlansAiPlanResultsTemplateGroup: {
        credits_per_engagement?: number;
        credits_spent: number;
        engagement_per_publication?: number;
        engagement_vs_average?: number;
        expected_engagement_per_publication?: number;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        plans: number;
        publications: { measured: number; published: number };
        ranked_plans: number;
    } & {
        template: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
    };
    AiPlansAiPlanSource: {
        event?: { date?: string; name?: string };
        id_account_catalog?: string;
        id_integration_catalog?: string;
        images?: { description?: string; id_upload?: string }[];
        products?: {
            description?: string;
            external_id?: string;
            id_upload?: string;
            name?: string;
            permalink?: string;
            price?: string;
        }[];
        text?: string;
        url?: string;
    };
    AiPlansAiPlanSourceImageInput: { description: string; id_upload: string };
    AiPlansAiPlanSourceInput: {
        event_date?: string;
        event_name?: string;
        id_account_catalog?: string;
        id_integration_catalog?: string;
        images?: { description: string; id_upload: string }[];
        product_catalog_id?: string;
        products?: string[];
        text?: string;
        url?: string;
    };
    AiPlansAiPlanSourceProduct: {
        description?: string;
        external_id?: string;
        id_upload?: string;
        name?: string;
        permalink?: string;
        price?: string;
    };
    AppsClientApp: {
        _id: string;
        allowed_domains: string[];
        creation_date: string;
        deleted: boolean;
        deleted_date?: string;
        id_client: string;
        id_user?: string;
        keycloak_client_idenfifier: string;
        name: string;
        redirect_urls: string[];
        webhook_url?: string;
    };
    AppsClientAppInput: {
        allowed_domains?: string[];
        keycloak_client_idenfifier: string;
        name: string;
        redirect_urls?: string[];
        webhook_url?: string;
    };
    AppsOAuthError: {
        error: | "server_error"
        | "invalid_client"
        | "slow_down"
        | "invalid_request"
        | "unsupported_grant_type";
        error_description?: string;
    };
    AppsTokenRequest: {
        client_id?: string;
        client_secret?: string;
        grant_type: "client_credentials";
        scope?: string;
    };
    AppsTokenResponse: {
        access_token: string;
        expires_in: number;
        scope?: string;
        token_type: string;
    };
    CatalogAspectRatios: { text: string[]; values: number[] };
    CatalogPlannerTemplate: {
        allows_gallery?: boolean;
        allows_shared?: boolean;
        generates_images?: boolean;
        max_source_items?: number;
        orchestration_cost?: number;
        orchestration_cost_per_source_item?: number;
        regenerate?: { image?: boolean; text?: boolean };
        source_fields?: {
            default?: unknown;
            max?: number;
            min?: number;
            name?: string;
            options?: string[];
            required?: boolean;
            type?:
                | "boolean"
                | "text"
                | "textarea"
                | "url"
                | "select"
                | "date"
                | "uploads_with_description"
                | "catalog_products";
        }[];
        source_requires_any?: string[];
        template?: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
        unsupported_networks?: (
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"
        )[];
    };
    CatalogPlannerTemplateField: {
        default?: unknown;
        max?: number;
        min?: number;
        name?: string;
        options?: string[];
        required?: boolean;
        type?: | "boolean"
        | "text"
        | "textarea"
        | "url"
        | "select"
        | "date"
        | "uploads_with_description"
        | "catalog_products";
    };
    CatalogSocialLimits: {
        characters: { [key: string]: number };
        comment_characters: { [key: string]: number };
        max_file_size_mb: { [key: string]: number };
        max_post_bytes: { [key: string]: number };
        title_characters: { [key: string]: number };
        total_images: { [key: string]: number };
        video_duration_in_seconds: { [key: string]: number };
    };
    CatalogSocialLimitsMap: { [key: string]: number };
    ClientsAiScopeSetting: {
        api_key?: string;
        has_api_key?: boolean;
        model: string;
        provider: "openrouter" | "openai" | "google" | "anthropic";
    };
    ClientsAiSettings: {
        image?: | null
        | {
            api_key?: string;
            has_api_key?: boolean;
            model: string;
            provider: "openrouter"
            | "openai"
            | "google"
            | "anthropic";
        };
        orchestrator?: | null
        | {
            api_key?: string;
            has_api_key?: boolean;
            model: string;
            provider: "openrouter"
            | "openai"
            | "google"
            | "anthropic";
        };
        text?: | null
        | {
            api_key?: string;
            has_api_key?: boolean;
            model: string;
            provider: "openrouter"
            | "openai"
            | "google"
            | "anthropic";
        };
    };
    ClientsClient: {
        _id: string;
        actual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_plan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            plan_identifier: "basic"
            | "free"
            | "pro"
            | "custom";
            require_action?: boolean;
            status: string;
            stripe_customer_id?: string;
        };
        actual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        ai_settings?: {
            image?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            orchestrator?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            text?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
        };
        client_type?: "personal"
        | "company";
        creation_date: string;
        name: string;
        trial_tested?: boolean;
    };
    ClientsClientList: {
        clients: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_settings?: {
                image?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                orchestrator?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                text?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
            };
            client_type?: "personal"
            | "company";
            creation_date: string;
            name: string;
            trial_tested?: boolean;
        }[];
        total: number;
    };
    ClientsClientOne: {
        client: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_settings?: {
                image?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                orchestrator?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                text?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
            };
            client_type?: "personal"
            | "company";
            creation_date: string;
            name: string;
            trial_tested?: boolean;
        };
    };
    ClientsOrganizationCreate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        name: string;
    };
    ClientsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        }[];
        total: number;
    };
    ClientsOrganizationOne: {
        organization: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
    };
    ClientsOrganizationUpdate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        stats_settings?: { auto_refresh_twitter: boolean };
    };
    ClientsPlan: {
        current_period_end?: string;
        current_period_start?: string;
        enabled: boolean;
        isEnabled: boolean;
        plan_data: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        plan_identifier: "basic"
        | "free"
        | "pro"
        | "custom";
        require_action?: boolean;
        status: string;
        stripe_customer_id?: string;
    };
    ClientsRolesClientPermissions: | "client:update"
    | "client:read"
    | "client:delete"
    | "client_app:create"
    | "client_app:update"
    | "client_app:read"
    | "client_app:delete"
    | "client_roles:create"
    | "client_roles:update"
    | "client_roles:read"
    | "client_roles:delete"
    | "client_roles_users:read"
    | "client_roles_users:create"
    | "client_roles_users:delete"
    | "client_organization:create"
    | "client_organization:update"
    | "client_organization:read"
    | "client_organization:delete"
    | "client_organization_roles:read"
    | "client_organization_roles:create"
    | "client_organization_roles:update"
    | "client_organization_roles:delete"
    | "client_organization_users_roles:read"
    | "client_organization_users_roles:create"
    | "client_organization_users_roles:delete"
    | "client_organization_accounts:read"
    | "client_organization_accounts:create"
    | "client_organization_accounts:update"
    | "client_organization_accounts:delete"
    | "client_organization_files:read"
    | "client_organization_files:create"
    | "client_organization_files:update"
    | "client_organization_files:delete"
    | "client_organization_publications:read"
    | "client_organization_publications:create"
    | "client_organization_publications:update"
    | "client_organization_publications:delete"
    | "client_organization_publications_stats:read"
    | "client_organization_account_stats:read";
    ClientsRolesClientPermissionsList: (
        | "client:update"
        | "client:read"
        | "client:delete"
        | "client_app:create"
        | "client_app:update"
        | "client_app:read"
        | "client_app:delete"
        | "client_roles:create"
        | "client_roles:update"
        | "client_roles:read"
        | "client_roles:delete"
        | "client_roles_users:read"
        | "client_roles_users:create"
        | "client_roles_users:delete"
        | "client_organization:create"
        | "client_organization:update"
        | "client_organization:read"
        | "client_organization:delete"
        | "client_organization_roles:read"
        | "client_organization_roles:create"
        | "client_organization_roles:update"
        | "client_organization_roles:delete"
        | "client_organization_users_roles:read"
        | "client_organization_users_roles:create"
        | "client_organization_users_roles:delete"
        | "client_organization_accounts:read"
        | "client_organization_accounts:create"
        | "client_organization_accounts:update"
        | "client_organization_accounts:delete"
        | "client_organization_files:read"
        | "client_organization_files:create"
        | "client_organization_files:update"
        | "client_organization_files:delete"
        | "client_organization_publications:read"
        | "client_organization_publications:create"
        | "client_organization_publications:update"
        | "client_organization_publications:delete"
        | "client_organization_publications_stats:read"
        | "client_organization_account_stats:read"
    )[];
    ClientsRolesClientPermissionsOne: {
        permissions?: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
        )[];
    };
    ClientsRolesRole: {
        name?: string;
        permissions?: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
        )[];
    };
    ClientsRolesRoleInput: {
        name: string;
        permissions: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
            | "client_organization_products:create"
            | "client_organization_products:update"
            | "client_organization_products:read"
            | "client_organization_products:delete"
            | "client_organization_messages:create"
            | "client_organization_messages:read"
            | "client_organization_messages:delete"
            | "client_organization_contacts:create"
            | "client_organization_contacts:read"
            | "client_organization_contacts:update"
            | "client_organization_contacts:delete"
            | "client_organization_ai_plans:create"
            | "client_organization_ai_plans:read"
            | "client_organization_ai_plans:update"
            | "client_organization_ai_plans:delete"
        )[];
    };
    ClientsRolesRoleList: {
        roles?: {
            name?: string;
            permissions?: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
            )[];
        }[];
        total?: number;
    };
    ClientsRolesRoleOne: {
        rol?: {
            name?: string;
            permissions?: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
            )[];
        };
    };
    ClientsRolesUser: {
        email?: string;
        firstname?: string;
        id?: string;
        lastname?: string;
        username?: string;
    };
    ClientsRolesUserList: {
        total?: number;
        users?: {
            email?: string;
            firstname?: string;
            id?: string;
            lastname?: string;
            username?: string;
        }[];
    };
    CommentsAiPlanWebhookChange: {
        credits_spent: number;
        error?: { code: number; message: string };
        field: "ai_plan_generated" | "ai_plan_failed";
        id_ai_plan: string;
        id_organization: string;
        state: "generated" | "failed";
        template:
            | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
        total_publications: number;
        warnings: number;
    };
    CommentsAiPlanWebhookError: { code: number; message: string };
    CommentsComment: {
        _id: string;
        author: {
            external_id: string;
            is_own: boolean;
            name?: string;
            profile_pic?: string;
        };
        collected_date: string;
        creation_date: string;
        deleted: boolean;
        external_id: string;
        hidden: boolean;
        id_account: | string
        | {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
        id_organization: string;
        id_publication?: | string
        | {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
        like_count?: number;
        our_reply_external_id?: string;
        parent_external_id?: string;
        publication_external_id: string;
        rating?: number;
        read: boolean;
        replied: boolean;
        reply_count?: number;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "twitter"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads";
        text: string;
    };
    CommentsCommentActions: {
        delete_others: boolean;
        delete_own: boolean;
        hide: boolean;
        reply: boolean;
    };
    CommentsCommentAuthor: {
        external_id: string;
        is_own: boolean;
        name?: string;
        profile_pic?: string;
    };
    CommentsCommentNetworkName: | "facebook"
    | "instagram"
    | "linkedin"
    | "twitter"
    | "youtube"
    | "google_business"
    | "bluesky"
    | "discord"
    | "telegram"
    | "threads";
    CommentsCommentThread: {
        comments: {
            _id: string;
            author: {
                external_id: string;
                is_own: boolean;
                name?: string;
                profile_pic?: string;
            };
            collected_date: string;
            creation_date: string;
            deleted: boolean;
            external_id: string;
            hidden: boolean;
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
            like_count?: number;
            our_reply_external_id?: string;
            parent_external_id?: string;
            publication_external_id: string;
            rating?: number;
            read: boolean;
            replied: boolean;
            reply_count?: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "twitter"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads";
            text: string;
        }[];
        credits_consumed: number;
        next_cursor?: string;
        total: number;
    };
    CommentsIntegrationWebhookChange: {
        error_code: number;
        field: "integration_error";
        id_integration: string;
        id_organization: string;
        provider: string;
    };
    CommentsSocialCapabilities: {
        comments: boolean;
        destinations: boolean;
        link: boolean;
        made_for_kids: boolean;
        messages: boolean;
        persistent_menu: boolean;
        products: boolean;
        publications: boolean;
        reply_control: boolean;
        visibility: boolean;
        webhooks: boolean;
    };
    CommentsWebhookChange: {
        commentObj?: {
            _id: string;
            author: {
                external_id: string;
                is_own: boolean;
                name?: string;
                profile_pic?: string;
            };
            collected_date: string;
            creation_date: string;
            deleted: boolean;
            external_id: string;
            hidden: boolean;
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
            like_count?: number;
            our_reply_external_id?: string;
            parent_external_id?: string;
            publication_external_id: string;
            rating?: number;
            read: boolean;
            replied: boolean;
            reply_count?: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "twitter"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads";
            text: string;
        };
        field: | "comments"
        | "messages"
        | "new_account"
        | "change_state_account"
        | "messaging_postbacks"
        | "messaging_seen"
        | "messaging_error";
        id_account: string;
        id_contact?: string;
        id_organization: string;
        messageObj?: {
            _id: string;
            contact_id?: | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            creation_date: string;
            element_external_id?: string;
            from_contact_id?: | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            id_account: string;
            in_response_external_id?: string;
            in_response_to?: string;
            message_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            message_options: {
                files: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...)
                            | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }
                )[];
                files_urls: { mime_type?: string; url?: string }[];
                metaElements?: { [key: string]: unknown }[];
                metaQuickReplies?: { [key: string]: unknown }[];
                payload?: string;
                template_language?: string;
                template_name?: string;
                template_parameters?: string[];
                whatsappInteractive?: { [key: string]: unknown };
            };
            message_type: | "simple_message"
            | "file_message"
            | "comment_message"
            | "publication_message"
            | "quick_reply_message"
            | "button_message"
            | "elements_message"
            | "postback_message"
            | "template_message"
            | "interactive_message";
            read: boolean;
            text?: string;
        };
        originalChange?: { [key: string]: unknown };
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
    };
    Contact: {
        _id: string;
        creation_date: string;
        creator_keycloak_identifier?: string;
        extra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string
            | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        id_organization: string;
        last_contact_update: string;
        name?: string;
        profile_image?: string;
        social_identifiers: {
            _id: string;
            external_identifier?: string;
            last_send_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        }[];
    };
    ContactChannel: | "facebook"
    | "instagram"
    | "linkedin"
    | "tiktok"
    | "twitter"
    | "whatsapp"
    | "youtube"
    | "google_business"
    | "bluesky"
    | "discord"
    | "email";
    ContactExtraData: {
        address?: string;
        boolean_property?: boolean;
        boolean_property2?: boolean;
        building?: string
        | number;
        city?: string;
        coords?: number[];
        country?: string;
        country_code?: string;
        door?: string | number;
        floor?: string | number;
        number?: string | number;
        number_property?: number;
        number_property2?: number;
        place_id?: string;
        state?: string;
        string_property?: string;
        string_property2?: string;
        zip_code?: string | number;
    };
    ContactsContactCreate: {
        extra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string
            | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        name?: string;
        profile_image?: string;
        social_identifiers: {
            _id?: string;
            external_identifier?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        }[];
    };
    ContactsContactUpdate: {
        extra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string
            | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        name?: string;
        profile_image?: string;
        social_identifiers?: {
            _id?: string;
            external_identifier?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        }[];
    };
    ContactsSocialIdentifierInput: {
        _id?: string;
        external_identifier?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "email";
    };
    DashboardAccountWithError: {
        _id: string;
        error_code: number;
        image?: string;
        name: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        username?: string;
    };
    DashboardDashboard: {
        account_metrics?: {
            by_day: {
                group: null
                | string;
                name:
                    | "reach"
                    | "impressions"
                    | "followers"
                    | "comments"
                    | "engagement"
                    | "likes"
                    | "shares"
                    | "saves"
                    | "clicks"
                    | "video_views"
                    | "profile_views"
                    | "followers_gained";
                value: number;
            }[];
            by_network: {
                group: null
                | string;
                name:
                    | "reach"
                    | "impressions"
                    | "followers"
                    | "comments"
                    | "engagement"
                    | "likes"
                    | "shares"
                    | "saves"
                    | "clicks"
                    | "video_views"
                    | "profile_views"
                    | "followers_gained";
                value: number;
            }[];
            previous_total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        ai_plan_results?: {
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            plans: number;
            ranked_plans: number;
            top: {
                accounts: number;
                archived_date?: string;
                creation_date: string;
                credits_per_engagement?: number;
                credits_spent: number;
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                expected_engagement_per_publication?: number;
                id_ai_plan: string;
                id_organization: string;
                last_publish_date?: string;
                maturing: boolean;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                prompt: string;
                publications: {
                    failed: number;
                    measured: number;
                    published: number;
                    scheduled: number;
                    total: number;
                };
                ranked: boolean;
                social_networks: (
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest"
                )[];
                state: "generated"
                | "validated";
                template:
                    | "standard"
                    | "from_images"
                    | "from_text"
                    | "from_catalog"
                    | "campaign";
                week_start: string;
            }[];
        };
        ai_plans?: {
            by_state: { state?: string; total?: number }[];
            credits_spent: number;
            generated_publications: number;
            last_plan?: {
                _id: string;
                creation_date: string;
                credits_spent?: number;
                error?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
                generation_end_date?: string;
                prompt?: string;
                publications?: string[];
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
            };
            pending_validation: number;
            total: number;
        };
        available_blocks: {
            account_metrics: boolean;
            ai_plan_results: boolean;
            ai_plans: boolean;
            health: boolean;
            messages: boolean;
            plan_use: boolean;
            publication_metrics: boolean;
            publications: boolean;
        };
        health?: {
            accounts_with_errors?: {
                _id: string;
                error_code: number;
                image?: string;
                name: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            }[];
            publications_with_errors?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publication_warnings?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                text?: string;
            }[];
            total_drafts?: number;
            upcoming_publications?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publication_warnings?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                text?: string;
            }[];
        };
        messages?: { unread: number };
        plan_use?: {
            actual_asigned: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            limits: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
        };
        publication_metrics?: {
            by_network: {
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                publications?: number;
                social_network?: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            previous_total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            top: {
                collected_date?: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                id_publication: string;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                publication: {
                    external_identifier?: string;
                    files?: {
                        _id: string;
                        ai_generated?: (...)
                        | (...);
                        cover_image?: (...) | (...);
                        cover_offset?: (...) | (...);
                        creation_date: string;
                        file_externals: (...)[];
                        file_format: (...) | (...) | (...) | (...) | (...);
                        file_properties: {
                            allowed_social_networks: ...;
                            aspect_ratio: ...;
                            duration: ...;
                            height: ...;
                            size_in_bytes: ...;
                            width: ...;
                        };
                        file_type: (...)
                        | (...);
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    publication_type?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                };
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        publications?: {
            by_day: { day?: string; state?: string; total?: number }[];
            by_network: {
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                total?: number;
            }[];
            by_state: { state?: string; total?: number }[];
            published_by_day: {
                day?: string;
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                total?: number;
            }[];
            total: number;
        } & { previous_total?: number };
        range: {
            from_date: string;
            previous_from_date: string;
            previous_to_date: string;
            to_date: string;
        };
    };
    DashboardDashboardAiPlanRef: {
        _id: string;
        creation_date: string;
        credits_spent?: number;
        error?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        };
        generation_end_date?: string;
        prompt?: string;
        publications?: string[];
        state: | "pending"
        | "generating"
        | "generated"
        | "validated"
        | "failed"
        | "cancelled";
    };
    DashboardDashboardPublicationRef: {
        _id: string;
        creation_date?: string;
        name?: string;
        publication_errors?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publication_warnings?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publish_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        text?: string;
    };
    DashboardDashboardRange: {
        from_date: string;
        previous_from_date: string;
        previous_to_date: string;
        to_date: string;
    };
    DashboardMetricName: | "reach"
    | "impressions"
    | "followers"
    | "comments"
    | "engagement"
    | "likes"
    | "shares"
    | "saves"
    | "clicks"
    | "video_views"
    | "profile_views"
    | "followers_gained";
    DashboardMetricRow: {
        group: null
        | string;
        name:
            | "reach"
            | "impressions"
            | "followers"
            | "comments"
            | "engagement"
            | "likes"
            | "shares"
            | "saves"
            | "clicks"
            | "video_views"
            | "profile_views"
            | "followers_gained";
        value: number;
    };
    DashboardPlanUse: {
        actual_asigned: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_use: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        limits: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
    };
    DashboardPublicationsSummary: {
        by_day: { day?: string; state?: string; total?: number }[];
        by_network: {
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            total?: number;
        }[];
        by_state: { state?: string; total?: number }[];
        published_by_day: {
            day?: string;
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            total?: number;
        }[];
        total: number;
    };
    DashboardTopPublication: {
        collected_date?: string;
        engagement_base?: "reach"
        | "impressions"
        | "followers";
        id_publication: string;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        publication: {
            external_identifier?: string;
            files?: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            publication_type?: string;
            text?: string;
            title?: string;
            url?: string;
        };
        publish_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
    };
    Error: { code: number; data?: { [key: string]: unknown }; message: string };
    FileProperties: {
        allowed_social_networks: string[];
        aspect_ratio: { text: string; value: number };
        duration: number;
        height: number;
        size_in_bytes: number;
        width: number;
    };
    IntegrationsGoogleDriveConnectRequest: {
        code: string;
        provider: "google_drive";
    };
    IntegrationsIntegration: {
        _id: string;
        config: {
            api_base?: "wp-json"
            | "rest_route";
            auth_mode?: "query" | "basic";
            auto_publish?: boolean;
            currency?: string;
            id_accounts?: string[];
            import_image?: boolean;
            key_ending?: string;
            last_checked?: string;
            publication_type?: string;
            seen_guids?: string[];
            tax_location_missing?: boolean;
            template?: string;
            url?: string;
        };
        connected: boolean;
        creation_date: string;
        enabled: boolean;
        error_code?: null
        | number;
        external_identifier?: string;
        id_client: string;
        id_organization: string;
        last_used_date?: string;
        name: string;
        provider: "google_drive" | "rss" | "woocommerce";
    };
    IntegrationsIntegrationCatalogPage: {
        items: {
            available: boolean;
            description?: string;
            external_id: string;
            image_url?: string;
            name: string;
            permalink?: string;
            price?: string;
        }[];
        next_cursor?: string;
    };
    IntegrationsIntegrationCatalogProduct: {
        available: boolean;
        description?: string;
        external_id: string;
        image_url?: string;
        name: string;
        permalink?: string;
        price?: string;
    };
    IntegrationsIntegrationConfig: {
        api_base?: "wp-json"
        | "rest_route";
        auth_mode?: "query" | "basic";
        auto_publish?: boolean;
        currency?: string;
        id_accounts?: string[];
        import_image?: boolean;
        key_ending?: string;
        last_checked?: string;
        publication_type?: string;
        seen_guids?: string[];
        tax_location_missing?: boolean;
        template?: string;
        url?: string;
    };
    IntegrationsIntegrationFormField: {
        default?: unknown;
        name: string;
        options?: string[];
        required: boolean;
        type: | "boolean"
        | "text"
        | "textarea"
        | "url"
        | "select"
        | "accounts"
        | "secret";
    };
    IntegrationsIntegrationProvider: {
        accepted_formats: string[];
        catalog: boolean;
        config_fields: {
            default?: unknown;
            name: string;
            options?: string[];
            required: boolean;
            type: | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "accounts"
            | "secret";
        }[];
        connect_link: boolean;
        connect_link_fields: {
            default?: unknown;
            name: string;
            options?: string[];
            required: boolean;
            type: | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "accounts"
            | "secret";
        }[];
        content_feed: boolean;
        file_import: boolean;
        provider: "google_drive"
        | "rss"
        | "woocommerce";
        requires_oauth: boolean;
    };
    IntegrationsIntegrationProviderName: "google_drive"
    | "rss"
    | "woocommerce";
    IntegrationsRssConfig: {
        auto_publish?: boolean;
        id_accounts?: string[];
        import_image?: boolean;
        last_checked?: string;
        publication_type?: string;
        seen_guids?: string[];
        template?: string;
        url?: string;
    };
    IntegrationsRssConnectRequest: {
        auto_publish?: boolean;
        id_accounts: string[];
        import_image?: boolean;
        provider: "rss";
        publication_type?: string;
        template?: string;
        url: string;
    };
    IntegrationsWooCommerceConnectRequest: {
        consumer_key: string;
        consumer_secret: string;
        provider: "woocommerce";
        url: string;
    };
    Message: {
        _id: string;
        contact_id?: | string
        | {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        creation_date: string;
        element_external_id?: string;
        from_contact_id?: | string
        | {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        id_account: string;
        in_response_external_id?: string;
        in_response_to?: string;
        message_errors: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        message_options: {
            files: (
                | string
                | {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }
            )[];
            files_urls: { mime_type?: string; url?: string }[];
            metaElements?: { [key: string]: unknown }[];
            metaQuickReplies?: { [key: string]: unknown }[];
            payload?: string;
            template_language?: string;
            template_name?: string;
            template_parameters?: string[];
            whatsappInteractive?: { [key: string]: unknown };
        };
        message_type: | "simple_message"
        | "file_message"
        | "comment_message"
        | "publication_message"
        | "quick_reply_message"
        | "button_message"
        | "elements_message"
        | "postback_message"
        | "template_message"
        | "interactive_message";
        read: boolean;
        text?: string;
    };
    MessageOptions: {
        files: (
            | string
            | {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }
        )[];
        files_urls: { mime_type?: string; url?: string }[];
        metaElements?: { [key: string]: unknown }[];
        metaQuickReplies?: { [key: string]: unknown }[];
        payload?: string;
        template_language?: string;
        template_name?: string;
        template_parameters?: string[];
        whatsappInteractive?: { [key: string]: unknown };
    };
    MessagesConversation: {
        contact: {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        date: string;
        unread_messages: number;
    };
    MessagesConversationTotals: | { total: number }
    | {
        group: "day" | "month" | "year";
        stats: { groupValue: number; totalConversations: number }[];
    };
    MessagesMessageInput: {
        in_response_external_id?: string;
        message_options?: {
            files: (
                | string
                | {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }
            )[];
            files_urls: { mime_type?: string; url?: string }[];
            metaElements?: { [key: string]: unknown }[];
            metaQuickReplies?: { [key: string]: unknown }[];
            payload?: string;
            template_language?: string;
            template_name?: string;
            template_parameters?: string[];
            whatsappInteractive?: { [key: string]: unknown };
        };
        message_type: | "simple_message"
        | "file_message"
        | "comment_message"
        | "publication_message"
        | "quick_reply_message"
        | "button_message"
        | "elements_message"
        | "postback_message"
        | "template_message"
        | "interactive_message";
        text?: string;
    };
    MessageType: | "simple_message"
    | "file_message"
    | "comment_message"
    | "publication_message"
    | "quick_reply_message"
    | "button_message"
    | "elements_message"
    | "postback_message"
    | "template_message"
    | "interactive_message";
    NormalizedMetrics: {
        clicks?: number;
        comments?: number;
        engagement?: number;
        followers?: number;
        followers_gained?: number;
        impressions?: number;
        likes?: number;
        profile_views?: number;
        reach?: number;
        saves?: number;
        shares?: number;
        video_views?: number;
    };
    Organization: {
        _id: string;
        actual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        ai_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        };
        creation_date: string;
        id_client: string;
        name: string;
        parent_organization?: string;
        social_credentials?: {
            discord?: {
                application_name?: string;
                client_id?: string;
                has_bot_token?: boolean;
                has_client_secret?: boolean;
                verified_date?: string;
            };
        };
        stats_settings?: { auto_refresh_twitter: boolean };
    };
    OrganizationsLimit: {
        accounts: number;
        ai_credits?: number;
        apps?: number;
        integrations: number;
        space: number;
        twitter_credits?: number;
    };
    OrganizationsOrganizationCreate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        name: string;
    };
    OrganizationsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        }[];
        total: number;
    };
    OrganizationsOrganizationOne: {
        organization: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
    };
    OrganizationsOrganizationUpdate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        stats_settings?: { auto_refresh_twitter: boolean };
    };
    OrganizationsRolesOrganizationRole: {
        _id?: string;
        creation_date?: string;
        default?: boolean;
        id_organization?: string;
        name?: string;
        permissions?: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[];
        total_users?: number;
    };
    OrganizationsRolesOrganizationRoleInput: {
        name: string;
        permissions: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[];
    };
    OrganizationsRolesOrganizationRoleList: {
        roles?: {
            _id?: string;
            creation_date?: string;
            default?: boolean;
            id_organization?: string;
            name?: string;
            permissions?: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
            total_users?: number;
        }[];
        total?: number;
    };
    OrganizationsRolesOrganizationRoleOne: {
        rol?: {
            _id?: string;
            creation_date?: string;
            default?: boolean;
            id_organization?: string;
            name?: string;
            permissions?: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
            total_users?: number;
        };
    };
    OrganizationsRolesPermissionList: {
        permissions?: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[];
    };
    OrganizationsRolesUserInOrganization: {
        email?: string;
        enabled?: boolean;
        firstname?: string;
        id?: string;
        lastname?: string;
        roles?: { _id?: string; name?: string }[];
        username?: string;
    };
    OrganizationsRolesUserInOrganizationList: {
        total?: number;
        users?: {
            email?: string;
            enabled?: boolean;
            firstname?: string;
            id?: string;
            lastname?: string;
            roles?: { _id?: string; name?: string }[];
            username?: string;
        }[];
    };
    OrganizationsSocialCredentialsInput: {
        bot_token?: string;
        client_id?: string;
        client_secret?: string;
    };
    OrganizationsUser: {
        email?: string;
        firstname?: string;
        id?: string;
        lastname?: string;
        username?: string;
    };
    OrganizationsUserList: {
        total?: number;
        users?: {
            email?: string;
            firstname?: string;
            id?: string;
            lastname?: string;
            username?: string;
        }[];
    };
    PlanData: {
        accounts: number;
        ai_credits?: number;
        apps?: number;
        integrations: number;
        space: number;
        twitter_credits?: number;
    };
    PlanUseData: { publications?: number; users?: number } & {
        accounts: number;
        ai_credits?: number;
        apps?: number;
        integrations: number;
        space: number;
        twitter_credits?: number;
    };
    ProductsProduct: {
        additional_image_urls?: string[];
        availability?: | "pending"
        | "in stock"
        | "out of stock"
        | "preorder"
        | "available for order"
        | "discontinued"
        | "mark_as_sold";
        brand?: string;
        category?: string;
        color?: string;
        condition?: | "new"
        | "refurbished"
        | "used"
        | "used_like_new"
        | "used_good"
        | "used_fair"
        | "cpo"
        | "open_box_new";
        currency: string;
        description?: string;
        id?: string;
        image_url: string;
        name: string;
        price: number;
        retailer_id: string;
        url?: string;
    } & { [key: string]: unknown };
    ProductsProductCatalog: {
        default_image_url?: string;
        feed_count?: number;
        id?: string;
        is_catalog_segment?: boolean;
        is_local_catalog?: boolean;
        name?: string;
        product_count?: number;
    } & { [key: string]: unknown };
    ProductsProductCatalogInput: { name: string };
    ProductsProductInput: {
        additional_image_urls?: string[];
        availability?:
            | "pending"
            | "in stock"
            | "out of stock"
            | "preorder"
            | "available for order"
            | "discontinued"
            | "mark_as_sold";
        brand?: string;
        category?: string;
        color?: string;
        condition?: | "new"
        | "refurbished"
        | "used"
        | "used_like_new"
        | "used_good"
        | "used_fair"
        | "cpo"
        | "open_box_new";
        currency: string;
        description?: string;
        id?: string;
        image_url: string;
        name: string;
        price: number;
        retailer_id: string;
        url?: string;
    } & { [key: string]: unknown };
    Publication: {
        _id: string;
        ai_generated?: { image: boolean; text: boolean };
        creation_date: string;
        destination?: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        engagement_base?: "reach"
        | "impressions"
        | "followers";
        external_identifier?: string;
        extra_data?: { [key: string]: unknown };
        files: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        }[];
        id_account: | string
        | {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
        id_integration?: string;
        id_organization: string;
        link?: string;
        made_for_kids?: boolean;
        metrics?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        name?: string;
        next_stats_update?: string;
        pending_publish?: {
            data?: { [key: string]: unknown };
            deadline?: string;
            next_check?: string;
            temp_keys?: string[];
        };
        publication_errors: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publication_type: | "profile"
        | "page"
        | "group"
        | "reels"
        | "stories"
        | "message";
        publication_warnings?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publish_date?: string;
        reply_control?: | "everyone"
        | "accounts_you_follow"
        | "mentioned_only"
        | "followers_only";
        retries: number;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        state: "ready"
        | "withErrors"
        | "sended"
        | "draft"
        | "publishing";
        statistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        };
        stats_updated_date?: string;
        text?: string;
        title?: string;
        url?: string;
        visibility?: "public"
        | "unlisted"
        | "private";
    };
    PublicationAiGenerated: { image: boolean; text: boolean };
    PublicationDestination: {
        id?: string;
        name?: string;
        section_id?: string;
        section_name?: string;
    };
    PublicationPending: {
        data?: { [key: string]: unknown };
        deadline?: string;
        next_check?: string;
        temp_keys?: string[];
    };
    PublicationsDestination: {
        description?: string;
        id: string;
        image?: string;
        name: string;
        privacy?: string;
        sections?: { id: string; name: string }[];
    };
    PublicationsPublicationInput: {
        destination?: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        files?: string[];
        link?: string;
        made_for_kids?: boolean;
        name?: string;
        publication_type?: "profile"
        | "page"
        | "group"
        | "reels"
        | "stories";
        publish_date?: string;
        reply_control?:
            | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
        social_network?: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        state?: "ready"
        | "withErrors"
        | "sended"
        | "draft"
        | "publishing";
        text?: string;
        title?: string;
        visibility?: "public" | "unlisted" | "private";
    };
    PublicationsPublicationList: {
        publications: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        }[];
        total: number;
    };
    PublicationsPublicationOne: {
        publication: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
    };
    PublicationsPublicationRetry: {
        max_retries: number;
        publication: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
    };
    PublicationsPublicationsStatsList: {
        metric?: string;
        publications?: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: (...)
                | (...)
                | (...) } & { [key: string]: unknown };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        }[];
        range?: {
            from_date?: string;
            previous_from_date?: string;
            previous_to_date?: string;
            to_date?: string;
        };
        summary?: {
            by_network?: {
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                publications?: number;
                social_network?: string;
            }[];
            previous_total?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            total?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        total?: number;
    };
    PublicationsPublicationStatsHistory: {
        engagement_base?: "reach"
        | "impressions"
        | "followers";
        id_publication: string;
        latest?: {
            collected_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            raw?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
        };
        metrics?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        next_stats_update?: string;
        publish_date?: string;
        series: {
            collected_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        }[];
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        statistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        };
        stats_updated_date?: string;
    };
    PublicationsPublicationStatsPoint: {
        collected_date: string;
        engagement_base?: "reach"
        | "impressions"
        | "followers";
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
    };
    PublicationStats: {
        angers?: number;
        bookmarks?: number;
        clicks?: number;
        comments?: number;
        engagement?: number;
        follows?: number;
        hahas?: number;
        impressions?: number;
        likes?: number;
        loves?: number;
        negative_feedback?: number;
        outbound_clicks?: number;
        page_likes?: number;
        pin_clicks?: number;
        playback_0_count?: number;
        playback_100_count?: number;
        playback_25_count?: number;
        playback_50_count?: number;
        playback_75_count?: number;
        profile_activity?: number;
        profile_visits?: number;
        quotes?: number;
        reach?: number;
        reactions?: number;
        reactions_by_emoji?: { [key: string]: number };
        replys?: number;
        retwets?: number;
        saved?: number;
        saves?: number;
        share?: number;
        shareMentions?: number;
        shares?: number;
        sorrys?: number;
        url_link_clicks?: number;
        user_profile_clicks?: number;
        video_views?: number;
        views?: number;
        wows?: number;
    };
    SocialCredentials: {
        application_name?: string;
        client_id?: string;
        has_bot_token?: boolean;
        has_client_secret?: boolean;
        verified_date?: string;
    };
    SocialIdentifier: {
        _id: string;
        external_identifier?: string;
        last_send_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "email";
    };
    SocialNetwork: | "facebook"
    | "instagram"
    | "linkedin"
    | "tiktok"
    | "twitter"
    | "whatsapp"
    | "youtube"
    | "google_business"
    | "bluesky"
    | "discord"
    | "telegram"
    | "threads"
    | "slack"
    | "pinterest";
    StatsSettings: { auto_refresh_twitter: boolean };
    Success: { success: boolean };
    Upload: {
        _id: string;
        ai_generated?: {
            generated_at: string;
            id_ai_plan?: string;
            model: string;
            provider: string;
        };
        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
        cover_offset?: number;
        creation_date: string;
        file_externals: {
            external_identifier: string;
            external_url: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        }[];
        file_format: "mp4"
        | "jpeg"
        | "gif"
        | "png"
        | "jpg";
        file_properties: {
            allowed_social_networks: string[];
            aspect_ratio: { text: string; value: number };
            duration: number;
            height: number;
            size_in_bytes: number;
            width: number;
        };
        file_type: "video"
        | "image";
        id_organization: string;
        is_temporal: boolean;
        name: string;
        public_path: string;
    };
    UploadsUploadList: {
        total: number;
        uploads: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        }[];
    };
    UploadsUploadOne: {
        upload: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        };
    };
}

Type declaration

  • Account: {
        _id: string;
        creation_date: string;
        error_code: number;
        extra_data?: { is_personal_profile?: boolean } & { [key: string]: unknown };
        followers_count?: number;
        id_client: string;
        id_organization: string;
        image?: string;
        name: string;
        next_comments_update?: string;
        next_stats_update?: string;
        private_message_link?: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        username?: string;
    }

    A social account connected to an organization.

    On `discord`, on `telegram` and on `slack` an account is a **channel**, not a profile: publishing to two Discord channels of the same server — or to two Telegram channels of the same brand, or to `#anuncios` and `#general` of the same Slack workspace — costs two accounts of the plan.
    
    On `linkedin` one authorization brings two kinds of account: the **personal profile** of whoever authorizes and each **page** they manage. Both publish and both have statistics, but only pages have a comment inbox: LinkedIn does not let any app read the comments on a member's posts, so on a profile every comment endpoint returns error `2600`. `extra_data.is_personal_profile` tells them apart.
    
    `error_code` other than `0` means the connection is broken — an expired token, a permission taken away — and the account has to be connected again. On `telegram` nothing expires, because there is no account token: what breaks the connection is the bot being removed from the channel or losing its permission to post there (error 968). On `slack` the bot token does not expire either: what breaks it is the app being removed from the channel (error 980) or the channel being archived or deleted (error 985).
    
    • _id: string
    • creation_date: string

      Format: date-time

    • error_code: number

      0 is a healthy account. Anything else is a PlanVortex error code explaining why the connection stopped working; the account keeps its data but cannot be used until it is reconnected.

    • Optionalextra_data?: { is_personal_profile?: boolean } & { [key: string]: unknown }

      What only makes sense on this account's network. Only the keys documented here are part of the contract: anything else in the object can change without notice.

    • Optionalfollowers_count?: number

      Followers the network reports. Absent on an account that has never been measured. On telegram and on slack it is the channel's member count, and it is the only audience figure either network publishes: there are no views, no impressions and no reach anywhere in the Bot API nor in the Slack Web API.

    • id_client: string

      The client the organization hangs from. Denormalized here for the plan checks.

    • id_organization: string
    • Optionalimage?: string

      Avatar URL as the network publishes it. Empty string when there is none.

    • name: string

      Display name of the profile, page or channel.

    • Optionalnext_comments_update?: string

      Format: date-time

      When the collector will read this account's comments again. Only on the networks whose comments hang off the account and not off a publication — today, google_business, whose reviews belong to the listing.

    • Optionalnext_stats_update?: string

      Format: date-time

      When the collector will ask the network for this account's stats again.

    • Optionalprivate_message_link?: string

      A link that opens a private chat with this account (m.me, ig.me, wa.me). Absent on every other network.

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"

      Network this account belongs to. Not every network publishes: whatsapp is a messaging channel with no feed, and google_business is a local business listing that receives reviews — both can be connected and both appear here, but neither accepts publications (see GET /social_capabilities).

    • Optionalusername?: string

      The handle, when the network has one. Absent on the networks that do not (a Discord channel, a WhatsApp number, a Google Business listing) and on a private Telegram channel, which has no @name at all — only public ones do. That is also why a private channel's publications come back with no url.

  • AccountsAccountList: {
        accounts: {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        }[];
        total: number;
    }
  • AccountsAccountOne: {
        account: {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
    }
    • account: {
          _id: string;
          creation_date: string;
          error_code: number;
          extra_data?: { is_personal_profile?: boolean } & { [key: string]: unknown };
          followers_count?: number;
          id_client: string;
          id_organization: string;
          image?: string;
          name: string;
          next_comments_update?: string;
          next_stats_update?: string;
          private_message_link?: string;
          social_network:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          username?: string;
      }
      • _id: string
      • creation_date: string

        Format: date-time

      • error_code: number

        0 is a healthy account. Anything else is a PlanVortex error code explaining why the connection stopped working; the account keeps its data but cannot be used until it is reconnected.

      • Optionalextra_data?: { is_personal_profile?: boolean } & { [key: string]: unknown }

        What only makes sense on this account's network. Only the keys documented here are part of the contract: anything else in the object can change without notice.

      • Optionalfollowers_count?: number

        Followers the network reports. Absent on an account that has never been measured. On telegram and on slack it is the channel's member count, and it is the only audience figure either network publishes: there are no views, no impressions and no reach anywhere in the Bot API nor in the Slack Web API.

      • id_client: string

        The client the organization hangs from. Denormalized here for the plan checks.

      • id_organization: string
      • Optionalimage?: string

        Avatar URL as the network publishes it. Empty string when there is none.

      • name: string

        Display name of the profile, page or channel.

      • Optionalnext_comments_update?: string

        Format: date-time

        When the collector will read this account's comments again. Only on the networks whose comments hang off the account and not off a publication — today, google_business, whose reviews belong to the listing.

      • Optionalnext_stats_update?: string

        Format: date-time

        When the collector will ask the network for this account's stats again.

      • Optionalprivate_message_link?: string

        A link that opens a private chat with this account (m.me, ig.me, wa.me). Absent on every other network.

      • social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"

        Network this account belongs to. Not every network publishes: whatsapp is a messaging channel with no feed, and google_business is a local business listing that receives reviews — both can be connected and both appear here, but neither accepts publications (see GET /social_capabilities).

      • Optionalusername?: string

        The handle, when the network has one. Absent on the networks that do not (a Discord channel, a WhatsApp number, a Google Business listing) and on a private Telegram channel, which has no @name at all — only public ones do. That is also why a private channel's publications come back with no url.

  • AccountsConnectSession: {
        _id: string;
        accounts: (
            {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            } & { already_enabled: boolean }
        )[];
        accounts_limit: number;
        accounts_used: number;
        creation_date?: string;
        expires_at: string;
        id_client?: string;
        id_organization?: string;
        keycloak_client_idenfifier?: string;
        redirect_uri?: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        status: "pending"
        | "returned"
        | "confirmed";
    }

    A connection in account_selection=integrator mode, from the moment the temporal token is issued until your app confirms which accounts stay.

    • _id: string

      The id that comes back in your redirect_uri as connect_session.

    • accounts: (
          {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          } & { already_enabled: boolean }
      )[]

      The accounts this authorization brought back, in the order the network returned them. Never other pending accounts of the organization. Empty while pending.

    • accounts_limit: number

      Accounts the plan allows. New accounts beyond accounts_limit - accounts_used answer 706 on confirm.

    • accounts_used: number

      Accounts of the plan already in use: the same counter the PlanVortex screen shows.

    • Optionalcreation_date?: string

      Format: date-time

    • expires_at: string

      Format: date-time

      While pending, the token's expiry. Once returned, thirty minutes after the person came back. After it the session answers 551 and its accounts stay unconnected.

    • Optionalid_client?: string
    • Optionalid_organization?: string
    • Optionalkeycloak_client_idenfifier?: string

      The app that issued the token. Only that app can read or confirm the session.

    • Optionalredirect_uri?: string
    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
    • status: "pending" | "returned" | "confirmed"

      pending: the person has not come back from the network yet. returned: the accounts are waiting for your choice. confirmed: done, the session cannot be used again.

  • AccountsConnectSessionAccount: {
        _id: string;
        creation_date: string;
        error_code: number;
        extra_data?: { is_personal_profile?: boolean } & { [key: string]: unknown };
        followers_count?: number;
        id_client: string;
        id_organization: string;
        image?: string;
        name: string;
        next_comments_update?: string;
        next_stats_update?: string;
        private_message_link?: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        username?: string;
    } & { already_enabled: boolean }
  • AccountsMetricList: (
        | "reach"
        | "impressions"
        | "comments"
        | "likes"
        | "shares"
        | "saves"
        | "profile_views"
        | "page_impressions"
        | "page_total_actions"
        | "page_call_phone_clicks_logged_in_unique"
        | "page_get_directions_clicks_logged_in_unique"
        | "page_website_clicks_logged_in_unique"
        | "page_post_engagements"
        | "page_consumptions_unique"
        | "page_negative_feedback"
        | "page_negative_feedback_unique"
        | "page_fans_online_per_day"
        | "page_impressions_unique"
        | "page_impressions_paid"
        | "page_impressions_paid_unique"
        | "page_impressions_organic_v2"
        | "page_impressions_organic_unique_v2"
        | "page_impressions_viral"
        | "page_impressions_viral_unique"
        | "page_impressions_nonviral"
        | "page_impressions_nonviral_unique"
        | "page_posts_impressions"
        | "page_posts_impressions_unique"
        | "page_posts_impressions_paid"
        | "page_posts_impressions_paid_unique"
        | "page_posts_impressions_organic"
        | "page_posts_impressions_organic_unique"
        | "page_posts_served_impressions_organic_unique"
        | "page_posts_impressions_viral"
        | "page_posts_impressions_viral_unique"
        | "page_posts_impressions_nonviral"
        | "page_posts_impressions_nonviral_unique"
        | "total_interactions"
        | "accounts_engaged"
        | "replies"
        | "follows_and_unfollows"
        | "profile_links_taps"
        | "website_clicks"
        | "paidFollowers"
        | "organicFollowerGain"
        | "careersPageBannerPromoClicks"
        | "careersPagePromoLinksClicks"
        | "careersPageEmployeesClicks"
        | "careersPageJobsClicks"
        | "careersPageViewsUnique"
        | "careersPageViews"
        | "overviewPageViewsUnique"
        | "overviewPageViews"
        | "allPageViews"
        | "follows"
        | "share"
        | "views"
    )[]
  • AccountsMetricModel: {
        group: "day" | "month" | "year";
        stats: {
            date: string;
            group: "day" | "month" | "year";
            group_value: number;
            name: string;
            value: number;
        }[];
    }

    A metric series for one account, already grouped. group says what each row covers: a range of 31 days or less is grouped by day, up to 720 by month, and beyond that by year.

    • group: "day" | "month" | "year"
    • stats: {
          date: string;
          group: "day" | "month" | "year";
          group_value: number;
          name: string;
          value: number;
      }[]

      One row per metric and per group. Empty when nothing was measured in the range.

  • AccountsPersistentMenu: {
        call_to_actions?: { [key: string]: unknown }[];
        composer_input_disabled?: boolean;
        locale?: string;
    }[]

    The chat's fixed menu, one entry per locale, in Meta's own format. The entry with locale: "default" is required and is what is shown when no other locale matches.

  • AccountsSocialAuthorizationMethod: {
        add_to_group_link?: string;
        app_id?: string;
        bot_username?: string;
        config_id?: string;
        feature_type?: string;
        graph_version?: string;
        session_info_version?: string;
        state?: string;
        type: "telegram_bot" | "redirect" | "meta_embedded_signup";
    }

    How an account of this network is authorized, which is not always "send the user to this URL".

    Almost every network is `redirect`: open `link` and the network sends the person back to PlanVortex with a code. Two are not:
    
    • **WhatsApp.** Its sign-up is Meta's *Embedded Signup*: a popup raised by the Facebook JavaScript SDK from your own page, which returns — over `postMessage` — session data (`waba_id`, `phone_number_id`) that no query string carries. Its `link` is therefore an empty string.
    • **Telegram.** There is no OAuth here: no consent screen, no `code`, no account token. `link` opens a private chat with the PlanVortex bot, the person then adds that bot to their channel, and **the account is created from that event**, not from any request of yours. Which means the connection cannot be finished by calling `GET /organizations/{id_organization}/account-connect/telegram` — see that endpoint.
    
    Branch on `authorization.type`, never on whether `link` is empty.
    
    • Optionaladd_to_group_link?: string

      telegram_bot only. The second step, and it does not follow from the first: link opens the list of channels and this one opens the list of groups. It adds the bot to the channel's linked discussion group, which is what turns comments on — a Telegram channel with no discussion group has no comment inbox at all (error 965). Optional for the user: publishing and statistics work without it.

    • Optionalapp_id?: string

      meta_embedded_signup only. Goes to FB.init({appId}). It is the same Meta app whose secret PlanVortex uses to exchange the code afterwards.

    • Optionalbot_username?: string

      telegram_bot only. The bot's @name, without the at sign. Published here so you never have to write it by hand: it is the name the person will see in Telegram, and it changes with the deployment.

    • Optionalconfig_id?: string

      meta_embedded_signup only. Goes to FB.login(cb, {config_id}) — the Embedded Signup configuration.

    • Optionalfeature_type?: string

      meta_embedded_signup only. Goes to extras.featureType.

    • Optionalgraph_version?: string

      meta_embedded_signup only. Goes to FB.init({version}). This is the JavaScript SDK version, not the Graph version PlanVortex calls server-side: they move independently.

    • Optionalsession_info_version?: string

      meta_embedded_signup only. Goes to extras.sessionInfoVersion.

    • Optionalstate?: string

      meta_embedded_signup only, and only with a temporal token issued with account_selection=integrator. The popup hands the code back in JavaScript, not in a URL from Meta, so whoever builds the return URL has to add this as state. The PlanVortex page does it for you.

    • type: "telegram_bot" | "redirect" | "meta_embedded_signup"

      redirect: send the user to link. meta_embedded_signup: open the Meta popup with the fields below. telegram_bot: open link in another tab and wait for the account to show up.

  • AccountsSocialLinksList: {
        links: {
            authorization: {
                add_to_group_link?: string;
                app_id?: string;
                bot_username?: string;
                config_id?: string;
                feature_type?: string;
                graph_version?: string;
                session_info_version?: string;
                state?: string;
                type: "telegram_bot" | "redirect" | "meta_embedded_signup";
            };
            link: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        }[];
    }
    • links: {
          authorization: {
              add_to_group_link?: string;
              app_id?: string;
              bot_username?: string;
              config_id?: string;
              feature_type?: string;
              graph_version?: string;
              session_info_version?: string;
              state?: string;
              type: "telegram_bot" | "redirect" | "meta_embedded_signup";
          };
          link: string;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest";
      }[]

      One entry per network that can be connected right now.

  • AiContext: {
        audience?: string;
        avoid?: string;
        blog_url?: string;
        brand_name?: string;
        default_tone?: string;
        description?: string;
        keywords?: string[];
        notes?: string;
        products?: string;
        sector?: string;
        shop_url?: string;
        social_urls?: string[];
        value_proposition?: string;
        website?: string;
    }

    Brand context for AI generation. Every field is optional; the ones you fill in are what the model is told about the business.

    • Optionalaudience?: string

      Who the content is aimed at.

    • Optionalavoid?: string

      Topics, expressions or competitors that must never appear.

    • Optionalblog_url?: string
    • Optionalbrand_name?: string

      Commercial name, when it differs from the organization's.

    • Optionaldefault_tone?: string

      Default tone. A tone set on the plan itself wins over this one.

    • Optionaldescription?: string

      What the organization does.

    • Optionalkeywords?: string[]

      Recurring keywords and hashtags.

    • Optionalnotes?: string

      Anything else the model should know.

    • Optionalproducts?: string

      Products or services that may be promoted.

    • Optionalsector?: string
    • Optionalshop_url?: string
    • Optionalsocial_urls?: string[]

      Social profiles or other reference links.

    • Optionalvalue_proposition?: string
    • Optionalwebsite?: string
  • AiImageOrigin: { generated_at: string; id_ai_plan?: string; model: string; provider: string }

    Where an AI-generated image came from. Only images a model generated carry it: a photo the organization uploaded, a product photo pulled from a connected shop or an image imported from an integration never does.

    It is set when the image is generated and cannot be edited. Use it to show your own AI label: under article 50(4) of the EU AI Act, telling the audience that an image is AI-generated is the job of whoever publishes it.
    
    Images made with the default model also carry a signed C2PA manifest, IPTC metadata and a SynthID watermark in the file itself. PlanVortex keeps the IPTC marker when it crops or recompresses an image for a network; the C2PA signature does not survive a change of pixels.
    
    • generated_at: string

      Format: date-time

    • Optionalid_ai_plan?: string

      The AI plan that generated it.

    • model: string

      The model, as it was requested, for instance google/gemini-3.1-flash-image.

    • provider: string

      The AI provider that answered: openrouter unless the client brought its own key.

  • AiPlanResult: {
        accounts: number;
        archived_date?: string;
        creation_date: string;
        credits_per_engagement?: number;
        credits_spent: number;
        engagement_per_publication?: number;
        engagement_vs_average?: number;
        expected_engagement_per_publication?: number;
        id_ai_plan: string;
        id_organization: string;
        last_publish_date?: string;
        maturing: boolean;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        prompt: string;
        publications: {
            failed: number;
            measured: number;
            published: number;
            scheduled: number;
            total: number;
        };
        ranked: boolean;
        social_networks: (
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"
        )[];
        state: "generated"
        | "validated";
        template:
            | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
        week_start: string;
    }

    What ONE AI plan achieved with what it published.

    **Where the numbers come from.** A plan keeps its publications, and each publication keeps the last known value of its metrics (the same ones `GET /organizations/{id}/publications/stats` returns). This adds those up — nothing here is measured twice or asked to the network again.
    
    **Only the publications that went out and were measured count** (`publications.measured`). A post scheduled for tomorrow, one that failed or one published an hour ago that nobody has measured yet does not lower the average: it is simply not in it.
    
    **A missing metric is not a zero**, as everywhere else: if no publication of the plan reports `reach`, the plan has no `reach` key.
    
    • accounts: number

      Accounts the plan was generated for.

    • Optionalarchived_date?: string

      Format: date-time

      Archived plans are included: archiving is visibility only, and what they published is still published.

    • creation_date: string

      Format: date-time

    • Optionalcredits_per_engagement?: number

      AI credits per interaction: what each interaction cost. Lower is better. Absent with no interactions, with no credits spent (your own AI key) and whenever social_network is filtered — the cost belongs to the whole plan, and dividing it by one network's interactions would overprice every one of them.

    • credits_spent: number

      AI credits the plan cost, for the whole plan.

    • Optionalengagement_per_publication?: number

      Interactions per measured publication — the number plans are ranked by. The total rewards size (seven accounts for seven days beat one account even if each post does half as well), and the engagement rate divides by reach on some networks and by followers on others, which makes two plans on different networks incomparable. Absent when nothing is measured yet.

    • Optionalengagement_vs_average?: number

      engagement_per_publication divided by expected_engagement_per_publication: 1 means like your average, 2 twice as much, 0.5 half. This is the number that says whether a plan is good, not just first — the ranking still orders by engagement_per_publication, so the first plan can be below 1. Absent with nothing measured or no average to compare with.

    • Optionalexpected_engagement_per_publication?: number

      What your usual posts would get with the same mix of networks: the organization's average interactions per measured post on each network, weighted by how many measured posts the plan has there. Two measured posts on Instagram (average 5) and two on LinkedIn (average 1) expect (2·5 + 2·1) / 4 = 3.

      The average covers **every** measured post of the organization in the range, AI ones included, on the same networks. Weighting by network is what keeps a LinkedIn-only plan from always reading as below average just because LinkedIn moves less than Instagram.
      
    • id_ai_plan: string
    • id_organization: string

      The organization the plan belongs to. In the dashboard block it can be a child of the organization you asked about, and a plan is only reachable by id through its own organization.

    • Optionallast_publish_date?: string

      Format: date-time

    • maturing: boolean

      Its numbers are still moving: something is still scheduled, or its last publication is less than 7 days old. Comparing it with a plan from last month is unfair to the new one — say so rather than hiding it.

    • metrics: {
          clicks?: number;
          comments?: number;
          engagement?: number;
          followers?: number;
          followers_gained?: number;
          impressions?: number;
          likes?: number;
          profile_views?: number;
          reach?: number;
          saves?: number;
          shares?: number;
          video_views?: number;
      }
      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions

      • Optionalfollowers?: number

        Followers accumulated at that date, not the day's gain.

      • Optionalfollowers_gained?: number

        Followers gained that day.

      • Optionalimpressions?: number

        Times the content was shown (not unique)

      • Optionallikes?: number
      • Optionalprofile_views?: number
      • Optionalreach?: number

        Unique users reached

      • Optionalsaves?: number
      • Optionalshares?: number
      • Optionalvideo_views?: number
    • prompt: string
    • publications: {
          failed: number;
          measured: number;
          published: number;
          scheduled: number;
          total: number;
      }
      • failed: number

        Failed to publish.

      • measured: number

        Published and with metrics collected: the only ones the averages use.

      • published: number

        Went out to the network.

      • scheduled: number

        Scheduled, or being published right now.

      • total: number

        Publications of the plan that still exist. Deleted ones do not count.

    • ranked: boolean

      Whether the plan competes in the ranking: it needs at least 3 measured publications, or all of them if it published fewer. With a single measurement, one lucky post would put its plan first.

    • social_networks: (
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
      )[]

      Networks the plan published on. With the social_network filter, only the filtered ones.

    • state: "generated" | "validated"

      Only these two can have results. A generated plan was never validated, but someone may have published some of its drafts by hand.

    • template: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

      What the plan was generated from. A plan created before templates existed reads standard.

    • week_start: string

      Format: date-time

      The week the plan publishes in. This is what the range filters on, not the creation date.

  • AiPlanResultsGroup: {
        credits_per_engagement?: number;
        credits_spent: number;
        engagement_per_publication?: number;
        engagement_vs_average?: number;
        expected_engagement_per_publication?: number;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        plans: number;
        publications: { measured: number; published: number };
        ranked_plans: number;
    }

    The aggregate of a set of plans: all of them, or those of one template.

    • Optionalcredits_per_engagement?: number

      Credits per interaction, counting only the plans that already have something measured: a plan validated yesterday brings its whole cost and no interactions, and would make the group look expensive for arriving late. Absent with the social_network filter.

    • credits_spent: number

      Credits of every plan in the group.

    • Optionalengagement_per_publication?: number

      A weighted average: every interaction of the group divided by every measured publication of the group — not the average of each plan's average, which would let a one-post plan weigh as much as a forty-post one.

    • Optionalengagement_vs_average?: number

      The group's interactions per post over what was expected, computed over the same plans on both sides — a plan with no reference cannot add its interactions to one side only.

    • Optionalexpected_engagement_per_publication?: number

      What your usual posts would get with the group's mix of networks, weighted like its average. Only plans that have a reference count.

    • metrics: {
          clicks?: number;
          comments?: number;
          engagement?: number;
          followers?: number;
          followers_gained?: number;
          impressions?: number;
          likes?: number;
          profile_views?: number;
          reach?: number;
          saves?: number;
          shares?: number;
          video_views?: number;
      }
      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions

      • Optionalfollowers?: number

        Followers accumulated at that date, not the day's gain.

      • Optionalfollowers_gained?: number

        Followers gained that day.

      • Optionalimpressions?: number

        Times the content was shown (not unique)

      • Optionallikes?: number
      • Optionalprofile_views?: number
      • Optionalreach?: number

        Unique users reached

      • Optionalsaves?: number
      • Optionalshares?: number
      • Optionalvideo_views?: number
    • plans: number
    • publications: { measured: number; published: number }
    • ranked_plans: number

      How many of them compete in the ranking (see AiPlanResult.ranked).

  • AiPlansAiPlan: {
        _id: string;
        accounts: string[];
        archived_date?: string;
        attempts: number;
        creation_date: string;
        credits_spent: number;
        destinations?: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        }[];
        error?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        };
        generation_end_date?: string;
        id_client: string;
        id_organization: string;
        keycloak_identifier?: string;
        options: {
            allow_images: boolean;
            gallery_uploads: string[];
            language: string;
            link?: string;
            max_images?: number;
            publish_days: number[];
            shared: boolean;
            timezone: string;
            tone?: string;
            use_organization_context: boolean;
            week_start: string;
        };
        orchestrator_result?: Record<string, never>;
        organization_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        };
        prompt: string;
        publications: (
            | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: (...)
                    | (...)
                    | (...) } & { [key: string]: unknown };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }
        )[];
        source?: {
            event?: { date?: string; name?: string };
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description?: string; id_upload?: string }[];
            products?: {
                description?: string;
                external_id?: string;
                id_upload?: string;
                name?: string;
                permalink?: string;
                price?: string;
            }[];
            text?: string;
            url?: string;
        };
        state: | "pending"
        | "generating"
        | "generated"
        | "validated"
        | "failed"
        | "cancelled";
        template?: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
        warnings?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
    }
    • _id: string
      66d04a6a427f4c43b9d97f54
      
    • accounts: string[]

      Accounts the plan was generated for.

    • Optionalarchived_date?: string

      Format: date-time

      When the plan was archived. Absent means it is active, which is how every plan created before archiving existed comes back.

      It is a field of its own and NOT a value of `state` on purpose: `state` is the generation lifecycle and archiving is orthogonal to it — a `validated` plan that already published gets archived just like a `failed` one. Inside the enum you would have to decide which state it returns to when unarchived, and that question has no answer.
      
      Archiving is visibility only: it takes the plan out of the default listing and touches no publication. Anything it had scheduled keeps publishing.
      
    • attempts: number

      Generation attempts consumed (transient failures are retried, max 2).

    • creation_date: string

      Format: date-time

    • credits_spent: number

      AI credits actually consumed by the generation.

    • Optionaldestinations?: {
          destination: {
              id?: string;
              name?: string;
              section_id?: string;
              section_name?: string;
          };
          id_account: string;
      }[]

      The destination of each account of the plan that needs one (today, the board of every Pinterest account). Empty on a plan without such accounts, and on every plan created before destinations existed.

    • Optionalerror?: { code: number; data?: { [key: string]: unknown }; message: string }

      Last generation error. Present only in state failed.

    • Optionalgeneration_end_date?: string

      Format: date-time

    • id_client: string
    • id_organization: string
    • Optionalkeycloak_identifier?: string

      User who requested the generation.

    • options: {
          allow_images: boolean;
          gallery_uploads: string[];
          language: string;
          link?: string;
          max_images?: number;
          publish_days: number[];
          shared: boolean;
          timezone: string;
          tone?: string;
          use_organization_context: boolean;
          week_start: string;
      }
      • allow_images: boolean

        Whether images may be generated. Each image costs 70 AI credits.

        true
        
      • gallery_uploads: string[]

        Upload ids from the organization's gallery used as visual reference for the generated images.

      • language: string

        Language of the generated texts.

        es
        
      • Optionallink?: string

        The destination link given to the plan's publications on the networks with link: true (today pinterest). Absent when none was sent or the plan has no such network.

      • Optionalmax_images?: number

        Optional cap on the number of images; the credit budget may reduce it further.

      • publish_days: number[]

        Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108.

        [
        1,
        2,
        3,
        4,
        5,
        6,
        7
        ]
      • shared: boolean

        Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7.

        false
        
      • timezone: string

        IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC.

        Europe/Madrid
        
      • Optionaltone?: string

        Optional tone (e.g. 'cercano', 'profesional') passed to the prompt.

      • use_organization_context: boolean

        Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile.

        true
        
      • week_start: string

        Format: date-time

        Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.

    • Optionalorchestrator_result?: Record<string, never>

      Raw plan returned by the orchestrator, kept for audit (before validation/trimming).

    • Optionalorganization_context?: {
          audience?: string;
          avoid?: string;
          blog_url?: string;
          brand_name?: string;
          default_tone?: string;
          description?: string;
          keywords?: string[];
          notes?: string;
          products?: string;
          sector?: string;
          shop_url?: string;
          social_urls?: string[];
          value_proposition?: string;
          website?: string;
      }

      SNAPSHOT of the organization's brand context taken when the plan was created, so a retry or a regeneration reproduces the same plan even if the configuration changed. Absent when the plan was asked for without context, or when the organization had none.

      • Optionalaudience?: string

        Who the content is aimed at.

      • Optionalavoid?: string

        Topics, expressions or competitors that must never appear.

      • Optionalblog_url?: string
      • Optionalbrand_name?: string

        Commercial name, when it differs from the organization's.

      • Optionaldefault_tone?: string

        Default tone. A tone set on the plan itself wins over this one.

      • Optionaldescription?: string

        What the organization does.

      • Optionalkeywords?: string[]

        Recurring keywords and hashtags.

      • Optionalnotes?: string

        Anything else the model should know.

      • Optionalproducts?: string

        Products or services that may be promoted.

      • Optionalsector?: string
      • Optionalshop_url?: string
      • Optionalsocial_urls?: string[]

        Social profiles or other reference links.

      • Optionalvalue_proposition?: string
      • Optionalwebsite?: string
    • prompt: string
    • publications: (
          | string
          | {
              _id: string;
              ai_generated?: { image: boolean; text: boolean };
              creation_date: string;
              destination?: {
                  id?: string;
                  name?: string;
                  section_id?: string;
                  section_name?: string;
              };
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              extra_data?: { [key: string]: unknown };
              files: {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: string;
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }[];
              id_account: | string
              | {
                  _id: string;
                  creation_date: string;
                  error_code: number;
                  extra_data?: { is_personal_profile?: (...)
                  | (...)
                  | (...) } & { [key: string]: unknown };
                  followers_count?: number;
                  id_client: string;
                  id_organization: string;
                  image?: string;
                  name: string;
                  next_comments_update?: string;
                  next_stats_update?: string;
                  private_message_link?: string;
                  social_network:
                      | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  username?: string;
              };
              id_integration?: string;
              id_organization: string;
              link?: string;
              made_for_kids?: boolean;
              metrics?: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              name?: string;
              next_stats_update?: string;
              pending_publish?: {
                  data?: { [key: string]: unknown };
                  deadline?: string;
                  next_check?: string;
                  temp_keys?: string[];
              };
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publication_warnings?: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publish_date?: string;
              reply_control?: | "everyone"
              | "accounts_you_follow"
              | "mentioned_only"
              | "followers_only";
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              state: "ready"
              | "withErrors"
              | "sended"
              | "draft"
              | "publishing";
              statistics?: {
                  angers?: number;
                  bookmarks?: number;
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  follows?: number;
                  hahas?: number;
                  impressions?: number;
                  likes?: number;
                  loves?: number;
                  negative_feedback?: number;
                  outbound_clicks?: number;
                  page_likes?: number;
                  pin_clicks?: number;
                  playback_0_count?: number;
                  playback_100_count?: number;
                  playback_25_count?: number;
                  playback_50_count?: number;
                  playback_75_count?: number;
                  profile_activity?: number;
                  profile_visits?: number;
                  quotes?: number;
                  reach?: number;
                  reactions?: number;
                  reactions_by_emoji?: { [key: string]: number };
                  replys?: number;
                  retwets?: number;
                  saved?: number;
                  saves?: number;
                  share?: number;
                  shareMentions?: number;
                  shares?: number;
                  sorrys?: number;
                  url_link_clicks?: number;
                  user_profile_clicks?: number;
                  video_views?: number;
                  views?: number;
                  wows?: number;
              };
              stats_updated_date?: string;
              text?: string;
              title?: string;
              url?: string;
              visibility?: "public"
              | "unlisted"
              | "private";
          }
      )[]

      The generated publications — ordinary drafts of the publication domain.

      **It is not always the same shape.** Reading one plan (`GET`, `validate`, `retry`) returns whole publications with their files resolved; the LISTING returns their identifiers as strings. Check before using them.
      
    • Optionalsource?: {
          event?: { date?: string; name?: string };
          id_account_catalog?: string;
          id_integration_catalog?: string;
          images?: { description?: string; id_upload?: string }[];
          products?: {
              description?: string;
              external_id?: string;
              id_upload?: string;
              name?: string;
              permalink?: string;
              price?: string;
          }[];
          text?: string;
          url?: string;
      }

      The source snapshot. Absent on a standard plan, which has no source.

      • Optionalevent?: { date?: string; name?: string }

        campaign. The event and its date, already normalised to the start of ITS day in the plan timezone.

        • Optionaldate?: string

          Format: date-time

        • Optionalname?: string
      • Optionalid_account_catalog?: string

        from_catalog. The account whose Meta catalogue was read.

      • Optionalid_integration_catalog?: string

        from_catalog. The connected store (an integration) whose catalogue was read. Only one of the two is present.

      • Optionalimages?: { description?: string; id_upload?: string }[]

        from_images. The chosen photos with their descriptions, in the order they were sent — the position IS the source_index of the publication that uses it.

      • Optionalproducts?: {
            description?: string;
            external_id?: string;
            id_upload?: string;
            name?: string;
            permalink?: string;
            price?: string;
        }[]

        from_catalog. Snapshot of the chosen products.

      • Optionaltext?: string

        from_text. The article, already downloaded and truncated. It is never downloaded again.

      • Optionalurl?: string

        from_text. The original address, kept for the record and to show where the plan came from.

    • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"

      State machine: pending -> generating -> generated -> validated | failed | cancelled. Reaching generated or failed is announced to your app's webhook (ai_plan_generated, ai_plan_failed); without one, poll the plan while state is pending or generating.

    • Optionaltemplate?: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

      What this plan was generated from. Always present: a plan created before templates existed reads standard.

    • Optionalwarnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

      Non-blocking notices about the LAST attempt (they are cleared when a new one starts). The plan is generated and perfectly usable; your UI just has to say what happened.

      Today there are two.
      
      **2117 — some source items did not fit in the plan week.** A plan is weekly and the source does not extend it, so 12 photos with 6 slots left publish 6 and the rest are dropped. `data` carries `{ source_items, capacity }`. Better said BEFORE creating the plan (the slots are the publish days x the accounts) than after charging for it.
      
      **922 — a publication of a network that cannot publish without an image was left without one.** On Pinterest a pin is an image or a video, never text. The plan cannot be created with a configuration that would cause this (2119), but an image generation that fails halfway through the plan cannot be foreseen. `data` carries `{ step, social_network, id_account, id_publication }`: that draft will not publish until it has an image — regenerate it or attach one.
      
  • AiPlansAiPlanCostEstimate: {
        available_credits: number;
        base_cost: number;
        estimated_cost: number;
        images_target: number;
        texts_target: number;
    }

    Deterministic cost estimate computed by the backend (never by the model). BYOK scopes cost 0 credits.

    • available_credits: number
    • base_cost: number

      Mandatory cost (orchestration + target texts). The orchestration half depends on the TEMPLATE and on the size of its source: orchestration_cost + orchestration_cost_per_source_item x units, both published in GET /planner_templates. The plan is rejected if this exceeds the available credits.

    • estimated_cost: number

      Total estimated cost including the financeable images (upper bound).

    • images_target: number

      How many images the plan will generate. 0 when the template does not generate them (from_images, from_catalog): the pictures come from the source, so the plan spends no image credits at all — a week of 7 publications with a picture on each goes from 519 credits to 48. That is worth saying out loud before the plan is created.

    • texts_target: number
  • AiPlansAiPlanCreateRequest: {
        accounts: string[];
        destinations?: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        }[];
        options?: {
            allow_images?: boolean;
            gallery_uploads?: string[];
            language?: string;
            link?: string;
            max_images?: number;
            publish_days?: number[];
            shared?: boolean;
            timezone?: string;
            tone?: string;
            use_organization_context?: boolean;
            week_start?: string;
        };
        prompt: string;
        source?: {
            event_date?: string;
            event_name?: string;
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description: string; id_upload: string }[];
            product_catalog_id?: string;
            products?: string[];
            text?: string;
            url?: string;
        };
        template?: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
    }
    • accounts: string[]

      Account ids (belonging to the organization) to generate the plan for. Not every network fits every template: leave out the ones in the template's unsupported_networks (GET /planner_templates), or the plan is refused with 2120.

    • Optionaldestinations?: {
          destination: {
              id?: string;
              name?: string;
              section_id?: string;
              section_name?: string;
          };
          id_account: string;
      }[]

      Where each account publishes, for the networks that answer destinations: true in GET /social_capabilities — today pinterest alone, where it is the board of every pin of that account.

      **On Pinterest it is required, one entry per Pinterest account of the plan.** A plan without it — or with a board id that is not a string of digits — is rejected with **2118**, listing EVERY account that fails in `data.accounts[]` with the same `reason` as the publication's 987 (`missing`, `invalid_id`, `invalid_section_id`), so your UI can mark them all at once. Without this check the plan would be created, charged, and leave a week of drafts in `withErrors` with the 987.
      
      Entries for accounts on networks without destinations are dropped, not rejected. The board is **not** checked against Pinterest at creation — that would make creating a plan depend on Pinterest answering; a board that does not exist fails when the pin is published. Read the account's boards with `GET /organizations/{id_organization}/accounts/{id_account}/destinations`.
      
    • Optionaloptions?: {
          allow_images?: boolean;
          gallery_uploads?: string[];
          language?: string;
          link?: string;
          max_images?: number;
          publish_days?: number[];
          shared?: boolean;
          timezone?: string;
          tone?: string;
          use_organization_context?: boolean;
          week_start?: string;
      }
      • Optionalallow_images?: boolean

        Whether images may be generated. Each image costs 70 AI credits. Optional; defaults to true. Forced to false when the template does not generate images (generates_images: false), where the picture comes from the source and costs nothing.

      • Optionalgallery_uploads?: string[]

        Upload ids from the organization's gallery used as visual reference for the generated images. They are references for the images the model GENERATES, so a template that does not generate them does not accept them either (allows_gallery): sending them to from_images or from_catalog is a 2106.

      • Optionallanguage?: string

        Language of the generated texts. Optional; defaults to "es".

      • Optionallink?: string

        The destination link of the plan's publications — the pin's link, the same for every publication of the plan. Optional: a pin without a link is legitimate, it just takes nobody anywhere. On from_catalog, each pin leads to its product's page (permalink) when this is absent; when it is present, it wins.

        It only reaches the publications of the networks that answer `link: true` in `GET /social_capabilities` (today `pinterest`); with none of them in the plan it is dropped. With one, it is validated **at creation**: a URL Pinterest would reject is a **994** now (`data.reason` `invalid_url` or `too_long`), not a week of pins failing at publish time.
        
      • Optionalmax_images?: number

        Optional cap on the number of images; the credit budget may reduce it further.

      • Optionalpublish_days?: number[]

        Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108. Optional; defaults to [1,2,3,4,5,6,7].

      • Optionalshared?: boolean

        Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7. Optional; defaults to false. Not every template accepts it (allows_shared in GET /planner_templates): from_images and from_catalog do not, because each of their publications carries a photo of its own, and sending true to them is rejected with 2106.

      • Optionaltimezone?: string

        IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC. Optional; defaults to "Europe/Madrid".

      • Optionaltone?: string

        Optional tone (e.g. 'cercano', 'profesional') passed to the prompt.

      • Optionaluse_organization_context?: boolean

        Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile. Optional; defaults to true.

      • Optionalweek_start?: string

        Format: date-time

        Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.

    • prompt: string

      Theme prompt written by the user.

    • Optionalsource?: {
          event_date?: string;
          event_name?: string;
          id_account_catalog?: string;
          id_integration_catalog?: string;
          images?: { description: string; id_upload: string }[];
          product_catalog_id?: string;
          products?: string[];
          text?: string;
          url?: string;
      }

      The source itself. Which fields it carries depends on template. Required for every template except standard, and validated at creation — 2112, 2113, 2114, 2115, 2116 or a store's own errors (2200, 2207-2214) come back while the user is still there.

      • Optionalevent_date?: string

        Format: date

        campaign. The day of the event. Send a calendar day, YYYY-MM-DD — never an ISO instant. A bare date is read in the plan's options.timezone, which is the whole point: 2026-09-15T00:00:00Z is midnight UTC, that is the 14th in the afternoon in New York — a whole day off in a countdown, for half of America, with no error anywhere. It cannot fall before the plan week (options.week_start) nor more than 60 days after it (2112). And it does not move publish_days: if the event lands on a day you did not choose, the plan respects your choice and it is up to you to say so.

      • Optionalevent_name?: string

        campaign. What the countdown is towards ("Rebajas de verano", "Apertura del local"). Over 120 characters it is rejected, not truncated: a name cut mid-word would come out that way in all seven publications, and whatever else needs saying goes in prompt.

      • Optionalid_account_catalog?: string

        from_catalog, from a Meta catalogue. Which account's catalogue the products come from. It has to belong to the organization (2103) and be on a network that supports products (2115). It only chooses the catalogue: the publications still go to every account in accounts — a LinkedIn account can publish a product from a Facebook catalogue. Exclusive with id_integration_catalog (both at once is a 2112).

      • Optionalid_integration_catalog?: string

        from_catalog, from a connected store. An integration of the organization whose provider has catalog: true (a WooCommerce store), enabled; another organization's is a 2200, without confirming it exists. The products are its external_ids, from GET .../integrations/{id_integration}/products. Like the account, it only chooses the catalogue: the publications go to every account in accounts. Exclusive with id_account_catalog.

      • Optionalimages?: { description: string; id_upload: string }[]

        from_images. Your own photos, each with its own description, in the order that tells the story: the orchestrator picks one per publication and keeps its position in source_index, so photo 3 can be the "before" and photo 7 the "after". Up to 20 (max_source_items), and each one has to be an image upload of this organization (806 otherwise).

      • Optionalproduct_catalog_id?: string

        from_catalog with id_account_catalog only. The catalogue itself, as the network identifies it: an account can have several catalogues, a store is one.

      • Optionalproducts?: string[]

        from_catalog. Ids of the chosen products, in the order they should tell the week. Up to 12 — a unit here is not an id already in the database: it is a live read plus a real download inside this request, with the user waiting. Repeated ids are deduplicated. They are ALL checked against the catalogue before a single picture is downloaded (2112 naming the missing one, or the one that is out of stock), and each picture is copied into an upload of the organization: a catalogue's picture URL expires or changes, and a plan published weeks later would carry a broken file. Those uploads count against the storage quota.

      • Optionaltext?: string

        from_text. The article pasted by hand. It wins over url when both come: pasting is what a user does when the download did not work (a paywall, a page that needs JavaScript), so re-downloading to ignore what they wrote would take away their only way out. Truncated to 12.000 characters — the cap is what keeps the estimate honest, since the real charge is per use. Under 200 characters it is not an article, it is the theme, which is prompt and another field (2116).

      • Optionalurl?: string

        Format: uri

        from_text. The article the plan is written from. It is downloaded at creation, and only http/https addresses that resolve to a public IP are accepted — checked again before every redirect (2114). A page that answers something that is not text or HTML, or that carries no usable text once stripped, is a 2113: paste the text in text instead.

    • Optionaltemplate?: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

      What the plan is generated FROM. Optional; defaults to standard, which is exactly what every plan did before templates existed — send nothing and nothing changes.

      A template is the **source** of the content, not a different flow: `shared`, `publish_days`, `language`, `tone` and the images stay cross-cutting options, and each template declares which of them it accepts. Sending one it does not accept is a 2106, not a silent ignore.
      
      Read the list, the costs and the fields from `GET /planner_templates`; do not hardcode them.
      
  • AiPlansAiPlanCreateResponse: {
        ai_plan: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...) | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        };
        estimate: {
            available_credits: number;
            base_cost: number;
            estimated_cost: number;
            images_target: number;
            texts_target: number;
        };
        estimated_cost: number;
    }
    • ai_plan: {
          _id: string;
          accounts: string[];
          archived_date?: string;
          attempts: number;
          creation_date: string;
          credits_spent: number;
          destinations?: {
              destination: {
                  id?: string;
                  name?: string;
                  section_id?: string;
                  section_name?: string;
              };
              id_account: string;
          }[];
          error?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          };
          generation_end_date?: string;
          id_client: string;
          id_organization: string;
          keycloak_identifier?: string;
          options: {
              allow_images: boolean;
              gallery_uploads: string[];
              language: string;
              link?: string;
              max_images?: number;
              publish_days: number[];
              shared: boolean;
              timezone: string;
              tone?: string;
              use_organization_context: boolean;
              week_start: string;
          };
          orchestrator_result?: Record<string, never>;
          organization_context?: {
              audience?: string;
              avoid?: string;
              blog_url?: string;
              brand_name?: string;
              default_tone?: string;
              description?: string;
              keywords?: string[];
              notes?: string;
              products?: string;
              sector?: string;
              shop_url?: string;
              social_urls?: string[];
              value_proposition?: string;
              website?: string;
          };
          prompt: string;
          publications: (
              | string
              | {
                  _id: string;
                  ai_generated?: { image: boolean; text: boolean };
                  creation_date: string;
                  destination?: {
                      id?: string;
                      name?: string;
                      section_id?: string;
                      section_name?: string;
                  };
                  engagement_base?: "reach"
                  | "impressions"
                  | "followers";
                  external_identifier?: string;
                  extra_data?: { [key: string]: unknown };
                  files: {
                      _id: string;
                      ai_generated?: {
                          generated_at: string;
                          id_ai_plan?: (...) | (...);
                          model: string;
                          provider: string;
                      };
                      cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                      cover_offset?: number;
                      creation_date: string;
                      file_externals: {
                          external_identifier: string;
                          external_url: string;
                          social_network: | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...);
                      }[];
                      file_format: "mp4"
                      | "jpeg"
                      | "gif"
                      | "png"
                      | "jpg";
                      file_properties: {
                          allowed_social_networks: string[];
                          aspect_ratio: { text: string; value: number };
                          duration: number;
                          height: number;
                          size_in_bytes: number;
                          width: number;
                      };
                      file_type: "video"
                      | "image";
                      id_organization: string;
                      is_temporal: boolean;
                      name: string;
                      public_path: string;
                  }[];
                  id_account: | string
                  | {
                      _id: string;
                      creation_date: string;
                      error_code: number;
                      extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                      followers_count?: number;
                      id_client: string;
                      id_organization: string;
                      image?: string;
                      name: string;
                      next_comments_update?: string;
                      next_stats_update?: string;
                      private_message_link?: string;
                      social_network:
                          | "facebook"
                          | "instagram"
                          | "linkedin"
                          | "tiktok"
                          | "twitter"
                          | "whatsapp"
                          | "youtube"
                          | "google_business"
                          | "bluesky"
                          | "discord"
                          | "telegram"
                          | "threads"
                          | "slack"
                          | "pinterest";
                      username?: string;
                  };
                  id_integration?: string;
                  id_organization: string;
                  link?: string;
                  made_for_kids?: boolean;
                  metrics?: {
                      clicks?: number;
                      comments?: number;
                      engagement?: number;
                      followers?: number;
                      followers_gained?: number;
                      impressions?: number;
                      likes?: number;
                      profile_views?: number;
                      reach?: number;
                      saves?: number;
                      shares?: number;
                      video_views?: number;
                  };
                  name?: string;
                  next_stats_update?: string;
                  pending_publish?: {
                      data?: { [key: string]: unknown };
                      deadline?: string;
                      next_check?: string;
                      temp_keys?: string[];
                  };
                  publication_errors: {
                      code: number;
                      data?: { [key: string]: unknown };
                      message: string;
                  }[];
                  publication_type: | "profile"
                  | "page"
                  | "group"
                  | "reels"
                  | "stories"
                  | "message";
                  publication_warnings?: {
                      code: number;
                      data?: { [key: ...]: ... };
                      message: string;
                  }[];
                  publish_date?: string;
                  reply_control?: | "everyone"
                  | "accounts_you_follow"
                  | "mentioned_only"
                  | "followers_only";
                  retries: number;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
                  state: "ready"
                  | "withErrors"
                  | "sended"
                  | "draft"
                  | "publishing";
                  statistics?: {
                      angers?: number;
                      bookmarks?: number;
                      clicks?: number;
                      comments?: number;
                      engagement?: number;
                      follows?: number;
                      hahas?: number;
                      impressions?: number;
                      likes?: number;
                      loves?: number;
                      negative_feedback?: number;
                      outbound_clicks?: number;
                      page_likes?: number;
                      pin_clicks?: number;
                      playback_0_count?: number;
                      playback_100_count?: number;
                      playback_25_count?: number;
                      playback_50_count?: number;
                      playback_75_count?: number;
                      profile_activity?: number;
                      profile_visits?: number;
                      quotes?: number;
                      reach?: number;
                      reactions?: number;
                      reactions_by_emoji?: { [key: string]: number };
                      replys?: number;
                      retwets?: number;
                      saved?: number;
                      saves?: number;
                      share?: number;
                      shareMentions?: number;
                      shares?: number;
                      sorrys?: number;
                      url_link_clicks?: number;
                      user_profile_clicks?: number;
                      video_views?: number;
                      views?: number;
                      wows?: number;
                  };
                  stats_updated_date?: string;
                  text?: string;
                  title?: string;
                  url?: string;
                  visibility?: "public"
                  | "unlisted"
                  | "private";
              }
          )[];
          source?: {
              event?: { date?: string; name?: string };
              id_account_catalog?: string;
              id_integration_catalog?: string;
              images?: { description?: string; id_upload?: string }[];
              products?: {
                  description?: string;
                  external_id?: string;
                  id_upload?: string;
                  name?: string;
                  permalink?: string;
                  price?: string;
              }[];
              text?: string;
              url?: string;
          };
          state: | "pending"
          | "generating"
          | "generated"
          | "validated"
          | "failed"
          | "cancelled";
          template?: | "standard"
          | "from_images"
          | "from_text"
          | "from_catalog"
          | "campaign";
          warnings?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • accounts: string[]

        Accounts the plan was generated for.

      • Optionalarchived_date?: string

        Format: date-time

        When the plan was archived. Absent means it is active, which is how every plan created before archiving existed comes back.

        It is a field of its own and NOT a value of `state` on purpose: `state` is the generation lifecycle and archiving is orthogonal to it — a `validated` plan that already published gets archived just like a `failed` one. Inside the enum you would have to decide which state it returns to when unarchived, and that question has no answer.
        
        Archiving is visibility only: it takes the plan out of the default listing and touches no publication. Anything it had scheduled keeps publishing.
        
      • attempts: number

        Generation attempts consumed (transient failures are retried, max 2).

      • creation_date: string

        Format: date-time

      • credits_spent: number

        AI credits actually consumed by the generation.

      • Optionaldestinations?: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        }[]

        The destination of each account of the plan that needs one (today, the board of every Pinterest account). Empty on a plan without such accounts, and on every plan created before destinations existed.

      • Optionalerror?: { code: number; data?: { [key: string]: unknown }; message: string }

        Last generation error. Present only in state failed.

      • Optionalgeneration_end_date?: string

        Format: date-time

      • id_client: string
      • id_organization: string
      • Optionalkeycloak_identifier?: string

        User who requested the generation.

      • options: {
            allow_images: boolean;
            gallery_uploads: string[];
            language: string;
            link?: string;
            max_images?: number;
            publish_days: number[];
            shared: boolean;
            timezone: string;
            tone?: string;
            use_organization_context: boolean;
            week_start: string;
        }
        • allow_images: boolean

          Whether images may be generated. Each image costs 70 AI credits.

          true
          
        • gallery_uploads: string[]

          Upload ids from the organization's gallery used as visual reference for the generated images.

        • language: string

          Language of the generated texts.

          es
          
        • Optionallink?: string

          The destination link given to the plan's publications on the networks with link: true (today pinterest). Absent when none was sent or the plan has no such network.

        • Optionalmax_images?: number

          Optional cap on the number of images; the credit budget may reduce it further.

        • publish_days: number[]

          Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108.

          [
          1,
          2,
          3,
          4,
          5,
          6,
          7
          ]
        • shared: boolean

          Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7.

          false
          
        • timezone: string

          IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC.

          Europe/Madrid
          
        • Optionaltone?: string

          Optional tone (e.g. 'cercano', 'profesional') passed to the prompt.

        • use_organization_context: boolean

          Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile.

          true
          
        • week_start: string

          Format: date-time

          Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.

      • Optionalorchestrator_result?: Record<string, never>

        Raw plan returned by the orchestrator, kept for audit (before validation/trimming).

      • Optionalorganization_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        }

        SNAPSHOT of the organization's brand context taken when the plan was created, so a retry or a regeneration reproduces the same plan even if the configuration changed. Absent when the plan was asked for without context, or when the organization had none.

        • Optionalaudience?: string

          Who the content is aimed at.

        • Optionalavoid?: string

          Topics, expressions or competitors that must never appear.

        • Optionalblog_url?: string
        • Optionalbrand_name?: string

          Commercial name, when it differs from the organization's.

        • Optionaldefault_tone?: string

          Default tone. A tone set on the plan itself wins over this one.

        • Optionaldescription?: string

          What the organization does.

        • Optionalkeywords?: string[]

          Recurring keywords and hashtags.

        • Optionalnotes?: string

          Anything else the model should know.

        • Optionalproducts?: string

          Products or services that may be promoted.

        • Optionalsector?: string
        • Optionalshop_url?: string
        • Optionalsocial_urls?: string[]

          Social profiles or other reference links.

        • Optionalvalue_proposition?: string
        • Optionalwebsite?: string
      • prompt: string
      • publications: (
            | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }
        )[]

        The generated publications — ordinary drafts of the publication domain.

        **It is not always the same shape.** Reading one plan (`GET`, `validate`, `retry`) returns whole publications with their files resolved; the LISTING returns their identifiers as strings. Check before using them.
        
      • Optionalsource?: {
            event?: { date?: string; name?: string };
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description?: string; id_upload?: string }[];
            products?: {
                description?: string;
                external_id?: string;
                id_upload?: string;
                name?: string;
                permalink?: string;
                price?: string;
            }[];
            text?: string;
            url?: string;
        }

        The source snapshot. Absent on a standard plan, which has no source.

        • Optionalevent?: { date?: string; name?: string }

          campaign. The event and its date, already normalised to the start of ITS day in the plan timezone.

          • Optionaldate?: string

            Format: date-time

          • Optionalname?: string
        • Optionalid_account_catalog?: string

          from_catalog. The account whose Meta catalogue was read.

        • Optionalid_integration_catalog?: string

          from_catalog. The connected store (an integration) whose catalogue was read. Only one of the two is present.

        • Optionalimages?: { description?: string; id_upload?: string }[]

          from_images. The chosen photos with their descriptions, in the order they were sent — the position IS the source_index of the publication that uses it.

        • Optionalproducts?: {
              description?: string;
              external_id?: string;
              id_upload?: string;
              name?: string;
              permalink?: string;
              price?: string;
          }[]

          from_catalog. Snapshot of the chosen products.

        • Optionaltext?: string

          from_text. The article, already downloaded and truncated. It is never downloaded again.

        • Optionalurl?: string

          from_text. The original address, kept for the record and to show where the plan came from.

      • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"

        State machine: pending -> generating -> generated -> validated | failed | cancelled. Reaching generated or failed is announced to your app's webhook (ai_plan_generated, ai_plan_failed); without one, poll the plan while state is pending or generating.

      • Optionaltemplate?: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

        What this plan was generated from. Always present: a plan created before templates existed reads standard.

      • Optionalwarnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

        Non-blocking notices about the LAST attempt (they are cleared when a new one starts). The plan is generated and perfectly usable; your UI just has to say what happened.

        Today there are two.
        
        **2117 — some source items did not fit in the plan week.** A plan is weekly and the source does not extend it, so 12 photos with 6 slots left publish 6 and the rest are dropped. `data` carries `{ source_items, capacity }`. Better said BEFORE creating the plan (the slots are the publish days x the accounts) than after charging for it.
        
        **922 — a publication of a network that cannot publish without an image was left without one.** On Pinterest a pin is an image or a video, never text. The plan cannot be created with a configuration that would cause this (2119), but an image generation that fails halfway through the plan cannot be foreseen. `data` carries `{ step, social_network, id_account, id_publication }`: that draft will not publish until it has an image — regenerate it or attach one.
        
    • estimate: {
          available_credits: number;
          base_cost: number;
          estimated_cost: number;
          images_target: number;
          texts_target: number;
      }
      • available_credits: number
      • base_cost: number

        Mandatory cost (orchestration + target texts). The orchestration half depends on the TEMPLATE and on the size of its source: orchestration_cost + orchestration_cost_per_source_item x units, both published in GET /planner_templates. The plan is rejected if this exceeds the available credits.

      • estimated_cost: number

        Total estimated cost including the financeable images (upper bound).

      • images_target: number

        How many images the plan will generate. 0 when the template does not generate them (from_images, from_catalog): the pictures come from the source, so the plan spends no image credits at all — a week of 7 publications with a picture on each goes from 519 credits to 48. That is worth saying out loud before the plan is created.

      • texts_target: number
    • estimated_cost: number

      Shortcut to estimate.estimated_cost.

  • AiPlansAiPlanDestination: {
        destination: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        id_account: string;
    }

    The destination of ONE account of the plan: the Pinterest board where all of that account's publications of the plan go.

    One per ACCOUNT, not one per plan, because a plan can carry three Pinterest profiles and each one has its own boards. And it travels with the account, not with the content: in a `shared` plan the same content replicated to three profiles lands on three boards with nothing else to touch.
    
    There is no default destination stored on the account: it lives in the plan alone.
    
    • destination: { id?: string; name?: string; section_id?: string; section_name?: string }
      • Optionalid?: string

        The board id. Always a string, never a number: Pinterest's ids are long integers, so a client that sends one as a JSON number has already lost digits to rounding before the request arrives. That is refused — publication_errors[].code = 987 with data.reason = "invalid_id" — rather than published to some other board. Sending the board's name instead of its id fails the same way, which is the likeliest first mistake of an integration.

      • Optionalname?: string

        The board's label, for display. Decides nothing.

      • Optionalsection_id?: string

        Pinterest only: the section of the board, optional. Absent or empty means the board itself. Same rule as id — anything that is not a string of digits is data.reason = "invalid_section_id". A board's sections arrive in the detail of one destination, not in the list of them.

      • Optionalsection_name?: string

        The section's label, for display. Decides nothing.

    • id_account: string

      An account of the plan — one of accounts. An entry for an account that is not in the plan is a 2106 (almost always an id swapped by mistake).

  • AiPlansAiPlanList: {
        ai_plans: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: ...;
                            id_ai_plan?: ...;
                            model: ...;
                            provider: ...;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: ...;
                            external_url: ...;
                            social_network: ...;
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: (...)[];
                            aspect_ratio: { text: ...; value: ... };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: (...) & (...);
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: ...]: ... };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: (...)[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: ...]: ... };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        }[];
        total: number;
    }
  • AiPlansAiPlanNotice: { code: number; data?: { [key: string]: unknown }; message: string }

    Something the plan has to say about itself, in the same shape as an API error.

  • AiPlansAiPlanOne: {
        ai_plan: {
            _id: string;
            accounts: string[];
            archived_date?: string;
            attempts: number;
            creation_date: string;
            credits_spent: number;
            destinations?: {
                destination: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                id_account: string;
            }[];
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            id_client: string;
            id_organization: string;
            keycloak_identifier?: string;
            options: {
                allow_images: boolean;
                gallery_uploads: string[];
                language: string;
                link?: string;
                max_images?: number;
                publish_days: number[];
                shared: boolean;
                timezone: string;
                tone?: string;
                use_organization_context: boolean;
                week_start: string;
            };
            orchestrator_result?: Record<string, never>;
            organization_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            prompt: string;
            publications: (
                | string
                | {
                    _id: string;
                    ai_generated?: { image: boolean; text: boolean };
                    creation_date: string;
                    destination?: {
                        id?: string;
                        name?: string;
                        section_id?: string;
                        section_name?: string;
                    };
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    extra_data?: { [key: string]: unknown };
                    files: {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...) | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    id_account: | string
                    | {
                        _id: string;
                        creation_date: string;
                        error_code: number;
                        extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                        followers_count?: number;
                        id_client: string;
                        id_organization: string;
                        image?: string;
                        name: string;
                        next_comments_update?: string;
                        next_stats_update?: string;
                        private_message_link?: string;
                        social_network:
                            | "facebook"
                            | "instagram"
                            | "linkedin"
                            | "tiktok"
                            | "twitter"
                            | "whatsapp"
                            | "youtube"
                            | "google_business"
                            | "bluesky"
                            | "discord"
                            | "telegram"
                            | "threads"
                            | "slack"
                            | "pinterest";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: string;
                    link?: string;
                    made_for_kids?: boolean;
                    metrics?: {
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        followers?: number;
                        followers_gained?: number;
                        impressions?: number;
                        likes?: number;
                        profile_views?: number;
                        reach?: number;
                        saves?: number;
                        shares?: number;
                        video_views?: number;
                    };
                    name?: string;
                    next_stats_update?: string;
                    pending_publish?: {
                        data?: { [key: string]: unknown };
                        deadline?: string;
                        next_check?: string;
                        temp_keys?: string[];
                    };
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publication_warnings?: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publish_date?: string;
                    reply_control?: | "everyone"
                    | "accounts_you_follow"
                    | "mentioned_only"
                    | "followers_only";
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                    state: "ready"
                    | "withErrors"
                    | "sended"
                    | "draft"
                    | "publishing";
                    statistics?: {
                        angers?: number;
                        bookmarks?: number;
                        clicks?: number;
                        comments?: number;
                        engagement?: number;
                        follows?: number;
                        hahas?: number;
                        impressions?: number;
                        likes?: number;
                        loves?: number;
                        negative_feedback?: number;
                        outbound_clicks?: number;
                        page_likes?: number;
                        pin_clicks?: number;
                        playback_0_count?: number;
                        playback_100_count?: number;
                        playback_25_count?: number;
                        playback_50_count?: number;
                        playback_75_count?: number;
                        profile_activity?: number;
                        profile_visits?: number;
                        quotes?: number;
                        reach?: number;
                        reactions?: number;
                        reactions_by_emoji?: { [key: string]: number };
                        replys?: number;
                        retwets?: number;
                        saved?: number;
                        saves?: number;
                        share?: number;
                        shareMentions?: number;
                        shares?: number;
                        sorrys?: number;
                        url_link_clicks?: number;
                        user_profile_clicks?: number;
                        video_views?: number;
                        views?: number;
                        wows?: number;
                    };
                    stats_updated_date?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                    visibility?: "public"
                    | "unlisted"
                    | "private";
                }
            )[];
            source?: {
                event?: { date?: string; name?: string };
                id_account_catalog?: string;
                id_integration_catalog?: string;
                images?: { description?: string; id_upload?: string }[];
                products?: {
                    description?: string;
                    external_id?: string;
                    id_upload?: string;
                    name?: string;
                    permalink?: string;
                    price?: string;
                }[];
                text?: string;
                url?: string;
            };
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
            template?: | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
            warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
        };
    }
    • ai_plan: {
          _id: string;
          accounts: string[];
          archived_date?: string;
          attempts: number;
          creation_date: string;
          credits_spent: number;
          destinations?: {
              destination: {
                  id?: string;
                  name?: string;
                  section_id?: string;
                  section_name?: string;
              };
              id_account: string;
          }[];
          error?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          };
          generation_end_date?: string;
          id_client: string;
          id_organization: string;
          keycloak_identifier?: string;
          options: {
              allow_images: boolean;
              gallery_uploads: string[];
              language: string;
              link?: string;
              max_images?: number;
              publish_days: number[];
              shared: boolean;
              timezone: string;
              tone?: string;
              use_organization_context: boolean;
              week_start: string;
          };
          orchestrator_result?: Record<string, never>;
          organization_context?: {
              audience?: string;
              avoid?: string;
              blog_url?: string;
              brand_name?: string;
              default_tone?: string;
              description?: string;
              keywords?: string[];
              notes?: string;
              products?: string;
              sector?: string;
              shop_url?: string;
              social_urls?: string[];
              value_proposition?: string;
              website?: string;
          };
          prompt: string;
          publications: (
              | string
              | {
                  _id: string;
                  ai_generated?: { image: boolean; text: boolean };
                  creation_date: string;
                  destination?: {
                      id?: string;
                      name?: string;
                      section_id?: string;
                      section_name?: string;
                  };
                  engagement_base?: "reach"
                  | "impressions"
                  | "followers";
                  external_identifier?: string;
                  extra_data?: { [key: string]: unknown };
                  files: {
                      _id: string;
                      ai_generated?: {
                          generated_at: string;
                          id_ai_plan?: (...) | (...);
                          model: string;
                          provider: string;
                      };
                      cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                      cover_offset?: number;
                      creation_date: string;
                      file_externals: {
                          external_identifier: string;
                          external_url: string;
                          social_network: | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...);
                      }[];
                      file_format: "mp4"
                      | "jpeg"
                      | "gif"
                      | "png"
                      | "jpg";
                      file_properties: {
                          allowed_social_networks: string[];
                          aspect_ratio: { text: string; value: number };
                          duration: number;
                          height: number;
                          size_in_bytes: number;
                          width: number;
                      };
                      file_type: "video"
                      | "image";
                      id_organization: string;
                      is_temporal: boolean;
                      name: string;
                      public_path: string;
                  }[];
                  id_account: | string
                  | {
                      _id: string;
                      creation_date: string;
                      error_code: number;
                      extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                      followers_count?: number;
                      id_client: string;
                      id_organization: string;
                      image?: string;
                      name: string;
                      next_comments_update?: string;
                      next_stats_update?: string;
                      private_message_link?: string;
                      social_network:
                          | "facebook"
                          | "instagram"
                          | "linkedin"
                          | "tiktok"
                          | "twitter"
                          | "whatsapp"
                          | "youtube"
                          | "google_business"
                          | "bluesky"
                          | "discord"
                          | "telegram"
                          | "threads"
                          | "slack"
                          | "pinterest";
                      username?: string;
                  };
                  id_integration?: string;
                  id_organization: string;
                  link?: string;
                  made_for_kids?: boolean;
                  metrics?: {
                      clicks?: number;
                      comments?: number;
                      engagement?: number;
                      followers?: number;
                      followers_gained?: number;
                      impressions?: number;
                      likes?: number;
                      profile_views?: number;
                      reach?: number;
                      saves?: number;
                      shares?: number;
                      video_views?: number;
                  };
                  name?: string;
                  next_stats_update?: string;
                  pending_publish?: {
                      data?: { [key: string]: unknown };
                      deadline?: string;
                      next_check?: string;
                      temp_keys?: string[];
                  };
                  publication_errors: {
                      code: number;
                      data?: { [key: string]: unknown };
                      message: string;
                  }[];
                  publication_type: | "profile"
                  | "page"
                  | "group"
                  | "reels"
                  | "stories"
                  | "message";
                  publication_warnings?: {
                      code: number;
                      data?: { [key: ...]: ... };
                      message: string;
                  }[];
                  publish_date?: string;
                  reply_control?: | "everyone"
                  | "accounts_you_follow"
                  | "mentioned_only"
                  | "followers_only";
                  retries: number;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
                  state: "ready"
                  | "withErrors"
                  | "sended"
                  | "draft"
                  | "publishing";
                  statistics?: {
                      angers?: number;
                      bookmarks?: number;
                      clicks?: number;
                      comments?: number;
                      engagement?: number;
                      follows?: number;
                      hahas?: number;
                      impressions?: number;
                      likes?: number;
                      loves?: number;
                      negative_feedback?: number;
                      outbound_clicks?: number;
                      page_likes?: number;
                      pin_clicks?: number;
                      playback_0_count?: number;
                      playback_100_count?: number;
                      playback_25_count?: number;
                      playback_50_count?: number;
                      playback_75_count?: number;
                      profile_activity?: number;
                      profile_visits?: number;
                      quotes?: number;
                      reach?: number;
                      reactions?: number;
                      reactions_by_emoji?: { [key: string]: number };
                      replys?: number;
                      retwets?: number;
                      saved?: number;
                      saves?: number;
                      share?: number;
                      shareMentions?: number;
                      shares?: number;
                      sorrys?: number;
                      url_link_clicks?: number;
                      user_profile_clicks?: number;
                      video_views?: number;
                      views?: number;
                      wows?: number;
                  };
                  stats_updated_date?: string;
                  text?: string;
                  title?: string;
                  url?: string;
                  visibility?: "public"
                  | "unlisted"
                  | "private";
              }
          )[];
          source?: {
              event?: { date?: string; name?: string };
              id_account_catalog?: string;
              id_integration_catalog?: string;
              images?: { description?: string; id_upload?: string }[];
              products?: {
                  description?: string;
                  external_id?: string;
                  id_upload?: string;
                  name?: string;
                  permalink?: string;
                  price?: string;
              }[];
              text?: string;
              url?: string;
          };
          state: | "pending"
          | "generating"
          | "generated"
          | "validated"
          | "failed"
          | "cancelled";
          template?: | "standard"
          | "from_images"
          | "from_text"
          | "from_catalog"
          | "campaign";
          warnings?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • accounts: string[]

        Accounts the plan was generated for.

      • Optionalarchived_date?: string

        Format: date-time

        When the plan was archived. Absent means it is active, which is how every plan created before archiving existed comes back.

        It is a field of its own and NOT a value of `state` on purpose: `state` is the generation lifecycle and archiving is orthogonal to it — a `validated` plan that already published gets archived just like a `failed` one. Inside the enum you would have to decide which state it returns to when unarchived, and that question has no answer.
        
        Archiving is visibility only: it takes the plan out of the default listing and touches no publication. Anything it had scheduled keeps publishing.
        
      • attempts: number

        Generation attempts consumed (transient failures are retried, max 2).

      • creation_date: string

        Format: date-time

      • credits_spent: number

        AI credits actually consumed by the generation.

      • Optionaldestinations?: {
            destination: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            id_account: string;
        }[]

        The destination of each account of the plan that needs one (today, the board of every Pinterest account). Empty on a plan without such accounts, and on every plan created before destinations existed.

      • Optionalerror?: { code: number; data?: { [key: string]: unknown }; message: string }

        Last generation error. Present only in state failed.

      • Optionalgeneration_end_date?: string

        Format: date-time

      • id_client: string
      • id_organization: string
      • Optionalkeycloak_identifier?: string

        User who requested the generation.

      • options: {
            allow_images: boolean;
            gallery_uploads: string[];
            language: string;
            link?: string;
            max_images?: number;
            publish_days: number[];
            shared: boolean;
            timezone: string;
            tone?: string;
            use_organization_context: boolean;
            week_start: string;
        }
        • allow_images: boolean

          Whether images may be generated. Each image costs 70 AI credits.

          true
          
        • gallery_uploads: string[]

          Upload ids from the organization's gallery used as visual reference for the generated images.

        • language: string

          Language of the generated texts.

          es
          
        • Optionallink?: string

          The destination link given to the plan's publications on the networks with link: true (today pinterest). Absent when none was sent or the plan has no such network.

        • Optionalmax_images?: number

          Optional cap on the number of images; the credit budget may reduce it further.

        • publish_days: number[]

          Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108.

          [
          1,
          2,
          3,
          4,
          5,
          6,
          7
          ]
        • shared: boolean

          Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7.

          false
          
        • timezone: string

          IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC.

          Europe/Madrid
          
        • Optionaltone?: string

          Optional tone (e.g. 'cercano', 'profesional') passed to the prompt.

        • use_organization_context: boolean

          Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile.

          true
          
        • week_start: string

          Format: date-time

          Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.

      • Optionalorchestrator_result?: Record<string, never>

        Raw plan returned by the orchestrator, kept for audit (before validation/trimming).

      • Optionalorganization_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        }

        SNAPSHOT of the organization's brand context taken when the plan was created, so a retry or a regeneration reproduces the same plan even if the configuration changed. Absent when the plan was asked for without context, or when the organization had none.

        • Optionalaudience?: string

          Who the content is aimed at.

        • Optionalavoid?: string

          Topics, expressions or competitors that must never appear.

        • Optionalblog_url?: string
        • Optionalbrand_name?: string

          Commercial name, when it differs from the organization's.

        • Optionaldefault_tone?: string

          Default tone. A tone set on the plan itself wins over this one.

        • Optionaldescription?: string

          What the organization does.

        • Optionalkeywords?: string[]

          Recurring keywords and hashtags.

        • Optionalnotes?: string

          Anything else the model should know.

        • Optionalproducts?: string

          Products or services that may be promoted.

        • Optionalsector?: string
        • Optionalshop_url?: string
        • Optionalsocial_urls?: string[]

          Social profiles or other reference links.

        • Optionalvalue_proposition?: string
        • Optionalwebsite?: string
      • prompt: string
      • publications: (
            | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }
        )[]

        The generated publications — ordinary drafts of the publication domain.

        **It is not always the same shape.** Reading one plan (`GET`, `validate`, `retry`) returns whole publications with their files resolved; the LISTING returns their identifiers as strings. Check before using them.
        
      • Optionalsource?: {
            event?: { date?: string; name?: string };
            id_account_catalog?: string;
            id_integration_catalog?: string;
            images?: { description?: string; id_upload?: string }[];
            products?: {
                description?: string;
                external_id?: string;
                id_upload?: string;
                name?: string;
                permalink?: string;
                price?: string;
            }[];
            text?: string;
            url?: string;
        }

        The source snapshot. Absent on a standard plan, which has no source.

        • Optionalevent?: { date?: string; name?: string }

          campaign. The event and its date, already normalised to the start of ITS day in the plan timezone.

          • Optionaldate?: string

            Format: date-time

          • Optionalname?: string
        • Optionalid_account_catalog?: string

          from_catalog. The account whose Meta catalogue was read.

        • Optionalid_integration_catalog?: string

          from_catalog. The connected store (an integration) whose catalogue was read. Only one of the two is present.

        • Optionalimages?: { description?: string; id_upload?: string }[]

          from_images. The chosen photos with their descriptions, in the order they were sent — the position IS the source_index of the publication that uses it.

        • Optionalproducts?: {
              description?: string;
              external_id?: string;
              id_upload?: string;
              name?: string;
              permalink?: string;
              price?: string;
          }[]

          from_catalog. Snapshot of the chosen products.

        • Optionaltext?: string

          from_text. The article, already downloaded and truncated. It is never downloaded again.

        • Optionalurl?: string

          from_text. The original address, kept for the record and to show where the plan came from.

      • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"

        State machine: pending -> generating -> generated -> validated | failed | cancelled. Reaching generated or failed is announced to your app's webhook (ai_plan_generated, ai_plan_failed); without one, poll the plan while state is pending or generating.

      • Optionaltemplate?: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

        What this plan was generated from. Always present: a plan created before templates existed reads standard.

      • Optionalwarnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

        Non-blocking notices about the LAST attempt (they are cleared when a new one starts). The plan is generated and perfectly usable; your UI just has to say what happened.

        Today there are two.
        
        **2117 — some source items did not fit in the plan week.** A plan is weekly and the source does not extend it, so 12 photos with 6 slots left publish 6 and the rest are dropped. `data` carries `{ source_items, capacity }`. Better said BEFORE creating the plan (the slots are the publish days x the accounts) than after charging for it.
        
        **922 — a publication of a network that cannot publish without an image was left without one.** On Pinterest a pin is an image or a video, never text. The plan cannot be created with a configuration that would cause this (2119), but an image generation that fails halfway through the plan cannot be foreseen. `data` carries `{ step, social_network, id_account, id_publication }`: that draft will not publish until it has an image — regenerate it or attach one.
        
  • AiPlansAiPlanOptions: {
        allow_images: boolean;
        gallery_uploads: string[];
        language: string;
        link?: string;
        max_images?: number;
        publish_days: number[];
        shared: boolean;
        timezone: string;
        tone?: string;
        use_organization_context: boolean;
        week_start: string;
    }

    Generation options as they were STORED, already normalised: publish_days comes sorted and deduplicated, and every default has been resolved.

    • allow_images: boolean

      Whether images may be generated. Each image costs 70 AI credits.

      true
      
    • gallery_uploads: string[]

      Upload ids from the organization's gallery used as visual reference for the generated images.

    • language: string

      Language of the generated texts.

      es
      
    • Optionallink?: string

      The destination link given to the plan's publications on the networks with link: true (today pinterest). Absent when none was sent or the plan has no such network.

    • Optionalmax_images?: number

      Optional cap on the number of images; the credit budget may reduce it further.

    • publish_days: number[]

      Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108.

      [
      1,
      2,
      3,
      4,
      5,
      6,
      7
      ]
    • shared: boolean

      Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7.

      false
      
    • timezone: string

      IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC.

      Europe/Madrid
      
    • Optionaltone?: string

      Optional tone (e.g. 'cercano', 'profesional') passed to the prompt.

    • use_organization_context: boolean

      Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile.

      true
      
    • week_start: string

      Format: date-time

      Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.

  • AiPlansAiPlanOptionsInput: {
        allow_images?: boolean;
        gallery_uploads?: string[];
        language?: string;
        link?: string;
        max_images?: number;
        publish_days?: number[];
        shared?: boolean;
        timezone?: string;
        tone?: string;
        use_organization_context?: boolean;
        week_start?: string;
    }

    Generation options, as you SEND them: every one is optional and the server fills in its default. Optimal publish slots are chosen deterministically by the backend from a fixed table per network, converted to this timezone; the model never invents times.

    • Optionalallow_images?: boolean

      Whether images may be generated. Each image costs 70 AI credits. Optional; defaults to true. Forced to false when the template does not generate images (generates_images: false), where the picture comes from the source and costs nothing.

    • Optionalgallery_uploads?: string[]

      Upload ids from the organization's gallery used as visual reference for the generated images. They are references for the images the model GENERATES, so a template that does not generate them does not accept them either (allows_gallery): sending them to from_images or from_catalog is a 2106.

    • Optionallanguage?: string

      Language of the generated texts. Optional; defaults to "es".

    • Optionallink?: string

      The destination link of the plan's publications — the pin's link, the same for every publication of the plan. Optional: a pin without a link is legitimate, it just takes nobody anywhere. On from_catalog, each pin leads to its product's page (permalink) when this is absent; when it is present, it wins.

      It only reaches the publications of the networks that answer `link: true` in `GET /social_capabilities` (today `pinterest`); with none of them in the plan it is dropped. With one, it is validated **at creation**: a URL Pinterest would reject is a **994** now (`data.reason` `invalid_url` or `too_long`), not a week of pins failing at publish time.
      
    • Optionalmax_images?: number

      Optional cap on the number of images; the credit budget may reduce it further.

    • Optionalpublish_days?: number[]

      Days of the week the plan publishes on, in ISO 8601 numbering (1 = Monday ... 7 = Sunday). Defaults to the whole week. There is still at most ONE publication per day and account, so this is what bounds the size and the cost of the plan: the number of generated posts is (selected days x accounts). Must be a non-empty array of unique integers between 1 and 7, or the request is rejected with 2106. The 7-day window starts at week_start, so each ISO day appears exactly once: with a week_start in mid-week, day 1 (Monday) is the FOLLOWING Monday. If the selected days leave no future slot at all, the request is rejected with 2108. Optional; defaults to [1,2,3,4,5,6,7].

    • Optionalshared?: boolean

      Generate ONE piece of content per day and replicate it across every account, each scheduled at the best hour for ITS network, instead of one publication per account and day. Cheaper — one text and one image per day — and it caps images at 7. Optional; defaults to false. Not every template accepts it (allows_shared in GET /planner_templates): from_images and from_catalog do not, because each of their publications carries a photo of its own, and sending true to them is rejected with 2106.

    • Optionaltimezone?: string

      IANA timezone for the optimal publish slots (typically the user's browser timezone). publish_date is stored in UTC. Optional; defaults to "Europe/Madrid".

    • Optionaltone?: string

      Optional tone (e.g. 'cercano', 'profesional') passed to the prompt.

    • Optionaluse_organization_context?: boolean

      Use the organization's brand context in the prompts. It is copied into the plan as a SNAPSHOT when the plan is created, so a retry or a regeneration uses the context the plan was asked with even if the configuration changed meanwhile. Optional; defaults to true.

    • Optionalweek_start?: string

      Format: date-time

      Start of the week to plan (slots are generated between this date and +7 days). Defaults to now.

  • AiPlansAiPlanResults: {
        ai_plans: {
            accounts: number;
            archived_date?: string;
            creation_date: string;
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            id_ai_plan: string;
            id_organization: string;
            last_publish_date?: string;
            maturing: boolean;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            prompt: string;
            publications: {
                failed: number;
                measured: number;
                published: number;
                scheduled: number;
                total: number;
            };
            ranked: boolean;
            social_networks: (
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest"
            )[];
            state: "generated"
            | "validated";
            template:
                | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            week_start: string;
        }[];
        by_template: (
            {
                credits_per_engagement?: number;
                credits_spent: number;
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                expected_engagement_per_publication?: number;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                plans: number;
                publications: { measured: number; published: number };
                ranked_plans: number;
            } & {
                template: | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            }
        )[];
        range: {
            from_date: string;
            previous_from_date?: string;
            previous_to_date?: string;
            to_date: string;
        };
        sort: string;
        total: number;
        totals: {
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            plans: number;
            publications: { measured: number; published: number };
            ranked_plans: number;
        };
    }
    • ai_plans: {
          accounts: number;
          archived_date?: string;
          creation_date: string;
          credits_per_engagement?: number;
          credits_spent: number;
          engagement_per_publication?: number;
          engagement_vs_average?: number;
          expected_engagement_per_publication?: number;
          id_ai_plan: string;
          id_organization: string;
          last_publish_date?: string;
          maturing: boolean;
          metrics: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          prompt: string;
          publications: {
              failed: number;
              measured: number;
              published: number;
              scheduled: number;
              total: number;
          };
          ranked: boolean;
          social_networks: (
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest"
          )[];
          state: "generated"
          | "validated";
          template:
              | "standard"
              | "from_images"
              | "from_text"
              | "from_catalog"
              | "campaign";
          week_start: string;
      }[]

      The page of plans, in sort order.

    • by_template: (
          {
              credits_per_engagement?: number;
              credits_spent: number;
              engagement_per_publication?: number;
              engagement_vs_average?: number;
              expected_engagement_per_publication?: number;
              metrics: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              plans: number;
              publications: { measured: number; published: number };
              ranked_plans: number;
          } & {
              template: | "standard"
              | "from_images"
              | "from_text"
              | "from_catalog"
              | "campaign";
          }
      )[]

      One entry per template that has plans in the range, best engagement_per_publication first. This is the answer to «which kind of plan works for me?».

    • range: {
          from_date: string;
          previous_from_date?: string;
          previous_to_date?: string;
          to_date: string;
      }

      The range that was actually used. The plans in it are those whose week starts inside it.

      • from_date: string

        Format: date-time

      • Optionalprevious_from_date?: string

        Format: date-time

      • Optionalprevious_to_date?: string

        Format: date-time

      • to_date: string

        Format: date-time

    • sort: string

      The order that was applied.

    • total: number

      Plans with results in the range (and filters), across every page.

    • totals: {
          credits_per_engagement?: number;
          credits_spent: number;
          engagement_per_publication?: number;
          engagement_vs_average?: number;
          expected_engagement_per_publication?: number;
          metrics: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          plans: number;
          publications: { measured: number; published: number };
          ranked_plans: number;
      }
      • Optionalcredits_per_engagement?: number

        Credits per interaction, counting only the plans that already have something measured: a plan validated yesterday brings its whole cost and no interactions, and would make the group look expensive for arriving late. Absent with the social_network filter.

      • credits_spent: number

        Credits of every plan in the group.

      • Optionalengagement_per_publication?: number

        A weighted average: every interaction of the group divided by every measured publication of the group — not the average of each plan's average, which would let a one-post plan weigh as much as a forty-post one.

      • Optionalengagement_vs_average?: number

        The group's interactions per post over what was expected, computed over the same plans on both sides — a plan with no reference cannot add its interactions to one side only.

      • Optionalexpected_engagement_per_publication?: number

        What your usual posts would get with the group's mix of networks, weighted like its average. Only plans that have a reference count.

      • metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • plans: number
      • publications: { measured: number; published: number }
      • ranked_plans: number

        How many of them compete in the ranking (see AiPlanResult.ranked).

  • AiPlansAiPlanResultsTemplateGroup: {
        credits_per_engagement?: number;
        credits_spent: number;
        engagement_per_publication?: number;
        engagement_vs_average?: number;
        expected_engagement_per_publication?: number;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        plans: number;
        publications: { measured: number; published: number };
        ranked_plans: number;
    } & {
        template: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
    }
  • AiPlansAiPlanSource: {
        event?: { date?: string; name?: string };
        id_account_catalog?: string;
        id_integration_catalog?: string;
        images?: { description?: string; id_upload?: string }[];
        products?: {
            description?: string;
            external_id?: string;
            id_upload?: string;
            name?: string;
            permalink?: string;
            price?: string;
        }[];
        text?: string;
        url?: string;
    }

    The plan source as it was STORED: a snapshot taken when the plan was created, not a live reference. It is what makes a retry reproduce the same plan even if the article went offline or the product left the catalogue — same reason as organization_context.

    • Optionalevent?: { date?: string; name?: string }

      campaign. The event and its date, already normalised to the start of ITS day in the plan timezone.

      • Optionaldate?: string

        Format: date-time

      • Optionalname?: string
    • Optionalid_account_catalog?: string

      from_catalog. The account whose Meta catalogue was read.

    • Optionalid_integration_catalog?: string

      from_catalog. The connected store (an integration) whose catalogue was read. Only one of the two is present.

    • Optionalimages?: { description?: string; id_upload?: string }[]

      from_images. The chosen photos with their descriptions, in the order they were sent — the position IS the source_index of the publication that uses it.

    • Optionalproducts?: {
          description?: string;
          external_id?: string;
          id_upload?: string;
          name?: string;
          permalink?: string;
          price?: string;
      }[]

      from_catalog. Snapshot of the chosen products.

    • Optionaltext?: string

      from_text. The article, already downloaded and truncated. It is never downloaded again.

    • Optionalurl?: string

      from_text. The original address, kept for the record and to show where the plan came from.

  • AiPlansAiPlanSourceImageInput: { description: string; id_upload: string }

    One photo of from_images.

    • description: string

      What is in the photo. Mandatory on purpose: without it the model writes about what it believes it sees, and with a product photo it gets the product wrong about half the time.

    • id_upload: string

      An upload of the organization. It has to be an image: a video or an audio is rejected here, not later at publish time.

  • AiPlansAiPlanSourceInput: {
        event_date?: string;
        event_name?: string;
        id_account_catalog?: string;
        id_integration_catalog?: string;
        images?: { description: string; id_upload: string }[];
        product_catalog_id?: string;
        products?: string[];
        text?: string;
        url?: string;
    }

    The plan's source, as you SEND it. One shape per template: send only the fields of the template you chose — what it does not read is ignored, and what it needs and does not get is a 2112.

    It is validated when the plan is **created**, not when it is generated: the article is downloaded, the catalogue or the store is read live and the product pictures are copied. So a source that does not work fails while the user is still there and can fix it, and what gets stored is a SNAPSHOT — a retry three days later does not depend on the article still being online or the product still being in the catalogue.
    
    | Template | Fields |
    | --- | --- |
    | `standard` | none — no source |
    | `from_images` | `images` |
    | `from_text` | `url` **or** `text` |
    | `from_catalog` | `id_account_catalog` + `product_catalog_id` (a Meta catalogue) **or** `id_integration_catalog` (a connected store), and `products` |
    | `campaign` | `event_name`, `event_date` |
    
    • Optionalevent_date?: string

      Format: date

      campaign. The day of the event. Send a calendar day, YYYY-MM-DD — never an ISO instant. A bare date is read in the plan's options.timezone, which is the whole point: 2026-09-15T00:00:00Z is midnight UTC, that is the 14th in the afternoon in New York — a whole day off in a countdown, for half of America, with no error anywhere. It cannot fall before the plan week (options.week_start) nor more than 60 days after it (2112). And it does not move publish_days: if the event lands on a day you did not choose, the plan respects your choice and it is up to you to say so.

    • Optionalevent_name?: string

      campaign. What the countdown is towards ("Rebajas de verano", "Apertura del local"). Over 120 characters it is rejected, not truncated: a name cut mid-word would come out that way in all seven publications, and whatever else needs saying goes in prompt.

    • Optionalid_account_catalog?: string

      from_catalog, from a Meta catalogue. Which account's catalogue the products come from. It has to belong to the organization (2103) and be on a network that supports products (2115). It only chooses the catalogue: the publications still go to every account in accounts — a LinkedIn account can publish a product from a Facebook catalogue. Exclusive with id_integration_catalog (both at once is a 2112).

    • Optionalid_integration_catalog?: string

      from_catalog, from a connected store. An integration of the organization whose provider has catalog: true (a WooCommerce store), enabled; another organization's is a 2200, without confirming it exists. The products are its external_ids, from GET .../integrations/{id_integration}/products. Like the account, it only chooses the catalogue: the publications go to every account in accounts. Exclusive with id_account_catalog.

    • Optionalimages?: { description: string; id_upload: string }[]

      from_images. Your own photos, each with its own description, in the order that tells the story: the orchestrator picks one per publication and keeps its position in source_index, so photo 3 can be the "before" and photo 7 the "after". Up to 20 (max_source_items), and each one has to be an image upload of this organization (806 otherwise).

    • Optionalproduct_catalog_id?: string

      from_catalog with id_account_catalog only. The catalogue itself, as the network identifies it: an account can have several catalogues, a store is one.

    • Optionalproducts?: string[]

      from_catalog. Ids of the chosen products, in the order they should tell the week. Up to 12 — a unit here is not an id already in the database: it is a live read plus a real download inside this request, with the user waiting. Repeated ids are deduplicated. They are ALL checked against the catalogue before a single picture is downloaded (2112 naming the missing one, or the one that is out of stock), and each picture is copied into an upload of the organization: a catalogue's picture URL expires or changes, and a plan published weeks later would carry a broken file. Those uploads count against the storage quota.

    • Optionaltext?: string

      from_text. The article pasted by hand. It wins over url when both come: pasting is what a user does when the download did not work (a paywall, a page that needs JavaScript), so re-downloading to ignore what they wrote would take away their only way out. Truncated to 12.000 characters — the cap is what keeps the estimate honest, since the real charge is per use. Under 200 characters it is not an article, it is the theme, which is prompt and another field (2116).

    • Optionalurl?: string

      Format: uri

      from_text. The article the plan is written from. It is downloaded at creation, and only http/https addresses that resolve to a public IP are accepted — checked again before every redirect (2114). A page that answers something that is not text or HTML, or that carries no usable text once stripped, is a 2113: paste the text in text instead.

  • AiPlansAiPlanSourceProduct: {
        description?: string;
        external_id?: string;
        id_upload?: string;
        name?: string;
        permalink?: string;
        price?: string;
    }

    A product of the catalogue, copied when the plan was created.

    • Optionaldescription?: string
    • Optionalexternal_id?: string

      The id it has in the catalogue: the network's, or the store's.

    • Optionalid_upload?: string

      The product picture, copied into an upload of the organization. The network CDN URL expires; this one does not.

    • Optionalname?: string
    • Optionalpermalink?: string

      The product's public page (a store's product page, or the url of the Meta catalogue item), kept only when it is an http(s) address. The texts use it on the networks where a link in the text can be clicked, never on Instagram or TikTok; and a Pinterest pin leads there unless the plan has its own options.link. Absent on plans created before the field existed.

    • Optionalprice?: string

      The price exactly as the source gave it: Meta's formatted price ("9,99 €"), or a store's displayed price with its tax, symbol and range ("14,52 € IVA incluido"). It is never converted: the same field is a number in other paths of Meta's API and there is no way to tell units from cents, and dividing by 100 "just in case" is precisely how a 10 € product gets advertised at 0,10 €. The prompt is told to copy it verbatim or to say nothing. Absent when the product has no price, and on a store's taxable products while its config.tax_location_missing is true.

  • AppsClientApp: {
        _id: string;
        allowed_domains: string[];
        creation_date: string;
        deleted: boolean;
        deleted_date?: string;
        id_client: string;
        id_user?: string;
        keycloak_client_idenfifier: string;
        name: string;
        redirect_urls: string[];
        webhook_url?: string;
    }

    An app: the credentials a third-party integration authenticates with.

    **The secret is not here.** It lives in Keycloak and is read with `GET /clients/{id_client}/apps/{id_app}/secret`, which needs a user token.
    
    • _id: string
    • allowed_domains: string[]
    • creation_date: string

      Format: date-time

    • deleted: boolean

      Deleting an app marks it instead of removing it — the Keycloak client is gone, so it can no longer get a token — and the listing filters those out.

    • Optionaldeleted_date?: string

      Format: date-time

    • id_client: string
    • Optionalid_user?: string

      The user who created the app, when it was created from the panel.

    • keycloak_client_idenfifier: string

      The app's client_id. Fixed for the life of the app: it cannot be changed once created (error 547).

    • name: string
    • redirect_urls: string[]
    • Optionalwebhook_url?: string

      Where PlanVortex posts events, when one is configured.

      **The body is an array of changes, not a single object**, and it carries two signature headers computed with this app's secret over the **raw** body: `x-hub-signature` (`sha1=<hex>`) and `x-hub-signature-256` (`sha256=<hex>`). Verify against the bytes you received — parsing the JSON and re-serialising it changes them and the signature will not match.
      
      The events delivered today are `new_account`, `change_state_account`, `messages`, `messaging_postbacks`, `messaging_seen`, `messaging_error`, `comments`, `integration_error`, `ai_plan_generated` and `ai_plan_failed`. The payload is documented in the `comments` specification. **Every** app of the client that has a `webhook_url` receives every event, not only the app whose call caused it: with two apps, each event arrives twice. Delivery is best effort: PlanVortex does not retry a webhook that fails.
      
  • AppsClientAppInput: {
        allowed_domains?: string[];
        keycloak_client_idenfifier: string;
        name: string;
        redirect_urls?: string[];
        webhook_url?: string;
    }
    • Optionalallowed_domains?: string[]

      Origins allowed to call the API with this app's identity. Every entry has to be a valid URL (error 531).

    • keycloak_client_idenfifier: string

      The app's client_id, which is what you send to POST /oauth/token.

      **Format is enforced** (error 533): lowercase letters, numbers, `.`, `-` and `_`, starting with a letter or a number, between 3 and 64 characters — `shop-integration`, not `Shop Integration`. Keycloak itself accepts anything, so an identifier with a space in it used to create an app that could never get a token.
      
      It also has to be unique across PlanVortex (error 534), and **it cannot be changed once the app exists** (error 547): it is what your integration authenticates with, so renaming it would lock out everything already using the old one. Send it unchanged on an update, or leave it out. The spelling of the field is historical and kept for compatibility.
      
      shop-integration
      
    • name: string

      A name for the app. Cannot be blank (error 525).

    • Optionalredirect_urls?: string[]

      URLs the connect flow is allowed to come back to. A redirect_uri that is not in this list is refused when issuing a temporal connect token (error 532).

    • Optionalwebhook_url?: string

      Where PlanVortex posts events. Has to be a valid URL (error 535). See ClientApp.webhook_url for what arrives and how it is signed.

  • AppsOAuthError: {
        error:
            | "server_error"
            | "invalid_client"
            | "slow_down"
            | "invalid_request"
            | "unsupported_grant_type";
        error_description?: string;
    }

    The error shape of the token endpoint, and only of the token endpoint. Every other endpoint in the API answers with Error instead.

  • AppsTokenRequest: {
        client_id?: string;
        client_secret?: string;
        grant_type: "client_credentials";
        scope?: string;
    }
    • Optionalclient_id?: string

      The app's identifier. Can travel here or in Authorization: Basic.

    • Optionalclient_secret?: string

      The app's secret. Can travel here or in Authorization: Basic.

    • grant_type: "client_credentials"

      Only client_credentials is supported.

    • Optionalscope?: string

      Optional. Passed through to the identity provider; there are no PlanVortex-defined scopes today.

  • AppsTokenResponse: { access_token: string; expires_in: number; scope?: string; token_type: string }
    • access_token: string

      Send it as Authorization: Bearer <access_token>.

    • expires_in: number

      Seconds the token is valid for. Refresh shortly before it runs out; there is no refresh token.

    • Optionalscope?: string
    • token_type: string

      Always Bearer.

  • CatalogAspectRatios: { text: string[]; values: number[] }

    Accepted crops. values and text are parallel arrays: same index, same ratio.

    • text: string[]

      The same ratio written the way a person reads it.

    • values: number[]

      The ratio as a number (width divided by height), which is what validation compares against.

  • CatalogPlannerTemplate: {
        allows_gallery?: boolean;
        allows_shared?: boolean;
        generates_images?: boolean;
        max_source_items?: number;
        orchestration_cost?: number;
        orchestration_cost_per_source_item?: number;
        regenerate?: { image?: boolean; text?: boolean };
        source_fields?: {
            default?: unknown;
            max?: number;
            min?: number;
            name?: string;
            options?: string[];
            required?: boolean;
            type?:
                | "boolean"
                | "text"
                | "textarea"
                | "url"
                | "select"
                | "date"
                | "uploads_with_description"
                | "catalog_products";
        }[];
        source_requires_any?: string[];
        template?: | "standard"
        | "from_images"
        | "from_text"
        | "from_catalog"
        | "campaign";
        unsupported_networks?: (
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"
        )[];
    }
    • Optionalallows_gallery?: boolean

      Does it accept options.gallery_uploads (visual references for the generated images)?

    • Optionalallows_shared?: boolean

      Does it accept options.shared (one content replicated across every account)?

    • Optionalgenerates_images?: boolean

      false = the pictures come from the source, and the plan spends no image credits.

    • Optionalmax_source_items?: number

      Hard cap of source units accepted. 0 = this template has no unit-based source.

    • Optionalorchestration_cost?: number

      Estimated credits for this template's orchestration pass. The real charge is per use.

    • Optionalorchestration_cost_per_source_item?: number

      Extra estimated credits per unit of source (per image, in from_images). 0 when the source does not scale the prompt.

    • Optionalregenerate?: { image?: boolean; text?: boolean }

      What can be regenerated on a publication of this plan.

    • Optionalsource_fields?: {
          default?: unknown;
          max?: number;
          min?: number;
          name?: string;
          options?: string[];
          required?: boolean;
          type?:
              | "boolean"
              | "text"
              | "textarea"
              | "url"
              | "select"
              | "date"
              | "uploads_with_description"
              | "catalog_products";
      }[]
    • Optionalsource_requires_any?: string[]

      Fields of which AT LEAST ONE is needed, even though none of them is required on its own: from_text takes the URL or the pasted text, never both empty (2116); from_catalog takes id_account_catalog or id_integration_catalog, and exactly one (2112 with both).

      It exists because a field's `required` cannot say "one or the other", and without it your UI would have to hardcode that rule — exactly the copy this catalogue exists to avoid. Absent = there is nothing of the sort to resolve.
      
    • Optionaltemplate?: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

      What the plan is generated FROM, and what you send as template when creating it:

      • **`standard`** — a theme prompt, images generated by the model. What every plan was before templates existed.
      • **`from_images`** — the user's own photos, each with its own description. One vision pass over ALL of them at once, so the model can sequence a narrative (photo 3 the "before", photo 7 the "after") instead of writing seven independent posts. It generates no images.
      • **`from_text`** — an article: a URL that is downloaded at creation, or the text pasted by hand.
      • **`from_catalog`** — products read LIVE from a connected catalogue (a Meta catalogue through a connected account, or a connected store such as WooCommerce), with their name, their description, their price, their picture and the link to their page. The one template that cannot be copied by a generic AI tool, because it needs the catalogue connection.
      • **`campaign`** — a countdown towards a date, with a narrative arc: teaser, announcement, reminder, today, thank you. The only plan that is a story instead of seven loose posts.
      
    • Optionalunsupported_networks?: (
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
      )[]

      Networks whose accounts cannot be in a plan of this template: creating one is refused with 2120, before anything is read or charged. The ones that do not publish (whatsapp, google_business) on every template; and on the templates where every publication is the photo of its source (from_images, from_catalog), also the ones that do not publish images: youtube, which only uploads video.

      It is computed from the same data that validates publishing, not from a list: a new network that does not publish photos drops out on its own. Filter the accounts you offer with it.
      
      [
      "whatsapp",
      "google_business",
      "youtube"
      ]
  • CatalogPlannerTemplateField: {
        default?: unknown;
        max?: number;
        min?: number;
        name?: string;
        options?: string[];
        required?: boolean;
        type?:
            | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "date"
            | "uploads_with_description"
            | "catalog_products";
    }

    One field of the source step. uploads_with_description (photos, each with its own description) and catalog_products (products read live from a connected catalogue) need a dedicated component; the rest are ordinary controls.

    • Optionaldefault?: unknown
    • Optionalmax?: number

      Cap in the field's own units: characters of a text, items of a list, and days of a date — the event_date of campaign carries 60, which is how far ahead of the plan week the countdown may point.

    • Optionalmin?: number

      Floor in the field's own units. Today only from_text: under 200 characters it is not an article, it is the theme, which is prompt and another field. Published for the same reason as max — without it your UI hardcodes the 200 and the user gets a 2116 AFTER pasting the text instead of while pasting it.

    • Optionalname?: string
    • Optionaloptions?: string[]
    • Optionalrequired?: boolean
    • Optionaltype?:
          | "boolean"
          | "text"
          | "textarea"
          | "url"
          | "select"
          | "date"
          | "uploads_with_description"
          | "catalog_products"
  • CatalogSocialLimits: {
        characters: { [key: string]: number };
        comment_characters: { [key: string]: number };
        max_file_size_mb: { [key: string]: number };
        max_post_bytes: { [key: string]: number };
        title_characters: { [key: string]: number };
        total_images: { [key: string]: number };
        video_duration_in_seconds: { [key: string]: number };
    }
    • characters: { [key: string]: number }

      Maximum length of a publication's text. Bluesky and Threads count GRAPHEMES, everyone else counts characters — Telegram included, where String.length is exactly the right unit. The difference is not academic: an emoji is one grapheme and two String.length units, so counting a Threads post with .length rejects at 250 emojis what the network publishes happily at 500.

      On Telegram there are **two numbers for the same field**: `telegram` (4.096) while the publication is text only, and `telegram_media` (1.024) the moment it carries an image or a video, because then the text is a media caption and not a message. Switch the counter when the file is attached, not when publish is pressed.
      
    • comment_characters: { [key: string]: number }

      Maximum length of a reply to a comment. 0 means the network has no comments.

    • max_file_size_mb: { [key: string]: number }

      Maximum size of one file, in megabytes.

      **On `slack` this one is a ceiling, not a promise.** 1.024 MB is what the network allows; the real limit is the lesser of that and the storage the client's own workspace plan still has, which no API exposes. A file inside this number can still come back as error 986. It is the only key in this map with that property.
      
      **On `pinterest` this number is the IMAGE one** (~20 MB); a video is allowed two orders of magnitude more. It is the one entry in this map that does not apply to every file of its network, so a size warning shown against it would be wrong on every video. Over whichever ceiling applies, the publication is created in state `withErrors` with `publication_errors[].code = 996` and `data.max_mb`.
      
    • max_post_bytes: { [key: string]: number }

      Second text limit, in UTF-8 bytes. 0 means the network does not measure text in bytes; only Bluesky does, at 3.000.

    • title_characters: { [key: string]: number }

      Maximum length of the title. 0 means the network has no title field at all.

    • total_images: { [key: string]: number }

      How many images one publication accepts. 0 means images are not a publication on that network.

      **On `discord`, `threads` and `slack` it counts images and videos together**, because there the carousel is one message carrying several attachments and not several publications: what is validated is the total number of files. Over it, the publication is created in state `withErrors` — on `slack` with `publication_errors[].code = 982`.
      
      **On `pinterest` it is a ceiling with a floor under it.** Several images are a carousel of 2 to 5: one image is not a small carousel (it is a plain image pin, which is a different call) and six is not a trimmed one. Outside that range the publication is created in state `withErrors` with `publication_errors[].code = 990`.
      
    • video_duration_in_seconds: { [key: string]: number }

      Maximum video duration. A network that limits weight instead of duration is not here but in max_file_size_mb.

  • CatalogSocialLimitsMap: { [key: string]: number }

    One number per network. Every network in /social_networks is present.

    **And a few keys are not a network.** Some limits depend on the *kind* of publication rather than on the network alone, and those get a compound key next to the plain one: `instagram_story`, `facebook_reel`, `telegram_media`. Read the plain key by default and the compound one when it applies.
    
  • ClientsAiScopeSetting: {
        api_key?: string;
        has_api_key?: boolean;
        model: string;
        provider: "openrouter" | "openai" | "google" | "anthropic";
    }

    AI provider configuration for a single scope (BYOK). On write, api_key is required the first time and is stored encrypted; on subsequent writes it can be omitted to keep the existing key (send only provider/model). On read, the api_key is NEVER returned — only has_api_key is exposed.

    • Optionalapi_key?: string

      Provider API key. Write-only: accepted on PUT, stored encrypted (AES-256-GCM), never returned.

    • Optional Readonlyhas_api_key?: boolean

      Read-only. True when an encrypted API key is stored for this scope.

    • model: string

      Model identifier at the chosen provider (e.g. google/gemini-3-flash).

    • provider: "openrouter" | "openai" | "google" | "anthropic"

      Fixed catalogue of allowed providers. The provider must support the capability of the scope (text for orchestrator/text, image for image).

  • ClientsAiSettings: {
        image?:
            | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
        orchestrator?: | null
        | {
            api_key?: string;
            has_api_key?: boolean;
            model: string;
            provider: "openrouter"
            | "openai"
            | "google"
            | "anthropic";
        };
        text?: | null
        | {
            api_key?: string;
            has_api_key?: boolean;
            model: string;
            provider: "openrouter"
            | "openai"
            | "google"
            | "anthropic";
        };
    }

    Per-scope AI provider configuration (BYOK). Only the scopes you send are touched; a scope set to null clears its configuration and returns that scope to PlanVortex credits. orchestrator and text need a text-capable provider, image needs an image-capable one. video is reserved for a later phase.

    • Optionalimage?:
          | null
          | {
              api_key?: string;
              has_api_key?: boolean;
              model: string;
              provider: "openrouter"
              | "openai"
              | "google"
              | "anthropic";
          }

      Configuration of the image scope. null clears it and returns the scope to PlanVortex credits.

    • Optionalorchestrator?:
          | null
          | {
              api_key?: string;
              has_api_key?: boolean;
              model: string;
              provider: "openrouter"
              | "openai"
              | "google"
              | "anthropic";
          }

      Configuration of the orchestrator scope. null clears it and returns the scope to PlanVortex credits.

    • Optionaltext?:
          | null
          | {
              api_key?: string;
              has_api_key?: boolean;
              model: string;
              provider: "openrouter"
              | "openai"
              | "google"
              | "anthropic";
          }

      Configuration of the text scope. null clears it and returns the scope to PlanVortex credits.

  • ClientsClient: {
        _id: string;
        actual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_plan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            plan_identifier: "basic"
            | "free"
            | "pro"
            | "custom";
            require_action?: boolean;
            status: string;
            stripe_customer_id?: string;
        };
        actual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        ai_settings?: {
            image?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            orchestrator?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            text?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
        };
        client_type?: "personal"
        | "company";
        creation_date: string;
        name: string;
        trial_tested?: boolean;
    }

    Who contracts the plan and whom the organizations hang from.

    • _id: string
      66d04a6a427f4c43b9d97f54
      
    • Optionalactual_asigned?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      What is already handed out to the client's root organizations, which is what is left to assign. Only present with getUse=true.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • actual_plan: {
          current_period_end?: string;
          current_period_start?: string;
          enabled: boolean;
          isEnabled: boolean;
          plan_data: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          plan_identifier: "basic"
          | "free"
          | "pro"
          | "custom";
          require_action?: boolean;
          status: string;
          stripe_customer_id?: string;
      }
      • Optionalcurrent_period_end?: string

        Format: date-time

        When the current billing period ends. A cancelled plan keeps working until then.

      • Optionalcurrent_period_start?: string

        Format: date-time

      • enabled: boolean

        Whether the plan is usable. A disabled client cannot connect accounts or publish.

      • isEnabled: boolean

        The same thing as enabled, recomputed on read rather than stored. Read either; they only disagree if the plan was never saved after changing.

      • plan_data: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        The client's actual limits, resolved: the named plan's table, or the agreed numbers when plan_identifier is custom. This is what to read, not the plan's name.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • plan_identifier: "basic" | "free" | "pro" | "custom"

        Which plan was contracted. custom carries its own numbers in plan_data.

      • Optionalrequire_action?: boolean

        The payment needs the customer to do something (3-D Secure, a new card).

      • status: string

        The subscription's state at the payment provider (active, past_due, canceled, trialing, unpaid...). A cancelled subscription still works until current_period_end.

      • Optionalstripe_customer_id?: string
    • Optionalactual_use?: { publications?: number; users?: number } & {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      Current consumption across every organization of the client. Only present with getUse=true. twitter_credits and ai_credits are what has been spent this calendar month.

    • Optionalai_settings?: {
          image?:
              | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              };
          orchestrator?: | null
          | {
              api_key?: string;
              has_api_key?: boolean;
              model: string;
              provider: "openrouter"
              | "openai"
              | "google"
              | "anthropic";
          };
          text?: | null
          | {
              api_key?: string;
              has_api_key?: boolean;
              model: string;
              provider: "openrouter"
              | "openai"
              | "google"
              | "anthropic";
          };
      }

      Read-only view of the client's own AI provider configuration (BYOK). Written via PUT /clients/{id_client}/ai-settings. API keys are stored encrypted and are NEVER returned: each scope only exposes provider, model and has_api_key.

      • Optionalimage?:
            | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            }

        Configuration of the image scope. null clears it and returns the scope to PlanVortex credits.

      • Optionalorchestrator?:
            | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            }

        Configuration of the orchestrator scope. null clears it and returns the scope to PlanVortex credits.

      • Optionaltext?:
            | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            }

        Configuration of the text scope. null clears it and returns the scope to PlanVortex credits.

    • Optionalclient_type?: "personal" | "company"
    • creation_date: string

      Format: date-time

    • name: string
    • Optionaltrial_tested?: boolean

      Whether this client has already used its trial.

  • ClientsClientList: {
        clients: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_settings?: {
                image?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                orchestrator?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                text?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
            };
            client_type?: "personal"
            | "company";
            creation_date: string;
            name: string;
            trial_tested?: boolean;
        }[];
        total: number;
    }
  • ClientsClientOne: {
        client: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    apps?: number;
                    integrations: number;
                    space: number;
                    twitter_credits?: number;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_settings?: {
                image?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                orchestrator?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
                text?: | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
            };
            client_type?: "personal"
            | "company";
            creation_date: string;
            name: string;
            trial_tested?: boolean;
        };
    }
    • client: {
          _id: string;
          actual_asigned?: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          actual_plan: {
              current_period_end?: string;
              current_period_start?: string;
              enabled: boolean;
              isEnabled: boolean;
              plan_data: {
                  accounts: number;
                  ai_credits?: number;
                  apps?: number;
                  integrations: number;
                  space: number;
                  twitter_credits?: number;
              };
              plan_identifier: "basic"
              | "free"
              | "pro"
              | "custom";
              require_action?: boolean;
              status: string;
              stripe_customer_id?: string;
          };
          actual_use?: { publications?: number; users?: number } & {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          ai_settings?: {
              image?: | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              };
              orchestrator?: | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              };
              text?: | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              };
          };
          client_type?: "personal"
          | "company";
          creation_date: string;
          name: string;
          trial_tested?: boolean;
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • Optionalactual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        What is already handed out to the client's root organizations, which is what is left to assign. Only present with getUse=true.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • actual_plan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            plan_identifier: "basic"
            | "free"
            | "pro"
            | "custom";
            require_action?: boolean;
            status: string;
            stripe_customer_id?: string;
        }
        • Optionalcurrent_period_end?: string

          Format: date-time

          When the current billing period ends. A cancelled plan keeps working until then.

        • Optionalcurrent_period_start?: string

          Format: date-time

        • enabled: boolean

          Whether the plan is usable. A disabled client cannot connect accounts or publish.

        • isEnabled: boolean

          The same thing as enabled, recomputed on read rather than stored. Read either; they only disagree if the plan was never saved after changing.

        • plan_data: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          }

          The client's actual limits, resolved: the named plan's table, or the agreed numbers when plan_identifier is custom. This is what to read, not the plan's name.

          • accounts: number

            Social accounts that may be connected.

          • Optionalai_credits?: number

            Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

          • Optionalapps?: number

            Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

          • integrations: number

            Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

          • space: number

            Storage, in GB.

          • Optionaltwitter_credits?: number

            Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

        • plan_identifier: "basic" | "free" | "pro" | "custom"

          Which plan was contracted. custom carries its own numbers in plan_data.

        • Optionalrequire_action?: boolean

          The payment needs the customer to do something (3-D Secure, a new card).

        • status: string

          The subscription's state at the payment provider (active, past_due, canceled, trialing, unpaid...). A cancelled subscription still works until current_period_end.

        • Optionalstripe_customer_id?: string
      • Optionalactual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        Current consumption across every organization of the client. Only present with getUse=true. twitter_credits and ai_credits are what has been spent this calendar month.

      • Optionalai_settings?: {
            image?:
                | null
                | {
                    api_key?: string;
                    has_api_key?: boolean;
                    model: string;
                    provider: "openrouter"
                    | "openai"
                    | "google"
                    | "anthropic";
                };
            orchestrator?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
            text?: | null
            | {
                api_key?: string;
                has_api_key?: boolean;
                model: string;
                provider: "openrouter"
                | "openai"
                | "google"
                | "anthropic";
            };
        }

        Read-only view of the client's own AI provider configuration (BYOK). Written via PUT /clients/{id_client}/ai-settings. API keys are stored encrypted and are NEVER returned: each scope only exposes provider, model and has_api_key.

        • Optionalimage?:
              | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              }

          Configuration of the image scope. null clears it and returns the scope to PlanVortex credits.

        • Optionalorchestrator?:
              | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              }

          Configuration of the orchestrator scope. null clears it and returns the scope to PlanVortex credits.

        • Optionaltext?:
              | null
              | {
                  api_key?: string;
                  has_api_key?: boolean;
                  model: string;
                  provider: "openrouter"
                  | "openai"
                  | "google"
                  | "anthropic";
              }

          Configuration of the text scope. null clears it and returns the scope to PlanVortex credits.

      • Optionalclient_type?: "personal" | "company"
      • creation_date: string

        Format: date-time

      • name: string
      • Optionaltrial_tested?: boolean

        Whether this client has already used its trial.

  • ClientsOrganizationCreate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        name: string;
    }

    Body accepted when creating an organization. Only these properties are read.

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      Resources assigned to this organization, taken from what the client has contracted.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • name: string

      Organization name.

  • ClientsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        }[];
        total: number;
    }
  • ClientsOrganizationOne: {
        organization: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
    }
    • organization: {
          _id: string;
          actual_asigned?: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          actual_plan?: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          actual_use?: { publications?: number; users?: number } & {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          ai_context?: {
              audience?: string;
              avoid?: string;
              blog_url?: string;
              brand_name?: string;
              default_tone?: string;
              description?: string;
              keywords?: string[];
              notes?: string;
              products?: string;
              sector?: string;
              shop_url?: string;
              social_urls?: string[];
              value_proposition?: string;
              website?: string;
          };
          creation_date: string;
          id_client: string;
          name: string;
          parent_organization?: string;
          social_credentials?: {
              discord?: {
                  application_name?: string;
                  client_id?: string;
                  has_bot_token?: boolean;
                  has_client_secret?: boolean;
                  verified_date?: string;
              };
          };
          stats_settings?: { auto_refresh_twitter: boolean };
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • Optionalactual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        What is already handed out to the organizations sharing this plan, which is what is left to assign. Only present with getUse=true.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • Optionalactual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        The slice of the client's plan assigned to this organization. Absent when nothing was assigned, and then the organization shares whatever its nearest parent with a plan has — or, failing that, the client's unassigned remainder. Ask GET /organizations/{id_organization}/limits for the effective numbers instead of reading this.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • Optionalactual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        Current consumption. Only present with getUse=true. twitter_credits and ai_credits are what has been spent in the current calendar month; the rest is what exists right now.

      • Optionalai_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        }
        • Optionalaudience?: string

          Who the content is aimed at.

        • Optionalavoid?: string

          Topics, expressions or competitors that must never appear.

        • Optionalblog_url?: string
        • Optionalbrand_name?: string

          Commercial name, when it differs from the organization's.

        • Optionaldefault_tone?: string

          Default tone. A tone set on the plan itself wins over this one.

        • Optionaldescription?: string

          What the organization does.

        • Optionalkeywords?: string[]

          Recurring keywords and hashtags.

        • Optionalnotes?: string

          Anything else the model should know.

        • Optionalproducts?: string

          Products or services that may be promoted.

        • Optionalsector?: string
        • Optionalshop_url?: string
        • Optionalsocial_urls?: string[]

          Social profiles or other reference links.

        • Optionalvalue_proposition?: string
        • Optionalwebsite?: string
      • creation_date: string

        Format: date-time

      • id_client: string

        The client this organization belongs to.

      • name: string
      • Optionalparent_organization?: string

        The organization this one hangs from. Absent on a root organization.

      • Optionalsocial_credentials?: {
            discord?: {
                application_name?: string;
                client_id?: string;
                has_bot_token?: boolean;
                has_client_secret?: boolean;
                verified_date?: string;
            };
        }

        The organization's own application credentials, by network. A network that is absent is not configured, and then it does not even appear as connectable.

        • Optionaldiscord?: {
              application_name?: string;
              client_id?: string;
              has_bot_token?: boolean;
              has_client_secret?: boolean;
              verified_date?: string;
          }
          • Optionalapplication_name?: string

            The application's name, as Discord returned it when the credentials were validated.

          • Optionalclient_id?: string
          • Optionalhas_bot_token?: boolean

            Whether a bot token is stored. Never the token.

          • Optionalhas_client_secret?: boolean

            Whether a secret is stored. Never the secret.

          • Optionalverified_date?: string

            Format: date-time

            When the credentials were last validated against Discord.

      • Optionalstats_settings?: { auto_refresh_twitter: boolean }
        • auto_refresh_twitter: boolean

          Whether the background job refreshes X (Twitter) statistics automatically. Every other network is free and always refreshed; X charges 1 credit per read, so this is the one setting that makes the robot spend the client's credits. Anything other than an explicit false is treated as true.

          true
          
  • ClientsOrganizationUpdate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        stats_settings?: { auto_refresh_twitter: boolean };
    }

    Body accepted when updating an organization. NOTE: name and parent_organization are NOT updatable through this endpoint - the server keeps their current value and silently ignores them.

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      New resource assignment. Validated against what is left of the client's contracted plan; lowering it below what the organization already uses is rejected.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • Optionalstats_settings?: { auto_refresh_twitter: boolean }

      Statistics collection settings.

      • auto_refresh_twitter: boolean

        Whether the background job refreshes X (Twitter) statistics automatically. Every other network is free and always refreshed; X charges 1 credit per read, so this is the one setting that makes the robot spend the client's credits. Anything other than an explicit false is treated as true.

        true
        
  • ClientsPlan: {
        current_period_end?: string;
        current_period_start?: string;
        enabled: boolean;
        isEnabled: boolean;
        plan_data: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        plan_identifier: "basic"
        | "free"
        | "pro"
        | "custom";
        require_action?: boolean;
        status: string;
        stripe_customer_id?: string;
    }

    The client's SUBSCRIPTION, which is not the same thing as the resources it grants: the numbers live in plan_data.

    • Optionalcurrent_period_end?: string

      Format: date-time

      When the current billing period ends. A cancelled plan keeps working until then.

    • Optionalcurrent_period_start?: string

      Format: date-time

    • enabled: boolean

      Whether the plan is usable. A disabled client cannot connect accounts or publish.

    • isEnabled: boolean

      The same thing as enabled, recomputed on read rather than stored. Read either; they only disagree if the plan was never saved after changing.

    • plan_data: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      The client's actual limits, resolved: the named plan's table, or the agreed numbers when plan_identifier is custom. This is what to read, not the plan's name.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • plan_identifier: "basic" | "free" | "pro" | "custom"

      Which plan was contracted. custom carries its own numbers in plan_data.

    • Optionalrequire_action?: boolean

      The payment needs the customer to do something (3-D Secure, a new card).

    • status: string

      The subscription's state at the payment provider (active, past_due, canceled, trialing, unpaid...). A cancelled subscription still works until current_period_end.

    • Optionalstripe_customer_id?: string
  • ClientsRolesClientPermissions:
        | "client:update"
        | "client:read"
        | "client:delete"
        | "client_app:create"
        | "client_app:update"
        | "client_app:read"
        | "client_app:delete"
        | "client_roles:create"
        | "client_roles:update"
        | "client_roles:read"
        | "client_roles:delete"
        | "client_roles_users:read"
        | "client_roles_users:create"
        | "client_roles_users:delete"
        | "client_organization:create"
        | "client_organization:update"
        | "client_organization:read"
        | "client_organization:delete"
        | "client_organization_roles:read"
        | "client_organization_roles:create"
        | "client_organization_roles:update"
        | "client_organization_roles:delete"
        | "client_organization_users_roles:read"
        | "client_organization_users_roles:create"
        | "client_organization_users_roles:delete"
        | "client_organization_accounts:read"
        | "client_organization_accounts:create"
        | "client_organization_accounts:update"
        | "client_organization_accounts:delete"
        | "client_organization_files:read"
        | "client_organization_files:create"
        | "client_organization_files:update"
        | "client_organization_files:delete"
        | "client_organization_publications:read"
        | "client_organization_publications:create"
        | "client_organization_publications:update"
        | "client_organization_publications:delete"
        | "client_organization_publications_stats:read"
        | "client_organization_account_stats:read"
  • ClientsRolesClientPermissionsList: (
        | "client:update"
        | "client:read"
        | "client:delete"
        | "client_app:create"
        | "client_app:update"
        | "client_app:read"
        | "client_app:delete"
        | "client_roles:create"
        | "client_roles:update"
        | "client_roles:read"
        | "client_roles:delete"
        | "client_roles_users:read"
        | "client_roles_users:create"
        | "client_roles_users:delete"
        | "client_organization:create"
        | "client_organization:update"
        | "client_organization:read"
        | "client_organization:delete"
        | "client_organization_roles:read"
        | "client_organization_roles:create"
        | "client_organization_roles:update"
        | "client_organization_roles:delete"
        | "client_organization_users_roles:read"
        | "client_organization_users_roles:create"
        | "client_organization_users_roles:delete"
        | "client_organization_accounts:read"
        | "client_organization_accounts:create"
        | "client_organization_accounts:update"
        | "client_organization_accounts:delete"
        | "client_organization_files:read"
        | "client_organization_files:create"
        | "client_organization_files:update"
        | "client_organization_files:delete"
        | "client_organization_publications:read"
        | "client_organization_publications:create"
        | "client_organization_publications:update"
        | "client_organization_publications:delete"
        | "client_organization_publications_stats:read"
        | "client_organization_account_stats:read"
    )[]
  • ClientsRolesClientPermissionsOne: {
        permissions?: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
        )[];
    }
  • ClientsRolesRole: {
        name?: string;
        permissions?: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
        )[];
    }
  • ClientsRolesRoleInput: {
        name: string;
        permissions: (
            | "client:update"
            | "client:read"
            | "client:delete"
            | "client_app:create"
            | "client_app:update"
            | "client_app:read"
            | "client_app:delete"
            | "client_roles:create"
            | "client_roles:update"
            | "client_roles:read"
            | "client_roles:delete"
            | "client_roles_users:read"
            | "client_roles_users:create"
            | "client_roles_users:delete"
            | "client_organization:create"
            | "client_organization:update"
            | "client_organization:read"
            | "client_organization:delete"
            | "client_organization_roles:read"
            | "client_organization_roles:create"
            | "client_organization_roles:update"
            | "client_organization_roles:delete"
            | "client_organization_users_roles:read"
            | "client_organization_users_roles:create"
            | "client_organization_users_roles:delete"
            | "client_organization_accounts:read"
            | "client_organization_accounts:create"
            | "client_organization_accounts:update"
            | "client_organization_accounts:delete"
            | "client_organization_files:read"
            | "client_organization_files:create"
            | "client_organization_files:update"
            | "client_organization_files:delete"
            | "client_organization_publications:read"
            | "client_organization_publications:create"
            | "client_organization_publications:update"
            | "client_organization_publications:delete"
            | "client_organization_publications_stats:read"
            | "client_organization_account_stats:read"
            | "client_organization_products:create"
            | "client_organization_products:update"
            | "client_organization_products:read"
            | "client_organization_products:delete"
            | "client_organization_messages:create"
            | "client_organization_messages:read"
            | "client_organization_messages:delete"
            | "client_organization_contacts:create"
            | "client_organization_contacts:read"
            | "client_organization_contacts:update"
            | "client_organization_contacts:delete"
            | "client_organization_ai_plans:create"
            | "client_organization_ai_plans:read"
            | "client_organization_ai_plans:update"
            | "client_organization_ai_plans:delete"
        )[];
    }

    Name and permission list of a role.

    • name: string

      Role name, shown when inviting a user.

    • permissions: (
          | "client:update"
          | "client:read"
          | "client:delete"
          | "client_app:create"
          | "client_app:update"
          | "client_app:read"
          | "client_app:delete"
          | "client_roles:create"
          | "client_roles:update"
          | "client_roles:read"
          | "client_roles:delete"
          | "client_roles_users:read"
          | "client_roles_users:create"
          | "client_roles_users:delete"
          | "client_organization:create"
          | "client_organization:update"
          | "client_organization:read"
          | "client_organization:delete"
          | "client_organization_roles:read"
          | "client_organization_roles:create"
          | "client_organization_roles:update"
          | "client_organization_roles:delete"
          | "client_organization_users_roles:read"
          | "client_organization_users_roles:create"
          | "client_organization_users_roles:delete"
          | "client_organization_accounts:read"
          | "client_organization_accounts:create"
          | "client_organization_accounts:update"
          | "client_organization_accounts:delete"
          | "client_organization_files:read"
          | "client_organization_files:create"
          | "client_organization_files:update"
          | "client_organization_files:delete"
          | "client_organization_publications:read"
          | "client_organization_publications:create"
          | "client_organization_publications:update"
          | "client_organization_publications:delete"
          | "client_organization_publications_stats:read"
          | "client_organization_account_stats:read"
          | "client_organization_products:create"
          | "client_organization_products:update"
          | "client_organization_products:read"
          | "client_organization_products:delete"
          | "client_organization_messages:create"
          | "client_organization_messages:read"
          | "client_organization_messages:delete"
          | "client_organization_contacts:create"
          | "client_organization_contacts:read"
          | "client_organization_contacts:update"
          | "client_organization_contacts:delete"
          | "client_organization_ai_plans:create"
          | "client_organization_ai_plans:read"
          | "client_organization_ai_plans:update"
          | "client_organization_ai_plans:delete"
      )[]

      Permissions granted by this role.

  • ClientsRolesRoleList: {
        roles?: {
            name?: string;
            permissions?: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
            )[];
        }[];
        total?: number;
    }
  • ClientsRolesRoleOne: {
        rol?: {
            name?: string;
            permissions?: (
                | "client:update"
                | "client:read"
                | "client:delete"
                | "client_app:create"
                | "client_app:update"
                | "client_app:read"
                | "client_app:delete"
                | "client_roles:create"
                | "client_roles:update"
                | "client_roles:read"
                | "client_roles:delete"
                | "client_roles_users:read"
                | "client_roles_users:create"
                | "client_roles_users:delete"
                | "client_organization:create"
                | "client_organization:update"
                | "client_organization:read"
                | "client_organization:delete"
                | "client_organization_roles:read"
                | "client_organization_roles:create"
                | "client_organization_roles:update"
                | "client_organization_roles:delete"
                | "client_organization_users_roles:read"
                | "client_organization_users_roles:create"
                | "client_organization_users_roles:delete"
                | "client_organization_accounts:read"
                | "client_organization_accounts:create"
                | "client_organization_accounts:update"
                | "client_organization_accounts:delete"
                | "client_organization_files:read"
                | "client_organization_files:create"
                | "client_organization_files:update"
                | "client_organization_files:delete"
                | "client_organization_publications:read"
                | "client_organization_publications:create"
                | "client_organization_publications:update"
                | "client_organization_publications:delete"
                | "client_organization_publications_stats:read"
                | "client_organization_account_stats:read"
            )[];
        };
    }
  • ClientsRolesUser: {
        email?: string;
        firstname?: string;
        id?: string;
        lastname?: string;
        username?: string;
    }
  • ClientsRolesUserList: {
        total?: number;
        users?: {
            email?: string;
            firstname?: string;
            id?: string;
            lastname?: string;
            username?: string;
        }[];
    }
  • CommentsAiPlanWebhookChange: {
        credits_spent: number;
        error?: { code: number; message: string };
        field: "ai_plan_generated" | "ai_plan_failed";
        id_ai_plan: string;
        id_organization: string;
        state: "generated" | "failed";
        template:
            | "standard"
            | "from_images"
            | "from_text"
            | "from_catalog"
            | "campaign";
        total_publications: number;
        warnings: number;
    }

    One change in the array PlanVortex posts to your app's webhook_url, when an AI plan finished: ai_plan_generated when it came out, ai_plan_failed when it gave up.

    Like `IntegrationWebhookChange`, it carries no `id_account` and no `social_network`: a plan can span several networks, and it hangs off the organization. It carries ids and numbers only. Read the plan itself with `GET /clients/{id_client}/organizations/{id_organization}/ai_plans/{id_ai_plan}`.
    
    • credits_spent: number

      AI credits the generation consumed, the same figure as AiPlan.credits_spent. A failed plan can have spent credits too, and they are not refunded.

    • Optionalerror?: { code: number; message: string }

      Only on ai_plan_failed: why the plan failed, the same code and message as AiPlan.error. Its data does not travel here; read the plan for it.

    • field: "ai_plan_generated" | "ai_plan_failed"
    • id_ai_plan: string
    • id_organization: string
    • state: "generated" | "failed"

      The state the plan finished in. It always matches field: generated with ai_plan_generated, failed with ai_plan_failed.

    • template: "standard" | "from_images" | "from_text" | "from_catalog" | "campaign"

      What the plan was generated from, the same value as AiPlan.template.

    • total_publications: number

      How many draft publications the plan holds. A failed plan can still hold the drafts of its failed attempt; retrying it discards them.

    • warnings: number

      How many non-blocking notices the plan has, not the notices themselves: those are in AiPlan.warnings. Above zero the plan is still generated and usable.

  • CommentsAiPlanWebhookError: { code: number; message: string }

    Why an AI plan failed, inside AiPlanWebhookChange.error: the same code and message as AiPlan.error. Its data is left out, because it can carry what the AI provider answered; read the plan for it.

  • CommentsComment: {
        _id: string;
        author: {
            external_id: string;
            is_own: boolean;
            name?: string;
            profile_pic?: string;
        };
        collected_date: string;
        creation_date: string;
        deleted: boolean;
        external_id: string;
        hidden: boolean;
        id_account: | string
        | {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
        id_organization: string;
        id_publication?: | string
        | {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
        like_count?: number;
        our_reply_external_id?: string;
        parent_external_id?: string;
        publication_external_id: string;
        rating?: number;
        read: boolean;
        replied: boolean;
        reply_count?: number;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "twitter"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads";
        text: string;
    }

    A comment — or a review — as PlanVortex stores it. Remember it is a snapshot of what the network said at collected_date; the live thread endpoints return the same shape reconciled against the network.

    • _id: string
    • author: { external_id: string; is_own: boolean; name?: string; profile_pic?: string }
      • external_id: string

        The author's id on the network. When the network gives none — Google Business publishes no identifier for a reviewer — this falls back to the review's own id, which means two reviews by the same person look like two different authors. There is no way around it from the API.

      • is_own: boolean

        Whether the connected account wrote it. This is what separates "delete mine" from "delete theirs", and what keeps your own replies out of the inbox.

      • Optionalname?: string

        Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string.

      • Optionalprofile_pic?: string
    • collected_date: string

      Format: date-time

      When PlanVortex last read it. The inbox is a photograph and this says how old it is.

    • creation_date: string

      Format: date-time

      When it was written on the network. This is what orders the inbox.

    • deleted: boolean

      Gone from the network. The row is kept so it is not created again by the next read or by a repeated webhook; it stops appearing in the inbox.

    • external_id: string

      The comment's id on the network. Unique per account, and what makes repeated webhook deliveries idempotent.

      Two exceptions worth knowing, and both are composite ids you should treat as opaque:
      
      • A Google Business reply has no id of its own — it is a *field* of the review — so PlanVortex fabricates a stable one, `{reviewId}/reply`.
      • A Telegram comment lives in a **different chat** from the post it answers (the channel's linked discussion group), so it needs two ids at once and travels as `{thread}/{message}`: replying wants the first, deleting wants the second.
      
    • hidden: boolean

      Hidden on the network. A hidden comment is never swept as deleted: on YouTube, hiding one makes the API stop returning it forever, and without that exception hiding would be indistinguishable from deleting.

    • id_account:
          | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          }

      The connected account it arrived on.

      **It is not always the same shape.** The inbox listing (`GET /organizations/{id}/comments`) returns the whole account resolved; every other operation — the live threads, the reply, the update — returns its identifier as a string. Check before using it.
      
    • id_organization: string
    • Optionalid_publication?:
          | string
          | {
              _id: string;
              ai_generated?: { image: boolean; text: boolean };
              creation_date: string;
              destination?: {
                  id?: string;
                  name?: string;
                  section_id?: string;
                  section_name?: string;
              };
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              extra_data?: { [key: string]: unknown };
              files: {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: string;
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }[];
              id_account: | string
              | {
                  _id: string;
                  creation_date: string;
                  error_code: number;
                  extra_data?: { is_personal_profile?: boolean } & {
                      [key: string]: unknown;
                  };
                  followers_count?: number;
                  id_client: string;
                  id_organization: string;
                  image?: string;
                  name: string;
                  next_comments_update?: string;
                  next_stats_update?: string;
                  private_message_link?: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
                  username?: string;
              };
              id_integration?: string;
              id_organization: string;
              link?: string;
              made_for_kids?: boolean;
              metrics?: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              name?: string;
              next_stats_update?: string;
              pending_publish?: {
                  data?: { [key: string]: unknown };
                  deadline?: string;
                  next_check?: string;
                  temp_keys?: string[];
              };
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publication_warnings?: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publish_date?: string;
              reply_control?: | "everyone"
              | "accounts_you_follow"
              | "mentioned_only"
              | "followers_only";
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              state: "ready"
              | "withErrors"
              | "sended"
              | "draft"
              | "publishing";
              statistics?: {
                  angers?: number;
                  bookmarks?: number;
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  follows?: number;
                  hahas?: number;
                  impressions?: number;
                  likes?: number;
                  loves?: number;
                  negative_feedback?: number;
                  outbound_clicks?: number;
                  page_likes?: number;
                  pin_clicks?: number;
                  playback_0_count?: number;
                  playback_100_count?: number;
                  playback_25_count?: number;
                  playback_50_count?: number;
                  playback_75_count?: number;
                  profile_activity?: number;
                  profile_visits?: number;
                  quotes?: number;
                  reach?: number;
                  reactions?: number;
                  reactions_by_emoji?: { [key: string]: number };
                  replys?: number;
                  retwets?: number;
                  saved?: number;
                  saves?: number;
                  share?: number;
                  shareMentions?: number;
                  shares?: number;
                  sorrys?: number;
                  url_link_clicks?: number;
                  user_profile_clicks?: number;
                  video_views?: number;
                  views?: number;
                  wows?: number;
              };
              stats_updated_date?: string;
              text?: string;
              title?: string;
              url?: string;
              visibility?: "public"
              | "unlisted"
              | "private";
          }

      Your publication, when there is one — and there often is not: a video uploaded to the channel by hand, a post that predates PlanVortex, and every Google Business review have comments with no publication of ours behind them. What always identifies the target is publication_external_id.

      Same asymmetry as `id_account`: the inbox listing resolves it into the whole publication, every other operation returns the identifier as a string.
      
    • Optionallike_count?: number

      Absent when the network does not publish it — not zero

    • Optionalour_reply_external_id?: string

      The network id of your reply, so you can find it or delete it later

    • Optionalparent_external_id?: string

      Present only when this is a reply to another comment

    • publication_external_id: string

      What the comment hangs off, on the network: the post/video id in most networks, the listing (locations/{id}) for a Google Business review, and the published message's id on Telegram — where the thread that holds the comments is the forwarded post.

    • Optionalrating?: number

      Star rating of a review. Present only on review networks — today Google Business. Its absence means "this network has no such thing", never zero.

      It is not decorative: without it a one-star review and a five-star one are the same row, and a stars-only review is a blank line.
      
    • read: boolean

      Yours, not the network's. A live read never overwrites it.

    • replied: boolean

      Yours, not the network's. Set when you reply through the API.

    • Optionalreply_count?: number

      Absent when the network does not publish it — not zero

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "twitter"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
    • text: string

      May legitimately be empty. A stars-only review carries no text at all, so render rating alongside it and never assume a blank comment is a loading failure.

  • CommentsCommentActions: { delete_others: boolean; delete_own: boolean; hide: boolean; reply: boolean }

    What one network lets you do to a comment. Four booleans and never fewer: an absent key would be indistinguishable from an oversight.

    • delete_others: boolean

      Delete somebody else's comment

    • delete_own: boolean

      Delete a comment you wrote. On Google Business this means your reply to a review — the review itself is never deletable.

    • hide: boolean
    • reply: boolean
  • CommentsCommentAuthor: { external_id: string; is_own: boolean; name?: string; profile_pic?: string }

    Who wrote it. Embedded in the comment and not a contact: a YouTube commenter has no private inbox you could ever write to, so they get no contact record.

    • external_id: string

      The author's id on the network. When the network gives none — Google Business publishes no identifier for a reviewer — this falls back to the review's own id, which means two reviews by the same person look like two different authors. There is no way around it from the API.

    • is_own: boolean

      Whether the connected account wrote it. This is what separates "delete mine" from "delete theirs", and what keeps your own replies out of the inbox.

    • Optionalname?: string

      Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string.

    • Optionalprofile_pic?: string
  • CommentsCommentNetworkName:
        | "facebook"
        | "instagram"
        | "linkedin"
        | "twitter"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"

    A network that has comments. Treat it as an open list: a new one is added before your integration hears about it.

  • CommentsCommentThread: {
        comments: {
            _id: string;
            author: {
                external_id: string;
                is_own: boolean;
                name?: string;
                profile_pic?: string;
            };
            collected_date: string;
            creation_date: string;
            deleted: boolean;
            external_id: string;
            hidden: boolean;
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
            like_count?: number;
            our_reply_external_id?: string;
            parent_external_id?: string;
            publication_external_id: string;
            rating?: number;
            read: boolean;
            replied: boolean;
            reply_count?: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "twitter"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads";
            text: string;
        }[];
        credits_consumed: number;
        next_cursor?: string;
        total: number;
    }

    A live read: asked of the network and reconciled with what was stored.

    • comments: {
          _id: string;
          author: {
              external_id: string;
              is_own: boolean;
              name?: string;
              profile_pic?: string;
          };
          collected_date: string;
          creation_date: string;
          deleted: boolean;
          external_id: string;
          hidden: boolean;
          id_account: | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          };
          id_organization: string;
          id_publication?: | string
          | {
              _id: string;
              ai_generated?: { image: boolean; text: boolean };
              creation_date: string;
              destination?: {
                  id?: string;
                  name?: string;
                  section_id?: string;
                  section_name?: string;
              };
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              extra_data?: { [key: string]: unknown };
              files: {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: (...) | (...);
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...);
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }[];
              id_account: | string
              | {
                  _id: string;
                  creation_date: string;
                  error_code: number;
                  extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                  followers_count?: number;
                  id_client: string;
                  id_organization: string;
                  image?: string;
                  name: string;
                  next_comments_update?: string;
                  next_stats_update?: string;
                  private_message_link?: string;
                  social_network:
                      | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  username?: string;
              };
              id_integration?: string;
              id_organization: string;
              link?: string;
              made_for_kids?: boolean;
              metrics?: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              name?: string;
              next_stats_update?: string;
              pending_publish?: {
                  data?: { [key: string]: unknown };
                  deadline?: string;
                  next_check?: string;
                  temp_keys?: string[];
              };
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publication_warnings?: {
                  code: number;
                  data?: { [key: ...]: ... };
                  message: string;
              }[];
              publish_date?: string;
              reply_control?: | "everyone"
              | "accounts_you_follow"
              | "mentioned_only"
              | "followers_only";
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              state: "ready"
              | "withErrors"
              | "sended"
              | "draft"
              | "publishing";
              statistics?: {
                  angers?: number;
                  bookmarks?: number;
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  follows?: number;
                  hahas?: number;
                  impressions?: number;
                  likes?: number;
                  loves?: number;
                  negative_feedback?: number;
                  outbound_clicks?: number;
                  page_likes?: number;
                  pin_clicks?: number;
                  playback_0_count?: number;
                  playback_100_count?: number;
                  playback_25_count?: number;
                  playback_50_count?: number;
                  playback_75_count?: number;
                  profile_activity?: number;
                  profile_visits?: number;
                  quotes?: number;
                  reach?: number;
                  reactions?: number;
                  reactions_by_emoji?: { [key: string]: number };
                  replys?: number;
                  retwets?: number;
                  saved?: number;
                  saves?: number;
                  share?: number;
                  shareMentions?: number;
                  shares?: number;
                  sorrys?: number;
                  url_link_clicks?: number;
                  user_profile_clicks?: number;
                  video_views?: number;
                  views?: number;
                  wows?: number;
              };
              stats_updated_date?: string;
              text?: string;
              title?: string;
              url?: string;
              visibility?: "public"
              | "unlisted"
              | "private";
          };
          like_count?: number;
          our_reply_external_id?: string;
          parent_external_id?: string;
          publication_external_id: string;
          rating?: number;
          read: boolean;
          replied: boolean;
          reply_count?: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "twitter"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads";
          text: string;
      }[]
    • credits_consumed: number

      X credits this read spent from the client's monthly pool. 0 on every other network. Charged after the fact and by real units, so a failed read charges nothing.

    • Optionalnext_cursor?: string

      Opaque page token from the network. Pass it back as offset; absent means there is no next page.

    • total: number

      What the network says the total is. On a Google Business listing it is the number of reviews, which is not the length of comments: your replies travel in the same array as children of the review they answer.

  • CommentsIntegrationWebhookChange: {
        error_code: number;
        field: "integration_error";
        id_integration: string;
        id_organization: string;
        provider: string;
    }

    One change in the array PlanVortex posts to your app's webhook_url, when an integration stopped working: a revoked Google Drive token, a feed that no longer answers, a publication quota that ran out.

    It carries neither `id_account` nor `social_network`, because an integration hangs off the organization and not off any account — which is exactly why it is a type of its own. A consumer that only understands account changes sees a `field` it does not know and ignores it, which is what should happen.
    
    • error_code: number

      PlanVortex error code saying what went wrong. Integration codes live in the 2200-2299 range.

    • field: "integration_error"
    • id_integration: string
    • id_organization: string
    • provider: string

      google_drive or rss today. This list grows: treat it as an open enumeration.

  • CommentsSocialCapabilities: {
        comments: boolean;
        destinations: boolean;
        link: boolean;
        made_for_kids: boolean;
        messages: boolean;
        persistent_menu: boolean;
        products: boolean;
        publications: boolean;
        reply_control: boolean;
        visibility: boolean;
        webhooks: boolean;
    }

    The coarse gates of one network

    • comments: boolean
    • destinations: boolean

      The network publishes into places inside the account, and every publication has to name one: a Pinterest board. When this is true, read GET /organizations/{id_organization}/accounts/{id_account}/destinations and send one back in destination — a publication created without it lands in state withErrors with publication_errors[].code = 987. Today only pinterest.

    • link: boolean

      The publication carries a destination link of its own (link), separate from its text: where a pin takes whoever clicks it. On a network that answers false the field is deleted on save, so do not offer it. Today only pinterest.

    • made_for_kids: boolean

      The publication can say whether it is made for kids (made_for_kids, COPPA). On a network that answers false the field is deleted on save, so do not offer it. Today only youtube.

    • messages: boolean
    • persistent_menu: boolean
    • products: boolean
    • publications: boolean
    • reply_control: boolean

      The publication can say who can reply to it (reply_control): anyone, the account's followers, the profiles it follows or the profiles mentioned in the text. It is set when the publication goes out and cannot be changed afterwards. On a network that answers false the field is deleted on save, so do not offer it. Today only threads.

    • visibility: boolean

      The publication can say who can see it when it goes out (visibility): public, unlisted or private. On a network that answers false the field is deleted on save, so do not offer it. Today only youtube.

    • webhooks: boolean
  • CommentsWebhookChange: {
        commentObj?: {
            _id: string;
            author: {
                external_id: string;
                is_own: boolean;
                name?: string;
                profile_pic?: string;
            };
            collected_date: string;
            creation_date: string;
            deleted: boolean;
            external_id: string;
            hidden: boolean;
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            };
            like_count?: number;
            our_reply_external_id?: string;
            parent_external_id?: string;
            publication_external_id: string;
            rating?: number;
            read: boolean;
            replied: boolean;
            reply_count?: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "twitter"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads";
            text: string;
        };
        field: | "comments"
        | "messages"
        | "new_account"
        | "change_state_account"
        | "messaging_postbacks"
        | "messaging_seen"
        | "messaging_error";
        id_account: string;
        id_contact?: string;
        id_organization: string;
        messageObj?: {
            _id: string;
            contact_id?: | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            creation_date: string;
            element_external_id?: string;
            from_contact_id?: | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
            id_account: string;
            in_response_external_id?: string;
            in_response_to?: string;
            message_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            message_options: {
                files: (
                    | string
                    | {
                        _id: string;
                        ai_generated?: {
                            generated_at: string;
                            id_ai_plan?: (...)
                            | (...);
                            model: string;
                            provider: string;
                        };
                        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                        cover_offset?: number;
                        creation_date: string;
                        file_externals: {
                            external_identifier: string;
                            external_url: string;
                            social_network: | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...);
                        }[];
                        file_format: "mp4"
                        | "jpeg"
                        | "gif"
                        | "png"
                        | "jpg";
                        file_properties: {
                            allowed_social_networks: string[];
                            aspect_ratio: { text: string; value: number };
                            duration: number;
                            height: number;
                            size_in_bytes: number;
                            width: number;
                        };
                        file_type: "video"
                        | "image";
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }
                )[];
                files_urls: { mime_type?: string; url?: string }[];
                metaElements?: { [key: string]: unknown }[];
                metaQuickReplies?: { [key: string]: unknown }[];
                payload?: string;
                template_language?: string;
                template_name?: string;
                template_parameters?: string[];
                whatsappInteractive?: { [key: string]: unknown };
            };
            message_type: | "simple_message"
            | "file_message"
            | "comment_message"
            | "publication_message"
            | "quick_reply_message"
            | "button_message"
            | "elements_message"
            | "postback_message"
            | "template_message"
            | "interactive_message";
            read: boolean;
            text?: string;
        };
        originalChange?: { [key: string]: unknown };
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
    }

    One change in the array PlanVortex posts to your app's webhook_url, when the change concerns a social account.

    An integration that stopped working has a shape of its own (`IntegrationWebhookChange`), and so does an AI plan that finished (`AiPlanWebhookChange`). One delivery can mix them. Switch on `field`, and ignore what you do not handle.
    
    • OptionalcommentObj?: {
          _id: string;
          author: {
              external_id: string;
              is_own: boolean;
              name?: string;
              profile_pic?: string;
          };
          collected_date: string;
          creation_date: string;
          deleted: boolean;
          external_id: string;
          hidden: boolean;
          id_account: | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          };
          id_organization: string;
          id_publication?: | string
          | {
              _id: string;
              ai_generated?: { image: boolean; text: boolean };
              creation_date: string;
              destination?: {
                  id?: string;
                  name?: string;
                  section_id?: string;
                  section_name?: string;
              };
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              extra_data?: { [key: string]: unknown };
              files: {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: (...) | (...);
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...);
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }[];
              id_account: | string
              | {
                  _id: string;
                  creation_date: string;
                  error_code: number;
                  extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                  followers_count?: number;
                  id_client: string;
                  id_organization: string;
                  image?: string;
                  name: string;
                  next_comments_update?: string;
                  next_stats_update?: string;
                  private_message_link?: string;
                  social_network:
                      | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  username?: string;
              };
              id_integration?: string;
              id_organization: string;
              link?: string;
              made_for_kids?: boolean;
              metrics?: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              name?: string;
              next_stats_update?: string;
              pending_publish?: {
                  data?: { [key: string]: unknown };
                  deadline?: string;
                  next_check?: string;
                  temp_keys?: string[];
              };
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publication_warnings?: {
                  code: number;
                  data?: { [key: ...]: ... };
                  message: string;
              }[];
              publish_date?: string;
              reply_control?: | "everyone"
              | "accounts_you_follow"
              | "mentioned_only"
              | "followers_only";
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              state: "ready"
              | "withErrors"
              | "sended"
              | "draft"
              | "publishing";
              statistics?: {
                  angers?: number;
                  bookmarks?: number;
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  follows?: number;
                  hahas?: number;
                  impressions?: number;
                  likes?: number;
                  loves?: number;
                  negative_feedback?: number;
                  outbound_clicks?: number;
                  page_likes?: number;
                  pin_clicks?: number;
                  playback_0_count?: number;
                  playback_100_count?: number;
                  playback_25_count?: number;
                  playback_50_count?: number;
                  playback_75_count?: number;
                  profile_activity?: number;
                  profile_visits?: number;
                  quotes?: number;
                  reach?: number;
                  reactions?: number;
                  reactions_by_emoji?: { [key: string]: number };
                  replys?: number;
                  retwets?: number;
                  saved?: number;
                  saves?: number;
                  share?: number;
                  shareMentions?: number;
                  shares?: number;
                  sorrys?: number;
                  url_link_clicks?: number;
                  user_profile_clicks?: number;
                  video_views?: number;
                  views?: number;
                  wows?: number;
              };
              stats_updated_date?: string;
              text?: string;
              title?: string;
              url?: string;
              visibility?: "public"
              | "unlisted"
              | "private";
          };
          like_count?: number;
          our_reply_external_id?: string;
          parent_external_id?: string;
          publication_external_id: string;
          rating?: number;
          read: boolean;
          replied: boolean;
          reply_count?: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "twitter"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads";
          text: string;
      }

      The comment. Present only when field is comments, and absent even then if the author deleted a comment we had never seen.

      • _id: string
      • author: { external_id: string; is_own: boolean; name?: string; profile_pic?: string }
        • external_id: string

          The author's id on the network. When the network gives none — Google Business publishes no identifier for a reviewer — this falls back to the review's own id, which means two reviews by the same person look like two different authors. There is no way around it from the API.

        • is_own: boolean

          Whether the connected account wrote it. This is what separates "delete mine" from "delete theirs", and what keeps your own replies out of the inbox.

        • Optionalname?: string

          Display name. Always present for a review, including anonymous ones, which get a placeholder rather than an empty string.

        • Optionalprofile_pic?: string
      • collected_date: string

        Format: date-time

        When PlanVortex last read it. The inbox is a photograph and this says how old it is.

      • creation_date: string

        Format: date-time

        When it was written on the network. This is what orders the inbox.

      • deleted: boolean

        Gone from the network. The row is kept so it is not created again by the next read or by a repeated webhook; it stops appearing in the inbox.

      • external_id: string

        The comment's id on the network. Unique per account, and what makes repeated webhook deliveries idempotent.

        Two exceptions worth knowing, and both are composite ids you should treat as opaque:
        
        • A Google Business reply has no id of its own — it is a *field* of the review — so PlanVortex fabricates a stable one, `{reviewId}/reply`.
        • A Telegram comment lives in a **different chat** from the post it answers (the channel's linked discussion group), so it needs two ids at once and travels as `{thread}/{message}`: replying wants the first, deleting wants the second.
        
      • hidden: boolean

        Hidden on the network. A hidden comment is never swept as deleted: on YouTube, hiding one makes the API stop returning it forever, and without that exception hiding would be indistinguishable from deleting.

      • id_account:
            | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            }

        The connected account it arrived on.

        **It is not always the same shape.** The inbox listing (`GET /organizations/{id}/comments`) returns the whole account resolved; every other operation — the live threads, the reply, the update — returns its identifier as a string. Check before using it.
        
      • id_organization: string
      • Optionalid_publication?:
            | string
            | {
                _id: string;
                ai_generated?: { image: boolean; text: boolean };
                creation_date: string;
                destination?: {
                    id?: string;
                    name?: string;
                    section_id?: string;
                    section_name?: string;
                };
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                extra_data?: { [key: string]: unknown };
                files: {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...) | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                id_account: | string
                | {
                    _id: string;
                    creation_date: string;
                    error_code: number;
                    extra_data?: { is_personal_profile?: ... } & { [key: ...]: ... };
                    followers_count?: number;
                    id_client: string;
                    id_organization: string;
                    image?: string;
                    name: string;
                    next_comments_update?: string;
                    next_stats_update?: string;
                    private_message_link?: string;
                    social_network:
                        | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    username?: string;
                };
                id_integration?: string;
                id_organization: string;
                link?: string;
                made_for_kids?: boolean;
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                name?: string;
                next_stats_update?: string;
                pending_publish?: {
                    data?: { [key: string]: unknown };
                    deadline?: string;
                    next_check?: string;
                    temp_keys?: string[];
                };
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publication_warnings?: {
                    code: number;
                    data?: { [key: ...]: ... };
                    message: string;
                }[];
                publish_date?: string;
                reply_control?: | "everyone"
                | "accounts_you_follow"
                | "mentioned_only"
                | "followers_only";
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                state: "ready"
                | "withErrors"
                | "sended"
                | "draft"
                | "publishing";
                statistics?: {
                    angers?: number;
                    bookmarks?: number;
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    follows?: number;
                    hahas?: number;
                    impressions?: number;
                    likes?: number;
                    loves?: number;
                    negative_feedback?: number;
                    outbound_clicks?: number;
                    page_likes?: number;
                    pin_clicks?: number;
                    playback_0_count?: number;
                    playback_100_count?: number;
                    playback_25_count?: number;
                    playback_50_count?: number;
                    playback_75_count?: number;
                    profile_activity?: number;
                    profile_visits?: number;
                    quotes?: number;
                    reach?: number;
                    reactions?: number;
                    reactions_by_emoji?: { [key: string]: number };
                    replys?: number;
                    retwets?: number;
                    saved?: number;
                    saves?: number;
                    share?: number;
                    shareMentions?: number;
                    shares?: number;
                    sorrys?: number;
                    url_link_clicks?: number;
                    user_profile_clicks?: number;
                    video_views?: number;
                    views?: number;
                    wows?: number;
                };
                stats_updated_date?: string;
                text?: string;
                title?: string;
                url?: string;
                visibility?: "public"
                | "unlisted"
                | "private";
            }

        Your publication, when there is one — and there often is not: a video uploaded to the channel by hand, a post that predates PlanVortex, and every Google Business review have comments with no publication of ours behind them. What always identifies the target is publication_external_id.

        Same asymmetry as `id_account`: the inbox listing resolves it into the whole publication, every other operation returns the identifier as a string.
        
      • Optionallike_count?: number

        Absent when the network does not publish it — not zero

      • Optionalour_reply_external_id?: string

        The network id of your reply, so you can find it or delete it later

      • Optionalparent_external_id?: string

        Present only when this is a reply to another comment

      • publication_external_id: string

        What the comment hangs off, on the network: the post/video id in most networks, the listing (locations/{id}) for a Google Business review, and the published message's id on Telegram — where the thread that holds the comments is the forwarded post.

      • Optionalrating?: number

        Star rating of a review. Present only on review networks — today Google Business. Its absence means "this network has no such thing", never zero.

        It is not decorative: without it a one-star review and a five-star one are the same row, and a stars-only review is a blank line.
        
      • read: boolean

        Yours, not the network's. A live read never overwrites it.

      • replied: boolean

        Yours, not the network's. Set when you reply through the API.

      • Optionalreply_count?: number

        Absent when the network does not publish it — not zero

      • social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "twitter"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
      • text: string

        May legitimately be empty. A stars-only review carries no text at all, so render rating alongside it and never assume a blank comment is a loading failure.

    • field:
          | "comments"
          | "messages"
          | "new_account"
          | "change_state_account"
          | "messaging_postbacks"
          | "messaging_seen"
          | "messaging_error"

      What kind of change this is. Treat it as an open list and ignore what you do not handle: it grows with the product.

      - `new_account` / `change_state_account`: an account was connected, or its state changed — it stopped working, its token was refreshed, it was disconnected. On `telegram` this is the **only** way to hear about a connection: there is no callback there, so no request of yours ever returns that account.
      - `messages`: a message came in. It travels in `messageObj`.
      - `messaging_postbacks`: the contact pressed a button or a quick reply. Also in `messageObj`.
      - `messaging_seen`: the contact read the conversation. `messageObj` carries the message they read, when we still have it.
      - `messaging_error`: the network refused a message we sent. The reason is in `messageObj.message_errors`.
      - `comments`: a comment came in. It travels in `commentObj`, never in `messageObj`.
      
    • id_account: string
    • Optionalid_contact?: string

      Only for messaging fields. A comment has no contact: its author is not someone you can write to.

    • id_organization: string
    • OptionalmessageObj?: {
          _id: string;
          contact_id?:
              | string
              | {
                  _id: string;
                  creation_date: string;
                  creator_keycloak_identifier?: string;
                  extra_data?: {
                      address?: string;
                      boolean_property?: boolean;
                      boolean_property2?: boolean;
                      building?: string
                      | number;
                      city?: string;
                      coords?: number[];
                      country?: string;
                      country_code?: string;
                      door?: string | number;
                      floor?: string | number;
                      number?: string | number;
                      number_property?: number;
                      number_property2?: number;
                      place_id?: string;
                      state?: string;
                      string_property?: string;
                      string_property2?: string;
                      zip_code?: string | number;
                  };
                  id_organization: string;
                  last_contact_update: string;
                  name?: string;
                  profile_image?: string;
                  social_identifiers: {
                      _id: string;
                      external_identifier?: string;
                      last_send_date?: string;
                      social_network: | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "email";
                  }[];
              };
          creation_date: string;
          element_external_id?: string;
          from_contact_id?: | string
          | {
              _id: string;
              creation_date: string;
              creator_keycloak_identifier?: string;
              extra_data?: {
                  address?: string;
                  boolean_property?: boolean;
                  boolean_property2?: boolean;
                  building?: string
                  | number;
                  city?: string;
                  coords?: number[];
                  country?: string;
                  country_code?: string;
                  door?: string | number;
                  floor?: string | number;
                  number?: string | number;
                  number_property?: number;
                  number_property2?: number;
                  place_id?: string;
                  state?: string;
                  string_property?: string;
                  string_property2?: string;
                  zip_code?: string | number;
              };
              id_organization: string;
              last_contact_update: string;
              name?: string;
              profile_image?: string;
              social_identifiers: {
                  _id: string;
                  external_identifier?: string;
                  last_send_date?: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "email";
              }[];
          };
          id_account: string;
          in_response_external_id?: string;
          in_response_to?: string;
          message_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          message_options: {
              files: (
                  | string
                  | {
                      _id: string;
                      ai_generated?: {
                          generated_at: string;
                          id_ai_plan?: (...)
                          | (...);
                          model: string;
                          provider: string;
                      };
                      cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                      cover_offset?: number;
                      creation_date: string;
                      file_externals: {
                          external_identifier: string;
                          external_url: string;
                          social_network: | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...)
                          | (...);
                      }[];
                      file_format: "mp4"
                      | "jpeg"
                      | "gif"
                      | "png"
                      | "jpg";
                      file_properties: {
                          allowed_social_networks: string[];
                          aspect_ratio: { text: string; value: number };
                          duration: number;
                          height: number;
                          size_in_bytes: number;
                          width: number;
                      };
                      file_type: "video"
                      | "image";
                      id_organization: string;
                      is_temporal: boolean;
                      name: string;
                      public_path: string;
                  }
              )[];
              files_urls: { mime_type?: string; url?: string }[];
              metaElements?: { [key: string]: unknown }[];
              metaQuickReplies?: { [key: string]: unknown }[];
              payload?: string;
              template_language?: string;
              template_name?: string;
              template_parameters?: string[];
              whatsappInteractive?: { [key: string]: unknown };
          };
          message_type: | "simple_message"
          | "file_message"
          | "comment_message"
          | "publication_message"
          | "quick_reply_message"
          | "button_message"
          | "elements_message"
          | "postback_message"
          | "template_message"
          | "interactive_message";
          read: boolean;
          text?: string;
      }

      The message. Present for the messaging fields, never for a comment — a comment is not a message and does not travel in here.

      It arrives **populated**: `contact_id`, `from_contact_id` and `message_options.files` carry whole objects. On `messaging_seen` and `messaging_error` it can be absent, because the message being acknowledged may not be one of ours.
      
      • _id: string
      • Optionalcontact_id?:
            | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            }

        Set when we wrote to the contact. Exactly one of contact_id and from_contact_id is present, and which one tells you the direction of the message.

      • creation_date: string

        Format: date-time

      • Optionalelement_external_id?: string

        Identifier of this message on the network.

      • Optionalfrom_contact_id?:
            | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            }

        Set when the contact wrote to us.

      • id_account: string
      • Optionalin_response_external_id?: string

        Identifier on the network of the publication, comment or message this one answers.

      • Optionalin_response_to?: string

        Identifier of the PlanVortex message this one answers.

      • message_errors: { code: number; data?: { [key: string]: unknown }; message: string }[]

        Why the network refused this message, if it did. Same shape as an API error. Empty when nothing went wrong.

      • message_options: {
            files: (
                | string
                | {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: (...)
                        | (...);
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...)
                        | (...);
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }
            )[];
            files_urls: { mime_type?: string; url?: string }[];
            metaElements?: { [key: string]: unknown }[];
            metaQuickReplies?: { [key: string]: unknown }[];
            payload?: string;
            template_language?: string;
            template_name?: string;
            template_parameters?: string[];
            whatsappInteractive?: { [key: string]: unknown };
        }
        • files: (
              | string
              | {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: (...)
                      | (...);
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...)
                      | (...);
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }
          )[]

          The uploads attached to the message. Populated wherever the message itself is: the messages list and webhook deliveries carry whole uploads, everything else carries their identifiers. Handle both.

        • files_urls: { mime_type?: string; url?: string }[]

          Files already hosted somewhere else. Filled in by PlanVortex when a message arrives from the network.

        • OptionalmetaElements?: { [key: string]: unknown }[]

          Meta cards, for elements_message and button_message.

        • OptionalmetaQuickReplies?: { [key: string]: unknown }[]

          Meta quick replies, for quick_reply_message.

        • Optionalpayload?: string

          Payload of a Meta postback.

        • Optionaltemplate_language?: string

          Required for template_message, as the network's language code.

        • Optionaltemplate_name?: string

          Required for template_message.

        • Optionaltemplate_parameters?: string[]

          For a template_message whose body has variables: their values, in order. The first one fills {{1}}, the second {{2}}, and so on. Without them WhatsApp rejects a template that has variables, so a reminder with the customer's name and time needs this. Each value is a non-empty string with no line breaks, no tabs and no more than four consecutive spaces; anything else answers 1511 with data.field = template_parameters and data.index pointing at the bad value. Only positional body variables are supported: named variables ({{name}}) and variables in the header or in a button URL are not sent yet.

        • OptionalwhatsappInteractive?: { [key: string]: unknown }

          WhatsApp interactive list, for interactive_message. It needs at least one section.

      • message_type:
            | "simple_message"
            | "file_message"
            | "comment_message"
            | "publication_message"
            | "quick_reply_message"
            | "button_message"
            | "elements_message"
            | "postback_message"
            | "template_message"
            | "interactive_message"
      • read: boolean
      • Optionaltext?: string

        Absent on the messages that carry no text of their own, such as a messaging_seen acknowledgement.

    • OptionaloriginalChange?: { [key: string]: unknown }

      The raw payload the social network sent, passed through untouched. Absent on the changes PlanVortex raises itself, such as new_account.

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
  • Contact: {
        _id: string;
        creation_date: string;
        creator_keycloak_identifier?: string;
        extra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        id_organization: string;
        last_contact_update: string;
        name?: string;
        profile_image?: string;
        social_identifiers: {
            _id: string;
            external_identifier?: string;
            last_send_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        }[];
    }

    A person the organization exchanges messages with. The same contact can be reachable on several channels — that is what social_identifiers is.

    • _id: string
    • creation_date: string

      Format: date-time

    • Optionalcreator_keycloak_identifier?: string

      The user who created the contact, when it was created from the panel instead of arriving from a network.

    • Optionalextra_data?: {
          address?: string;
          boolean_property?: boolean;
          boolean_property2?: boolean;
          building?: string | number;
          city?: string;
          coords?: number[];
          country?: string;
          country_code?: string;
          door?: string | number;
          floor?: string | number;
          number?: string | number;
          number_property?: number;
          number_property2?: number;
          place_id?: string;
          state?: string;
          string_property?: string;
          string_property2?: string;
          zip_code?: string | number;
      }
      • Optionaladdress?: string
      • Optionalboolean_property?: boolean
      • Optionalboolean_property2?: boolean
      • Optionalbuilding?: string | number
      • Optionalcity?: string
      • Optionalcoords?: number[]

        Longitude and latitude, in that order.

      • Optionalcountry?: string
      • Optionalcountry_code?: string
      • Optionaldoor?: string | number
      • Optionalfloor?: string | number
      • Optionalnumber?: string | number
      • Optionalnumber_property?: number
      • Optionalnumber_property2?: number
      • Optionalplace_id?: string
      • Optionalstate?: string
      • Optionalstring_property?: string
      • Optionalstring_property2?: string
      • Optionalzip_code?: string | number
    • id_organization: string
    • last_contact_update: string

      Format: date-time

      Last time the contact's profile was refreshed from the network.

    • Optionalname?: string
    • Optionalprofile_image?: string

      URL of the contact's avatar on the network. It belongs to the network and it can stop working.

    • social_identifiers: {
          _id: string;
          external_identifier?: string;
          last_send_date?: string;
          social_network:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "email";
      }[]
  • ContactChannel:
        | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "email"

    Where a contact can be reached. Every social network that has messaging, plus email for a contact created by hand instead of arriving from a network.

    **This list grows** with the networks: treat it as an open enumeration.
    
  • ContactExtraData: {
        address?: string;
        boolean_property?: boolean;
        boolean_property2?: boolean;
        building?: string | number;
        city?: string;
        coords?: number[];
        country?: string;
        country_code?: string;
        door?: string | number;
        floor?: string | number;
        number?: string | number;
        number_property?: number;
        number_property2?: number;
        place_id?: string;
        state?: string;
        string_property?: string;
        string_property2?: string;
        zip_code?: string | number;
    }

    Your own fields on the contact. The address block is known to PlanVortex; the six generic properties are yours to use, and they are what extra_data filters on.

    • Optionaladdress?: string
    • Optionalboolean_property?: boolean
    • Optionalboolean_property2?: boolean
    • Optionalbuilding?: string | number
    • Optionalcity?: string
    • Optionalcoords?: number[]

      Longitude and latitude, in that order.

    • Optionalcountry?: string
    • Optionalcountry_code?: string
    • Optionaldoor?: string | number
    • Optionalfloor?: string | number
    • Optionalnumber?: string | number
    • Optionalnumber_property?: number
    • Optionalnumber_property2?: number
    • Optionalplace_id?: string
    • Optionalstate?: string
    • Optionalstring_property?: string
    • Optionalstring_property2?: string
    • Optionalzip_code?: string | number
  • ContactsContactCreate: {
        extra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        name?: string;
        profile_image?: string;
        social_identifiers: {
            _id?: string;
            external_identifier?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        }[];
    }

    A new contact. At least one identifier is mandatory (ERROR_CODE_1601 otherwise): a contact with no channel is a contact nobody can write to.

    Creating is idempotent on the FIRST identifier: if the organization already has a contact with that channel and that `external_identifier`, you get the existing one back untouched — `name`, `profile_image` and `extra_data` of the request are ignored. There is no "already exists" error.
    
    • Optionalextra_data?: {
          address?: string;
          boolean_property?: boolean;
          boolean_property2?: boolean;
          building?: string | number;
          city?: string;
          coords?: number[];
          country?: string;
          country_code?: string;
          door?: string | number;
          floor?: string | number;
          number?: string | number;
          number_property?: number;
          number_property2?: number;
          place_id?: string;
          state?: string;
          string_property?: string;
          string_property2?: string;
          zip_code?: string | number;
      }
      • Optionaladdress?: string
      • Optionalboolean_property?: boolean
      • Optionalboolean_property2?: boolean
      • Optionalbuilding?: string | number
      • Optionalcity?: string
      • Optionalcoords?: number[]

        Longitude and latitude, in that order.

      • Optionalcountry?: string
      • Optionalcountry_code?: string
      • Optionaldoor?: string | number
      • Optionalfloor?: string | number
      • Optionalnumber?: string | number
      • Optionalnumber_property?: number
      • Optionalnumber_property2?: number
      • Optionalplace_id?: string
      • Optionalstate?: string
      • Optionalstring_property?: string
      • Optionalstring_property2?: string
      • Optionalzip_code?: string | number
    • Optionalname?: string
    • Optionalprofile_image?: string
    • social_identifiers: {
          _id?: string;
          external_identifier?: string;
          social_network:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "email";
      }[]
  • ContactsContactUpdate: {
        extra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        };
        name?: string;
        profile_image?: string;
        social_identifiers?: {
            _id?: string;
            external_identifier?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
        }[];
    }

    Changes to a contact. name, profile_image and social_identifiers are left alone when you omit them.

    **`extra_data` is the exception and it is destructive**: it is written with whatever the body carries, so omitting it ERASES every custom field on the contact. Read the contact, change what you need and send the whole block back.
    
    • Optionalextra_data?: {
          address?: string;
          boolean_property?: boolean;
          boolean_property2?: boolean;
          building?: string | number;
          city?: string;
          coords?: number[];
          country?: string;
          country_code?: string;
          door?: string | number;
          floor?: string | number;
          number?: string | number;
          number_property?: number;
          number_property2?: number;
          place_id?: string;
          state?: string;
          string_property?: string;
          string_property2?: string;
          zip_code?: string | number;
      }

      Written as sent. Omitting it erases the contact's custom fields.

      • Optionaladdress?: string
      • Optionalboolean_property?: boolean
      • Optionalboolean_property2?: boolean
      • Optionalbuilding?: string | number
      • Optionalcity?: string
      • Optionalcoords?: number[]

        Longitude and latitude, in that order.

      • Optionalcountry?: string
      • Optionalcountry_code?: string
      • Optionaldoor?: string | number
      • Optionalfloor?: string | number
      • Optionalnumber?: string | number
      • Optionalnumber_property?: number
      • Optionalnumber_property2?: number
      • Optionalplace_id?: string
      • Optionalstate?: string
      • Optionalstring_property?: string
      • Optionalstring_property2?: string
      • Optionalzip_code?: string | number
    • Optionalname?: string
    • Optionalprofile_image?: string
    • Optionalsocial_identifiers?: {
          _id?: string;
          external_identifier?: string;
          social_network:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "email";
      }[]

      Replaces the whole list, it does not merge into it. Omit it to keep the current one.

  • ContactsSocialIdentifierInput: {
        _id?: string;
        external_identifier?: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
    }

    The same person on one channel, as you SEND it. _id is optional here and PlanVortex mints one when it is missing — which is the difference with SocialIdentifier, where it always travels back.

    • Optional_id?: string

      Only when you are keeping an identifier the API already gave you.

    • Optionalexternal_identifier?: string

      The contact id on that channel — the phone number on WhatsApp, the PSID on Messenger. Optional in the model, but a contact without it cannot be written to, and it is what deduplicates on create.

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "email"
  • DashboardAccountWithError: {
        _id: string;
        error_code: number;
        image?: string;
        name: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        username?: string;
    }

    A connected account that has stopped working: an expired token or a revoked permission. Until it is reconnected it neither publishes nor measures.

    • _id: string
    • error_code: number

      PlanVortex error code that broke it. 0 means healthy, so anything here is non-zero.

    • Optionalimage?: string
    • name: string
    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
    • Optionalusername?: string
  • DashboardDashboard: {
        account_metrics?: {
            by_day: {
                group: null | string;
                name:
                    | "reach"
                    | "impressions"
                    | "followers"
                    | "comments"
                    | "engagement"
                    | "likes"
                    | "shares"
                    | "saves"
                    | "clicks"
                    | "video_views"
                    | "profile_views"
                    | "followers_gained";
                value: number;
            }[];
            by_network: {
                group: null
                | string;
                name:
                    | "reach"
                    | "impressions"
                    | "followers"
                    | "comments"
                    | "engagement"
                    | "likes"
                    | "shares"
                    | "saves"
                    | "clicks"
                    | "video_views"
                    | "profile_views"
                    | "followers_gained";
                value: number;
            }[];
            previous_total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        ai_plan_results?: {
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            plans: number;
            ranked_plans: number;
            top: {
                accounts: number;
                archived_date?: string;
                creation_date: string;
                credits_per_engagement?: number;
                credits_spent: number;
                engagement_per_publication?: number;
                engagement_vs_average?: number;
                expected_engagement_per_publication?: number;
                id_ai_plan: string;
                id_organization: string;
                last_publish_date?: string;
                maturing: boolean;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                prompt: string;
                publications: {
                    failed: number;
                    measured: number;
                    published: number;
                    scheduled: number;
                    total: number;
                };
                ranked: boolean;
                social_networks: (
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest"
                )[];
                state: "generated"
                | "validated";
                template:
                    | "standard"
                    | "from_images"
                    | "from_text"
                    | "from_catalog"
                    | "campaign";
                week_start: string;
            }[];
        };
        ai_plans?: {
            by_state: { state?: string; total?: number }[];
            credits_spent: number;
            generated_publications: number;
            last_plan?: {
                _id: string;
                creation_date: string;
                credits_spent?: number;
                error?: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                };
                generation_end_date?: string;
                prompt?: string;
                publications?: string[];
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
            };
            pending_validation: number;
            total: number;
        };
        available_blocks: {
            account_metrics: boolean;
            ai_plan_results: boolean;
            ai_plans: boolean;
            health: boolean;
            messages: boolean;
            plan_use: boolean;
            publication_metrics: boolean;
            publications: boolean;
        };
        health?: {
            accounts_with_errors?: {
                _id: string;
                error_code: number;
                image?: string;
                name: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            }[];
            publications_with_errors?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publication_warnings?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                text?: string;
            }[];
            total_drafts?: number;
            upcoming_publications?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publication_warnings?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                text?: string;
            }[];
        };
        messages?: { unread: number };
        plan_use?: {
            actual_asigned: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            limits: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
        };
        publication_metrics?: {
            by_network: {
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                publications?: number;
                social_network?: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            previous_total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            top: {
                collected_date?: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                id_publication: string;
                metrics: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                publication: {
                    external_identifier?: string;
                    files?: {
                        _id: string;
                        ai_generated?: (...)
                        | (...);
                        cover_image?: (...) | (...);
                        cover_offset?: (...) | (...);
                        creation_date: string;
                        file_externals: (...)[];
                        file_format: (...) | (...) | (...) | (...) | (...);
                        file_properties: {
                            allowed_social_networks: ...;
                            aspect_ratio: ...;
                            duration: ...;
                            height: ...;
                            size_in_bytes: ...;
                            width: ...;
                        };
                        file_type: (...)
                        | (...);
                        id_organization: string;
                        is_temporal: boolean;
                        name: string;
                        public_path: string;
                    }[];
                    publication_type?: string;
                    text?: string;
                    title?: string;
                    url?: string;
                };
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            total: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        publications?: {
            by_day: { day?: string; state?: string; total?: number }[];
            by_network: {
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                total?: number;
            }[];
            by_state: { state?: string; total?: number }[];
            published_by_day: {
                day?: string;
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                total?: number;
            }[];
            total: number;
        } & { previous_total?: number };
        range: {
            from_date: string;
            previous_from_date: string;
            previous_to_date: string;
            to_date: string;
        };
    }

    Everything the home screen needs, in ONE round trip.

    **A missing block is not an error.** Each one is checked against its own permission and omitted when the caller cannot read it, instead of failing the whole request; `available_blocks` says which ones were allowed. A block that is `true` in `available_blocks` and absent from the body means there was no data — except `messages`, which also turns to `false` when the plan does not include chat.
    
    • Optionalaccount_metrics?: {
          by_day: {
              group: null | string;
              name:
                  | "reach"
                  | "impressions"
                  | "followers"
                  | "comments"
                  | "engagement"
                  | "likes"
                  | "shares"
                  | "saves"
                  | "clicks"
                  | "video_views"
                  | "profile_views"
                  | "followers_gained";
              value: number;
          }[];
          by_network: {
              group: null
              | string;
              name:
                  | "reach"
                  | "impressions"
                  | "followers"
                  | "comments"
                  | "engagement"
                  | "likes"
                  | "shares"
                  | "saves"
                  | "clicks"
                  | "video_views"
                  | "profile_views"
                  | "followers_gained";
              value: number;
          }[];
          previous_total: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          total: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
      }
      • by_day: {
            group: null | string;
            name:
                | "reach"
                | "impressions"
                | "followers"
                | "comments"
                | "engagement"
                | "likes"
                | "shares"
                | "saves"
                | "clicks"
                | "video_views"
                | "profile_views"
                | "followers_gained";
            value: number;
        }[]
      • by_network: {
            group: null | string;
            name:
                | "reach"
                | "impressions"
                | "followers"
                | "comments"
                | "engagement"
                | "likes"
                | "shares"
                | "saves"
                | "clicks"
                | "video_views"
                | "profile_views"
                | "followers_gained";
            value: number;
        }[]
      • previous_total: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • total: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
    • Optionalai_plan_results?: {
          engagement_per_publication?: number;
          engagement_vs_average?: number;
          plans: number;
          ranked_plans: number;
          top: {
              accounts: number;
              archived_date?: string;
              creation_date: string;
              credits_per_engagement?: number;
              credits_spent: number;
              engagement_per_publication?: number;
              engagement_vs_average?: number;
              expected_engagement_per_publication?: number;
              id_ai_plan: string;
              id_organization: string;
              last_publish_date?: string;
              maturing: boolean;
              metrics: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              prompt: string;
              publications: {
                  failed: number;
                  measured: number;
                  published: number;
                  scheduled: number;
                  total: number;
              };
              ranked: boolean;
              social_networks: (
                  | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest"
              )[];
              state: "generated"
              | "validated";
              template:
                  | "standard"
                  | "from_images"
                  | "from_text"
                  | "from_catalog"
                  | "campaign";
              week_start: string;
          }[];
      }

      The best AI plans of the range, by interactions per measured publication — the short version of GET /clients/{id}/organizations/{id}/ai_plans/results, with the same rules: the range filters on the plan's week, and only plans with at least 3 measured publications compete.

      Unlike that endpoint it covers the organization **and its children**, like the rest of this screen, so each plan carries its `id_organization`.
      
      • Optionalengagement_per_publication?: number

        Interactions per measured publication across every plan of the range.

      • Optionalengagement_vs_average?: number

        Interactions per post of every plan of the range over what your usual posts would get on the same networks. 1 means like your average.

      • plans: number

        Plans with results in the range.

      • ranked_plans: number

        How many of those compete in the ranking. plans > 0 with ranked_plans: 0 means there are results, just not enough measured yet.

      • top: {
            accounts: number;
            archived_date?: string;
            creation_date: string;
            credits_per_engagement?: number;
            credits_spent: number;
            engagement_per_publication?: number;
            engagement_vs_average?: number;
            expected_engagement_per_publication?: number;
            id_ai_plan: string;
            id_organization: string;
            last_publish_date?: string;
            maturing: boolean;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            prompt: string;
            publications: {
                failed: number;
                measured: number;
                published: number;
                scheduled: number;
                total: number;
            };
            ranked: boolean;
            social_networks: (
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest"
            )[];
            state: "generated"
            | "validated";
            template:
                | "standard"
                | "from_images"
                | "from_text"
                | "from_catalog"
                | "campaign";
            week_start: string;
        }[]

        Up to three plans, best first. Only ranked ones.

    • Optionalai_plans?: {
          by_state: { state?: string; total?: number }[];
          credits_spent: number;
          generated_publications: number;
          last_plan?: {
              _id: string;
              creation_date: string;
              credits_spent?: number;
              error?: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              };
              generation_end_date?: string;
              prompt?: string;
              publications?: string[];
              state: | "pending"
              | "generating"
              | "generated"
              | "validated"
              | "failed"
              | "cancelled";
          };
          pending_validation: number;
          total: number;
      }
      • by_state: { state?: string; total?: number }[]
      • credits_spent: number
      • generated_publications: number

        Publications generated by the plans of the range.

      • Optionallast_plan?: {
            _id: string;
            creation_date: string;
            credits_spent?: number;
            error?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            };
            generation_end_date?: string;
            prompt?: string;
            publications?: string[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        }

        The most recent plan of the organization, whatever the range. Absent when there has never been one.

        • _id: string
        • creation_date: string

          Format: date-time

        • Optionalcredits_spent?: number
        • Optionalerror?: { code: number; data?: { [key: string]: unknown }; message: string }
        • Optionalgeneration_end_date?: string

          Format: date-time

        • Optionalprompt?: string
        • Optionalpublications?: string[]
        • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"
      • pending_validation: number

        Plans already generated and waiting for someone to validate them: work paid for that is not publishing anything yet.

      • total: number
    • available_blocks: {
          account_metrics: boolean;
          ai_plan_results: boolean;
          ai_plans: boolean;
          health: boolean;
          messages: boolean;
          plan_use: boolean;
          publication_metrics: boolean;
          publications: boolean;
      }

      Which blocks the caller was allowed to see. A false here is a permission (or plan) answer; a block that is true but empty means there is no data.

      • account_metrics: boolean
      • ai_plan_results: boolean

        Needs both ai_plans:read and publication_stats:read: the block shows plans and their publications' metrics.

      • ai_plans: boolean
      • health: boolean
      • messages: boolean
      • plan_use: boolean
      • publication_metrics: boolean
      • publications: boolean
    • Optionalhealth?: {
          accounts_with_errors?: {
              _id: string;
              error_code: number;
              image?: string;
              name: string;
              social_network:
                  | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              username?: string;
          }[];
          publications_with_errors?: {
              _id: string;
              creation_date?: string;
              name?: string;
              publication_errors?: {
                  code: number;
                  data?: (...)
                  | (...);
                  message: string;
              }[];
              publication_warnings?: {
                  code: number;
                  data?: (...)
                  | (...);
                  message: string;
              }[];
              publish_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              text?: string;
          }[];
          total_drafts?: number;
          upcoming_publications?: {
              _id: string;
              creation_date?: string;
              name?: string;
              publication_errors?: {
                  code: number;
                  data?: (...)
                  | (...);
                  message: string;
              }[];
              publication_warnings?: {
                  code: number;
                  data?: (...)
                  | (...);
                  message: string;
              }[];
              publish_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              text?: string;
          }[];
      }

      What needs fixing today. Each half has its own permission: somebody who cannot read accounts still sees the failed publications.

      • Optionalaccounts_with_errors?: {
            _id: string;
            error_code: number;
            image?: string;
            name: string;
            social_network:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            username?: string;
        }[]
      • Optionalpublications_with_errors?: {
            _id: string;
            creation_date?: string;
            name?: string;
            publication_errors?: {
                code: number;
                data?: (...) | (...);
                message: string;
            }[];
            publication_warnings?: {
                code: number;
                data?: (...)
                | (...);
                message: string;
            }[];
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            text?: string;
        }[]

        Up to ten publications in state with_errors, newest first.

      • Optionaltotal_drafts?: number
      • Optionalupcoming_publications?: {
            _id: string;
            creation_date?: string;
            name?: string;
            publication_errors?: {
                code: number;
                data?: (...) | (...);
                message: string;
            }[];
            publication_warnings?: {
                code: number;
                data?: (...)
                | (...);
                message: string;
            }[];
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            text?: string;
        }[]

        Up to ten publications due in the next 48 hours.

    • Optionalmessages?: { unread: number }
    • Optionalplan_use?: {
          actual_asigned: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          actual_use: { publications?: number; users?: number } & {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          limits: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
      }
      • actual_asigned: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        What has been handed down to child organizations out of this organization's plan.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • actual_use: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        What the organization and its children are consuming right now.

      • limits: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        The plan in force. An organization with no plan of its own inherits the closest parent that has one.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • Optionalpublication_metrics?: {
          by_network: {
              metrics?: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              publications?: number;
              social_network?: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          }[];
          previous_total: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          top: {
              collected_date?: string;
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              id_publication: string;
              metrics: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              publication: {
                  external_identifier?: string;
                  files?: {
                      _id: string;
                      ai_generated?: (...)
                      | (...);
                      cover_image?: (...) | (...);
                      cover_offset?: (...) | (...);
                      creation_date: string;
                      file_externals: (...)[];
                      file_format: (...) | (...) | (...) | (...) | (...);
                      file_properties: {
                          allowed_social_networks: ...;
                          aspect_ratio: ...;
                          duration: ...;
                          height: ...;
                          size_in_bytes: ...;
                          width: ...;
                      };
                      file_type: (...)
                      | (...);
                      id_organization: string;
                      is_temporal: boolean;
                      name: string;
                      public_path: string;
                  }[];
                  publication_type?: string;
                  text?: string;
                  title?: string;
                  url?: string;
              };
              publish_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          }[];
          total: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
      }
      • by_network: {
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            publications?: number;
            social_network?: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        }[]
      • previous_total: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • top: {
            collected_date?: string;
            engagement_base?: "reach" | "impressions" | "followers";
            id_publication: string;
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            publication: {
                external_identifier?: string;
                files?: {
                    _id: string;
                    ai_generated?: (...)
                    | (...);
                    cover_image?: (...) | (...);
                    cover_offset?: (...) | (...);
                    creation_date: string;
                    file_externals: (...)[];
                    file_format: (...) | (...) | (...) | (...) | (...);
                    file_properties: {
                        allowed_social_networks: ...;
                        aspect_ratio: ...;
                        duration: ...;
                        height: ...;
                        size_in_bytes: ...;
                        width: ...;
                    };
                    file_type: (...)
                    | (...);
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }[];
                publication_type?: string;
                text?: string;
                title?: string;
                url?: string;
            };
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        }[]
      • total: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
    • Optionalpublications?: {
          by_day: { day?: string; state?: string; total?: number }[];
          by_network: {
              social_network?:
                  | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              total?: number;
          }[];
          by_state: { state?: string; total?: number }[];
          published_by_day: {
              day?: string;
              social_network?:
                  | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              total?: number;
          }[];
          total: number;
      } & { previous_total?: number }
    • range: {
          from_date: string;
          previous_from_date: string;
          previous_to_date: string;
          to_date: string;
      }
      • from_date: string

        Format: date-time

      • previous_from_date: string

        Format: date-time

      • previous_to_date: string

        Format: date-time

      • to_date: string

        Format: date-time

  • DashboardDashboardAiPlanRef: {
        _id: string;
        creation_date: string;
        credits_spent?: number;
        error?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        };
        generation_end_date?: string;
        prompt?: string;
        publications?: string[];
        state: | "pending"
        | "generating"
        | "generated"
        | "validated"
        | "failed"
        | "cancelled";
    }

    The most recent AI plan, projected: enough to tell at a glance whether one is still generating, failed, or is waiting to be validated. publications are identifiers here.

    • _id: string
    • creation_date: string

      Format: date-time

    • Optionalcredits_spent?: number
    • Optionalerror?: { code: number; data?: { [key: string]: unknown }; message: string }
    • Optionalgeneration_end_date?: string

      Format: date-time

    • Optionalprompt?: string
    • Optionalpublications?: string[]
    • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"
  • DashboardDashboardPublicationRef: {
        _id: string;
        creation_date?: string;
        name?: string;
        publication_errors?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publication_warnings?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publish_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        text?: string;
    }

    A publication as the health block projects it: a handful of fields, not a whole Publication. state is not among them — the list it came from already says what state it is in.

    • _id: string
    • Optionalcreation_date?: string

      Format: date-time

    • Optionalname?: string
    • Optionalpublication_errors?: { code: number; data?: { [key: string]: unknown }; message: string }[]

      Only on the failed ones. Same shape as in a full Publication.

    • Optionalpublication_warnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

      What still has to be done by hand on the network for a publication that DID go out. Same shape as publication_errors, and an empty array when there is nothing to do.

      It is a separate field because these are not failures: the publication stays in state `sended` and must **not** be retried, because retrying would publish it twice. Like `publication_errors`, it belongs to the last attempt.
      
      Today there is one code. **2400** (YouTube): YouTube accepted the upload but did not make the video public, so YouTube Studio shows it as a draft or private until someone sets its audience and visibility there. The upload does not fail when this happens; PlanVortex reads the video back right after uploading it to find out. `data` carries `requested_privacy_status`, `privacy_status` (what YouTube actually left), `upload_status`, `made_for_kids` and `studio_url`, the YouTube Studio page where it is finished.
      
    • Optionalpublish_date?: string

      Format: date-time

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
    • Optionaltext?: string
  • DashboardDashboardRange: {
        from_date: string;
        previous_from_date: string;
        previous_to_date: string;
        to_date: string;
    }

    The range that was actually used, plus the previous period of exactly the same length. The previous one is not "last month": comparing 30 days against a calendar month would move the delta with the calendar.

    • from_date: string

      Format: date-time

    • previous_from_date: string

      Format: date-time

    • previous_to_date: string

      Format: date-time

    • to_date: string

      Format: date-time

  • DashboardMetricName:
        | "reach"
        | "impressions"
        | "followers"
        | "comments"
        | "engagement"
        | "likes"
        | "shares"
        | "saves"
        | "clicks"
        | "video_views"
        | "profile_views"
        | "followers_gained"

    A metric in PlanVortex's common vocabulary. Each network reports what it reports and PlanVortex translates it; a metric a network does not publish is absent, never zero.

  • DashboardMetricRow: {
        group: null | string;
        name:
            | "reach"
            | "impressions"
            | "followers"
            | "comments"
            | "engagement"
            | "likes"
            | "shares"
            | "saves"
            | "clicks"
            | "video_views"
            | "profile_views"
            | "followers_gained";
        value: number;
    }
    • group: null | string

      The value of the axis: the day, the network or the account identifier. null when group_by was total — the field is always there, the value is not always a string.

    • name:
          | "reach"
          | "impressions"
          | "followers"
          | "comments"
          | "engagement"
          | "likes"
          | "shares"
          | "saves"
          | "clicks"
          | "video_views"
          | "profile_views"
          | "followers_gained"
    • value: number
  • DashboardPlanUse: {
        actual_asigned: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_use: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        limits: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
    }
    • actual_asigned: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      What has been handed down to child organizations out of this organization's plan.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • actual_use: { publications?: number; users?: number } & {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      What the organization and its children are consuming right now.

    • limits: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      The plan in force. An organization with no plan of its own inherits the closest parent that has one.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

  • DashboardPublicationsSummary: {
        by_day: { day?: string; state?: string; total?: number }[];
        by_network: {
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            total?: number;
        }[];
        by_state: { state?: string; total?: number }[];
        published_by_day: {
            day?: string;
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            total?: number;
        }[];
        total: number;
    }
    • by_day: { day?: string; state?: string; total?: number }[]

      Publications created each day, split by state.

    • by_network: {
          social_network?:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          total?: number;
      }[]
    • by_state: { state?: string; total?: number }[]
    • published_by_day: {
          day?: string;
          social_network?:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          total?: number;
      }[]

      Publications that actually went out each day, split by network. Only the ones in state sended.

    • total: number

      Publications created in the range.

  • DashboardTopPublication: {
        collected_date?: string;
        engagement_base?: "reach" | "impressions" | "followers";
        id_publication: string;
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        publication: {
            external_identifier?: string;
            files?: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            publication_type?: string;
            text?: string;
            title?: string;
            url?: string;
        };
        publish_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
    }

    One row of the ranking. It comes out of the stats aggregation, not out of the publications collection, so it does not have the shape of a Publication: there is no _id (the identifier is id_publication) and the content travels nested under publication.

    Only publications that have already been measured can appear here. For a listing that includes the unmeasured ones, use `GET /organizations/{id}/publications/stats`.
    
    • Optionalcollected_date?: string

      Format: date-time

      When this measurement was taken.

    • Optionalengagement_base?: "reach" | "impressions" | "followers"

      What this row's engagement rate is divided by. Two rows with different bases are not comparable, so say which one it is when you put them in the same table.

    • id_publication: string
    • metrics: {
          clicks?: number;
          comments?: number;
          engagement?: number;
          followers?: number;
          followers_gained?: number;
          impressions?: number;
          likes?: number;
          profile_views?: number;
          reach?: number;
          saves?: number;
          shares?: number;
          video_views?: number;
      }
      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions

      • Optionalfollowers?: number

        Followers accumulated at that date, not the day's gain.

      • Optionalfollowers_gained?: number

        Followers gained that day.

      • Optionalimpressions?: number

        Times the content was shown (not unique)

      • Optionallikes?: number
      • Optionalprofile_views?: number
      • Optionalreach?: number

        Unique users reached

      • Optionalsaves?: number
      • Optionalshares?: number
      • Optionalvideo_views?: number
    • publication: {
          external_identifier?: string;
          files?: {
              _id: string;
              ai_generated?: {
                  generated_at: string;
                  id_ai_plan?: string;
                  model: string;
                  provider: string;
              };
              cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
              cover_offset?: number;
              creation_date: string;
              file_externals: {
                  external_identifier: string;
                  external_url: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              }[];
              file_format: "mp4"
              | "jpeg"
              | "gif"
              | "png"
              | "jpg";
              file_properties: {
                  allowed_social_networks: string[];
                  aspect_ratio: { text: string; value: number };
                  duration: number;
                  height: number;
                  size_in_bytes: number;
                  width: number;
              };
              file_type: "video"
              | "image";
              id_organization: string;
              is_temporal: boolean;
              name: string;
              public_path: string;
          }[];
          publication_type?: string;
          text?: string;
          title?: string;
          url?: string;
      }

      The bit of the publication needed to render the row. Nothing else is projected.

    • Optionalpublish_date?: string

      Format: date-time

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
  • Error: { code: number; data?: { [key: string]: unknown }; message: string }

    Error payload returned by every failing request.

    **Classify by `code`, never by the HTTP status.** Every domain error travels with HTTP 400 — an expired token, a disconnected account, an exhausted plan quota and a text that is too long are all 400. Only error 520 (permissions) answers 401, and an unexpected failure answers 500.
    
    The catalogue grows with the product, so treat an unknown `code` as a generic failure instead of rejecting it.
    
    • code: number

      PlanVortex error code. Ranges: 500-554 auth, tokens, client apps and connect sessions · 601-612 user · 700-716 social accounts · 800-810 files · 900-996 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1308 client plan · 1400-1408 organization plan · 1500-1512 messaging · 1600-1601 contacts · 1900-1906 payments · 2000-2099 products · 2100-2199 AI plans · 2200-2299 integrations · 2600-2699 comments, the ones that no longer fit in 945-948.

    • Optionaldata?: { [key: string]: unknown }

      Extra context attached to the error, when there is any.

    • message: string

      Human readable description of the error.

  • FileProperties: {
        allowed_social_networks: string[];
        aspect_ratio: { text: string; value: number };
        duration: number;
        height: number;
        size_in_bytes: number;
        width: number;
    }

    Measurements taken when the file was ingested. Always present on an upload.

    • allowed_social_networks: string[]

      The networks whose accepted crops this file's ratio matches, with a 0.1 margin. It is about the RATIO only: a network listed here can still reject the file for its duration or its weight (see GET /social_limits).

    • aspect_ratio: { text: string; value: number }

      Width divided by height, as a number and as a person writes it.

      • text: string
        16:9
        
      • value: number
        1.7777777777777777
        
    • duration: number

      Seconds. 0 on an image.

    • height: number
    • size_in_bytes: number
    • width: number

      0 on a file whose dimensions could not be read.

  • IntegrationsGoogleDriveConnectRequest: { code: string; provider: "google_drive" }
    • code: string

      OAuth code returned to the redirect of connect_link. Single-use.

    • provider: "google_drive"
  • IntegrationsIntegration: {
        _id: string;
        config: {
            api_base?: "wp-json" | "rest_route";
            auth_mode?: "query" | "basic";
            auto_publish?: boolean;
            currency?: string;
            id_accounts?: string[];
            import_image?: boolean;
            key_ending?: string;
            last_checked?: string;
            publication_type?: string;
            seen_guids?: string[];
            tax_location_missing?: boolean;
            template?: string;
            url?: string;
        };
        connected: boolean;
        creation_date: string;
        enabled: boolean;
        error_code?: null
        | number;
        external_identifier?: string;
        id_client: string;
        id_organization: string;
        last_used_date?: string;
        name: string;
        provider: "google_drive" | "rss" | "woocommerce";
    }

    Credentials are never returned. connected is the summary the panel paints: false means the connection failed and needs attention.

    • _id: string
    • config: {
          api_base?: "wp-json" | "rest_route";
          auth_mode?: "query" | "basic";
          auto_publish?: boolean;
          currency?: string;
          id_accounts?: string[];
          import_image?: boolean;
          key_ending?: string;
          last_checked?: string;
          publication_type?: string;
          seen_guids?: string[];
          tax_location_missing?: boolean;
          template?: string;
          url?: string;
      }

      Provider-specific configuration, built by the server. Empty object for google_drive (the Picker supplies everything), the feed settings for rss and the store connection for woocommerce, so every field here is optional. It never carries a secret.

      • Optionalapi_base?: "wp-json" | "rest_route"

        woocommerce. Where the store's REST API answers: wp-json (/wp-json/wc/v3/…) or rest_route (/?rest_route=/wc/v3/…), the fallback for stores with plain permalinks. A rest_route store cannot use the approval button (2216).

      • Optionalauth_mode?: "query" | "basic"

        woocommerce. How the key travels: basic (the Authorization header) or query (in the URL, only for hostings that drop that header). Detected when connecting.

      • Optionalauto_publish?: boolean

        rss.

      • Optionalcurrency?: string

        woocommerce. The store currency, when the key could read it (it needs a shop manager's key). Only used for a product that comes without price_html.

        EUR
        
      • Optionalid_accounts?: string[]

        rss.

      • Optionalimport_image?: boolean

        rss.

      • Optionalkey_ending?: string

        woocommerce. The last 7 characters of the consumer key, which is what WooCommerce shows in its key list (WooCommerce → Settings → Advanced → REST API). Disconnecting cannot revoke the key: this is how the user finds which one to delete there.

        3f9a2c1
        
      • Optionallast_checked?: string

        Format: date-time

        rss.

      • Optionalpublication_type?: string

        rss.

      • Optionalseen_guids?: string[]

        rss. Entries already processed (last 200, FIFO). Owned by the job: filled at connection time with everything the feed already had, so the back catalogue is never published.

      • Optionaltax_location_missing?: boolean

        woocommerce. true when the store's API gives prices WITHOUT tax, labelled as tax included. It happens with the default customer location set to geolocate (or to no location), prices entered without tax and tax based on the customer's address: an API request has no customer, so WooCommerce has nowhere to charge tax, and price_html reads "20,00 € IVA incluido" where the shop charges 24,20 €. While it is true, the store's taxable products come back without a price rather than with a wrong one; products with no tax keep theirs. It is checked when connecting, so after fixing the setting (WooCommerce → Settings → General → Default customer location → Shop country/region) the store has to be reconnected. Always present on a store, also as false.

      • Optionaltemplate?: string

        rss.

      • Optionalurl?: string

        rss: the feed. woocommerce: the store, as it was resolved when connecting (after its own redirects, which from then on are never followed). A store's url cannot be changed with PUT (2220): it decides which server receives the stored key. Changing store is reconnecting.

    • connected: boolean

      error_code is empty. It is computed on the way out, not stored: the panel needs to know whether the connection is alive, not with which credentials.

    • creation_date: string

      Format: date-time

    • enabled: boolean

      Only enabled integrations consume plan allowance.

    • Optionalerror_code?: null | number

      PlanVortex error code of the last failure (2203 token revoked, 2205 feed unreachable, 2211 the store rejected its key, 924 no publication allowance left…). 2219 is not a failure: a store connected with the button is being checked, for a few seconds; if it stays there, the check never finished and the store has to be reconnected.

    • Optionalexternal_identifier?: string

      The Google account email, the feed URL, or the store URL.

      ana@empresa.com
      
    • id_client: string
    • id_organization: string
    • Optionallast_used_date?: string

      Format: date-time

    • name: string

      The Google account, the feed title, or the store's site name.

      Drive de ana@empresa.com
      
    • provider: "google_drive" | "rss" | "woocommerce"
  • IntegrationsIntegrationCatalogPage: {
        items: {
            available: boolean;
            description?: string;
            external_id: string;
            image_url?: string;
            name: string;
            permalink?: string;
            price?: string;
        }[];
        next_cursor?: string;
    }
    • items: {
          available: boolean;
          description?: string;
          external_id: string;
          image_url?: string;
          name: string;
          permalink?: string;
          price?: string;
      }[]
    • Optionalnext_cursor?: string

      Absent on the last page. Opaque: send it back as cursor exactly as it came, and never build or parse one. A cursor the server did not issue is a 2208.

  • IntegrationsIntegrationCatalogProduct: {
        available: boolean;
        description?: string;
        external_id: string;
        image_url?: string;
        name: string;
        permalink?: string;
        price?: string;
    }

    A product of a connected store, already normalised: the same shape whatever the store is.

    • available: boolean

      Can it be chosen? false for what is out of stock: show it, marked, but do not let it be picked. Advertising what cannot be bought is worse than not advertising, and a plan with one is rejected (2112). A product on backorder is available.

    • Optionaldescription?: string

      Plain text, already stripped of HTML, entities and page-builder shortcodes, cut at 400 characters without splitting a word.

    • external_id: string

      The id it has in the store. Always a string, even where the store uses numbers. It is what goes into source.products of a from_catalog plan.

      68
      
    • Optionalimage_url?: string

      The first image of the product. It is the store's own URL: it can be slow, or blocked when loaded from another domain.

    • name: string
      Taza de cerámica
      
    • Optionalpermalink?: string

      The product's public page in the store.

    • Optionalprice?: string

      Text ready to be copied verbatim, as the store displays it: with its tax suffix, its currency symbol and the range of a variable product ("36,30 € - 48,40 € IVA incluido"); for a product on sale, the sale price alone. Never a number to do arithmetic with. Absent = no price: the product has none, or it is taxable and the store's config.tax_location_missing is true.

      14,52 € IVA incluido
      
  • IntegrationsIntegrationConfig: {
        api_base?: "wp-json" | "rest_route";
        auth_mode?: "query" | "basic";
        auto_publish?: boolean;
        currency?: string;
        id_accounts?: string[];
        import_image?: boolean;
        key_ending?: string;
        last_checked?: string;
        publication_type?: string;
        seen_guids?: string[];
        tax_location_missing?: boolean;
        template?: string;
        url?: string;
    }

    What config holds, per provider. google_drive: nothing. rss: the feed settings. woocommerce: how to reach the store, which the server detects when connecting. None of it is a secret.

    • Optionalapi_base?: "wp-json" | "rest_route"

      woocommerce. Where the store's REST API answers: wp-json (/wp-json/wc/v3/…) or rest_route (/?rest_route=/wc/v3/…), the fallback for stores with plain permalinks. A rest_route store cannot use the approval button (2216).

    • Optionalauth_mode?: "query" | "basic"

      woocommerce. How the key travels: basic (the Authorization header) or query (in the URL, only for hostings that drop that header). Detected when connecting.

    • Optionalauto_publish?: boolean

      rss.

    • Optionalcurrency?: string

      woocommerce. The store currency, when the key could read it (it needs a shop manager's key). Only used for a product that comes without price_html.

      EUR
      
    • Optionalid_accounts?: string[]

      rss.

    • Optionalimport_image?: boolean

      rss.

    • Optionalkey_ending?: string

      woocommerce. The last 7 characters of the consumer key, which is what WooCommerce shows in its key list (WooCommerce → Settings → Advanced → REST API). Disconnecting cannot revoke the key: this is how the user finds which one to delete there.

      3f9a2c1
      
    • Optionallast_checked?: string

      Format: date-time

      rss.

    • Optionalpublication_type?: string

      rss.

    • Optionalseen_guids?: string[]

      rss. Entries already processed (last 200, FIFO). Owned by the job: filled at connection time with everything the feed already had, so the back catalogue is never published.

    • Optionaltax_location_missing?: boolean

      woocommerce. true when the store's API gives prices WITHOUT tax, labelled as tax included. It happens with the default customer location set to geolocate (or to no location), prices entered without tax and tax based on the customer's address: an API request has no customer, so WooCommerce has nowhere to charge tax, and price_html reads "20,00 € IVA incluido" where the shop charges 24,20 €. While it is true, the store's taxable products come back without a price rather than with a wrong one; products with no tax keep theirs. It is checked when connecting, so after fixing the setting (WooCommerce → Settings → General → Default customer location → Shop country/region) the store has to be reconnected. Always present on a store, also as false.

    • Optionaltemplate?: string

      rss.

    • Optionalurl?: string

      rss: the feed. woocommerce: the store, as it was resolved when connecting (after its own redirects, which from then on are never followed). A store's url cannot be changed with PUT (2220): it decides which server receives the stored key. Changing store is reconnecting.

  • IntegrationsIntegrationFormField: {
        default?: unknown;
        name: string;
        options?: string[];
        required: boolean;
        type:
            | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "accounts"
            | "secret";
    }

    One field of a provider's form. Build the form from these, not from a copy of your own: the server that validates the field is the one that announces it.

    • Optionaldefault?: unknown
    • name: string
    • Optionaloptions?: string[]
    • required: boolean
    • type: "boolean" | "text" | "textarea" | "url" | "select" | "accounts" | "secret"

      accounts is a picker of the organization's accounts. secret is a credential (WooCommerce's consumer secret): mask it, never prefill it when editing, and mark the input as a new password (autocomplete="new-password"), or the browser's password manager fills it with the user's own PlanVortex password and the store answers 2211.

  • IntegrationsIntegrationProvider: {
        accepted_formats: string[];
        catalog: boolean;
        config_fields: {
            default?: unknown;
            name: string;
            options?: string[];
            required: boolean;
            type:
                | "boolean"
                | "text"
                | "textarea"
                | "url"
                | "select"
                | "accounts"
                | "secret";
        }[];
        connect_link: boolean;
        connect_link_fields: {
            default?: unknown;
            name: string;
            options?: string[];
            required: boolean;
            type: | "boolean"
            | "text"
            | "textarea"
            | "url"
            | "select"
            | "accounts"
            | "secret";
        }[];
        content_feed: boolean;
        file_import: boolean;
        provider: "google_drive"
        | "rss"
        | "woocommerce";
        requires_oauth: boolean;
    }
    • accepted_formats: string[]

      File formats accepted at the door. Empty when file_import is false — that is what rss returns, and it does not mean "anything goes". heic/heif are accepted and converted to JPEG on ingestion, so what ends up stored is always jpeg.

      [
      "mp4",
      "jpeg",
      "gif",
      "png",
      "jpg",
      "heic",
      "heif"
      ]
    • catalog: boolean

      Has a product catalogue: GET .../integrations/{id_integration}/products, and a source for the from_catalog planner template (source.id_integration_catalog). WooCommerce.

    • config_fields: {
          default?: unknown;
          name: string;
          options?: string[];
          required: boolean;
          type:
              | "boolean"
              | "text"
              | "textarea"
              | "url"
              | "select"
              | "accounts"
              | "secret";
      }[]

      The connection form. Empty when the provider connects through OAuth alone.

    • connect_link: boolean

      Can be connected by sending the user to GET .../integrations/{provider}/connect_link: Google Drive (its OAuth) and WooCommerce (the store's approval button, which creates the key without anyone copying it). A provider with a link can ALSO have config_fields: a WooCommerce store accepts API keys by hand too.

    • connect_link_fields: {
          default?: unknown;
          name: string;
          options?: string[];
          required: boolean;
          type:
              | "boolean"
              | "text"
              | "textarea"
              | "url"
              | "select"
              | "accounts"
              | "secret";
      }[]

      What connect_link needs in its query before it can build the link: the store url on WooCommerce, because the link points at the store's own WordPress. Empty on Google Drive.

    • content_feed: boolean

      Polled by the poll-feeds job, which turns new entries into publications.

    • file_import: boolean

      Contributes files to the library through POST /uploads/import.

    • provider: "google_drive" | "rss" | "woocommerce"
    • requires_oauth: boolean

      true = there is an OAuth token behind the connection (Google Drive): connect with connect_link + code, one per organization and provider. false = no token to renew. Having a link is not being OAuth: read connect_link for that.

  • IntegrationsIntegrationProviderName: "google_drive" | "rss" | "woocommerce"
  • IntegrationsRssConfig: {
        auto_publish?: boolean;
        id_accounts?: string[];
        import_image?: boolean;
        last_checked?: string;
        publication_type?: string;
        seen_guids?: string[];
        template?: string;
        url?: string;
    }

    Provider-specific configuration. Empty for google_drive.

    • Optionalauto_publish?: boolean
    • Optionalid_accounts?: string[]
    • Optionalimport_image?: boolean
    • Optionallast_checked?: string

      Format: date-time

    • Optionalpublication_type?: string
    • Optionalseen_guids?: string[]

      Entries already processed (last 200, FIFO). Owned by the job: filled at connection time with everything the feed already had, so the back catalogue is never published.

    • Optionaltemplate?: string
    • Optionalurl?: string
  • IntegrationsRssConnectRequest: {
        auto_publish?: boolean;
        id_accounts: string[];
        import_image?: boolean;
        provider: "rss";
        publication_type?: string;
        template?: string;
        url: string;
    }
    • Optionalauto_publish?: boolean

      false (the default) creates each entry as a draft for review. true schedules it a few minutes out, so there is a window to catch it before it goes out on the client's networks. Optional; defaults to false.

    • id_accounts: string[]

      Accounts of this organization the entries will be published to. At least one, otherwise 2206.

    • Optionalimport_image?: boolean

      Import the entry's featured image (enclosure, media:content or the first of the content) into the library and attach it. Optional; defaults to true.

    • provider: "rss"
    • Optionalpublication_type?: string

      Optional; defaults to "profile".

    • Optionaltemplate?: string

      Text template. Placeholders: {{title}}, {{link}}, {{summary}}. The result is truncated to the character limit of each network, taken from GET /social_limits. Optional; defaults to "{{title}}\n\n{{link}}".

    • url: string

      Public feed URL (RSS 2.0 or Atom). Private or authenticated feeds are not supported.

      https://blog.cliente.com/feed
      
  • IntegrationsWooCommerceConnectRequest: {
        consumer_key: string;
        consumer_secret: string;
        provider: "woocommerce";
        url: string;
    }
    • consumer_key: string

      Starts with ck_. Created in WooCommerce → Settings → Advanced → REST API with Read permission.

    • consumer_secret: string

      Starts with cs_. Stored encrypted and never returned by any endpoint.

    • provider: "woocommerce"
    • url: string

      The store address. https only: a store that only answers on http is not connected, because the key would travel in the clear. Its redirects (http to https, bare domain to www) are resolved now, without credentials, and the final URL is what gets stored.

      https://tienda.example.com
      
  • Message: {
        _id: string;
        contact_id?:
            | string
            | {
                _id: string;
                creation_date: string;
                creator_keycloak_identifier?: string;
                extra_data?: {
                    address?: string;
                    boolean_property?: boolean;
                    boolean_property2?: boolean;
                    building?: string
                    | number;
                    city?: string;
                    coords?: number[];
                    country?: string;
                    country_code?: string;
                    door?: string | number;
                    floor?: string | number;
                    number?: string | number;
                    number_property?: number;
                    number_property2?: number;
                    place_id?: string;
                    state?: string;
                    string_property?: string;
                    string_property2?: string;
                    zip_code?: string | number;
                };
                id_organization: string;
                last_contact_update: string;
                name?: string;
                profile_image?: string;
                social_identifiers: {
                    _id: string;
                    external_identifier?: string;
                    last_send_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "email";
                }[];
            };
        creation_date: string;
        element_external_id?: string;
        from_contact_id?: | string
        | {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string
                | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        id_account: string;
        in_response_external_id?: string;
        in_response_to?: string;
        message_errors: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        message_options: {
            files: (
                | string
                | {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }
            )[];
            files_urls: { mime_type?: string; url?: string }[];
            metaElements?: { [key: string]: unknown }[];
            metaQuickReplies?: { [key: string]: unknown }[];
            payload?: string;
            template_language?: string;
            template_name?: string;
            template_parameters?: string[];
            whatsappInteractive?: { [key: string]: unknown };
        };
        message_type: | "simple_message"
        | "file_message"
        | "comment_message"
        | "publication_message"
        | "quick_reply_message"
        | "button_message"
        | "elements_message"
        | "postback_message"
        | "template_message"
        | "interactive_message";
        read: boolean;
        text?: string;
    }

    A message exchanged with a contact.

    **Careful with the three reference fields.** `contact_id`, `from_contact_id` and `message_options.files` arrive **populated** — the whole object, not the identifier — in the messages list and in the webhook PlanVortex posts to your app, and as plain identifiers everywhere else. The types say `string | object` because both really happen.
    
    • _id: string
    • Optionalcontact_id?:
          | string
          | {
              _id: string;
              creation_date: string;
              creator_keycloak_identifier?: string;
              extra_data?: {
                  address?: string;
                  boolean_property?: boolean;
                  boolean_property2?: boolean;
                  building?: string
                  | number;
                  city?: string;
                  coords?: number[];
                  country?: string;
                  country_code?: string;
                  door?: string | number;
                  floor?: string | number;
                  number?: string | number;
                  number_property?: number;
                  number_property2?: number;
                  place_id?: string;
                  state?: string;
                  string_property?: string;
                  string_property2?: string;
                  zip_code?: string | number;
              };
              id_organization: string;
              last_contact_update: string;
              name?: string;
              profile_image?: string;
              social_identifiers: {
                  _id: string;
                  external_identifier?: string;
                  last_send_date?: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "email";
              }[];
          }

      Set when we wrote to the contact. Exactly one of contact_id and from_contact_id is present, and which one tells you the direction of the message.

    • creation_date: string

      Format: date-time

    • Optionalelement_external_id?: string

      Identifier of this message on the network.

    • Optionalfrom_contact_id?:
          | string
          | {
              _id: string;
              creation_date: string;
              creator_keycloak_identifier?: string;
              extra_data?: {
                  address?: string;
                  boolean_property?: boolean;
                  boolean_property2?: boolean;
                  building?: string
                  | number;
                  city?: string;
                  coords?: number[];
                  country?: string;
                  country_code?: string;
                  door?: string | number;
                  floor?: string | number;
                  number?: string | number;
                  number_property?: number;
                  number_property2?: number;
                  place_id?: string;
                  state?: string;
                  string_property?: string;
                  string_property2?: string;
                  zip_code?: string | number;
              };
              id_organization: string;
              last_contact_update: string;
              name?: string;
              profile_image?: string;
              social_identifiers: {
                  _id: string;
                  external_identifier?: string;
                  last_send_date?: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "email";
              }[];
          }

      Set when the contact wrote to us.

    • id_account: string
    • Optionalin_response_external_id?: string

      Identifier on the network of the publication, comment or message this one answers.

    • Optionalin_response_to?: string

      Identifier of the PlanVortex message this one answers.

    • message_errors: { code: number; data?: { [key: string]: unknown }; message: string }[]

      Why the network refused this message, if it did. Same shape as an API error. Empty when nothing went wrong.

    • message_options: {
          files: (
              | string
              | {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: string;
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }
          )[];
          files_urls: { mime_type?: string; url?: string }[];
          metaElements?: { [key: string]: unknown }[];
          metaQuickReplies?: { [key: string]: unknown }[];
          payload?: string;
          template_language?: string;
          template_name?: string;
          template_parameters?: string[];
          whatsappInteractive?: { [key: string]: unknown };
      }
      • files: (
            | string
            | {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }
        )[]

        The uploads attached to the message. Populated wherever the message itself is: the messages list and webhook deliveries carry whole uploads, everything else carries their identifiers. Handle both.

      • files_urls: { mime_type?: string; url?: string }[]

        Files already hosted somewhere else. Filled in by PlanVortex when a message arrives from the network.

      • OptionalmetaElements?: { [key: string]: unknown }[]

        Meta cards, for elements_message and button_message.

      • OptionalmetaQuickReplies?: { [key: string]: unknown }[]

        Meta quick replies, for quick_reply_message.

      • Optionalpayload?: string

        Payload of a Meta postback.

      • Optionaltemplate_language?: string

        Required for template_message, as the network's language code.

      • Optionaltemplate_name?: string

        Required for template_message.

      • Optionaltemplate_parameters?: string[]

        For a template_message whose body has variables: their values, in order. The first one fills {{1}}, the second {{2}}, and so on. Without them WhatsApp rejects a template that has variables, so a reminder with the customer's name and time needs this. Each value is a non-empty string with no line breaks, no tabs and no more than four consecutive spaces; anything else answers 1511 with data.field = template_parameters and data.index pointing at the bad value. Only positional body variables are supported: named variables ({{name}}) and variables in the header or in a button URL are not sent yet.

      • OptionalwhatsappInteractive?: { [key: string]: unknown }

        WhatsApp interactive list, for interactive_message. It needs at least one section.

    • message_type:
          | "simple_message"
          | "file_message"
          | "comment_message"
          | "publication_message"
          | "quick_reply_message"
          | "button_message"
          | "elements_message"
          | "postback_message"
          | "template_message"
          | "interactive_message"
    • read: boolean
    • Optionaltext?: string

      Absent on the messages that carry no text of their own, such as a messaging_seen acknowledgement.

  • MessageOptions: {
        files: (
            | string
            | {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }
        )[];
        files_urls: { mime_type?: string; url?: string }[];
        metaElements?: { [key: string]: unknown }[];
        metaQuickReplies?: { [key: string]: unknown }[];
        payload?: string;
        template_language?: string;
        template_name?: string;
        template_parameters?: string[];
        whatsappInteractive?: { [key: string]: unknown };
    }

    Everything a message can carry besides its text. Which block is required depends on message_type.

    • files: (
          | string
          | {
              _id: string;
              ai_generated?: {
                  generated_at: string;
                  id_ai_plan?: string;
                  model: string;
                  provider: string;
              };
              cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
              cover_offset?: number;
              creation_date: string;
              file_externals: {
                  external_identifier: string;
                  external_url: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              }[];
              file_format: "mp4"
              | "jpeg"
              | "gif"
              | "png"
              | "jpg";
              file_properties: {
                  allowed_social_networks: string[];
                  aspect_ratio: { text: string; value: number };
                  duration: number;
                  height: number;
                  size_in_bytes: number;
                  width: number;
              };
              file_type: "video"
              | "image";
              id_organization: string;
              is_temporal: boolean;
              name: string;
              public_path: string;
          }
      )[]

      The uploads attached to the message. Populated wherever the message itself is: the messages list and webhook deliveries carry whole uploads, everything else carries their identifiers. Handle both.

    • files_urls: { mime_type?: string; url?: string }[]

      Files already hosted somewhere else. Filled in by PlanVortex when a message arrives from the network.

    • OptionalmetaElements?: { [key: string]: unknown }[]

      Meta cards, for elements_message and button_message.

    • OptionalmetaQuickReplies?: { [key: string]: unknown }[]

      Meta quick replies, for quick_reply_message.

    • Optionalpayload?: string

      Payload of a Meta postback.

    • Optionaltemplate_language?: string

      Required for template_message, as the network's language code.

    • Optionaltemplate_name?: string

      Required for template_message.

    • Optionaltemplate_parameters?: string[]

      For a template_message whose body has variables: their values, in order. The first one fills {{1}}, the second {{2}}, and so on. Without them WhatsApp rejects a template that has variables, so a reminder with the customer's name and time needs this. Each value is a non-empty string with no line breaks, no tabs and no more than four consecutive spaces; anything else answers 1511 with data.field = template_parameters and data.index pointing at the bad value. Only positional body variables are supported: named variables ({{name}}) and variables in the header or in a button URL are not sent yet.

    • OptionalwhatsappInteractive?: { [key: string]: unknown }

      WhatsApp interactive list, for interactive_message. It needs at least one section.

  • MessagesConversation: {
        contact: {
            _id: string;
            creation_date: string;
            creator_keycloak_identifier?: string;
            extra_data?: {
                address?: string;
                boolean_property?: boolean;
                boolean_property2?: boolean;
                building?: string | number;
                city?: string;
                coords?: number[];
                country?: string;
                country_code?: string;
                door?: string | number;
                floor?: string | number;
                number?: string | number;
                number_property?: number;
                number_property2?: number;
                place_id?: string;
                state?: string;
                string_property?: string;
                string_property2?: string;
                zip_code?: string | number;
            };
            id_organization: string;
            last_contact_update: string;
            name?: string;
            profile_image?: string;
            social_identifiers: {
                _id: string;
                external_identifier?: string;
                last_send_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
            }[];
        };
        date: string;
        unread_messages: number;
    }

    One contact's thread, as it looks in an inbox list.

    • contact: {
          _id: string;
          creation_date: string;
          creator_keycloak_identifier?: string;
          extra_data?: {
              address?: string;
              boolean_property?: boolean;
              boolean_property2?: boolean;
              building?: string | number;
              city?: string;
              coords?: number[];
              country?: string;
              country_code?: string;
              door?: string | number;
              floor?: string | number;
              number?: string | number;
              number_property?: number;
              number_property2?: number;
              place_id?: string;
              state?: string;
              string_property?: string;
              string_property2?: string;
              zip_code?: string | number;
          };
          id_organization: string;
          last_contact_update: string;
          name?: string;
          profile_image?: string;
          social_identifiers: {
              _id: string;
              external_identifier?: string;
              last_send_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "email";
          }[];
      }
      • _id: string
      • creation_date: string

        Format: date-time

      • Optionalcreator_keycloak_identifier?: string

        The user who created the contact, when it was created from the panel instead of arriving from a network.

      • Optionalextra_data?: {
            address?: string;
            boolean_property?: boolean;
            boolean_property2?: boolean;
            building?: string | number;
            city?: string;
            coords?: number[];
            country?: string;
            country_code?: string;
            door?: string | number;
            floor?: string | number;
            number?: string | number;
            number_property?: number;
            number_property2?: number;
            place_id?: string;
            state?: string;
            string_property?: string;
            string_property2?: string;
            zip_code?: string | number;
        }
        • Optionaladdress?: string
        • Optionalboolean_property?: boolean
        • Optionalboolean_property2?: boolean
        • Optionalbuilding?: string | number
        • Optionalcity?: string
        • Optionalcoords?: number[]

          Longitude and latitude, in that order.

        • Optionalcountry?: string
        • Optionalcountry_code?: string
        • Optionaldoor?: string | number
        • Optionalfloor?: string | number
        • Optionalnumber?: string | number
        • Optionalnumber_property?: number
        • Optionalnumber_property2?: number
        • Optionalplace_id?: string
        • Optionalstate?: string
        • Optionalstring_property?: string
        • Optionalstring_property2?: string
        • Optionalzip_code?: string | number
      • id_organization: string
      • last_contact_update: string

        Format: date-time

        Last time the contact's profile was refreshed from the network.

      • Optionalname?: string
      • Optionalprofile_image?: string

        URL of the contact's avatar on the network. It belongs to the network and it can stop working.

      • social_identifiers: {
            _id: string;
            external_identifier?: string;
            last_send_date?: string;
            social_network:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "email";
        }[]
    • date: string

      Format: date-time

      When the last message of the thread was written, which is what the list is sorted by.

    • unread_messages: number

      Unread messages from the contact. Ours never count.

  • MessagesConversationTotals:
        | { total: number }
        | {
            group: "day" | "month" | "year";
            stats: { groupValue: number; totalConversations: number }[];
        }

    Two different answers, not one with optional fields: without group_by you get {total}, with it you get {stats, group}. Never both.

  • MessagesMessageInput: {
        in_response_external_id?: string;
        message_options?: {
            files: (
                | string
                | {
                    _id: string;
                    ai_generated?: {
                        generated_at: string;
                        id_ai_plan?: string;
                        model: string;
                        provider: string;
                    };
                    cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                    cover_offset?: number;
                    creation_date: string;
                    file_externals: {
                        external_identifier: string;
                        external_url: string;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord"
                        | "telegram"
                        | "threads"
                        | "slack"
                        | "pinterest";
                    }[];
                    file_format: "mp4"
                    | "jpeg"
                    | "gif"
                    | "png"
                    | "jpg";
                    file_properties: {
                        allowed_social_networks: string[];
                        aspect_ratio: { text: string; value: number };
                        duration: number;
                        height: number;
                        size_in_bytes: number;
                        width: number;
                    };
                    file_type: "video"
                    | "image";
                    id_organization: string;
                    is_temporal: boolean;
                    name: string;
                    public_path: string;
                }
            )[];
            files_urls: { mime_type?: string; url?: string }[];
            metaElements?: { [key: string]: unknown }[];
            metaQuickReplies?: { [key: string]: unknown }[];
            payload?: string;
            template_language?: string;
            template_name?: string;
            template_parameters?: string[];
            whatsappInteractive?: { [key: string]: unknown };
        };
        message_type: | "simple_message"
        | "file_message"
        | "comment_message"
        | "publication_message"
        | "quick_reply_message"
        | "button_message"
        | "elements_message"
        | "postback_message"
        | "template_message"
        | "interactive_message";
        text?: string;
    }

    What you send to write a message.

    `comment_message` and `publication_message` need `in_response_external_id`, the identifier of the comment or the publication being answered ON THE NETWORK. The endpoint did not read it from the body until 2026-08-24, which left both types unreachable from the public API; it does now.
    
    • Optionalin_response_external_id?: string

      Required by comment_message and publication_message, and ignored by every other type (error 1510 when it is missing). It is the identifier the NETWORK gives: a comment's external_id or a publication's external_identifier, never a PlanVortex _id.

      Only Facebook and Instagram do anything with it: `comment_message` sends a private reply to a public comment (Meta's `recipient.comment_id`) and `publication_message` attaches the post as a `MEDIA_SHARE`.
      
    • Optionalmessage_options?: {
          files: (
              | string
              | {
                  _id: string;
                  ai_generated?: {
                      generated_at: string;
                      id_ai_plan?: string;
                      model: string;
                      provider: string;
                  };
                  cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                  cover_offset?: number;
                  creation_date: string;
                  file_externals: {
                      external_identifier: string;
                      external_url: string;
                      social_network: | "facebook"
                      | "instagram"
                      | "linkedin"
                      | "tiktok"
                      | "twitter"
                      | "whatsapp"
                      | "youtube"
                      | "google_business"
                      | "bluesky"
                      | "discord"
                      | "telegram"
                      | "threads"
                      | "slack"
                      | "pinterest";
                  }[];
                  file_format: "mp4"
                  | "jpeg"
                  | "gif"
                  | "png"
                  | "jpg";
                  file_properties: {
                      allowed_social_networks: string[];
                      aspect_ratio: { text: string; value: number };
                      duration: number;
                      height: number;
                      size_in_bytes: number;
                      width: number;
                  };
                  file_type: "video"
                  | "image";
                  id_organization: string;
                  is_temporal: boolean;
                  name: string;
                  public_path: string;
              }
          )[];
          files_urls: { mime_type?: string; url?: string }[];
          metaElements?: { [key: string]: unknown }[];
          metaQuickReplies?: { [key: string]: unknown }[];
          payload?: string;
          template_language?: string;
          template_name?: string;
          template_parameters?: string[];
          whatsappInteractive?: { [key: string]: unknown };
      }
      • files: (
            | string
            | {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }
        )[]

        The uploads attached to the message. Populated wherever the message itself is: the messages list and webhook deliveries carry whole uploads, everything else carries their identifiers. Handle both.

      • files_urls: { mime_type?: string; url?: string }[]

        Files already hosted somewhere else. Filled in by PlanVortex when a message arrives from the network.

      • OptionalmetaElements?: { [key: string]: unknown }[]

        Meta cards, for elements_message and button_message.

      • OptionalmetaQuickReplies?: { [key: string]: unknown }[]

        Meta quick replies, for quick_reply_message.

      • Optionalpayload?: string

        Payload of a Meta postback.

      • Optionaltemplate_language?: string

        Required for template_message, as the network's language code.

      • Optionaltemplate_name?: string

        Required for template_message.

      • Optionaltemplate_parameters?: string[]

        For a template_message whose body has variables: their values, in order. The first one fills {{1}}, the second {{2}}, and so on. Without them WhatsApp rejects a template that has variables, so a reminder with the customer's name and time needs this. Each value is a non-empty string with no line breaks, no tabs and no more than four consecutive spaces; anything else answers 1511 with data.field = template_parameters and data.index pointing at the bad value. Only positional body variables are supported: named variables ({{name}}) and variables in the header or in a button URL are not sent yet.

      • OptionalwhatsappInteractive?: { [key: string]: unknown }

        WhatsApp interactive list, for interactive_message. It needs at least one section.

    • message_type:
          | "simple_message"
          | "file_message"
          | "comment_message"
          | "publication_message"
          | "quick_reply_message"
          | "button_message"
          | "elements_message"
          | "postback_message"
          | "template_message"
          | "interactive_message"
    • Optionaltext?: string

      Required for the text-based types. Validated against characters in GET /social_limits.

  • MessageType:
        | "simple_message"
        | "file_message"
        | "comment_message"
        | "publication_message"
        | "quick_reply_message"
        | "button_message"
        | "elements_message"
        | "postback_message"
        | "template_message"
        | "interactive_message"

    What kind of message this is. simple_message and file_message work everywhere; the rest are network-specific shapes.

  • NormalizedMetrics: {
        clicks?: number;
        comments?: number;
        engagement?: number;
        followers?: number;
        followers_gained?: number;
        impressions?: number;
        likes?: number;
        profile_views?: number;
        reach?: number;
        saves?: number;
        shares?: number;
        video_views?: number;
    }

    Metrics translated to a common vocabulary shared by every network, which is what makes two networks comparable and summable (each network names them differently: page_post_engagements, total_interactions, views…).

    **A missing key means the network does not publish that metric** — it is never an implicit zero. A key present with value `0` means it was measured and came out zero. Never default a missing key to 0 when displaying it.
    
    `engagement` is the network's own total when it provides one, and otherwise the sum of likes, comments, shares, saves and clicks. Video views are deliberately excluded from it: a view is not an interaction.
    
    • Optionalclicks?: number
    • Optionalcomments?: number
    • Optionalengagement?: number

      Total interactions

    • Optionalfollowers?: number

      Followers accumulated at that date, not the day's gain.

    • Optionalfollowers_gained?: number

      Followers gained that day.

    • Optionalimpressions?: number

      Times the content was shown (not unique)

    • Optionallikes?: number
    • Optionalprofile_views?: number
    • Optionalreach?: number

      Unique users reached

    • Optionalsaves?: number
    • Optionalshares?: number
    • Optionalvideo_views?: number
  • Organization: {
        _id: string;
        actual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        actual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        ai_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        };
        creation_date: string;
        id_client: string;
        name: string;
        parent_organization?: string;
        social_credentials?: {
            discord?: {
                application_name?: string;
                client_id?: string;
                has_bot_token?: boolean;
                has_client_secret?: boolean;
                verified_date?: string;
            };
        };
        stats_settings?: { auto_refresh_twitter: boolean };
    }

    The container of accounts, publications and files. Organizations can nest.

    • _id: string
      66d04a6a427f4c43b9d97f54
      
    • Optionalactual_asigned?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      What is already handed out to the organizations sharing this plan, which is what is left to assign. Only present with getUse=true.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      The slice of the client's plan assigned to this organization. Absent when nothing was assigned, and then the organization shares whatever its nearest parent with a plan has — or, failing that, the client's unassigned remainder. Ask GET /organizations/{id_organization}/limits for the effective numbers instead of reading this.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • Optionalactual_use?: { publications?: number; users?: number } & {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      Current consumption. Only present with getUse=true. twitter_credits and ai_credits are what has been spent in the current calendar month; the rest is what exists right now.

    • Optionalai_context?: {
          audience?: string;
          avoid?: string;
          blog_url?: string;
          brand_name?: string;
          default_tone?: string;
          description?: string;
          keywords?: string[];
          notes?: string;
          products?: string;
          sector?: string;
          shop_url?: string;
          social_urls?: string[];
          value_proposition?: string;
          website?: string;
      }
      • Optionalaudience?: string

        Who the content is aimed at.

      • Optionalavoid?: string

        Topics, expressions or competitors that must never appear.

      • Optionalblog_url?: string
      • Optionalbrand_name?: string

        Commercial name, when it differs from the organization's.

      • Optionaldefault_tone?: string

        Default tone. A tone set on the plan itself wins over this one.

      • Optionaldescription?: string

        What the organization does.

      • Optionalkeywords?: string[]

        Recurring keywords and hashtags.

      • Optionalnotes?: string

        Anything else the model should know.

      • Optionalproducts?: string

        Products or services that may be promoted.

      • Optionalsector?: string
      • Optionalshop_url?: string
      • Optionalsocial_urls?: string[]

        Social profiles or other reference links.

      • Optionalvalue_proposition?: string
      • Optionalwebsite?: string
    • creation_date: string

      Format: date-time

    • id_client: string

      The client this organization belongs to.

    • name: string
    • Optionalparent_organization?: string

      The organization this one hangs from. Absent on a root organization.

    • Optionalsocial_credentials?: {
          discord?: {
              application_name?: string;
              client_id?: string;
              has_bot_token?: boolean;
              has_client_secret?: boolean;
              verified_date?: string;
          };
      }

      The organization's own application credentials, by network. A network that is absent is not configured, and then it does not even appear as connectable.

      • Optionaldiscord?: {
            application_name?: string;
            client_id?: string;
            has_bot_token?: boolean;
            has_client_secret?: boolean;
            verified_date?: string;
        }
        • Optionalapplication_name?: string

          The application's name, as Discord returned it when the credentials were validated.

        • Optionalclient_id?: string
        • Optionalhas_bot_token?: boolean

          Whether a bot token is stored. Never the token.

        • Optionalhas_client_secret?: boolean

          Whether a secret is stored. Never the secret.

        • Optionalverified_date?: string

          Format: date-time

          When the credentials were last validated against Discord.

    • Optionalstats_settings?: { auto_refresh_twitter: boolean }
      • auto_refresh_twitter: boolean

        Whether the background job refreshes X (Twitter) statistics automatically. Every other network is free and always refreshed; X charges 1 credit per read, so this is the one setting that makes the robot spend the client's credits. Anything other than an explicit false is treated as true.

        true
        
  • OrganizationsLimit: {
        accounts: number;
        ai_credits?: number;
        apps?: number;
        integrations: number;
        space: number;
        twitter_credits?: number;
    }

    What this organization may actually use. An organization with no plan of its own inherits the nearest parent's, and failing that the share of the client's plan that is not assigned to anyone.

    • accounts: number

      Social accounts that may be connected.

    • Optionalai_credits?: number

      Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

    • Optionalapps?: number

      Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

    • integrations: number

      Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

    • space: number

      Storage, in GB.

    • Optionaltwitter_credits?: number

      Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

  • OrganizationsOrganizationCreate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        name: string;
    }

    Body accepted when creating an organization. Only these properties are read.

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      Resources assigned to this organization, taken from what the client has contracted.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • name: string

      Organization name.

  • OrganizationsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        }[];
        total: number;
    }
  • OrganizationsOrganizationOne: {
        organization: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            actual_use?: { publications?: number; users?: number } & {
                accounts: number;
                ai_credits?: number;
                apps?: number;
                integrations: number;
                space: number;
                twitter_credits?: number;
            };
            ai_context?: {
                audience?: string;
                avoid?: string;
                blog_url?: string;
                brand_name?: string;
                default_tone?: string;
                description?: string;
                keywords?: string[];
                notes?: string;
                products?: string;
                sector?: string;
                shop_url?: string;
                social_urls?: string[];
                value_proposition?: string;
                website?: string;
            };
            creation_date: string;
            id_client: string;
            name: string;
            parent_organization?: string;
            social_credentials?: {
                discord?: {
                    application_name?: string;
                    client_id?: string;
                    has_bot_token?: boolean;
                    has_client_secret?: boolean;
                    verified_date?: string;
                };
            };
            stats_settings?: { auto_refresh_twitter: boolean };
        };
    }
    • organization: {
          _id: string;
          actual_asigned?: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          actual_plan?: {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          actual_use?: { publications?: number; users?: number } & {
              accounts: number;
              ai_credits?: number;
              apps?: number;
              integrations: number;
              space: number;
              twitter_credits?: number;
          };
          ai_context?: {
              audience?: string;
              avoid?: string;
              blog_url?: string;
              brand_name?: string;
              default_tone?: string;
              description?: string;
              keywords?: string[];
              notes?: string;
              products?: string;
              sector?: string;
              shop_url?: string;
              social_urls?: string[];
              value_proposition?: string;
              website?: string;
          };
          creation_date: string;
          id_client: string;
          name: string;
          parent_organization?: string;
          social_credentials?: {
              discord?: {
                  application_name?: string;
                  client_id?: string;
                  has_bot_token?: boolean;
                  has_client_secret?: boolean;
                  verified_date?: string;
              };
          };
          stats_settings?: { auto_refresh_twitter: boolean };
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • Optionalactual_asigned?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        What is already handed out to the organizations sharing this plan, which is what is left to assign. Only present with getUse=true.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • Optionalactual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        The slice of the client's plan assigned to this organization. Absent when nothing was assigned, and then the organization shares whatever its nearest parent with a plan has — or, failing that, the client's unassigned remainder. Ask GET /organizations/{id_organization}/limits for the effective numbers instead of reading this.

        • accounts: number

          Social accounts that may be connected.

        • Optionalai_credits?: number

          Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

        • Optionalapps?: number

          Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

        • integrations: number

          Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

        • space: number

          Storage, in GB.

        • Optionaltwitter_credits?: number

          Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

      • Optionalactual_use?: { publications?: number; users?: number } & {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        }

        Current consumption. Only present with getUse=true. twitter_credits and ai_credits are what has been spent in the current calendar month; the rest is what exists right now.

      • Optionalai_context?: {
            audience?: string;
            avoid?: string;
            blog_url?: string;
            brand_name?: string;
            default_tone?: string;
            description?: string;
            keywords?: string[];
            notes?: string;
            products?: string;
            sector?: string;
            shop_url?: string;
            social_urls?: string[];
            value_proposition?: string;
            website?: string;
        }
        • Optionalaudience?: string

          Who the content is aimed at.

        • Optionalavoid?: string

          Topics, expressions or competitors that must never appear.

        • Optionalblog_url?: string
        • Optionalbrand_name?: string

          Commercial name, when it differs from the organization's.

        • Optionaldefault_tone?: string

          Default tone. A tone set on the plan itself wins over this one.

        • Optionaldescription?: string

          What the organization does.

        • Optionalkeywords?: string[]

          Recurring keywords and hashtags.

        • Optionalnotes?: string

          Anything else the model should know.

        • Optionalproducts?: string

          Products or services that may be promoted.

        • Optionalsector?: string
        • Optionalshop_url?: string
        • Optionalsocial_urls?: string[]

          Social profiles or other reference links.

        • Optionalvalue_proposition?: string
        • Optionalwebsite?: string
      • creation_date: string

        Format: date-time

      • id_client: string

        The client this organization belongs to.

      • name: string
      • Optionalparent_organization?: string

        The organization this one hangs from. Absent on a root organization.

      • Optionalsocial_credentials?: {
            discord?: {
                application_name?: string;
                client_id?: string;
                has_bot_token?: boolean;
                has_client_secret?: boolean;
                verified_date?: string;
            };
        }

        The organization's own application credentials, by network. A network that is absent is not configured, and then it does not even appear as connectable.

        • Optionaldiscord?: {
              application_name?: string;
              client_id?: string;
              has_bot_token?: boolean;
              has_client_secret?: boolean;
              verified_date?: string;
          }
          • Optionalapplication_name?: string

            The application's name, as Discord returned it when the credentials were validated.

          • Optionalclient_id?: string
          • Optionalhas_bot_token?: boolean

            Whether a bot token is stored. Never the token.

          • Optionalhas_client_secret?: boolean

            Whether a secret is stored. Never the secret.

          • Optionalverified_date?: string

            Format: date-time

            When the credentials were last validated against Discord.

      • Optionalstats_settings?: { auto_refresh_twitter: boolean }
        • auto_refresh_twitter: boolean

          Whether the background job refreshes X (Twitter) statistics automatically. Every other network is free and always refreshed; X charges 1 credit per read, so this is the one setting that makes the robot spend the client's credits. Anything other than an explicit false is treated as true.

          true
          
  • OrganizationsOrganizationUpdate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            apps?: number;
            integrations: number;
            space: number;
            twitter_credits?: number;
        };
        stats_settings?: { auto_refresh_twitter: boolean };
    }

    Body accepted when updating an organization. NOTE: name and parent_organization are NOT updatable through this endpoint - the server keeps their current value and silently ignores them.

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          apps?: number;
          integrations: number;
          space: number;
          twitter_credits?: number;
      }

      New resource assignment. Validated against what is left of the client's contracted plan; lowering it below what the organization already uses is rejected.

      • accounts: number

        Social accounts that may be connected.

      • Optionalai_credits?: number

        Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

      • Optionalapps?: number

        Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

      • integrations: number

        Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

      • space: number

        Storage, in GB.

      • Optionaltwitter_credits?: number

        Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

    • Optionalstats_settings?: { auto_refresh_twitter: boolean }

      Statistics collection settings.

      • auto_refresh_twitter: boolean

        Whether the background job refreshes X (Twitter) statistics automatically. Every other network is free and always refreshed; X charges 1 credit per read, so this is the one setting that makes the robot spend the client's credits. Anything other than an explicit false is treated as true.

        true
        
  • OrganizationsRolesOrganizationRole: {
        _id?: string;
        creation_date?: string;
        default?: boolean;
        id_organization?: string;
        name?: string;
        permissions?: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[];
        total_users?: number;
    }

    An organization role as the API returns it. Note it exposes total_users and never the list of user identifiers.

    • Optional_id?: string

      Role identifier.

    • Optionalcreation_date?: string

      Format: date-time

      When the role was created.

    • Optionaldefault?: boolean

      Whether this is a default role. Default roles cannot be updated or deleted, and their last user cannot be removed.

    • Optionalid_organization?: string

      Organization the role belongs to.

    • Optionalname?: string

      Role name.

    • Optionalpermissions?: (
          | "organization:create"
          | "organization:update"
          | "organization:read"
          | "organization:delete"
          | "organization_roles:create"
          | "organization_roles:update"
          | "organization_roles:read"
          | "organization_roles:delete"
          | "organization_users_roles:read"
          | "organization_users_roles:create"
          | "organization_users_roles:delete"
          | "accounts:create"
          | "accounts:update"
          | "accounts:read"
          | "accounts:delete"
          | "products:create"
          | "products:update"
          | "products:read"
          | "products:delete"
          | "files:create"
          | "files:update"
          | "files:read"
          | "files:delete"
          | "publications:create"
          | "publications:update"
          | "publications:read"
          | "publications:delete"
          | "account_stats:read"
          | "publication_stats:read"
          | "messages:create"
          | "messages:read"
          | "messages:delete"
          | "contacts:create"
          | "contacts:read"
          | "contacts:update"
          | "contacts:delete"
          | "ai_plans:create"
          | "ai_plans:read"
          | "ai_plans:update"
          | "ai_plans:delete"
      )[]

      Organization permissions granted by this role.

    • Optionaltotal_users?: number

      Number of users in the role.

  • OrganizationsRolesOrganizationRoleInput: {
        name: string;
        permissions: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[];
    }

    Name and permission list of an organization role. Both properties overwrite the stored value.

    • name: string

      Role name. Must be unique inside the organization.

    • permissions: (
          | "organization:create"
          | "organization:update"
          | "organization:read"
          | "organization:delete"
          | "organization_roles:create"
          | "organization_roles:update"
          | "organization_roles:read"
          | "organization_roles:delete"
          | "organization_users_roles:read"
          | "organization_users_roles:create"
          | "organization_users_roles:delete"
          | "accounts:create"
          | "accounts:update"
          | "accounts:read"
          | "accounts:delete"
          | "products:create"
          | "products:update"
          | "products:read"
          | "products:delete"
          | "files:create"
          | "files:update"
          | "files:read"
          | "files:delete"
          | "publications:create"
          | "publications:update"
          | "publications:read"
          | "publications:delete"
          | "account_stats:read"
          | "publication_stats:read"
          | "messages:create"
          | "messages:read"
          | "messages:delete"
          | "contacts:create"
          | "contacts:read"
          | "contacts:update"
          | "contacts:delete"
          | "ai_plans:create"
          | "ai_plans:read"
          | "ai_plans:update"
          | "ai_plans:delete"
      )[]

      Complete list of organization permissions granted by this role.

  • OrganizationsRolesOrganizationRoleList: {
        roles?: {
            _id?: string;
            creation_date?: string;
            default?: boolean;
            id_organization?: string;
            name?: string;
            permissions?: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
            total_users?: number;
        }[];
        total?: number;
    }
    • Optionalroles?: {
          _id?: string;
          creation_date?: string;
          default?: boolean;
          id_organization?: string;
          name?: string;
          permissions?: (
              | "organization:create"
              | "organization:update"
              | "organization:read"
              | "organization:delete"
              | "organization_roles:create"
              | "organization_roles:update"
              | "organization_roles:read"
              | "organization_roles:delete"
              | "organization_users_roles:read"
              | "organization_users_roles:create"
              | "organization_users_roles:delete"
              | "accounts:create"
              | "accounts:update"
              | "accounts:read"
              | "accounts:delete"
              | "products:create"
              | "products:update"
              | "products:read"
              | "products:delete"
              | "files:create"
              | "files:update"
              | "files:read"
              | "files:delete"
              | "publications:create"
              | "publications:update"
              | "publications:read"
              | "publications:delete"
              | "account_stats:read"
              | "publication_stats:read"
              | "messages:create"
              | "messages:read"
              | "messages:delete"
              | "contacts:create"
              | "contacts:read"
              | "contacts:update"
              | "contacts:delete"
              | "ai_plans:create"
              | "ai_plans:read"
              | "ai_plans:update"
              | "ai_plans:delete"
          )[];
          total_users?: number;
      }[]
    • Optionaltotal?: number

      Total number of roles in the organization, ignoring pagination.

  • OrganizationsRolesOrganizationRoleOne: {
        rol?: {
            _id?: string;
            creation_date?: string;
            default?: boolean;
            id_organization?: string;
            name?: string;
            permissions?: (
                | "organization:create"
                | "organization:update"
                | "organization:read"
                | "organization:delete"
                | "organization_roles:create"
                | "organization_roles:update"
                | "organization_roles:read"
                | "organization_roles:delete"
                | "organization_users_roles:read"
                | "organization_users_roles:create"
                | "organization_users_roles:delete"
                | "accounts:create"
                | "accounts:update"
                | "accounts:read"
                | "accounts:delete"
                | "products:create"
                | "products:update"
                | "products:read"
                | "products:delete"
                | "files:create"
                | "files:update"
                | "files:read"
                | "files:delete"
                | "publications:create"
                | "publications:update"
                | "publications:read"
                | "publications:delete"
                | "account_stats:read"
                | "publication_stats:read"
                | "messages:create"
                | "messages:read"
                | "messages:delete"
                | "contacts:create"
                | "contacts:read"
                | "contacts:update"
                | "contacts:delete"
                | "ai_plans:create"
                | "ai_plans:read"
                | "ai_plans:update"
                | "ai_plans:delete"
            )[];
            total_users?: number;
        };
    }
    • Optionalrol?: {
          _id?: string;
          creation_date?: string;
          default?: boolean;
          id_organization?: string;
          name?: string;
          permissions?: (
              | "organization:create"
              | "organization:update"
              | "organization:read"
              | "organization:delete"
              | "organization_roles:create"
              | "organization_roles:update"
              | "organization_roles:read"
              | "organization_roles:delete"
              | "organization_users_roles:read"
              | "organization_users_roles:create"
              | "organization_users_roles:delete"
              | "accounts:create"
              | "accounts:update"
              | "accounts:read"
              | "accounts:delete"
              | "products:create"
              | "products:update"
              | "products:read"
              | "products:delete"
              | "files:create"
              | "files:update"
              | "files:read"
              | "files:delete"
              | "publications:create"
              | "publications:update"
              | "publications:read"
              | "publications:delete"
              | "account_stats:read"
              | "publication_stats:read"
              | "messages:create"
              | "messages:read"
              | "messages:delete"
              | "contacts:create"
              | "contacts:read"
              | "contacts:update"
              | "contacts:delete"
              | "ai_plans:create"
              | "ai_plans:read"
              | "ai_plans:update"
              | "ai_plans:delete"
          )[];
          total_users?: number;
      }
      • Optional_id?: string

        Role identifier.

      • Optionalcreation_date?: string

        Format: date-time

        When the role was created.

      • Optionaldefault?: boolean

        Whether this is a default role. Default roles cannot be updated or deleted, and their last user cannot be removed.

      • Optionalid_organization?: string

        Organization the role belongs to.

      • Optionalname?: string

        Role name.

      • Optionalpermissions?: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[]

        Organization permissions granted by this role.

      • Optionaltotal_users?: number

        Number of users in the role.

  • OrganizationsRolesPermissionList: {
        permissions?: (
            | "organization:create"
            | "organization:update"
            | "organization:read"
            | "organization:delete"
            | "organization_roles:create"
            | "organization_roles:update"
            | "organization_roles:read"
            | "organization_roles:delete"
            | "organization_users_roles:read"
            | "organization_users_roles:create"
            | "organization_users_roles:delete"
            | "accounts:create"
            | "accounts:update"
            | "accounts:read"
            | "accounts:delete"
            | "products:create"
            | "products:update"
            | "products:read"
            | "products:delete"
            | "files:create"
            | "files:update"
            | "files:read"
            | "files:delete"
            | "publications:create"
            | "publications:update"
            | "publications:read"
            | "publications:delete"
            | "account_stats:read"
            | "publication_stats:read"
            | "messages:create"
            | "messages:read"
            | "messages:delete"
            | "contacts:create"
            | "contacts:read"
            | "contacts:update"
            | "contacts:delete"
            | "ai_plans:create"
            | "ai_plans:read"
            | "ai_plans:update"
            | "ai_plans:delete"
        )[];
    }
  • OrganizationsRolesUserInOrganization: {
        email?: string;
        enabled?: boolean;
        firstname?: string;
        id?: string;
        lastname?: string;
        roles?: { _id?: string; name?: string }[];
        username?: string;
    }
    • Optionalemail?: string

      Format: email

    • Optionalenabled?: boolean

      false while an invitation is still pending acceptance.

    • Optionalfirstname?: string
    • Optionalid?: string

      User identifier.

    • Optionallastname?: string
    • Optionalroles?: { _id?: string; name?: string }[]

      Roles this user holds in the organization.

    • Optionalusername?: string
  • OrganizationsRolesUserInOrganizationList: {
        total?: number;
        users?: {
            email?: string;
            enabled?: boolean;
            firstname?: string;
            id?: string;
            lastname?: string;
            roles?: { _id?: string; name?: string }[];
            username?: string;
        }[];
    }
    • Optionaltotal?: number

      Total number of users, ignoring pagination. May be higher than the length of users if some user no longer exists in the identity provider.

    • Optionalusers?: {
          email?: string;
          enabled?: boolean;
          firstname?: string;
          id?: string;
          lastname?: string;
          roles?: { _id?: string; name?: string }[];
          username?: string;
      }[]
  • OrganizationsSocialCredentialsInput: { bot_token?: string; client_id?: string; client_secret?: string }

    Credentials of the organization's own Discord application. Write-only: nothing sent here ever comes back.

    All three are required the first time. Afterwards, what you leave out is kept — so the `client_id` can be fixed without resending the secrets.
    
    • Optionalbot_token?: string

      The bot's token. Stored encrypted, and validated against Discord before anything is saved.

    • Optionalclient_id?: string

      The Discord application's id (its Application ID, which is also its client id).

    • Optionalclient_secret?: string

      The application's OAuth2 secret. Stored encrypted.

  • OrganizationsUser: {
        email?: string;
        firstname?: string;
        id?: string;
        lastname?: string;
        username?: string;
    }
  • OrganizationsUserList: {
        total?: number;
        users?: {
            email?: string;
            firstname?: string;
            id?: string;
            lastname?: string;
            username?: string;
        }[];
    }
  • PlanData: {
        accounts: number;
        ai_credits?: number;
        apps?: number;
        integrations: number;
        space: number;
        twitter_credits?: number;
    }

    The resources a plan grants. On a client it is what was contracted; on an organization, the slice of it that was assigned. The sum across all the organizations of a client can never exceed what the client has contracted.

    Users are NOT here: every plan has unlimited users, so they are neither charged nor split between organizations. They are still counted, in `PlanUseData.users`. There are no `artificial_inteligence`, `whatsapp` or `stats` flags either: statistics and WhatsApp are on every plan, and what gates AI is `ai_credits` — a plan with credits has AI, and Free has zero.
    
    • accounts: number

      Social accounts that may be connected.

    • Optionalai_credits?: number

      Monthly AI credits (1 credit = $0.001 of provider cost): 15 per plan orchestration pass, 2 per generated text, 70 per generated image. Resets monthly and does not roll over. A client using its own provider key (BYOK) does not consume them in that scope.

    • Optionalapps?: number

      Apps this plan allows: 1 on Free, 2 on Basic, 5 on Pro, 10 on Custom. Each one is a client_id with a secret, so each one is a key to the whole public API — which every plan has, Free included. Unlike accounts or storage this is NOT split between organizations: an app belongs to the client. On a use payload it is how many exist right now.

    • integrations: number

      Connections to a third-party tool material is pulled from (Google Drive, an RSS feed). Not the same thing as an app: an app is API access, and it has its own allowance in apps.

    • space: number

      Storage, in GB.

    • Optionaltwitter_credits?: number

      Monthly X (Twitter) credits. X bills per use: 15 per post, 200 if the text contains a link, 15 per deletion, 1 per stat read, 1 per timeline item. The pool resets on the 1st of each calendar month and does not roll over.

  • PlanUseData: { publications?: number; users?: number } & {
        accounts: number;
        ai_credits?: number;
        apps?: number;
        integrations: number;
        space: number;
        twitter_credits?: number;
    }

    What is being consumed right now. Same shape as PlanData plus publications and users, which are counted but neither charged nor split between organizations.

  • ProductsProduct: {
        additional_image_urls?: string[];
        availability?:
            | "pending"
            | "in stock"
            | "out of stock"
            | "preorder"
            | "available for order"
            | "discontinued"
            | "mark_as_sold";
        brand?: string;
        category?: string;
        color?: string;
        condition?: | "new"
        | "refurbished"
        | "used"
        | "used_like_new"
        | "used_good"
        | "used_fair"
        | "cpo"
        | "open_box_new";
        currency: string;
        description?: string;
        id?: string;
        image_url: string;
        name: string;
        price: number;
        retailer_id: string;
        url?: string;
    } & { [key: string]: unknown }

    A product as the network returns it. id is always present here.

  • ProductsProductCatalog: {
        default_image_url?: string;
        feed_count?: number;
        id?: string;
        is_catalog_segment?: boolean;
        is_local_catalog?: boolean;
        name?: string;
        product_count?: number;
    } & { [key: string]: unknown }

    A Meta commerce catalogue, as the network returns it.

  • ProductsProductCatalogInput: { name: string }
  • ProductsProductInput: {
        additional_image_urls?: string[];
        availability?:
            | "pending"
            | "in stock"
            | "out of stock"
            | "preorder"
            | "available for order"
            | "discontinued"
            | "mark_as_sold";
        brand?: string;
        category?: string;
        color?: string;
        condition?: | "new"
        | "refurbished"
        | "used"
        | "used_like_new"
        | "used_good"
        | "used_fair"
        | "cpo"
        | "open_box_new";
        currency: string;
        description?: string;
        id?: string;
        image_url: string;
        name: string;
        price: number;
        retailer_id: string;
        url?: string;
    } & { [key: string]: unknown }

    A product in Meta's Commerce vocabulary. Only the fields PlanVortex depends on are listed; anything else Meta accepts travels through untouched.

  • Publication: {
        _id: string;
        ai_generated?: { image: boolean; text: boolean };
        creation_date: string;
        destination?: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        engagement_base?: "reach"
        | "impressions"
        | "followers";
        external_identifier?: string;
        extra_data?: { [key: string]: unknown };
        files: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        }[];
        id_account: | string
        | {
            _id: string;
            creation_date: string;
            error_code: number;
            extra_data?: { is_personal_profile?: boolean } & {
                [key: string]: unknown;
            };
            followers_count?: number;
            id_client: string;
            id_organization: string;
            image?: string;
            name: string;
            next_comments_update?: string;
            next_stats_update?: string;
            private_message_link?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            username?: string;
        };
        id_integration?: string;
        id_organization: string;
        link?: string;
        made_for_kids?: boolean;
        metrics?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        name?: string;
        next_stats_update?: string;
        pending_publish?: {
            data?: { [key: string]: unknown };
            deadline?: string;
            next_check?: string;
            temp_keys?: string[];
        };
        publication_errors: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publication_type: | "profile"
        | "page"
        | "group"
        | "reels"
        | "stories"
        | "message";
        publication_warnings?: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publish_date?: string;
        reply_control?: | "everyone"
        | "accounts_you_follow"
        | "mentioned_only"
        | "followers_only";
        retries: number;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        state: "ready"
        | "withErrors"
        | "sended"
        | "draft"
        | "publishing";
        statistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        };
        stats_updated_date?: string;
        text?: string;
        title?: string;
        url?: string;
        visibility?: "public"
        | "unlisted"
        | "private";
    }
    • _id: string
    • Optionalai_generated?: { image: boolean; text: boolean }
      • image: boolean

        At least one of the files carries ai_generated. Recomputed every time the publication is saved, so replacing an AI image with a photo of your own turns it off.

      • text: boolean

        The text was written by the AI planner. Set when the draft is created and never changed afterwards, not even if the text is rewritten: it says where the text came from, not who reviewed it.

    • creation_date: string

      Format: date-time

    • Optionaldestination?: { id?: string; name?: string; section_id?: string; section_name?: string }

      Where inside the account this publication goes. Only present on the networks that answer destinations: true in GET /social_capabilities.

      • Optionalid?: string

        The board id. Always a string, never a number: Pinterest's ids are long integers, so a client that sends one as a JSON number has already lost digits to rounding before the request arrives. That is refused — publication_errors[].code = 987 with data.reason = "invalid_id" — rather than published to some other board. Sending the board's name instead of its id fails the same way, which is the likeliest first mistake of an integration.

      • Optionalname?: string

        The board's label, for display. Decides nothing.

      • Optionalsection_id?: string

        Pinterest only: the section of the board, optional. Absent or empty means the board itself. Same rule as id — anything that is not a string of digits is data.reason = "invalid_section_id". A board's sections arrive in the detail of one destination, not in the list of them.

      • Optionalsection_name?: string

        The section's label, for display. Decides nothing.

    • Optionalengagement_base?: "reach" | "impressions" | "followers"

      What this publication's engagement rate is divided by.

    • Optionalexternal_identifier?: string

      The network's own identifier, once published. On telegram an album is one publication that is several messages, and this holds the first one; the rest travel in extra_data.telegram_message_ids.

    • Optionalextra_data?: { [key: string]: unknown }

      What one network needs to remember about this publication and that has no common field. Absent on a publication whose network needs nothing, which is almost all of them.

      Today only `telegram` writes here, and only `telegram_message_ids`: the ids of every message an album turned into, because deleting the album means deleting all of them.
      
    • files: {
          _id: string;
          ai_generated?: {
              generated_at: string;
              id_ai_plan?: string;
              model: string;
              provider: string;
          };
          cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
          cover_offset?: number;
          creation_date: string;
          file_externals: {
              external_identifier: string;
              external_url: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          }[];
          file_format: "mp4"
          | "jpeg"
          | "gif"
          | "png"
          | "jpg";
          file_properties: {
              allowed_social_networks: string[];
              aspect_ratio: { text: string; value: number };
              duration: number;
              height: number;
              size_in_bytes: number;
              width: number;
          };
          file_type: "video"
          | "image";
          id_organization: string;
          is_temporal: boolean;
          name: string;
          public_path: string;
      }[]

      The attached files, already resolved: every read and write path returns full uploads, not identifiers. Identifiers are what you SEND (see PublicationInput.files).

    • id_account:
          | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          }

      The account the publication goes out through.

      **It is not always the same shape.** The single-publication operations (create, read, retry) return the account already resolved; the listing and the update return its identifier as a string. Check before using it.
      
    • Optionalid_integration?: string

      The integration this publication came from — an RSS feed, for instance. Set when it is created and never changed afterwards.

    • id_organization: string
    • Optionallink?: string

      The destination link: where the publication takes whoever clicks it. Not to be confused with url, which is the link to the publication on the network and only exists once it is published.

      Only the networks that answer `link: true` in `GET /social_capabilities` carry it — today `pinterest` alone, where a pin has a `link` field of its own and sending traffic somewhere is the whole point of publishing there. Putting the URL inside `text` instead leaves it visible and unclickable.
      
      **On every other network the field is deleted on save**, like `destination`.
      
    • Optionalmade_for_kids?: boolean

      Whether the video is made for kids (COPPA), on the networks that answer made_for_kids: true in GET /social_capabilities (today youtube). Absent means false.

      **On every other network the field is deleted on save**, like `reply_control`.
      
    • Optionalmetrics?: {
          clicks?: number;
          comments?: number;
          engagement?: number;
          followers?: number;
          followers_gained?: number;
          impressions?: number;
          likes?: number;
          profile_views?: number;
          reach?: number;
          saves?: number;
          shares?: number;
          video_views?: number;
      }

      Last known measurement, in the common vocabulary. Absent until it is measured.

      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions

      • Optionalfollowers?: number

        Followers accumulated at that date, not the day's gain.

      • Optionalfollowers_gained?: number

        Followers gained that day.

      • Optionalimpressions?: number

        Times the content was shown (not unique)

      • Optionallikes?: number
      • Optionalprofile_views?: number
      • Optionalreach?: number

        Unique users reached

      • Optionalsaves?: number
      • Optionalshares?: number
      • Optionalvideo_views?: number
    • Optionalname?: string

      Internal name. Never shown on the social network.

    • Optionalnext_stats_update?: string

      Format: date-time

    • Optionalpending_publish?: {
          data?: { [key: string]: unknown };
          deadline?: string;
          next_check?: string;
          temp_keys?: string[];
      }
      • Optionaldata?: { [key: string]: unknown }

        PlanVortex's own bookkeeping to resume the publication (on Instagram, the ids of Meta's containers). Its content may change without notice.

      • Optionaldeadline?: string

        Format: date-time

        When PlanVortex stops waiting. If the network has not finished by then, the publication ends in withErrors (999 on Instagram).

      • Optionalnext_check?: string

        Format: date-time

        When PlanVortex will ask the network again. A good moment to read the publication again: asking before it changes nothing.

      • Optionaltemp_keys?: string[]

        PlanVortex's own bookkeeping: the temporary cropped files the network may still be downloading. Do not rely on it.

    • publication_errors: { code: number; data?: { [key: string]: unknown }; message: string }[]

      Why the publication failed, one entry per problem. It is an array, and it is empty on a publication that has not failed.

      For a scheduled X (Twitter) publication that runs out of credits at publish time, `code` is 940 and `data` is `{ used, limit }`; the publication stays in state `withErrors`. No webhook announces it: read the publication to find out.
      
      On Instagram, two codes tell you whether a retry makes sense. **998**: Meta rejected the media while processing it (a codec, a duration, a URL it could not download). `data` carries `container_id`, `status_code` and, when Meta gives one, its reason in `status`. Retrying the same file fails the same way: change it first. **999**: Meta had not finished processing the media 10 minutes after it was sent. `data` carries `container_ids` and `minutes`. The file is not the problem, and a retry usually works.
      
    • publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message"
    • Optionalpublication_warnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

      What still has to be done by hand on the network for a publication that DID go out. Same shape as publication_errors, and an empty array when there is nothing to do.

      It is a separate field because these are not failures: the publication stays in state `sended` and must **not** be retried, because retrying would publish it twice. Like `publication_errors`, it belongs to the last attempt.
      
      Today there is one code. **2400** (YouTube): YouTube accepted the upload but did not make the video public, so YouTube Studio shows it as a draft or private until someone sets its audience and visibility there. The upload does not fail when this happens; PlanVortex reads the video back right after uploading it to find out. `data` carries `requested_privacy_status`, `privacy_status` (what YouTube actually left), `upload_status`, `made_for_kids` and `studio_url`, the YouTube Studio page where it is finished.
      
    • Optionalpublish_date?: string

      Format: date-time

    • Optionalreply_control?: "everyone" | "accounts_you_follow" | "mentioned_only" | "followers_only"

      Who can reply to the publication, on the networks that answer reply_control: true in GET /social_capabilities (today threads). Absent means the network's default, which is anyone. It is set when the publication goes out and cannot be changed afterwards.

      **On every other network the field is deleted on save**, like `link`.
      
    • retries: number

      Manual retries already spent on a failed publication, against the max_retries published by GET /publication_limits. Only POST .../retry increases it; updating the publication resets it to 0.

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"

      Always the network of the account in id_account.

    • state: "ready" | "withErrors" | "sended" | "draft" | "publishing"

      draft is never sent; ready is scheduled; publishing is in the network's hands right now; sended went out; withErrors failed and carries the reason in publication_errors.

      `publishing` usually lasts a few seconds, but it can last **up to 10 minutes** when the network is still processing a video (today, Instagram). Then `pending_publish` is present: wait and read the publication again, do not retry it.
      
    • Optionalstatistics?: {
          angers?: number;
          bookmarks?: number;
          clicks?: number;
          comments?: number;
          engagement?: number;
          follows?: number;
          hahas?: number;
          impressions?: number;
          likes?: number;
          loves?: number;
          negative_feedback?: number;
          outbound_clicks?: number;
          page_likes?: number;
          pin_clicks?: number;
          playback_0_count?: number;
          playback_100_count?: number;
          playback_25_count?: number;
          playback_50_count?: number;
          playback_75_count?: number;
          profile_activity?: number;
          profile_visits?: number;
          quotes?: number;
          reach?: number;
          reactions?: number;
          reactions_by_emoji?: { [key: string]: number };
          replys?: number;
          retwets?: number;
          saved?: number;
          saves?: number;
          share?: number;
          shareMentions?: number;
          shares?: number;
          sorrys?: number;
          url_link_clicks?: number;
          user_profile_clicks?: number;
          video_views?: number;
          views?: number;
          wows?: number;
      }
      • Optionalangers?: number
      • Optionalbookmarks?: number

        X (Twitter). Times the post was saved to bookmarks. Always available (public_metrics). Normalised as saves and counted towards engagement.

      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions. LinkedIn reports it directly. On X it comes from the non-public metrics and, when present, takes precedence over the sum of the individual interactions — it includes interactions the API does not break down.

      • Optionalfollows?: number
      • Optionalhahas?: number
      • Optionalimpressions?: number
      • Optionallikes?: number
      • Optionalloves?: number
      • Optionalnegative_feedback?: number
      • Optionaloutbound_clicks?: number

        Pinterest. Clicks that left the pin towards its link. This is the one normalised as the common clicks.

      • Optionalpage_likes?: number
      • Optionalpin_clicks?: number

        Pinterest. Clicks that opened the pin inside Pinterest without leaving it. No common equivalent, so it lives only here.

      • Optionalplayback_0_count?: number

        X (Twitter). Video playbacks that reached 0% — i.e. started. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_100_count?: number

        X (Twitter). Video playbacks that reached 100%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_25_count?: number

        X (Twitter). Video playbacks that reached 25%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_50_count?: number

        X (Twitter). Video playbacks that reached 50%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_75_count?: number

        X (Twitter). Video playbacks that reached 75%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalprofile_activity?: number
      • Optionalprofile_visits?: number
      • Optionalquotes?: number
      • Optionalreach?: number
      • Optionalreactions?: number

        Telegram, Slack and Pinterest. Every reaction on the post, all emoji together, normalised as likes. On telegram and slack it is the complete state and not an increment: it goes down when somebody takes theirs back. On slack it is the only metric the network gives.

      • Optionalreactions_by_emoji?: { [key: string]: number }

        Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it.

      • Optionalreplys?: number
      • Optionalretwets?: number
      • Optionalsaved?: number
      • Optionalsaves?: number

        Pinterest. Times the pin was saved to a board — the gesture the network is built on. Normalised as saves and counted towards engagement. Not the same key as saved, which is Instagram's.

      • Optionalshare?: number
      • OptionalshareMentions?: number
      • Optionalshares?: number
      • Optionalsorrys?: number
      • Optionalurl_link_clicks?: number

        X (Twitter). Clicks on links in the post. Comes from X's non-public metrics: omitted when unavailable.

      • Optionaluser_profile_clicks?: number

        X (Twitter). Clicks on the author's profile from the post. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalvideo_views?: number
      • Optionalviews?: number
      • Optionalwows?: number
    • Optionalstats_updated_date?: string

      Format: date-time

    • Optionaltext?: string
    • Optionaltitle?: string

      Only the networks that have a title field use it.

    • Optionalurl?: string

      Link to the publication on the network, when there is one. A private Telegram channel has no public URL, so it comes back empty even though the post went out.

    • Optionalvisibility?: "public" | "unlisted" | "private"

      Who can see the publication when it goes out, on the networks that answer visibility: true in GET /social_capabilities (today youtube). Absent means public. It is set when the publication goes out.

      **On every other network the field is deleted on save**, like `reply_control`.
      
  • PublicationAiGenerated: { image: boolean; text: boolean }

    Which part of a publication was generated by AI. Absent means nothing was.

    Use it to show your own AI label: under article 50(4) of the EU AI Act, telling the audience is the job of whoever publishes.
    
    • image: boolean

      At least one of the files carries ai_generated. Recomputed every time the publication is saved, so replacing an AI image with a photo of your own turns it off.

    • text: boolean

      The text was written by the AI planner. Set when the draft is created and never changed afterwards, not even if the text is rewritten: it says where the text came from, not who reviewed it.

  • PublicationDestination: { id?: string; name?: string; section_id?: string; section_name?: string }

    Where inside the account a publication goes, on the networks where choosing the account is not yet choosing the destination. Today that is pinterest alone, where it is the board the pin is saved to.

    Ask `destinations` in `GET /social_capabilities` instead of keeping a list of your own, and read the account's boards with `GET /organizations/{id_organization}/accounts/{id_account}/destinations`.
    
    **On Pinterest it is required.** A publication created without it is created in state `withErrors` with `publication_errors[].code = 987` and the background job will not attempt it — the same treatment as a YouTube video with no title, and for the same reason: a scheduled publication that dies at 3 a.m. over a board that was missing from the start is a failure that could have been told to the person while they were still there.
    
    **On every other network the field is deleted, not rejected.** A `destination` on a Facebook publication would be a field that does nothing, and giving it back in the response would be worse than dropping it.
    
    `name` and `section_name` are labels for display ("Recipes > Desserts"). The server never checks them and nothing is decided by them: what publishes is `id`.
    
    • Optionalid?: string

      The board id. Always a string, never a number: Pinterest's ids are long integers, so a client that sends one as a JSON number has already lost digits to rounding before the request arrives. That is refused — publication_errors[].code = 987 with data.reason = "invalid_id" — rather than published to some other board. Sending the board's name instead of its id fails the same way, which is the likeliest first mistake of an integration.

    • Optionalname?: string

      The board's label, for display. Decides nothing.

    • Optionalsection_id?: string

      Pinterest only: the section of the board, optional. Absent or empty means the board itself. Same rule as id — anything that is not a string of digits is data.reason = "invalid_section_id". A board's sections arrive in the detail of one destination, not in the list of them.

    • Optionalsection_name?: string

      The section's label, for display. Decides nothing.

  • PublicationPending: {
        data?: { [key: string]: unknown };
        deadline?: string;
        next_check?: string;
        temp_keys?: string[];
    }

    Present only while the network is still processing what was sent, and PlanVortex is waiting to publish it. Today that happens on Instagram alone, when Meta takes longer than the ~30 seconds the request waits to process the media. In practice, that means videos.

    The publication stays in state `publishing`, and the background job asks Instagram again about once a minute until it goes out (`sended`) or fails (`withErrors`). It gives up 10 minutes after the media was sent to Instagram, and then the publication ends in `withErrors` with code 999. The object disappears as soon as the publication is resolved.
    
    **Wait for it. Do not retry it and do not create it again**: it has not failed, and a second publication would put the same video out twice. There is no webhook for the outcome: read the publication again after `next_check`. While this object is present the publication **cannot be updated** (error 921), for the same reason.
    
    • Optionaldata?: { [key: string]: unknown }

      PlanVortex's own bookkeeping to resume the publication (on Instagram, the ids of Meta's containers). Its content may change without notice.

    • Optionaldeadline?: string

      Format: date-time

      When PlanVortex stops waiting. If the network has not finished by then, the publication ends in withErrors (999 on Instagram).

    • Optionalnext_check?: string

      Format: date-time

      When PlanVortex will ask the network again. A good moment to read the publication again: asking before it changes nothing.

    • Optionaltemp_keys?: string[]

      PlanVortex's own bookkeeping: the temporary cropped files the network may still be downloading. Do not rely on it.

  • PublicationsDestination: {
        description?: string;
        id: string;
        image?: string;
        name: string;
        privacy?: string;
        sections?: { id: string; name: string }[];
    }

    A place inside the account a publication can be sent to: on Pinterest, a board.

    • Optionaldescription?: string

      The destination's own description, when the network has one.

    • id: string

      What goes in destination.id when creating a publication. Always a string, even though Pinterest's are long integers — parse it as text or you will lose digits.

    • Optionalimage?: string

      A cover image for the picker, when the network has one.

    • name: string

      The name to show in a picker.

    • Optionalprivacy?: string

      Pinterest: PUBLIC, PROTECTED or SECRET. Worth showing: a pin on a secret board is seen by nobody else, and afterwards there is nothing in the statistics that explains why it has no impressions.

    • Optionalsections?: { id: string; name: string }[]

      Pinterest: the board's sections, which is what goes in destination.section_id. Only in the detail of one destination — listing them for every board would cost one call to the network per board.

  • PublicationsPublicationInput: {
        destination?: {
            id?: string;
            name?: string;
            section_id?: string;
            section_name?: string;
        };
        files?: string[];
        link?: string;
        made_for_kids?: boolean;
        name?: string;
        publication_type?: "profile"
        | "page"
        | "group"
        | "reels"
        | "stories";
        publish_date?: string;
        reply_control?:
            | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
        social_network?: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        state?: "ready"
        | "withErrors"
        | "sended"
        | "draft"
        | "publishing";
        text?: string;
        title?: string;
        visibility?: "public" | "unlisted" | "private";
    }

    Body accepted when creating or updating a publication. Only these properties are read; anything else in the payload is ignored.

    • Optionaldestination?: { id?: string; name?: string; section_id?: string; section_name?: string }

      Where inside the account the publication goes. Required on the networks that answer destinations: true in GET /social_capabilities — today pinterest, where it is the board — and deleted on every other one.

      Read the account's destinations with `GET /organizations/{id_organization}/accounts/{id_account}/destinations` and send back the `id` you got from there. Missing or malformed, the publication is still created, in state `withErrors` with `publication_errors[].code = 987` and a `data.reason` of `missing`, `invalid_id` or `invalid_section_id`. It is **not** checked against the network at creation: that would cost a call to Pinterest on every publication and make creating one depend on Pinterest answering.
      
      On an update, omitting it keeps the destination that was there.
      
      • Optionalid?: string

        The board id. Always a string, never a number: Pinterest's ids are long integers, so a client that sends one as a JSON number has already lost digits to rounding before the request arrives. That is refused — publication_errors[].code = 987 with data.reason = "invalid_id" — rather than published to some other board. Sending the board's name instead of its id fails the same way, which is the likeliest first mistake of an integration.

      • Optionalname?: string

        The board's label, for display. Decides nothing.

      • Optionalsection_id?: string

        Pinterest only: the section of the board, optional. Absent or empty means the board itself. Same rule as id — anything that is not a string of digits is data.reason = "invalid_section_id". A board's sections arrive in the detail of one destination, not in the list of them.

      • Optionalsection_name?: string

        The section's label, for display. Decides nothing.

    • Optionalfiles?: string[]

      Identifiers of uploads previously created through the uploads endpoints, attached to this publication.

      **On Slack the files travel inside the message**, not as publications of their own: up to 10 attachments counting images and videos together (`publication_errors[].code = 982` over it), each one under the `max_file_size_mb.slack` ceiling (code 983), and anything the upload itself refuses comes back as code 986.
      
      **On Pinterest a pin is an image or a video, never text alone** (code 922 with neither), and it is of one kind only: two to five images make a carousel — outside that range, code 990 — images and videos are not mixed and there is no more than one video (code 916). The weight ceilings are two orders of magnitude apart, so `max_file_size_mb.pinterest` is the **image** one (~20 MB) while a video is allowed far more; over either, code 996 with `data.max_mb`.
      
    • Optionallink?: string

      The destination link: where the publication takes whoever clicks it. Only on the networks that answer link: true in GET /social_capabilities — today pinterest, where it is the whole point of a pin — and deleted on every other one. It is not url, which is the link to the publication on the network once published.

      It is optional (a pin with no link is legitimate), but if it is sent it must be a real `http(s)://` URL of at most 2.048 characters: a bare domain such as `mysite.com/recipe` is created in state `withErrors` with `publication_errors[].code = 994` and `data.reason` of `invalid_url` or `too_long`. It is checked when the publication is **created**, not when it is published, so a scheduled pin does not die at 3 a.m. over a link that was already wrong.
      
      On an update: omit it to keep what was there, send `null` or `""` to remove it.
      
    • Optionalmade_for_kids?: boolean

      Whether the video is made for kids. Only on the networks that answer made_for_kids: true in GET /social_capabilities (today youtube), and deleted on every other one. Absent means false.

      The law (COPPA) and YouTube's policies require a video directed at children to be uploaded with `true`, and it is the **user's** call: if your software publishes on behalf of someone, ask them. YouTube then turns off features such as comments and personalised ads on that video.
      
      It must be a JSON boolean. Anything else (`"yes"`, `"no"`, `1`) is not guessed: the publication is still created, in state `withErrors` with `publication_errors[].code = 2501`.
      
      On an update: omit it to keep what was there, send `null` or `""` to go back to `false`.
      
    • Optionalname?: string

      Internal name for the publication. Useful for grouping; never shown on the social network.

    • Optionalpublication_type?: "profile" | "page" | "group" | "reels" | "stories"

      Defaults to profile. Not every network accepts every type, and an unsupported combination returns error 923. Allowed values are: facebook and instagram -> profile, reels, stories; twitter, linkedin, tiktok and youtube -> profile; whatsapp -> stories. YouTube has no separate type for Shorts: any vertical video of 3 minutes or less is classified as one automatically.

    • Optionalpublish_date?: string

      Format: date-time

      When the publication must go out. If omitted, it is published immediately. An invalid date returns error 938.

    • Optionalreply_control?: "everyone" | "accounts_you_follow" | "mentioned_only" | "followers_only"

      Who can reply to the publication. Only on the networks that answer reply_control: true in GET /social_capabilities (today threads), and deleted on every other one.

      - `everyone`: anyone. It is the network's default, and what applies when the field is omitted.
      - `followers_only`: only the account's followers.
      - `accounts_you_follow`: only the profiles the account follows.
      - `mentioned_only`: only the profiles mentioned in the text.
      
      **It is set when the publication goes out and cannot be changed afterwards**: Threads has no way to change it on a published post through its API. A value the network does not accept does not fail the request: the publication is still created, in state `withErrors` with `publication_errors[].code = 997`, whose `data` carries the `allowed` values. It is checked when the publication is **created**, so a scheduled post does not fail at 3 a.m. over a value that was already wrong.
      
      On an update: omit it to keep what was there, send `null` or `""` to go back to the network's default.
      
    • Optionalsocial_network?:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"

      Network the publication targets. Required when creating: the request fails with error 702 if it is missing or not one of these values. It must match the network of the account in the path.

      Not every connectable network publishes — a local business listing receives reviews, not posts — so this list is shorter than the one in `GET /social_networks`. Ask `GET /allowed_social_publications` rather than hardcoding it, because it grows.
      
    • Optionalstate?: "ready" | "withErrors" | "sended" | "draft" | "publishing"

      Send draft to store the publication without publishing it. If omitted, the state is resolved automatically: ready when everything validates, withErrors otherwise. Forcing sended marks it as published without actually sending it.

    • Optionaltext?: string

      Body text of the publication. Either text or at least one entry in files is required: if both are empty the publication is still created, but in state withErrors with publication_errors[].code = 915. Maximum length depends on the network. On YouTube this is the video description (5,000 characters), and the publication must carry exactly one video file and no images — otherwise it is created in state withErrors with publication_errors[].code = 943. For X (Twitter), a text containing a link costs 200 credits instead of 15.

      **On Telegram the limit depends on what else the publication carries**: 4.096 characters while it is text only, and **1.024** the moment it has an image or a video, because then the text is the caption of a photo, a video or an album and no longer a message. Over the limit it is created in state `withErrors` with `publication_errors[].code = 967`, whose `data` carries `characters`, `max_characters` and `has_media`. Both numbers are published, as `characters.telegram` and `characters.telegram_media` in `GET /social_limits`.
      
      **On Slack the limit is 4.000 characters** and it is counted over the text you send, not over what travels: `&`, `<` and `>` are escaped before publishing, so a text made of ampersands grows on the wire and is still measured here. Over the limit the publication is created in state `withErrors` with `publication_errors[].code = 981`. And because the escaped text is what is measured on the wire, a text that passed at 4.000 characters and is full of `&` is **trimmed** before going out — Slack does not reject a long `text`, it truncates it or splits it into several messages, and one publication showing up as two posts is worse. The text goes out **plain**: Slack speaks *mrkdwn* and not Markdown, and PlanVortex sends no `blocks`, so `**bold**` is published literally.
      
      **On Pinterest `text` is the pin's description**, at most 800 characters — the title is the separate `title` field, which is the first thing anyone arriving from Facebook gets wrong. Over it, `publication_errors[].code = 995` with `data.field = "description"`.
      
    • Optionaltitle?: string

      Title for the publication. Only some networks use it: optional on LinkedIn, and required on YouTube, where it is the video title and must be 100 characters or fewer — a publication without it, or with a longer one, is created in state withErrors with publication_errors[].code = 944.

      **On Pinterest it is the pin's title**, optional and at most 100 characters; over it the publication is created in state `withErrors` with `publication_errors[].code = 995` and `data.field = "title"`.
      
    • Optionalvisibility?: "public" | "unlisted" | "private"

      Who can see the publication when it goes out. Only on the networks that answer visibility: true in GET /social_capabilities (today youtube), and deleted on every other one.

      - `public`: anyone. It is what applies when the field is omitted.
      - `unlisted`: only people with the link. It does not show on the channel or in search.
      - `private`: only the channel owner and the people they invite from YouTube Studio.
      
      YouTube's policies require this to be **the user's choice**: if your software publishes on behalf of someone, ask them. A value the network does not accept does not fail the request: the publication is still created, in state `withErrors` with `publication_errors[].code = 2500`, whose `data` carries the `allowed` values. It is checked when the publication is **created**, so a scheduled video does not fail at 3 a.m. over a value that was already wrong.
      
      If YouTube does not leave the video with the visibility that was asked for, the publication still ends up `sended` (the video is on the channel) and carries a warning in `publication_warnings` with `code = 2400`.
      
      On an update: omit it to keep what was there, send `null` or `""` to go back to `public`.
      
  • PublicationsPublicationList: {
        publications: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        }[];
        total: number;
    }
  • PublicationsPublicationOne: {
        publication: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
    }
    • publication: {
          _id: string;
          ai_generated?: { image: boolean; text: boolean };
          creation_date: string;
          destination?: {
              id?: string;
              name?: string;
              section_id?: string;
              section_name?: string;
          };
          engagement_base?: "reach"
          | "impressions"
          | "followers";
          external_identifier?: string;
          extra_data?: { [key: string]: unknown };
          files: {
              _id: string;
              ai_generated?: {
                  generated_at: string;
                  id_ai_plan?: string;
                  model: string;
                  provider: string;
              };
              cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
              cover_offset?: number;
              creation_date: string;
              file_externals: {
                  external_identifier: string;
                  external_url: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              }[];
              file_format: "mp4"
              | "jpeg"
              | "gif"
              | "png"
              | "jpg";
              file_properties: {
                  allowed_social_networks: string[];
                  aspect_ratio: { text: string; value: number };
                  duration: number;
                  height: number;
                  size_in_bytes: number;
                  width: number;
              };
              file_type: "video"
              | "image";
              id_organization: string;
              is_temporal: boolean;
              name: string;
              public_path: string;
          }[];
          id_account: | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          };
          id_integration?: string;
          id_organization: string;
          link?: string;
          made_for_kids?: boolean;
          metrics?: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          name?: string;
          next_stats_update?: string;
          pending_publish?: {
              data?: { [key: string]: unknown };
              deadline?: string;
              next_check?: string;
              temp_keys?: string[];
          };
          publication_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publication_type: | "profile"
          | "page"
          | "group"
          | "reels"
          | "stories"
          | "message";
          publication_warnings?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publish_date?: string;
          reply_control?: | "everyone"
          | "accounts_you_follow"
          | "mentioned_only"
          | "followers_only";
          retries: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest";
          state: "ready"
          | "withErrors"
          | "sended"
          | "draft"
          | "publishing";
          statistics?: {
              angers?: number;
              bookmarks?: number;
              clicks?: number;
              comments?: number;
              engagement?: number;
              follows?: number;
              hahas?: number;
              impressions?: number;
              likes?: number;
              loves?: number;
              negative_feedback?: number;
              outbound_clicks?: number;
              page_likes?: number;
              pin_clicks?: number;
              playback_0_count?: number;
              playback_100_count?: number;
              playback_25_count?: number;
              playback_50_count?: number;
              playback_75_count?: number;
              profile_activity?: number;
              profile_visits?: number;
              quotes?: number;
              reach?: number;
              reactions?: number;
              reactions_by_emoji?: { [key: string]: number };
              replys?: number;
              retwets?: number;
              saved?: number;
              saves?: number;
              share?: number;
              shareMentions?: number;
              shares?: number;
              sorrys?: number;
              url_link_clicks?: number;
              user_profile_clicks?: number;
              video_views?: number;
              views?: number;
              wows?: number;
          };
          stats_updated_date?: string;
          text?: string;
          title?: string;
          url?: string;
          visibility?: "public"
          | "unlisted"
          | "private";
      }
      • _id: string
      • Optionalai_generated?: { image: boolean; text: boolean }
        • image: boolean

          At least one of the files carries ai_generated. Recomputed every time the publication is saved, so replacing an AI image with a photo of your own turns it off.

        • text: boolean

          The text was written by the AI planner. Set when the draft is created and never changed afterwards, not even if the text is rewritten: it says where the text came from, not who reviewed it.

      • creation_date: string

        Format: date-time

      • Optionaldestination?: { id?: string; name?: string; section_id?: string; section_name?: string }

        Where inside the account this publication goes. Only present on the networks that answer destinations: true in GET /social_capabilities.

        • Optionalid?: string

          The board id. Always a string, never a number: Pinterest's ids are long integers, so a client that sends one as a JSON number has already lost digits to rounding before the request arrives. That is refused — publication_errors[].code = 987 with data.reason = "invalid_id" — rather than published to some other board. Sending the board's name instead of its id fails the same way, which is the likeliest first mistake of an integration.

        • Optionalname?: string

          The board's label, for display. Decides nothing.

        • Optionalsection_id?: string

          Pinterest only: the section of the board, optional. Absent or empty means the board itself. Same rule as id — anything that is not a string of digits is data.reason = "invalid_section_id". A board's sections arrive in the detail of one destination, not in the list of them.

        • Optionalsection_name?: string

          The section's label, for display. Decides nothing.

      • Optionalengagement_base?: "reach" | "impressions" | "followers"

        What this publication's engagement rate is divided by.

      • Optionalexternal_identifier?: string

        The network's own identifier, once published. On telegram an album is one publication that is several messages, and this holds the first one; the rest travel in extra_data.telegram_message_ids.

      • Optionalextra_data?: { [key: string]: unknown }

        What one network needs to remember about this publication and that has no common field. Absent on a publication whose network needs nothing, which is almost all of them.

        Today only `telegram` writes here, and only `telegram_message_ids`: the ids of every message an album turned into, because deleting the album means deleting all of them.
        
      • files: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        }[]

        The attached files, already resolved: every read and write path returns full uploads, not identifiers. Identifiers are what you SEND (see PublicationInput.files).

      • id_account:
            | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            }

        The account the publication goes out through.

        **It is not always the same shape.** The single-publication operations (create, read, retry) return the account already resolved; the listing and the update return its identifier as a string. Check before using it.
        
      • Optionalid_integration?: string

        The integration this publication came from — an RSS feed, for instance. Set when it is created and never changed afterwards.

      • id_organization: string
      • Optionallink?: string

        The destination link: where the publication takes whoever clicks it. Not to be confused with url, which is the link to the publication on the network and only exists once it is published.

        Only the networks that answer `link: true` in `GET /social_capabilities` carry it — today `pinterest` alone, where a pin has a `link` field of its own and sending traffic somewhere is the whole point of publishing there. Putting the URL inside `text` instead leaves it visible and unclickable.
        
        **On every other network the field is deleted on save**, like `destination`.
        
      • Optionalmade_for_kids?: boolean

        Whether the video is made for kids (COPPA), on the networks that answer made_for_kids: true in GET /social_capabilities (today youtube). Absent means false.

        **On every other network the field is deleted on save**, like `reply_control`.
        
      • Optionalmetrics?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }

        Last known measurement, in the common vocabulary. Absent until it is measured.

        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • Optionalname?: string

        Internal name. Never shown on the social network.

      • Optionalnext_stats_update?: string

        Format: date-time

      • Optionalpending_publish?: {
            data?: { [key: string]: unknown };
            deadline?: string;
            next_check?: string;
            temp_keys?: string[];
        }
        • Optionaldata?: { [key: string]: unknown }

          PlanVortex's own bookkeeping to resume the publication (on Instagram, the ids of Meta's containers). Its content may change without notice.

        • Optionaldeadline?: string

          Format: date-time

          When PlanVortex stops waiting. If the network has not finished by then, the publication ends in withErrors (999 on Instagram).

        • Optionalnext_check?: string

          Format: date-time

          When PlanVortex will ask the network again. A good moment to read the publication again: asking before it changes nothing.

        • Optionaltemp_keys?: string[]

          PlanVortex's own bookkeeping: the temporary cropped files the network may still be downloading. Do not rely on it.

      • publication_errors: { code: number; data?: { [key: string]: unknown }; message: string }[]

        Why the publication failed, one entry per problem. It is an array, and it is empty on a publication that has not failed.

        For a scheduled X (Twitter) publication that runs out of credits at publish time, `code` is 940 and `data` is `{ used, limit }`; the publication stays in state `withErrors`. No webhook announces it: read the publication to find out.
        
        On Instagram, two codes tell you whether a retry makes sense. **998**: Meta rejected the media while processing it (a codec, a duration, a URL it could not download). `data` carries `container_id`, `status_code` and, when Meta gives one, its reason in `status`. Retrying the same file fails the same way: change it first. **999**: Meta had not finished processing the media 10 minutes after it was sent. `data` carries `container_ids` and `minutes`. The file is not the problem, and a retry usually works.
        
      • publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message"
      • Optionalpublication_warnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

        What still has to be done by hand on the network for a publication that DID go out. Same shape as publication_errors, and an empty array when there is nothing to do.

        It is a separate field because these are not failures: the publication stays in state `sended` and must **not** be retried, because retrying would publish it twice. Like `publication_errors`, it belongs to the last attempt.
        
        Today there is one code. **2400** (YouTube): YouTube accepted the upload but did not make the video public, so YouTube Studio shows it as a draft or private until someone sets its audience and visibility there. The upload does not fail when this happens; PlanVortex reads the video back right after uploading it to find out. `data` carries `requested_privacy_status`, `privacy_status` (what YouTube actually left), `upload_status`, `made_for_kids` and `studio_url`, the YouTube Studio page where it is finished.
        
      • Optionalpublish_date?: string

        Format: date-time

      • Optionalreply_control?: "everyone" | "accounts_you_follow" | "mentioned_only" | "followers_only"

        Who can reply to the publication, on the networks that answer reply_control: true in GET /social_capabilities (today threads). Absent means the network's default, which is anyone. It is set when the publication goes out and cannot be changed afterwards.

        **On every other network the field is deleted on save**, like `link`.
        
      • retries: number

        Manual retries already spent on a failed publication, against the max_retries published by GET /publication_limits. Only POST .../retry increases it; updating the publication resets it to 0.

      • social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"

        Always the network of the account in id_account.

      • state: "ready" | "withErrors" | "sended" | "draft" | "publishing"

        draft is never sent; ready is scheduled; publishing is in the network's hands right now; sended went out; withErrors failed and carries the reason in publication_errors.

        `publishing` usually lasts a few seconds, but it can last **up to 10 minutes** when the network is still processing a video (today, Instagram). Then `pending_publish` is present: wait and read the publication again, do not retry it.
        
      • Optionalstatistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        }
        • Optionalangers?: number
        • Optionalbookmarks?: number

          X (Twitter). Times the post was saved to bookmarks. Always available (public_metrics). Normalised as saves and counted towards engagement.

        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions. LinkedIn reports it directly. On X it comes from the non-public metrics and, when present, takes precedence over the sum of the individual interactions — it includes interactions the API does not break down.

        • Optionalfollows?: number
        • Optionalhahas?: number
        • Optionalimpressions?: number
        • Optionallikes?: number
        • Optionalloves?: number
        • Optionalnegative_feedback?: number
        • Optionaloutbound_clicks?: number

          Pinterest. Clicks that left the pin towards its link. This is the one normalised as the common clicks.

        • Optionalpage_likes?: number
        • Optionalpin_clicks?: number

          Pinterest. Clicks that opened the pin inside Pinterest without leaving it. No common equivalent, so it lives only here.

        • Optionalplayback_0_count?: number

          X (Twitter). Video playbacks that reached 0% — i.e. started. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_100_count?: number

          X (Twitter). Video playbacks that reached 100%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_25_count?: number

          X (Twitter). Video playbacks that reached 25%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_50_count?: number

          X (Twitter). Video playbacks that reached 50%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_75_count?: number

          X (Twitter). Video playbacks that reached 75%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalprofile_activity?: number
        • Optionalprofile_visits?: number
        • Optionalquotes?: number
        • Optionalreach?: number
        • Optionalreactions?: number

          Telegram, Slack and Pinterest. Every reaction on the post, all emoji together, normalised as likes. On telegram and slack it is the complete state and not an increment: it goes down when somebody takes theirs back. On slack it is the only metric the network gives.

        • Optionalreactions_by_emoji?: { [key: string]: number }

          Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it.

        • Optionalreplys?: number
        • Optionalretwets?: number
        • Optionalsaved?: number
        • Optionalsaves?: number

          Pinterest. Times the pin was saved to a board — the gesture the network is built on. Normalised as saves and counted towards engagement. Not the same key as saved, which is Instagram's.

        • Optionalshare?: number
        • OptionalshareMentions?: number
        • Optionalshares?: number
        • Optionalsorrys?: number
        • Optionalurl_link_clicks?: number

          X (Twitter). Clicks on links in the post. Comes from X's non-public metrics: omitted when unavailable.

        • Optionaluser_profile_clicks?: number

          X (Twitter). Clicks on the author's profile from the post. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalvideo_views?: number
        • Optionalviews?: number
        • Optionalwows?: number
      • Optionalstats_updated_date?: string

        Format: date-time

      • Optionaltext?: string
      • Optionaltitle?: string

        Only the networks that have a title field use it.

      • Optionalurl?: string

        Link to the publication on the network, when there is one. A private Telegram channel has no public URL, so it comes back empty even though the post went out.

      • Optionalvisibility?: "public" | "unlisted" | "private"

        Who can see the publication when it goes out, on the networks that answer visibility: true in GET /social_capabilities (today youtube). Absent means public. It is set when the publication goes out.

        **On every other network the field is deleted on save**, like `reply_control`.
        
  • PublicationsPublicationRetry: {
        max_retries: number;
        publication: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        };
    }
    • max_retries: number

      Retries a failed publication accepts in total. Read it from here instead of hardcoding it: it is the same number the server enforces.

    • publication: {
          _id: string;
          ai_generated?: { image: boolean; text: boolean };
          creation_date: string;
          destination?: {
              id?: string;
              name?: string;
              section_id?: string;
              section_name?: string;
          };
          engagement_base?: "reach"
          | "impressions"
          | "followers";
          external_identifier?: string;
          extra_data?: { [key: string]: unknown };
          files: {
              _id: string;
              ai_generated?: {
                  generated_at: string;
                  id_ai_plan?: string;
                  model: string;
                  provider: string;
              };
              cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
              cover_offset?: number;
              creation_date: string;
              file_externals: {
                  external_identifier: string;
                  external_url: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              }[];
              file_format: "mp4"
              | "jpeg"
              | "gif"
              | "png"
              | "jpg";
              file_properties: {
                  allowed_social_networks: string[];
                  aspect_ratio: { text: string; value: number };
                  duration: number;
                  height: number;
                  size_in_bytes: number;
                  width: number;
              };
              file_type: "video"
              | "image";
              id_organization: string;
              is_temporal: boolean;
              name: string;
              public_path: string;
          }[];
          id_account: | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: boolean } & {
                  [key: string]: unknown;
              };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
              username?: string;
          };
          id_integration?: string;
          id_organization: string;
          link?: string;
          made_for_kids?: boolean;
          metrics?: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          name?: string;
          next_stats_update?: string;
          pending_publish?: {
              data?: { [key: string]: unknown };
              deadline?: string;
              next_check?: string;
              temp_keys?: string[];
          };
          publication_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publication_type: | "profile"
          | "page"
          | "group"
          | "reels"
          | "stories"
          | "message";
          publication_warnings?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publish_date?: string;
          reply_control?: | "everyone"
          | "accounts_you_follow"
          | "mentioned_only"
          | "followers_only";
          retries: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest";
          state: "ready"
          | "withErrors"
          | "sended"
          | "draft"
          | "publishing";
          statistics?: {
              angers?: number;
              bookmarks?: number;
              clicks?: number;
              comments?: number;
              engagement?: number;
              follows?: number;
              hahas?: number;
              impressions?: number;
              likes?: number;
              loves?: number;
              negative_feedback?: number;
              outbound_clicks?: number;
              page_likes?: number;
              pin_clicks?: number;
              playback_0_count?: number;
              playback_100_count?: number;
              playback_25_count?: number;
              playback_50_count?: number;
              playback_75_count?: number;
              profile_activity?: number;
              profile_visits?: number;
              quotes?: number;
              reach?: number;
              reactions?: number;
              reactions_by_emoji?: { [key: string]: number };
              replys?: number;
              retwets?: number;
              saved?: number;
              saves?: number;
              share?: number;
              shareMentions?: number;
              shares?: number;
              sorrys?: number;
              url_link_clicks?: number;
              user_profile_clicks?: number;
              video_views?: number;
              views?: number;
              wows?: number;
          };
          stats_updated_date?: string;
          text?: string;
          title?: string;
          url?: string;
          visibility?: "public"
          | "unlisted"
          | "private";
      }
      • _id: string
      • Optionalai_generated?: { image: boolean; text: boolean }
        • image: boolean

          At least one of the files carries ai_generated. Recomputed every time the publication is saved, so replacing an AI image with a photo of your own turns it off.

        • text: boolean

          The text was written by the AI planner. Set when the draft is created and never changed afterwards, not even if the text is rewritten: it says where the text came from, not who reviewed it.

      • creation_date: string

        Format: date-time

      • Optionaldestination?: { id?: string; name?: string; section_id?: string; section_name?: string }

        Where inside the account this publication goes. Only present on the networks that answer destinations: true in GET /social_capabilities.

        • Optionalid?: string

          The board id. Always a string, never a number: Pinterest's ids are long integers, so a client that sends one as a JSON number has already lost digits to rounding before the request arrives. That is refused — publication_errors[].code = 987 with data.reason = "invalid_id" — rather than published to some other board. Sending the board's name instead of its id fails the same way, which is the likeliest first mistake of an integration.

        • Optionalname?: string

          The board's label, for display. Decides nothing.

        • Optionalsection_id?: string

          Pinterest only: the section of the board, optional. Absent or empty means the board itself. Same rule as id — anything that is not a string of digits is data.reason = "invalid_section_id". A board's sections arrive in the detail of one destination, not in the list of them.

        • Optionalsection_name?: string

          The section's label, for display. Decides nothing.

      • Optionalengagement_base?: "reach" | "impressions" | "followers"

        What this publication's engagement rate is divided by.

      • Optionalexternal_identifier?: string

        The network's own identifier, once published. On telegram an album is one publication that is several messages, and this holds the first one; the rest travel in extra_data.telegram_message_ids.

      • Optionalextra_data?: { [key: string]: unknown }

        What one network needs to remember about this publication and that has no common field. Absent on a publication whose network needs nothing, which is almost all of them.

        Today only `telegram` writes here, and only `telegram_message_ids`: the ids of every message an album turned into, because deleting the album means deleting all of them.
        
      • files: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        }[]

        The attached files, already resolved: every read and write path returns full uploads, not identifiers. Identifiers are what you SEND (see PublicationInput.files).

      • id_account:
            | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: boolean } & {
                    [key: string]: unknown;
                };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
                username?: string;
            }

        The account the publication goes out through.

        **It is not always the same shape.** The single-publication operations (create, read, retry) return the account already resolved; the listing and the update return its identifier as a string. Check before using it.
        
      • Optionalid_integration?: string

        The integration this publication came from — an RSS feed, for instance. Set when it is created and never changed afterwards.

      • id_organization: string
      • Optionallink?: string

        The destination link: where the publication takes whoever clicks it. Not to be confused with url, which is the link to the publication on the network and only exists once it is published.

        Only the networks that answer `link: true` in `GET /social_capabilities` carry it — today `pinterest` alone, where a pin has a `link` field of its own and sending traffic somewhere is the whole point of publishing there. Putting the URL inside `text` instead leaves it visible and unclickable.
        
        **On every other network the field is deleted on save**, like `destination`.
        
      • Optionalmade_for_kids?: boolean

        Whether the video is made for kids (COPPA), on the networks that answer made_for_kids: true in GET /social_capabilities (today youtube). Absent means false.

        **On every other network the field is deleted on save**, like `reply_control`.
        
      • Optionalmetrics?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }

        Last known measurement, in the common vocabulary. Absent until it is measured.

        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • Optionalname?: string

        Internal name. Never shown on the social network.

      • Optionalnext_stats_update?: string

        Format: date-time

      • Optionalpending_publish?: {
            data?: { [key: string]: unknown };
            deadline?: string;
            next_check?: string;
            temp_keys?: string[];
        }
        • Optionaldata?: { [key: string]: unknown }

          PlanVortex's own bookkeeping to resume the publication (on Instagram, the ids of Meta's containers). Its content may change without notice.

        • Optionaldeadline?: string

          Format: date-time

          When PlanVortex stops waiting. If the network has not finished by then, the publication ends in withErrors (999 on Instagram).

        • Optionalnext_check?: string

          Format: date-time

          When PlanVortex will ask the network again. A good moment to read the publication again: asking before it changes nothing.

        • Optionaltemp_keys?: string[]

          PlanVortex's own bookkeeping: the temporary cropped files the network may still be downloading. Do not rely on it.

      • publication_errors: { code: number; data?: { [key: string]: unknown }; message: string }[]

        Why the publication failed, one entry per problem. It is an array, and it is empty on a publication that has not failed.

        For a scheduled X (Twitter) publication that runs out of credits at publish time, `code` is 940 and `data` is `{ used, limit }`; the publication stays in state `withErrors`. No webhook announces it: read the publication to find out.
        
        On Instagram, two codes tell you whether a retry makes sense. **998**: Meta rejected the media while processing it (a codec, a duration, a URL it could not download). `data` carries `container_id`, `status_code` and, when Meta gives one, its reason in `status`. Retrying the same file fails the same way: change it first. **999**: Meta had not finished processing the media 10 minutes after it was sent. `data` carries `container_ids` and `minutes`. The file is not the problem, and a retry usually works.
        
      • publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message"
      • Optionalpublication_warnings?: { code: number; data?: { [key: string]: unknown }; message: string }[]

        What still has to be done by hand on the network for a publication that DID go out. Same shape as publication_errors, and an empty array when there is nothing to do.

        It is a separate field because these are not failures: the publication stays in state `sended` and must **not** be retried, because retrying would publish it twice. Like `publication_errors`, it belongs to the last attempt.
        
        Today there is one code. **2400** (YouTube): YouTube accepted the upload but did not make the video public, so YouTube Studio shows it as a draft or private until someone sets its audience and visibility there. The upload does not fail when this happens; PlanVortex reads the video back right after uploading it to find out. `data` carries `requested_privacy_status`, `privacy_status` (what YouTube actually left), `upload_status`, `made_for_kids` and `studio_url`, the YouTube Studio page where it is finished.
        
      • Optionalpublish_date?: string

        Format: date-time

      • Optionalreply_control?: "everyone" | "accounts_you_follow" | "mentioned_only" | "followers_only"

        Who can reply to the publication, on the networks that answer reply_control: true in GET /social_capabilities (today threads). Absent means the network's default, which is anyone. It is set when the publication goes out and cannot be changed afterwards.

        **On every other network the field is deleted on save**, like `link`.
        
      • retries: number

        Manual retries already spent on a failed publication, against the max_retries published by GET /publication_limits. Only POST .../retry increases it; updating the publication resets it to 0.

      • social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest"

        Always the network of the account in id_account.

      • state: "ready" | "withErrors" | "sended" | "draft" | "publishing"

        draft is never sent; ready is scheduled; publishing is in the network's hands right now; sended went out; withErrors failed and carries the reason in publication_errors.

        `publishing` usually lasts a few seconds, but it can last **up to 10 minutes** when the network is still processing a video (today, Instagram). Then `pending_publish` is present: wait and read the publication again, do not retry it.
        
      • Optionalstatistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        }
        • Optionalangers?: number
        • Optionalbookmarks?: number

          X (Twitter). Times the post was saved to bookmarks. Always available (public_metrics). Normalised as saves and counted towards engagement.

        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions. LinkedIn reports it directly. On X it comes from the non-public metrics and, when present, takes precedence over the sum of the individual interactions — it includes interactions the API does not break down.

        • Optionalfollows?: number
        • Optionalhahas?: number
        • Optionalimpressions?: number
        • Optionallikes?: number
        • Optionalloves?: number
        • Optionalnegative_feedback?: number
        • Optionaloutbound_clicks?: number

          Pinterest. Clicks that left the pin towards its link. This is the one normalised as the common clicks.

        • Optionalpage_likes?: number
        • Optionalpin_clicks?: number

          Pinterest. Clicks that opened the pin inside Pinterest without leaving it. No common equivalent, so it lives only here.

        • Optionalplayback_0_count?: number

          X (Twitter). Video playbacks that reached 0% — i.e. started. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_100_count?: number

          X (Twitter). Video playbacks that reached 100%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_25_count?: number

          X (Twitter). Video playbacks that reached 25%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_50_count?: number

          X (Twitter). Video playbacks that reached 50%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_75_count?: number

          X (Twitter). Video playbacks that reached 75%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalprofile_activity?: number
        • Optionalprofile_visits?: number
        • Optionalquotes?: number
        • Optionalreach?: number
        • Optionalreactions?: number

          Telegram, Slack and Pinterest. Every reaction on the post, all emoji together, normalised as likes. On telegram and slack it is the complete state and not an increment: it goes down when somebody takes theirs back. On slack it is the only metric the network gives.

        • Optionalreactions_by_emoji?: { [key: string]: number }

          Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it.

        • Optionalreplys?: number
        • Optionalretwets?: number
        • Optionalsaved?: number
        • Optionalsaves?: number

          Pinterest. Times the pin was saved to a board — the gesture the network is built on. Normalised as saves and counted towards engagement. Not the same key as saved, which is Instagram's.

        • Optionalshare?: number
        • OptionalshareMentions?: number
        • Optionalshares?: number
        • Optionalsorrys?: number
        • Optionalurl_link_clicks?: number

          X (Twitter). Clicks on links in the post. Comes from X's non-public metrics: omitted when unavailable.

        • Optionaluser_profile_clicks?: number

          X (Twitter). Clicks on the author's profile from the post. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalvideo_views?: number
        • Optionalviews?: number
        • Optionalwows?: number
      • Optionalstats_updated_date?: string

        Format: date-time

      • Optionaltext?: string
      • Optionaltitle?: string

        Only the networks that have a title field use it.

      • Optionalurl?: string

        Link to the publication on the network, when there is one. A private Telegram channel has no public URL, so it comes back empty even though the post went out.

      • Optionalvisibility?: "public" | "unlisted" | "private"

        Who can see the publication when it goes out, on the networks that answer visibility: true in GET /social_capabilities (today youtube). Absent means public. It is set when the publication goes out.

        **On every other network the field is deleted on save**, like `reply_control`.
        
  • PublicationsPublicationsStatsList: {
        metric?: string;
        publications?: {
            _id: string;
            ai_generated?: { image: boolean; text: boolean };
            creation_date: string;
            destination?: {
                id?: string;
                name?: string;
                section_id?: string;
                section_name?: string;
            };
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            extra_data?: { [key: string]: unknown };
            files: {
                _id: string;
                ai_generated?: {
                    generated_at: string;
                    id_ai_plan?: string;
                    model: string;
                    provider: string;
                };
                cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
                cover_offset?: number;
                creation_date: string;
                file_externals: {
                    external_identifier: string;
                    external_url: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                }[];
                file_format: "mp4"
                | "jpeg"
                | "gif"
                | "png"
                | "jpg";
                file_properties: {
                    allowed_social_networks: string[];
                    aspect_ratio: { text: string; value: number };
                    duration: number;
                    height: number;
                    size_in_bytes: number;
                    width: number;
                };
                file_type: "video"
                | "image";
                id_organization: string;
                is_temporal: boolean;
                name: string;
                public_path: string;
            }[];
            id_account: | string
            | {
                _id: string;
                creation_date: string;
                error_code: number;
                extra_data?: { is_personal_profile?: (...)
                | (...)
                | (...) } & { [key: string]: unknown };
                followers_count?: number;
                id_client: string;
                id_organization: string;
                image?: string;
                name: string;
                next_comments_update?: string;
                next_stats_update?: string;
                private_message_link?: string;
                social_network:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord"
                    | "telegram"
                    | "threads"
                    | "slack"
                    | "pinterest";
                username?: string;
            };
            id_integration?: string;
            id_organization: string;
            link?: string;
            made_for_kids?: boolean;
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            name?: string;
            next_stats_update?: string;
            pending_publish?: {
                data?: { [key: string]: unknown };
                deadline?: string;
                next_check?: string;
                temp_keys?: string[];
            };
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publication_warnings?: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publish_date?: string;
            reply_control?: | "everyone"
            | "accounts_you_follow"
            | "mentioned_only"
            | "followers_only";
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
            state: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
            stats_updated_date?: string;
            text?: string;
            title?: string;
            url?: string;
            visibility?: "public"
            | "unlisted"
            | "private";
        }[];
        range?: {
            from_date?: string;
            previous_from_date?: string;
            previous_to_date?: string;
            to_date?: string;
        };
        summary?: {
            by_network?: {
                metrics?: {
                    clicks?: number;
                    comments?: number;
                    engagement?: number;
                    followers?: number;
                    followers_gained?: number;
                    impressions?: number;
                    likes?: number;
                    profile_views?: number;
                    reach?: number;
                    saves?: number;
                    shares?: number;
                    video_views?: number;
                };
                publications?: number;
                social_network?: string;
            }[];
            previous_total?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            total?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        };
        total?: number;
    }
    • Optionalmetric?: string

      Metric the listing is ordered by

    • Optionalpublications?: {
          _id: string;
          ai_generated?: { image: boolean; text: boolean };
          creation_date: string;
          destination?: {
              id?: string;
              name?: string;
              section_id?: string;
              section_name?: string;
          };
          engagement_base?: "reach"
          | "impressions"
          | "followers";
          external_identifier?: string;
          extra_data?: { [key: string]: unknown };
          files: {
              _id: string;
              ai_generated?: {
                  generated_at: string;
                  id_ai_plan?: string;
                  model: string;
                  provider: string;
              };
              cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
              cover_offset?: number;
              creation_date: string;
              file_externals: {
                  external_identifier: string;
                  external_url: string;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              }[];
              file_format: "mp4"
              | "jpeg"
              | "gif"
              | "png"
              | "jpg";
              file_properties: {
                  allowed_social_networks: string[];
                  aspect_ratio: { text: string; value: number };
                  duration: number;
                  height: number;
                  size_in_bytes: number;
                  width: number;
              };
              file_type: "video"
              | "image";
              id_organization: string;
              is_temporal: boolean;
              name: string;
              public_path: string;
          }[];
          id_account: | string
          | {
              _id: string;
              creation_date: string;
              error_code: number;
              extra_data?: { is_personal_profile?: (...)
              | (...)
              | (...) } & { [key: string]: unknown };
              followers_count?: number;
              id_client: string;
              id_organization: string;
              image?: string;
              name: string;
              next_comments_update?: string;
              next_stats_update?: string;
              private_message_link?: string;
              social_network:
                  | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord"
                  | "telegram"
                  | "threads"
                  | "slack"
                  | "pinterest";
              username?: string;
          };
          id_integration?: string;
          id_organization: string;
          link?: string;
          made_for_kids?: boolean;
          metrics?: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          name?: string;
          next_stats_update?: string;
          pending_publish?: {
              data?: { [key: string]: unknown };
              deadline?: string;
              next_check?: string;
              temp_keys?: string[];
          };
          publication_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publication_type: | "profile"
          | "page"
          | "group"
          | "reels"
          | "stories"
          | "message";
          publication_warnings?: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publish_date?: string;
          reply_control?: | "everyone"
          | "accounts_you_follow"
          | "mentioned_only"
          | "followers_only";
          retries: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest";
          state: "ready"
          | "withErrors"
          | "sended"
          | "draft"
          | "publishing";
          statistics?: {
              angers?: number;
              bookmarks?: number;
              clicks?: number;
              comments?: number;
              engagement?: number;
              follows?: number;
              hahas?: number;
              impressions?: number;
              likes?: number;
              loves?: number;
              negative_feedback?: number;
              outbound_clicks?: number;
              page_likes?: number;
              pin_clicks?: number;
              playback_0_count?: number;
              playback_100_count?: number;
              playback_25_count?: number;
              playback_50_count?: number;
              playback_75_count?: number;
              profile_activity?: number;
              profile_visits?: number;
              quotes?: number;
              reach?: number;
              reactions?: number;
              reactions_by_emoji?: { [key: string]: number };
              replys?: number;
              retwets?: number;
              saved?: number;
              saves?: number;
              share?: number;
              shareMentions?: number;
              shares?: number;
              sorrys?: number;
              url_link_clicks?: number;
              user_profile_clicks?: number;
              video_views?: number;
              views?: number;
              wows?: number;
          };
          stats_updated_date?: string;
          text?: string;
          title?: string;
          url?: string;
          visibility?: "public"
          | "unlisted"
          | "private";
      }[]

      The requested page. Each publication carries its last known metrics, engagement_base and stats_updated_date; a publication that has not been measured yet has none of them.

    • Optionalrange?: {
          from_date?: string;
          previous_from_date?: string;
          previous_to_date?: string;
          to_date?: string;
      }

      The resolved range and the immediately preceding period of the same length, which is what summary.previous_total covers.

      • Optionalfrom_date?: string

        Format: date-time

      • Optionalprevious_from_date?: string

        Format: date-time

      • Optionalprevious_to_date?: string

        Format: date-time

      • Optionalto_date?: string

        Format: date-time

    • Optionalsummary?: {
          by_network?: {
              metrics?: {
                  clicks?: number;
                  comments?: number;
                  engagement?: number;
                  followers?: number;
                  followers_gained?: number;
                  impressions?: number;
                  likes?: number;
                  profile_views?: number;
                  reach?: number;
                  saves?: number;
                  shares?: number;
                  video_views?: number;
              };
              publications?: number;
              social_network?: string;
          }[];
          previous_total?: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          total?: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
      }

      Aggregates for the whole organization in the range. Omitted when summary=false.

      • Optionalby_network?: {
            metrics?: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            publications?: number;
            social_network?: string;
        }[]
      • Optionalprevious_total?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • Optionaltotal?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
    • Optionaltotal?: number

      Publications matching the filters, for paging

  • PublicationsPublicationStatsHistory: {
        engagement_base?: "reach" | "impressions" | "followers";
        id_publication: string;
        latest?: {
            collected_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
            raw?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                outbound_clicks?: number;
                page_likes?: number;
                pin_clicks?: number;
                playback_0_count?: number;
                playback_100_count?: number;
                playback_25_count?: number;
                playback_50_count?: number;
                playback_75_count?: number;
                profile_activity?: number;
                profile_visits?: number;
                quotes?: number;
                reach?: number;
                reactions?: number;
                reactions_by_emoji?: { [key: string]: number };
                replys?: number;
                retwets?: number;
                saved?: number;
                saves?: number;
                share?: number;
                shareMentions?: number;
                shares?: number;
                sorrys?: number;
                url_link_clicks?: number;
                user_profile_clicks?: number;
                video_views?: number;
                views?: number;
                wows?: number;
            };
        };
        metrics?: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
        next_stats_update?: string;
        publish_date?: string;
        series: {
            collected_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            metrics: {
                clicks?: number;
                comments?: number;
                engagement?: number;
                followers?: number;
                followers_gained?: number;
                impressions?: number;
                likes?: number;
                profile_views?: number;
                reach?: number;
                saves?: number;
                shares?: number;
                video_views?: number;
            };
        }[];
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest";
        statistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        };
        stats_updated_date?: string;
    }

    A publication's measured history plus its last known values.

    • Optionalengagement_base?: "reach" | "impressions" | "followers"
    • id_publication: string
    • Optionallatest?: {
          collected_date: string;
          engagement_base?: "reach" | "impressions" | "followers";
          metrics: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
          raw?: {
              angers?: number;
              bookmarks?: number;
              clicks?: number;
              comments?: number;
              engagement?: number;
              follows?: number;
              hahas?: number;
              impressions?: number;
              likes?: number;
              loves?: number;
              negative_feedback?: number;
              outbound_clicks?: number;
              page_likes?: number;
              pin_clicks?: number;
              playback_0_count?: number;
              playback_100_count?: number;
              playback_25_count?: number;
              playback_50_count?: number;
              playback_75_count?: number;
              profile_activity?: number;
              profile_visits?: number;
              quotes?: number;
              reach?: number;
              reactions?: number;
              reactions_by_emoji?: { [key: string]: number };
              replys?: number;
              retwets?: number;
              saved?: number;
              saves?: number;
              share?: number;
              shareMentions?: number;
              shares?: number;
              sorrys?: number;
              url_link_clicks?: number;
              user_profile_clicks?: number;
              video_views?: number;
              views?: number;
              wows?: number;
          };
      }

      The most recent row of the series, with the network's raw payload attached. Absent when the series is empty.

      • collected_date: string

        Format: date-time

      • Optionalengagement_base?: "reach" | "impressions" | "followers"
      • metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        }
        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions

        • Optionalfollowers?: number

          Followers accumulated at that date, not the day's gain.

        • Optionalfollowers_gained?: number

          Followers gained that day.

        • Optionalimpressions?: number

          Times the content was shown (not unique)

        • Optionallikes?: number
        • Optionalprofile_views?: number
        • Optionalreach?: number

          Unique users reached

        • Optionalsaves?: number
        • Optionalshares?: number
        • Optionalvideo_views?: number
      • Optionalraw?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            outbound_clicks?: number;
            page_likes?: number;
            pin_clicks?: number;
            playback_0_count?: number;
            playback_100_count?: number;
            playback_25_count?: number;
            playback_50_count?: number;
            playback_75_count?: number;
            profile_activity?: number;
            profile_visits?: number;
            quotes?: number;
            reach?: number;
            reactions?: number;
            reactions_by_emoji?: { [key: string]: number };
            replys?: number;
            retwets?: number;
            saved?: number;
            saves?: number;
            share?: number;
            shareMentions?: number;
            shares?: number;
            sorrys?: number;
            url_link_clicks?: number;
            user_profile_clicks?: number;
            video_views?: number;
            views?: number;
            wows?: number;
        }

        What the network answered, unprocessed.

        • Optionalangers?: number
        • Optionalbookmarks?: number

          X (Twitter). Times the post was saved to bookmarks. Always available (public_metrics). Normalised as saves and counted towards engagement.

        • Optionalclicks?: number
        • Optionalcomments?: number
        • Optionalengagement?: number

          Total interactions. LinkedIn reports it directly. On X it comes from the non-public metrics and, when present, takes precedence over the sum of the individual interactions — it includes interactions the API does not break down.

        • Optionalfollows?: number
        • Optionalhahas?: number
        • Optionalimpressions?: number
        • Optionallikes?: number
        • Optionalloves?: number
        • Optionalnegative_feedback?: number
        • Optionaloutbound_clicks?: number

          Pinterest. Clicks that left the pin towards its link. This is the one normalised as the common clicks.

        • Optionalpage_likes?: number
        • Optionalpin_clicks?: number

          Pinterest. Clicks that opened the pin inside Pinterest without leaving it. No common equivalent, so it lives only here.

        • Optionalplayback_0_count?: number

          X (Twitter). Video playbacks that reached 0% — i.e. started. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_100_count?: number

          X (Twitter). Video playbacks that reached 100%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_25_count?: number

          X (Twitter). Video playbacks that reached 25%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_50_count?: number

          X (Twitter). Video playbacks that reached 50%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalplayback_75_count?: number

          X (Twitter). Video playbacks that reached 75%. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalprofile_activity?: number
        • Optionalprofile_visits?: number
        • Optionalquotes?: number
        • Optionalreach?: number
        • Optionalreactions?: number

          Telegram, Slack and Pinterest. Every reaction on the post, all emoji together, normalised as likes. On telegram and slack it is the complete state and not an increment: it goes down when somebody takes theirs back. On slack it is the only metric the network gives.

        • Optionalreactions_by_emoji?: { [key: string]: number }

          Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it.

        • Optionalreplys?: number
        • Optionalretwets?: number
        • Optionalsaved?: number
        • Optionalsaves?: number

          Pinterest. Times the pin was saved to a board — the gesture the network is built on. Normalised as saves and counted towards engagement. Not the same key as saved, which is Instagram's.

        • Optionalshare?: number
        • OptionalshareMentions?: number
        • Optionalshares?: number
        • Optionalsorrys?: number
        • Optionalurl_link_clicks?: number

          X (Twitter). Clicks on links in the post. Comes from X's non-public metrics: omitted when unavailable.

        • Optionaluser_profile_clicks?: number

          X (Twitter). Clicks on the author's profile from the post. Comes from X's non-public metrics: omitted when unavailable.

        • Optionalvideo_views?: number
        • Optionalviews?: number
        • Optionalwows?: number
    • Optionalmetrics?: {
          clicks?: number;
          comments?: number;
          engagement?: number;
          followers?: number;
          followers_gained?: number;
          impressions?: number;
          likes?: number;
          profile_views?: number;
          reach?: number;
          saves?: number;
          shares?: number;
          video_views?: number;
      }
      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions

      • Optionalfollowers?: number

        Followers accumulated at that date, not the day's gain.

      • Optionalfollowers_gained?: number

        Followers gained that day.

      • Optionalimpressions?: number

        Times the content was shown (not unique)

      • Optionallikes?: number
      • Optionalprofile_views?: number
      • Optionalreach?: number

        Unique users reached

      • Optionalsaves?: number
      • Optionalshares?: number
      • Optionalvideo_views?: number
    • Optionalnext_stats_update?: string

      Format: date-time

      When the collector will look again. Absent means the 30-day window is over

    • Optionalpublish_date?: string

      Format: date-time

    • series: {
          collected_date: string;
          engagement_base?: "reach" | "impressions" | "followers";
          metrics: {
              clicks?: number;
              comments?: number;
              engagement?: number;
              followers?: number;
              followers_gained?: number;
              impressions?: number;
              likes?: number;
              profile_views?: number;
              reach?: number;
              saves?: number;
              shares?: number;
              video_views?: number;
          };
      }[]

      One row per measured day, oldest first. Empty is valid: nothing has been measured yet.

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "telegram"
          | "threads"
          | "slack"
          | "pinterest"
    • Optionalstatistics?: {
          angers?: number;
          bookmarks?: number;
          clicks?: number;
          comments?: number;
          engagement?: number;
          follows?: number;
          hahas?: number;
          impressions?: number;
          likes?: number;
          loves?: number;
          negative_feedback?: number;
          outbound_clicks?: number;
          page_likes?: number;
          pin_clicks?: number;
          playback_0_count?: number;
          playback_100_count?: number;
          playback_25_count?: number;
          playback_50_count?: number;
          playback_75_count?: number;
          profile_activity?: number;
          profile_visits?: number;
          quotes?: number;
          reach?: number;
          reactions?: number;
          reactions_by_emoji?: { [key: string]: number };
          replys?: number;
          retwets?: number;
          saved?: number;
          saves?: number;
          share?: number;
          shareMentions?: number;
          shares?: number;
          sorrys?: number;
          url_link_clicks?: number;
          user_profile_clicks?: number;
          video_views?: number;
          views?: number;
          wows?: number;
      }
      • Optionalangers?: number
      • Optionalbookmarks?: number

        X (Twitter). Times the post was saved to bookmarks. Always available (public_metrics). Normalised as saves and counted towards engagement.

      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions. LinkedIn reports it directly. On X it comes from the non-public metrics and, when present, takes precedence over the sum of the individual interactions — it includes interactions the API does not break down.

      • Optionalfollows?: number
      • Optionalhahas?: number
      • Optionalimpressions?: number
      • Optionallikes?: number
      • Optionalloves?: number
      • Optionalnegative_feedback?: number
      • Optionaloutbound_clicks?: number

        Pinterest. Clicks that left the pin towards its link. This is the one normalised as the common clicks.

      • Optionalpage_likes?: number
      • Optionalpin_clicks?: number

        Pinterest. Clicks that opened the pin inside Pinterest without leaving it. No common equivalent, so it lives only here.

      • Optionalplayback_0_count?: number

        X (Twitter). Video playbacks that reached 0% — i.e. started. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_100_count?: number

        X (Twitter). Video playbacks that reached 100%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_25_count?: number

        X (Twitter). Video playbacks that reached 25%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_50_count?: number

        X (Twitter). Video playbacks that reached 50%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalplayback_75_count?: number

        X (Twitter). Video playbacks that reached 75%. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalprofile_activity?: number
      • Optionalprofile_visits?: number
      • Optionalquotes?: number
      • Optionalreach?: number
      • Optionalreactions?: number

        Telegram, Slack and Pinterest. Every reaction on the post, all emoji together, normalised as likes. On telegram and slack it is the complete state and not an increment: it goes down when somebody takes theirs back. On slack it is the only metric the network gives.

      • Optionalreactions_by_emoji?: { [key: string]: number }

        Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it.

      • Optionalreplys?: number
      • Optionalretwets?: number
      • Optionalsaved?: number
      • Optionalsaves?: number

        Pinterest. Times the pin was saved to a board — the gesture the network is built on. Normalised as saves and counted towards engagement. Not the same key as saved, which is Instagram's.

      • Optionalshare?: number
      • OptionalshareMentions?: number
      • Optionalshares?: number
      • Optionalsorrys?: number
      • Optionalurl_link_clicks?: number

        X (Twitter). Clicks on links in the post. Comes from X's non-public metrics: omitted when unavailable.

      • Optionaluser_profile_clicks?: number

        X (Twitter). Clicks on the author's profile from the post. Comes from X's non-public metrics: omitted when unavailable.

      • Optionalvideo_views?: number
      • Optionalviews?: number
      • Optionalwows?: number
    • Optionalstats_updated_date?: string

      Format: date-time

      Last time it was measured. Absent means never

  • PublicationsPublicationStatsPoint: {
        collected_date: string;
        engagement_base?: "reach" | "impressions" | "followers";
        metrics: {
            clicks?: number;
            comments?: number;
            engagement?: number;
            followers?: number;
            followers_gained?: number;
            impressions?: number;
            likes?: number;
            profile_views?: number;
            reach?: number;
            saves?: number;
            shares?: number;
            video_views?: number;
        };
    }

    One measurement of a publication. metrics is the running total at collected_date, not that day's increment.

    • collected_date: string

      Format: date-time

      Day of the measurement, normalized to 00:00

    • Optionalengagement_base?: "reach" | "impressions" | "followers"

      What the engagement rate is divided by. Two rows with different bases are not comparable: state the base whenever you put them in the same table.

    • metrics: {
          clicks?: number;
          comments?: number;
          engagement?: number;
          followers?: number;
          followers_gained?: number;
          impressions?: number;
          likes?: number;
          profile_views?: number;
          reach?: number;
          saves?: number;
          shares?: number;
          video_views?: number;
      }
      • Optionalclicks?: number
      • Optionalcomments?: number
      • Optionalengagement?: number

        Total interactions

      • Optionalfollowers?: number

        Followers accumulated at that date, not the day's gain.

      • Optionalfollowers_gained?: number

        Followers gained that day.

      • Optionalimpressions?: number

        Times the content was shown (not unique)

      • Optionallikes?: number
      • Optionalprofile_views?: number
      • Optionalreach?: number

        Unique users reached

      • Optionalsaves?: number
      • Optionalshares?: number
      • Optionalvideo_views?: number
  • PublicationStats: {
        angers?: number;
        bookmarks?: number;
        clicks?: number;
        comments?: number;
        engagement?: number;
        follows?: number;
        hahas?: number;
        impressions?: number;
        likes?: number;
        loves?: number;
        negative_feedback?: number;
        outbound_clicks?: number;
        page_likes?: number;
        pin_clicks?: number;
        playback_0_count?: number;
        playback_100_count?: number;
        playback_25_count?: number;
        playback_50_count?: number;
        playback_75_count?: number;
        profile_activity?: number;
        profile_visits?: number;
        quotes?: number;
        reach?: number;
        reactions?: number;
        reactions_by_emoji?: { [key: string]: number };
        replys?: number;
        retwets?: number;
        saved?: number;
        saves?: number;
        share?: number;
        shareMentions?: number;
        shares?: number;
        sorrys?: number;
        url_link_clicks?: number;
        user_profile_clicks?: number;
        video_views?: number;
        views?: number;
        wows?: number;
    }

    Raw, per-network metrics for a publication. Only the fields that belong to the publication's own social network are returned.

    **An absent field is not a zero.** A field is present only when the network actually reported it; `0` means the network measured zero. This matters most on X (Twitter), where metrics are split into groups with different access levels: `public_metrics` (likes, replys, retwets, quotes, bookmarks, impressions) is always available, while clicks, the pre-computed `engagement` and the video playback quartiles come from X's non-public metrics — only for your own posts, within 30 days of publishing, and only if the app is entitled to them. When they are unavailable they are omitted rather than returned as `0`. Do not default missing fields to zero when displaying them.
    
    On `discord` there are only two: `likes` (the reactions on the message) and `comments` (the messages in its thread). There is no impressions figure anywhere in Discord's API, so engagement is computed over the server's member count.
    
    On `bluesky` there are no impressions and no reach either — only the public counters — so engagement is computed over followers.
    
    On `threads` there are six, and the one that matters is `views`: it is the only one of the four newest networks with something like impressions, so its engagement rate is computed over a real base and not over followers. Sharing arrives split in three — `reposts`, `quotes` and `shares` (outside Threads) — and the three are added into one figure, the same criterion as on X; the breakdown stays in `raw`. A reply is what every other network calls a comment.
    
    On `telegram` there are two as well, and **neither of them is asked for**: the Bot API has no method that returns a message's metrics, so `reactions` arrives on its own through the bot and `comments` is counted in PlanVortex's own inbox. There are no impressions, no reach, no views and no forwards to be had anywhere in it, so engagement is computed over followers.
    
    On `slack` there is exactly **one**, `reactions`, and the other absences are the informative part: the Web API publishes no impressions, no reach, no views and no clicks for a message, so those keys are missing rather than zero. There is no `comments` either — Slack threads are not read at all (`comments` is `false` in `GET /social_capabilities`). Engagement is computed over the channel's members.
    
    On `pinterest` there are seven, and three of them exist nowhere else: `saves` — the gesture the whole network is built on —, `outbound_clicks` (clicks that left the pin towards its `link`, which is the one normalised as the common `clicks`) and `pin_clicks` (clicks that opened the pin inside Pinterest, with no common equivalent). `impressions` is real here, so the engagement rate is computed over it and not over followers. `video_views` only exists on a video pin. And `comments` is the odd one: Pinterest **counts** them and offers no way to read them, so the number is reported while `comments` is `false` in `GET /social_capabilities` — this network has no comment inbox, and it is not a gap waiting to be filled.
    
    • Optionalangers?: number
    • Optionalbookmarks?: number

      X (Twitter). Times the post was saved to bookmarks. Always available (public_metrics). Normalised as saves and counted towards engagement.

    • Optionalclicks?: number
    • Optionalcomments?: number
    • Optionalengagement?: number

      Total interactions. LinkedIn reports it directly. On X it comes from the non-public metrics and, when present, takes precedence over the sum of the individual interactions — it includes interactions the API does not break down.

    • Optionalfollows?: number
    • Optionalhahas?: number
    • Optionalimpressions?: number
    • Optionallikes?: number
    • Optionalloves?: number
    • Optionalnegative_feedback?: number
    • Optionaloutbound_clicks?: number

      Pinterest. Clicks that left the pin towards its link. This is the one normalised as the common clicks.

    • Optionalpage_likes?: number
    • Optionalpin_clicks?: number

      Pinterest. Clicks that opened the pin inside Pinterest without leaving it. No common equivalent, so it lives only here.

    • Optionalplayback_0_count?: number

      X (Twitter). Video playbacks that reached 0% — i.e. started. Comes from X's non-public metrics: omitted when unavailable.

    • Optionalplayback_100_count?: number

      X (Twitter). Video playbacks that reached 100%. Comes from X's non-public metrics: omitted when unavailable.

    • Optionalplayback_25_count?: number

      X (Twitter). Video playbacks that reached 25%. Comes from X's non-public metrics: omitted when unavailable.

    • Optionalplayback_50_count?: number

      X (Twitter). Video playbacks that reached 50%. Comes from X's non-public metrics: omitted when unavailable.

    • Optionalplayback_75_count?: number

      X (Twitter). Video playbacks that reached 75%. Comes from X's non-public metrics: omitted when unavailable.

    • Optionalprofile_activity?: number
    • Optionalprofile_visits?: number
    • Optionalquotes?: number
    • Optionalreach?: number
    • Optionalreactions?: number

      Telegram, Slack and Pinterest. Every reaction on the post, all emoji together, normalised as likes. On telegram and slack it is the complete state and not an increment: it goes down when somebody takes theirs back. On slack it is the only metric the network gives.

    • Optionalreactions_by_emoji?: { [key: string]: number }

      Telegram. The same total broken down by emoji. Reactions with a custom emoji are grouped under a single key: their identifier means nothing outside the server that created it.

    • Optionalreplys?: number
    • Optionalretwets?: number
    • Optionalsaved?: number
    • Optionalsaves?: number

      Pinterest. Times the pin was saved to a board — the gesture the network is built on. Normalised as saves and counted towards engagement. Not the same key as saved, which is Instagram's.

    • Optionalshare?: number
    • OptionalshareMentions?: number
    • Optionalshares?: number
    • Optionalsorrys?: number
    • Optionalurl_link_clicks?: number

      X (Twitter). Clicks on links in the post. Comes from X's non-public metrics: omitted when unavailable.

    • Optionaluser_profile_clicks?: number

      X (Twitter). Clicks on the author's profile from the post. Comes from X's non-public metrics: omitted when unavailable.

    • Optionalvideo_views?: number
    • Optionalviews?: number
    • Optionalwows?: number
  • SocialCredentials: {
        application_name?: string;
        client_id?: string;
        has_bot_token?: boolean;
        has_client_secret?: boolean;
        verified_date?: string;
    }

    What can be read back about an organization's own application. The secrets are not here and never will be.

    • Optionalapplication_name?: string

      The application's name, as Discord returned it when the credentials were validated.

    • Optionalclient_id?: string
    • Optionalhas_bot_token?: boolean

      Whether a bot token is stored. Never the token.

    • Optionalhas_client_secret?: boolean

      Whether a secret is stored. Never the secret.

    • Optionalverified_date?: string

      Format: date-time

      When the credentials were last validated against Discord.

  • SocialIdentifier: {
        _id: string;
        external_identifier?: string;
        last_send_date?: string;
        social_network:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "email";
    }

    The same person, on one channel.

    • _id: string
    • Optionalexternal_identifier?: string

      Identifier of the contact on that channel.

    • Optionallast_send_date?: string

      Format: date-time

      Last message received from the contact. On WhatsApp it is what opens the 24-hour window in which a free-form message is allowed.

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
          | "email"
  • SocialNetwork:
        | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord"
        | "telegram"
        | "threads"
        | "slack"
        | "pinterest"

    A social network supported by PlanVortex.

    **This list grows.** Treat it as an open enumeration: a client that rejects an unknown value breaks the day a network is added, which happens several times a year. Not every network does everything — ask `GET /social_capabilities`.
    
  • StatsSettings: { auto_refresh_twitter: boolean }

    Statistics collection settings. Only auto_refresh_twitter is read; any other key is ignored.

    • auto_refresh_twitter: boolean

      Whether the background job refreshes X (Twitter) statistics automatically. Every other network is free and always refreshed; X charges 1 credit per read, so this is the one setting that makes the robot spend the client's credits. Anything other than an explicit false is treated as true.

      true
      
  • Success: { success: boolean }

    What an operation with nothing to return answers. A failure never looks like this: it comes back as an Error with HTTP 400.

  • Upload: {
        _id: string;
        ai_generated?: {
            generated_at: string;
            id_ai_plan?: string;
            model: string;
            provider: string;
        };
        cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
        cover_offset?: number;
        creation_date: string;
        file_externals: {
            external_identifier: string;
            external_url: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord"
            | "telegram"
            | "threads"
            | "slack"
            | "pinterest";
        }[];
        file_format: "mp4"
        | "jpeg"
        | "gif"
        | "png"
        | "jpg";
        file_properties: {
            allowed_social_networks: string[];
            aspect_ratio: { text: string; value: number };
            duration: number;
            height: number;
            size_in_bytes: number;
            width: number;
        };
        file_type: "video"
        | "image";
        id_organization: string;
        is_temporal: boolean;
        name: string;
        public_path: string;
    }

    A file in the organization's library.

    **`public_path` is a signed, temporary URL, not a permanent link.** Do not store it: it expires. Ask for the upload again when you need it.
    
    • _id: string
    • Optionalai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string }
      • generated_at: string

        Format: date-time

      • Optionalid_ai_plan?: string

        The AI plan that generated it.

      • model: string

        The model, as it was requested, for instance google/gemini-3.1-flash-image.

      • provider: string

        The AI provider that answered: openrouter unless the client brought its own key.

    • Optionalcover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...

      Cover of a video, which is another upload of its own and comes back already resolved. It never appears on its own in the library listing.

    • Optionalcover_offset?: number

      Point of the video, in milliseconds, used as the cover frame.

    • creation_date: string

      Format: date-time

    • file_externals: {
          external_identifier: string;
          external_url: string;
          social_network:
              | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
      }[]

      Where this file ended up on each network it has been published to. Some networks keep their own copy and give it an identifier that is reused instead of uploading the bytes again.

    • file_format: "mp4" | "jpeg" | "gif" | "png" | "jpg"

      The format of the stored bytes. heic/heif are accepted at the door — that is what an iPhone produces — but never stored: they are converted to JPEG while being ingested, so an upload never comes back with one.

    • file_properties: {
          allowed_social_networks: string[];
          aspect_ratio: { text: string; value: number };
          duration: number;
          height: number;
          size_in_bytes: number;
          width: number;
      }
      • allowed_social_networks: string[]

        The networks whose accepted crops this file's ratio matches, with a 0.1 margin. It is about the RATIO only: a network listed here can still reject the file for its duration or its weight (see GET /social_limits).

      • aspect_ratio: { text: string; value: number }

        Width divided by height, as a number and as a person writes it.

        • text: string
          16:9
          
        • value: number
          1.7777777777777777
          
      • duration: number

        Seconds. 0 on an image.

      • height: number
      • size_in_bytes: number
      • width: number

        0 on a file whose dimensions could not be read.

    • file_type: "video" | "image"
    • id_organization: string
    • is_temporal: boolean

      true on a file the platform created for itself — a crop made to fit a network's aspect ratio. Temporary files are not part of the library listing.

    • name: string
    • public_path: string

      Format: uri

      Download URL. IMPORTANT: it is a TEMPORARY, signed URL, not a permanent link. It expires (24 hours by default) and must not be stored or shared: ask for the upload again to get a valid one. The URL stays byte-identical within the same hour, so it can be cached for that long.

      https://a1b2c3d4e5f6.eu.r2.cloudflarestorage.com/planvortex-prod/orgs/60b.../60c.../foto.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=86400&X-Amz-Signature=...
      
  • UploadsUploadList: {
        total: number;
        uploads: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        }[];
    }
  • UploadsUploadOne: {
        upload: {
            _id: string;
            ai_generated?: {
                generated_at: string;
                id_ai_plan?: string;
                model: string;
                provider: string;
            };
            cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
            cover_offset?: number;
            creation_date: string;
            file_externals: {
                external_identifier: string;
                external_url: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
            }[];
            file_format: "mp4"
            | "jpeg"
            | "gif"
            | "png"
            | "jpg";
            file_properties: {
                allowed_social_networks: string[];
                aspect_ratio: { text: string; value: number };
                duration: number;
                height: number;
                size_in_bytes: number;
                width: number;
            };
            file_type: "video"
            | "image";
            id_organization: string;
            is_temporal: boolean;
            name: string;
            public_path: string;
        };
    }
    • upload: {
          _id: string;
          ai_generated?: {
              generated_at: string;
              id_ai_plan?: string;
              model: string;
              provider: string;
          };
          cover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...;
          cover_offset?: number;
          creation_date: string;
          file_externals: {
              external_identifier: string;
              external_url: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord"
              | "telegram"
              | "threads"
              | "slack"
              | "pinterest";
          }[];
          file_format: "mp4"
          | "jpeg"
          | "gif"
          | "png"
          | "jpg";
          file_properties: {
              allowed_social_networks: string[];
              aspect_ratio: { text: string; value: number };
              duration: number;
              height: number;
              size_in_bytes: number;
              width: number;
          };
          file_type: "video"
          | "image";
          id_organization: string;
          is_temporal: boolean;
          name: string;
          public_path: string;
      }
      • _id: string
      • Optionalai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string }
        • generated_at: string

          Format: date-time

        • Optionalid_ai_plan?: string

          The AI plan that generated it.

        • model: string

          The model, as it was requested, for instance google/gemini-3.1-flash-image.

        • provider: string

          The AI provider that answered: openrouter unless the client brought its own key.

      • Optionalcover_image?: { _id: string; ai_generated?: { generated_at: string; id_ai_plan?: string; model: string; provider: string; }; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | ... 12 more ... | "pinterest"; }[]; ... 6 m...

        Cover of a video, which is another upload of its own and comes back already resolved. It never appears on its own in the library listing.

      • Optionalcover_offset?: number

        Point of the video, in milliseconds, used as the cover frame.

      • creation_date: string

        Format: date-time

      • file_externals: {
            external_identifier: string;
            external_url: string;
            social_network:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord"
                | "telegram"
                | "threads"
                | "slack"
                | "pinterest";
        }[]

        Where this file ended up on each network it has been published to. Some networks keep their own copy and give it an identifier that is reused instead of uploading the bytes again.

      • file_format: "mp4" | "jpeg" | "gif" | "png" | "jpg"

        The format of the stored bytes. heic/heif are accepted at the door — that is what an iPhone produces — but never stored: they are converted to JPEG while being ingested, so an upload never comes back with one.

      • file_properties: {
            allowed_social_networks: string[];
            aspect_ratio: { text: string; value: number };
            duration: number;
            height: number;
            size_in_bytes: number;
            width: number;
        }
        • allowed_social_networks: string[]

          The networks whose accepted crops this file's ratio matches, with a 0.1 margin. It is about the RATIO only: a network listed here can still reject the file for its duration or its weight (see GET /social_limits).

        • aspect_ratio: { text: string; value: number }

          Width divided by height, as a number and as a person writes it.

          • text: string
            16:9
            
          • value: number
            1.7777777777777777
            
        • duration: number

          Seconds. 0 on an image.

        • height: number
        • size_in_bytes: number
        • width: number

          0 on a file whose dimensions could not be read.

      • file_type: "video" | "image"
      • id_organization: string
      • is_temporal: boolean

        true on a file the platform created for itself — a crop made to fit a network's aspect ratio. Temporary files are not part of the library listing.

      • name: string
      • public_path: string

        Format: uri

        Download URL. IMPORTANT: it is a TEMPORARY, signed URL, not a permanent link. It expires (24 hours by default) and must not be stored or shared: ask for the upload again to get a valid one. The URL stays byte-identical within the same hour, so it can be cached for that long.

        https://a1b2c3d4e5f6.eu.r2.cloudflarestorage.com/planvortex-prod/orgs/60b.../60c.../foto.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=86400&X-Amz-Signature=...