Interface OpenApiComponents

interface OpenApiComponents {
    headers: never;
    parameters: {
        AiPlansidAiPlan: string;
        AiPlansidClient: string;
        AiPlansidOrganization: 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;
            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";
            username?: string;
        };
        AccountsAccountList: {
            accounts: {
                _id: string;
                creation_date: string;
                error_code: number;
                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";
                username?: string;
            }[];
            total: number;
        };
        AccountsAccountOne: {
            account: {
                _id: string;
                creation_date: string;
                error_code: number;
                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";
                username?: string;
            };
        };
        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: {
            app_id?: string;
            config_id?: string;
            feature_type?: string;
            graph_version?: string;
            session_info_version?: string;
            type: "redirect"
            | "meta_embedded_signup";
        };
        AccountsSocialLinksList: {
            links: {
                authorization: {
                    app_id?: string;
                    config_id?: string;
                    feature_type?: string;
                    graph_version?: string;
                    session_info_version?: string;
                    type: "redirect"
                    | "meta_embedded_signup";
                };
                link: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
            }[];
        };
        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;
        };
        AiPlansAiPlan: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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";
                        }[];
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        };
        AiPlansAiPlanCostEstimate: {
            available_credits: number;
            base_cost: number;
            estimated_cost: number;
            images_target: number;
            texts_target: number;
        };
        AiPlansAiPlanCreateRequest: {
            accounts: string[];
            options?: {
                allow_images?: boolean;
                gallery_uploads?: string[];
                language?: string;
                max_images?: number;
                publish_days?: number[];
                shared?: boolean;
                timezone?: string;
                tone?: string;
                use_organization_context?: boolean;
                week_start?: string;
            };
            prompt: string;
        };
        AiPlansAiPlanCreateResponse: {
            ai_plan: {
                _id: string;
                accounts: string[];
                attempts: number;
                creation_date: string;
                credits_spent: number;
                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;
                    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;
                        creation_date: string;
                        engagement_base?: "reach"
                        | "impressions"
                        | "followers";
                        external_identifier?: string;
                        files: {
                            _id: string;
                            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                            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;
                            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";
                            username?: string;
                        };
                        id_integration?: string;
                        id_organization: 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;
                        };
                        name?: string;
                        next_stats_update?: string;
                        publication_errors: {
                            code: number;
                            data?: { [key: string]: unknown };
                            message: string;
                        }[];
                        publication_type: | "profile"
                        | "page"
                        | "group"
                        | "reels"
                        | "stories"
                        | "message";
                        publish_date?: string;
                        retries: number;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord";
                        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;
                            page_likes?: 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;
                            replys?: number;
                            retwets?: number;
                            saved?: 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;
                    }
                )[];
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
            };
            estimate: {
                available_credits: number;
                base_cost: number;
                estimated_cost: number;
                images_target: number;
                texts_target: number;
            };
            estimated_cost: number;
        };
        AiPlansAiPlanList: {
            ai_plans: {
                _id: string;
                accounts: string[];
                attempts: number;
                creation_date: string;
                credits_spent: number;
                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;
                    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;
                        creation_date: string;
                        engagement_base?: "reach"
                        | "impressions"
                        | "followers";
                        external_identifier?: string;
                        files: {
                            _id: string;
                            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                            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;
                            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";
                            username?: string;
                        };
                        id_integration?: string;
                        id_organization: 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;
                        };
                        name?: string;
                        next_stats_update?: string;
                        publication_errors: {
                            code: number;
                            data?: { [key: ...]: ... };
                            message: string;
                        }[];
                        publication_type: | "profile"
                        | "page"
                        | "group"
                        | "reels"
                        | "stories"
                        | "message";
                        publish_date?: string;
                        retries: number;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord";
                        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;
                            page_likes?: 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;
                            replys?: number;
                            retwets?: number;
                            saved?: 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;
                    }
                )[];
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
            }[];
            total: number;
        };
        AiPlansAiPlanOne: {
            ai_plan: {
                _id: string;
                accounts: string[];
                attempts: number;
                creation_date: string;
                credits_spent: number;
                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;
                    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;
                        creation_date: string;
                        engagement_base?: "reach"
                        | "impressions"
                        | "followers";
                        external_identifier?: string;
                        files: {
                            _id: string;
                            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                            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;
                            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";
                            username?: string;
                        };
                        id_integration?: string;
                        id_organization: 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;
                        };
                        name?: string;
                        next_stats_update?: string;
                        publication_errors: {
                            code: number;
                            data?: { [key: string]: unknown };
                            message: string;
                        }[];
                        publication_type: | "profile"
                        | "page"
                        | "group"
                        | "reels"
                        | "stories"
                        | "message";
                        publish_date?: string;
                        retries: number;
                        social_network: | "facebook"
                        | "instagram"
                        | "linkedin"
                        | "tiktok"
                        | "twitter"
                        | "whatsapp"
                        | "youtube"
                        | "google_business"
                        | "bluesky"
                        | "discord";
                        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;
                            page_likes?: 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;
                            replys?: number;
                            retwets?: number;
                            saved?: 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;
                    }
                )[];
                state: | "pending"
                | "generating"
                | "generated"
                | "validated"
                | "failed"
                | "cancelled";
            };
        };
        AiPlansAiPlanOptions: {
            allow_images: boolean;
            gallery_uploads: string[];
            language: 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;
            max_images?: number;
            publish_days?: number[];
            shared?: boolean;
            timezone?: string;
            tone?: string;
            use_organization_context?: boolean;
            week_start?: 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[] };
        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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_plan: {
                    current_period_end?: string;
                    current_period_start?: string;
                    enabled: boolean;
                    isEnabled: boolean;
                    plan_data: {
                        accounts: number;
                        ai_credits?: number;
                        artificial_inteligence?: boolean;
                        integrations: number;
                        publications: number;
                        space: number;
                        stats?: boolean;
                        twitter_credits?: number;
                        users: number;
                        whatsapp?: boolean;
                    };
                    plan_identifier: "basic"
                    | "free"
                    | "pro"
                    | "custom";
                    require_action?: boolean;
                    status: string;
                    stripe_customer_id?: string;
                };
                actual_use?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                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;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_plan: {
                    current_period_end?: string;
                    current_period_start?: string;
                    enabled: boolean;
                    isEnabled: boolean;
                    plan_data: {
                        accounts: number;
                        ai_credits?: number;
                        artificial_inteligence?: boolean;
                        integrations: number;
                        publications: number;
                        space: number;
                        stats?: boolean;
                        twitter_credits?: number;
                        users: number;
                        whatsapp?: boolean;
                    };
                    plan_identifier: "basic"
                    | "free"
                    | "pro"
                    | "custom";
                    require_action?: boolean;
                    status: string;
                    stripe_customer_id?: string;
                };
                actual_use?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            name: string;
        };
        ClientsOrganizationList: {
            organizations: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_use?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                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;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_use?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
            }[];
        };
        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;
                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";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
            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";
            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";
        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;
                    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";
                    username?: string;
                };
                id_organization: string;
                id_publication?: | string
                | {
                    _id: string;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                };
                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";
                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;
            messages: boolean;
            persistent_menu: boolean;
            products: boolean;
            publications: 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;
                    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";
                    username?: string;
                };
                id_organization: string;
                id_publication?: | string
                | {
                    _id: string;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                };
                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";
                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;
                            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                            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;
                    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";
        };
        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";
            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_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_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";
                    username?: string;
                }[];
                publications_with_errors?: {
                    _id: string;
                    creation_date?: string;
                    name?: string;
                    publication_errors?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publish_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    text?: string;
                }[];
                total_drafts?: number;
                upcoming_publications?: {
                    _id: string;
                    creation_date?: string;
                    name?: string;
                    publication_errors?: {
                        code: number;
                        data?: (...)
                        | (...);
                        message: string;
                    }[];
                    publish_date?: string;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    text?: string;
                }[];
            };
            messages?: { unread: number };
            plan_use?: {
                actual_asigned: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_use: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                limits: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
            };
            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";
                }[];
                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;
                            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";
                }[];
                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";
                    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";
                    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;
            }[];
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            limits: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
        };
        DashboardPublicationsSummary: {
            by_day: { day?: string; state?: string; total?: number }[];
            by_network: {
                social_network?:
                    | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                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";
                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;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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";
        };
        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: {
                auto_publish?: boolean;
                id_accounts?: string[];
                import_image?: boolean;
                last_checked?: string;
                publication_type?: string;
                seen_guids?: string[];
                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";
        };
        IntegrationsIntegrationProvider: {
            accepted_formats: string[];
            config_fields: {
                default?: unknown;
                name: string;
                options?: string[];
                required?: boolean;
                type: "boolean"
                | "text"
                | "url"
                | "accounts"
                | "textarea"
                | "select";
            }[];
            content_feed: boolean;
            file_import: boolean;
            provider: "google_drive"
            | "rss";
            requires_oauth: boolean;
        };
        IntegrationsIntegrationProviderName: "google_drive"
        | "rss";
        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;
        };
        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;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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";
                        }[];
                        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;
                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;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
            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: {
            message_options?: {
                files: (
                    | string
                    | {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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";
                        }[];
                        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;
                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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        OrganizationsOrganizationCreate: {
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            name: string;
        };
        OrganizationsOrganizationList: {
            organizations: {
                _id: string;
                actual_asigned?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_use?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                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;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_plan?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                actual_use?: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
            creation_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
        PublicationsPublicationInput: {
            files?: string[];
            name?: string;
            publication_type?: "profile"
            | "page"
            | "group"
            | "reels"
            | "stories";
            publish_date?: string;
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "bluesky"
                | "discord";
            state?: "ready"
            | "withErrors"
            | "sended"
            | "draft"
            | "publishing";
            text?: string;
            title?: string;
        };
        PublicationsPublicationList: {
            publications: {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }[];
            total: number;
        };
        PublicationsPublicationOne: {
            publication: {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
        };
        PublicationsPublicationRetry: {
            max_retries: number;
            publication: {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
        };
        PublicationsPublicationsStatsList: {
            metric?: string;
            publications?: {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }[];
            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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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";
            statistics?: {
                angers?: number;
                bookmarks?: number;
                clicks?: number;
                comments?: number;
                engagement?: number;
                follows?: number;
                hahas?: number;
                impressions?: number;
                likes?: number;
                loves?: number;
                negative_feedback?: number;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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";
        StatsSettings: { auto_refresh_twitter: boolean };
        Success: { success: boolean };
        Upload: {
            _id: string;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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: {
    AiPlansidAiPlan: string;
    AiPlansidClient: string;
    AiPlansidOrganization: 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

  • AiPlansidAiPlan: string

    AI plan identifier

  • AiPlansidClient: string

    Client identifier

  • AiPlansidOrganization: string

    Organization identifier

  • 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. |
    | `1101` | Invalid organization. |
    | `1501` | The comment's account could not be resolved. |
    
  • 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;
        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";
        username?: string;
    };
    AccountsAccountList: {
        accounts: {
            _id: string;
            creation_date: string;
            error_code: number;
            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";
            username?: string;
        }[];
        total: number;
    };
    AccountsAccountOne: {
        account: {
            _id: string;
            creation_date: string;
            error_code: number;
            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";
            username?: string;
        };
    };
    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: {
        app_id?: string;
        config_id?: string;
        feature_type?: string;
        graph_version?: string;
        session_info_version?: string;
        type: "redirect"
        | "meta_embedded_signup";
    };
    AccountsSocialLinksList: {
        links: {
            authorization: {
                app_id?: string;
                config_id?: string;
                feature_type?: string;
                graph_version?: string;
                session_info_version?: string;
                type: "redirect"
                | "meta_embedded_signup";
            };
            link: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
        }[];
    };
    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;
    };
    AiPlansAiPlan: {
        _id: string;
        accounts: string[];
        attempts: number;
        creation_date: string;
        credits_spent: number;
        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;
            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;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }
        )[];
        state: | "pending"
        | "generating"
        | "generated"
        | "validated"
        | "failed"
        | "cancelled";
    };
    AiPlansAiPlanCostEstimate: {
        available_credits: number;
        base_cost: number;
        estimated_cost: number;
        images_target: number;
        texts_target: number;
    };
    AiPlansAiPlanCreateRequest: {
        accounts: string[];
        options?: {
            allow_images?: boolean;
            gallery_uploads?: string[];
            language?: string;
            max_images?: number;
            publish_days?: number[];
            shared?: boolean;
            timezone?: string;
            tone?: string;
            use_organization_context?: boolean;
            week_start?: string;
        };
        prompt: string;
    };
    AiPlansAiPlanCreateResponse: {
        ai_plan: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        };
        estimate: {
            available_credits: number;
            base_cost: number;
            estimated_cost: number;
            images_target: number;
            texts_target: number;
        };
        estimated_cost: number;
    };
    AiPlansAiPlanList: {
        ai_plans: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        }[];
        total: number;
    };
    AiPlansAiPlanOne: {
        ai_plan: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        };
    };
    AiPlansAiPlanOptions: {
        allow_images: boolean;
        gallery_uploads: string[];
        language: 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;
        max_images?: number;
        publish_days?: number[];
        shared?: boolean;
        timezone?: string;
        tone?: string;
        use_organization_context?: boolean;
        week_start?: 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[] };
    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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_plan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            plan_identifier: "basic"
            | "free"
            | "pro"
            | "custom";
            require_action?: boolean;
            status: string;
            stripe_customer_id?: string;
        };
        actual_use?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        name: string;
    };
    ClientsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
        }[];
    };
    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;
            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";
            username?: string;
        };
        id_organization: string;
        id_publication?: | string
        | {
            _id: string;
            creation_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
        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";
        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";
    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;
                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";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
            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";
            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;
        messages: boolean;
        persistent_menu: boolean;
        products: boolean;
        publications: 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;
                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";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
            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";
            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;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                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";
    };
    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";
        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_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_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";
                username?: string;
            }[];
            publications_with_errors?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                text?: string;
            }[];
            total_drafts?: number;
            upcoming_publications?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                text?: string;
            }[];
        };
        messages?: { unread: number };
        plan_use?: {
            actual_asigned: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            limits: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
        };
        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";
            }[];
            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;
                        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";
            }[];
            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";
                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";
                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;
        }[];
        publish_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord";
        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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_use: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        limits: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
    };
    DashboardPublicationsSummary: {
        by_day: { day?: string; state?: string; total?: number }[];
        by_network: {
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
            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";
            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;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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";
    };
    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: {
            auto_publish?: boolean;
            id_accounts?: string[];
            import_image?: boolean;
            last_checked?: string;
            publication_type?: string;
            seen_guids?: string[];
            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";
    };
    IntegrationsIntegrationProvider: {
        accepted_formats: string[];
        config_fields: {
            default?: unknown;
            name: string;
            options?: string[];
            required?: boolean;
            type: "boolean"
            | "text"
            | "url"
            | "accounts"
            | "textarea"
            | "select";
        }[];
        content_feed: boolean;
        file_import: boolean;
        provider: "google_drive"
        | "rss";
        requires_oauth: boolean;
    };
    IntegrationsIntegrationProviderName: "google_drive"
    | "rss";
    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;
    };
    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;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
            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;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
        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: {
        message_options?: {
            files: (
                | string
                | {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
            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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_use?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
        artificial_inteligence?: boolean;
        integrations: number;
        publications: number;
        space: number;
        stats?: boolean;
        twitter_credits?: number;
        users: number;
        whatsapp?: boolean;
    };
    OrganizationsOrganizationCreate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        name: string;
    };
    OrganizationsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
        artificial_inteligence?: boolean;
        integrations: number;
        publications: number;
        space: number;
        stats?: boolean;
        twitter_credits?: number;
        users: number;
        whatsapp?: boolean;
    };
    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;
        creation_date: string;
        engagement_base?: "reach" | "impressions" | "followers";
        external_identifier?: string;
        files: {
            _id: string;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
            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";
            username?: string;
        };
        id_integration?: string;
        id_organization: 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;
        };
        name?: string;
        next_stats_update?: string;
        publication_errors: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publication_type: | "profile"
        | "page"
        | "group"
        | "reels"
        | "stories"
        | "message";
        publish_date?: string;
        retries: number;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord";
        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;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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;
    };
    PublicationsPublicationInput: {
        files?: string[];
        name?: string;
        publication_type?: "profile"
        | "page"
        | "group"
        | "reels"
        | "stories";
        publish_date?: string;
        social_network?:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "bluesky"
            | "discord";
        state?: "ready"
        | "withErrors"
        | "sended"
        | "draft"
        | "publishing";
        text?: string;
        title?: string;
    };
    PublicationsPublicationList: {
        publications: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        }[];
        total: number;
    };
    PublicationsPublicationOne: {
        publication: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
    };
    PublicationsPublicationRetry: {
        max_retries: number;
        publication: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
    };
    PublicationsPublicationsStatsList: {
        metric?: string;
        publications?: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        }[];
        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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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";
        statistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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;
        page_likes?: 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;
        replys?: number;
        retwets?: number;
        saved?: 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";
    StatsSettings: { auto_refresh_twitter: boolean };
    Success: { success: boolean };
    Upload: {
        _id: string;
        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
        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";
        }[];
        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;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
        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";
        username?: string;
    }

    A social account connected to an organization.

    On `discord` an account is a **channel**, not a profile: publishing to two channels of the same server costs two accounts of the plan.
    
    `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.
    
    • _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.

    • Optionalfollowers_count?: number

      Followers the network reports. Absent on an account that has never been measured.

    • 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"

      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).

  • AccountsAccountList: {
        accounts: {
            _id: string;
            creation_date: string;
            error_code: number;
            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";
            username?: string;
        }[];
        total: number;
    }
  • AccountsAccountOne: {
        account: {
            _id: string;
            creation_date: string;
            error_code: number;
            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";
            username?: string;
        };
    }
    • account: {
          _id: string;
          creation_date: string;
          error_code: number;
          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";
          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.

      • Optionalfollowers_count?: number

        Followers the network reports. Absent on an account that has never been measured.

      • 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"

        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).

  • 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: {
        app_id?: string;
        config_id?: string;
        feature_type?: string;
        graph_version?: string;
        session_info_version?: string;
        type: "redirect" | "meta_embedded_signup";
    }

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

    Nine of the ten networks are `redirect`: open `link` and the network sends the person back to PlanVortex with a code. **WhatsApp is not.** 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.
    
    Branch on `authorization.type`, never on whether `link` is empty.
    
    • 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.

    • 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.

    • type: "redirect" | "meta_embedded_signup"

      redirect: send the user to link. meta_embedded_signup: open the Meta popup with the fields below.

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

      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
  • AiPlansAiPlan: {
        _id: string;
        accounts: string[];
        attempts: number;
        creation_date: string;
        credits_spent: number;
        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;
            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;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }
        )[];
        state: | "pending"
        | "generating"
        | "generated"
        | "validated"
        | "failed"
        | "cancelled";
    }
    • _id: string
      66d04a6a427f4c43b9d97f54
      
    • accounts: string[]

      Accounts the plan was generated for.

    • 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.

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

      Last generation error, in the same shape as an API 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;
          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
        
      • 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;
              creation_date: string;
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              files: {
                  _id: string;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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";
                  }[];
                  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;
                  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";
                  username?: string;
              };
              id_integration?: string;
              id_organization: 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;
              };
              name?: string;
              next_stats_update?: string;
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publish_date?: string;
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord";
              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;
                  page_likes?: 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;
                  replys?: number;
                  retwets?: number;
                  saved?: 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;
          }
      )[]

      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.
      
    • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"

      State machine: pending -> generating -> generated -> validated | failed | cancelled. Poll the plan while state is pending or generating.

  • 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 plan is rejected if this exceeds the available credits.

    • estimated_cost: number

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

    • images_target: number
    • texts_target: number
  • AiPlansAiPlanCreateRequest: {
        accounts: string[];
        options?: {
            allow_images?: boolean;
            gallery_uploads?: string[];
            language?: string;
            max_images?: number;
            publish_days?: number[];
            shared?: boolean;
            timezone?: string;
            tone?: string;
            use_organization_context?: boolean;
            week_start?: string;
        };
        prompt: string;
    }
    • accounts: string[]

      Account ids (belonging to the organization) to generate the plan for.

    • Optionaloptions?: {
          allow_images?: boolean;
          gallery_uploads?: string[];
          language?: 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.

      • Optionalgallery_uploads?: string[]

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

      • Optionallanguage?: string

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

      • 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.

      • 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.

  • AiPlansAiPlanCreateResponse: {
        ai_plan: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        };
        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[];
          attempts: number;
          creation_date: string;
          credits_spent: number;
          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;
              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;
                  creation_date: string;
                  engagement_base?: "reach"
                  | "impressions"
                  | "followers";
                  external_identifier?: string;
                  files: {
                      _id: string;
                      cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                      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;
                      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";
                      username?: string;
                  };
                  id_integration?: string;
                  id_organization: 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;
                  };
                  name?: string;
                  next_stats_update?: string;
                  publication_errors: {
                      code: number;
                      data?: { [key: string]: unknown };
                      message: string;
                  }[];
                  publication_type: | "profile"
                  | "page"
                  | "group"
                  | "reels"
                  | "stories"
                  | "message";
                  publish_date?: string;
                  retries: number;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord";
                  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;
                      page_likes?: 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;
                      replys?: number;
                      retwets?: number;
                      saved?: 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;
              }
          )[];
          state: | "pending"
          | "generating"
          | "generated"
          | "validated"
          | "failed"
          | "cancelled";
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • accounts: string[]

        Accounts the plan was generated for.

      • 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.

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

        Last generation error, in the same shape as an API 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;
            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
          
        • 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;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }
        )[]

        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.
        
      • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"

        State machine: pending -> generating -> generated -> validated | failed | cancelled. Poll the plan while state is pending or generating.

    • 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 plan is rejected if this exceeds the available credits.

      • estimated_cost: number

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

      • images_target: number
      • texts_target: number
    • estimated_cost: number

      Shortcut to estimate.estimated_cost.

  • AiPlansAiPlanList: {
        ai_plans: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: ...]: ... };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        }[];
        total: number;
    }
  • AiPlansAiPlanOne: {
        ai_plan: {
            _id: string;
            accounts: string[];
            attempts: number;
            creation_date: string;
            credits_spent: number;
            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;
                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;
                    creation_date: string;
                    engagement_base?: "reach"
                    | "impressions"
                    | "followers";
                    external_identifier?: string;
                    files: {
                        _id: string;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                        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";
                        username?: string;
                    };
                    id_integration?: string;
                    id_organization: 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;
                    };
                    name?: string;
                    next_stats_update?: string;
                    publication_errors: {
                        code: number;
                        data?: { [key: string]: unknown };
                        message: string;
                    }[];
                    publication_type: | "profile"
                    | "page"
                    | "group"
                    | "reels"
                    | "stories"
                    | "message";
                    publish_date?: string;
                    retries: number;
                    social_network: | "facebook"
                    | "instagram"
                    | "linkedin"
                    | "tiktok"
                    | "twitter"
                    | "whatsapp"
                    | "youtube"
                    | "google_business"
                    | "bluesky"
                    | "discord";
                    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;
                        page_likes?: 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;
                        replys?: number;
                        retwets?: number;
                        saved?: 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;
                }
            )[];
            state: | "pending"
            | "generating"
            | "generated"
            | "validated"
            | "failed"
            | "cancelled";
        };
    }
    • ai_plan: {
          _id: string;
          accounts: string[];
          attempts: number;
          creation_date: string;
          credits_spent: number;
          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;
              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;
                  creation_date: string;
                  engagement_base?: "reach"
                  | "impressions"
                  | "followers";
                  external_identifier?: string;
                  files: {
                      _id: string;
                      cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                      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;
                      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";
                      username?: string;
                  };
                  id_integration?: string;
                  id_organization: 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;
                  };
                  name?: string;
                  next_stats_update?: string;
                  publication_errors: {
                      code: number;
                      data?: { [key: string]: unknown };
                      message: string;
                  }[];
                  publication_type: | "profile"
                  | "page"
                  | "group"
                  | "reels"
                  | "stories"
                  | "message";
                  publish_date?: string;
                  retries: number;
                  social_network: | "facebook"
                  | "instagram"
                  | "linkedin"
                  | "tiktok"
                  | "twitter"
                  | "whatsapp"
                  | "youtube"
                  | "google_business"
                  | "bluesky"
                  | "discord";
                  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;
                      page_likes?: 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;
                      replys?: number;
                      retwets?: number;
                      saved?: 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;
              }
          )[];
          state: | "pending"
          | "generating"
          | "generated"
          | "validated"
          | "failed"
          | "cancelled";
      }
      • _id: string
        66d04a6a427f4c43b9d97f54
        
      • accounts: string[]

        Accounts the plan was generated for.

      • 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.

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

        Last generation error, in the same shape as an API 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;
            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
          
        • 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;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }
        )[]

        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.
        
      • state: "pending" | "generating" | "generated" | "validated" | "failed" | "cancelled"

        State machine: pending -> generating -> generated -> validated | failed | cancelled. Poll the plan while state is pending or generating.

  • AiPlansAiPlanOptions: {
        allow_images: boolean;
        gallery_uploads: string[];
        language: 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
      
    • 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;
        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.

    • Optionalgallery_uploads?: string[]

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

    • Optionallanguage?: string

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

    • 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.

    • 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.

  • 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.

    • 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` and `integration_error`. The payload is documented in the `comments` specification. 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. It has to be unique across PlanVortex (error 534). The spelling of the field is historical and kept for compatibility.

    • 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.

  • 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 counts graphemes, everyone else counts characters.

    • 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.

    • 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.

    • 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.

  • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_plan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            plan_identifier: "basic"
            | "free"
            | "pro"
            | "custom";
            require_action?: boolean;
            status: string;
            stripe_customer_id?: string;
        };
        actual_use?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • actual_plan: {
          current_period_end?: string;
          current_period_start?: string;
          enabled: boolean;
          isEnabled: boolean;
          plan_data: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • 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?: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • 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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • 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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan: {
                current_period_end?: string;
                current_period_start?: string;
                enabled: boolean;
                isEnabled: boolean;
                plan_data: {
                    accounts: number;
                    ai_credits?: number;
                    artificial_inteligence?: boolean;
                    integrations: number;
                    publications: number;
                    space: number;
                    stats?: boolean;
                    twitter_credits?: number;
                    users: number;
                    whatsapp?: boolean;
                };
                plan_identifier: "basic"
                | "free"
                | "pro"
                | "custom";
                require_action?: boolean;
                status: string;
                stripe_customer_id?: string;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          actual_plan: {
              current_period_end?: string;
              current_period_start?: string;
              enabled: boolean;
              isEnabled: boolean;
              plan_data: {
                  accounts: number;
                  ai_credits?: number;
                  artificial_inteligence?: boolean;
                  integrations: number;
                  publications: number;
                  space: number;
                  stats?: boolean;
                  twitter_credits?: number;
                  users: number;
                  whatsapp?: boolean;
              };
              plan_identifier: "basic"
              | "free"
              | "pro"
              | "custom";
              require_action?: boolean;
              status: string;
              stripe_customer_id?: string;
          };
          actual_use?: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • actual_plan: {
            current_period_end?: string;
            current_period_start?: string;
            enabled: boolean;
            isEnabled: boolean;
            plan_data: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          }

          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.

          • Optionalartificial_inteligence?: boolean

            Whether AI generation is enabled.

          • 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 is a Custom-plan feature of its own.

          • publications: number

            Publications that may be sent per month.

          • space: number

            Storage, in GB.

          • Optionalstats?: boolean

            Whether statistics collection is enabled.

          • 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.

          • users: number

            Users with access.

          • Optionalwhatsapp?: boolean

            Whether WhatsApp may be connected.

        • 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?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • 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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        name: string;
    }

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

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • name: string

      Organization name.

  • ClientsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          actual_plan?: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          actual_use?: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • Optionalactual_plan?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • Optionalactual_use?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • 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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • 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;
        }[];
    }
  • 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;
            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";
            username?: string;
        };
        id_organization: string;
        id_publication?: | string
        | {
            _id: string;
            creation_date: string;
            engagement_base?: "reach"
            | "impressions"
            | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
        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";
        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.

      One exception worth knowing: 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`.
      
    • 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;
              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";
              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;
              creation_date: string;
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              files: {
                  _id: string;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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";
                  }[];
                  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;
                  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";
                  username?: string;
              };
              id_integration?: string;
              id_organization: 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;
              };
              name?: string;
              next_stats_update?: string;
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publish_date?: string;
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord";
              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;
                  page_likes?: 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;
                  replys?: number;
                  retwets?: number;
                  saved?: 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;
          }

      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 five networks, and the listing (locations/{id}) for a Google Business review.

    • 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"
    • 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"

    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;
                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";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
            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";
            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;
              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";
              username?: string;
          };
          id_organization: string;
          id_publication?: | string
          | {
              _id: string;
              creation_date: string;
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              files: {
                  _id: string;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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;
                  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";
                  username?: string;
              };
              id_integration?: string;
              id_organization: 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;
              };
              name?: string;
              next_stats_update?: string;
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publish_date?: string;
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord";
              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;
                  page_likes?: 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;
                  replys?: number;
                  retwets?: number;
                  saved?: 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;
          };
          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";
          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;
        messages: boolean;
        persistent_menu: boolean;
        products: boolean;
        publications: boolean;
        webhooks: boolean;
    }

    The coarse gates of one network

  • 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;
                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";
                username?: string;
            };
            id_organization: string;
            id_publication?: | string
            | {
                _id: string;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            };
            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";
            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;
                        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                        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;
                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";
    }

    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 one delivery can mix both. 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;
              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";
              username?: string;
          };
          id_organization: string;
          id_publication?: | string
          | {
              _id: string;
              creation_date: string;
              engagement_base?: "reach"
              | "impressions"
              | "followers";
              external_identifier?: string;
              files: {
                  _id: string;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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;
                  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";
                  username?: string;
              };
              id_integration?: string;
              id_organization: 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;
              };
              name?: string;
              next_stats_update?: string;
              publication_errors: {
                  code: number;
                  data?: { [key: string]: unknown };
                  message: string;
              }[];
              publication_type: | "profile"
              | "page"
              | "group"
              | "reels"
              | "stories"
              | "message";
              publish_date?: string;
              retries: number;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord";
              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;
                  page_likes?: 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;
                  replys?: number;
                  retwets?: number;
                  saved?: 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;
          };
          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";
          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.

        One exception worth knowing: 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`.
        
      • 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;
                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";
                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;
                creation_date: string;
                engagement_base?: "reach"
                | "impressions"
                | "followers";
                external_identifier?: string;
                files: {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
                    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";
                    username?: string;
                };
                id_integration?: string;
                id_organization: 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;
                };
                name?: string;
                next_stats_update?: string;
                publication_errors: {
                    code: number;
                    data?: { [key: string]: unknown };
                    message: string;
                }[];
                publication_type: | "profile"
                | "page"
                | "group"
                | "reels"
                | "stories"
                | "message";
                publish_date?: string;
                retries: number;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                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;
                    page_likes?: 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;
                    replys?: number;
                    retwets?: number;
                    saved?: 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;
            }

        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 five networks, and the listing (locations/{id}) for a Google Business review.

      • 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"
      • 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.
      - `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;
                      cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                      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;
              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;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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;
            whatsappInteractive?: { [key: string]: unknown };
        }
        • files: (
              | string
              | {
                  _id: string;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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.

        • 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"
  • 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";
        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"
    • 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_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_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";
                username?: string;
            }[];
            publications_with_errors?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                text?: string;
            }[];
            total_drafts?: number;
            upcoming_publications?: {
                _id: string;
                creation_date?: string;
                name?: string;
                publication_errors?: {
                    code: number;
                    data?: (...)
                    | (...);
                    message: string;
                }[];
                publish_date?: string;
                social_network: | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
                text?: string;
            }[];
        };
        messages?: { unread: number };
        plan_use?: {
            actual_asigned: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            limits: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
        };
        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";
            }[];
            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;
                        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";
            }[];
            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";
                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";
                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_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_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.

    • 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";
              username?: string;
          }[];
          publications_with_errors?: {
              _id: string;
              creation_date?: string;
              name?: string;
              publication_errors?: {
                  code: number;
                  data?: (...)
                  | (...);
                  message: string;
              }[];
              publish_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord";
              text?: string;
          }[];
          total_drafts?: number;
          upcoming_publications?: {
              _id: string;
              creation_date?: string;
              name?: string;
              publication_errors?: {
                  code: number;
                  data?: (...)
                  | (...);
                  message: string;
              }[];
              publish_date?: string;
              social_network: | "facebook"
              | "instagram"
              | "linkedin"
              | "tiktok"
              | "twitter"
              | "whatsapp"
              | "youtube"
              | "google_business"
              | "bluesky"
              | "discord";
              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";
            username?: string;
        }[]
      • Optionalpublications_with_errors?: {
            _id: string;
            creation_date?: string;
            name?: string;
            publication_errors?: {
                code: number;
                data?: (...) | (...);
                message: string;
            }[];
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
            }[];
            publish_date?: string;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            text?: string;
        }[]

        Up to ten publications due in the next 48 hours.

    • Optionalmessages?: { unread: number }
    • Optionalplan_use?: {
          actual_asigned: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          actual_use: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          limits: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
      }
      • actual_asigned: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • actual_use: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        What the organization and its children are consuming right now.

        • 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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • limits: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

    • 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";
          }[];
          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;
                      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";
          }[];
          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";
        }[]
      • 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;
                    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";
        }[]
      • 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";
              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";
              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;
        }[];
        publish_date?: string;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord";
        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.

    • Optionalpublish_date?: string

      Format: date-time

    • social_network:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord"
    • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_use: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        limits: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
    }
    • actual_asigned: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • actual_use: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      What the organization and its children are consuming right now.

      • 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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • limits: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

  • DashboardPublicationsSummary: {
        by_day: { day?: string; state?: string; total?: number }[];
        by_network: {
            social_network?:
                | "facebook"
                | "instagram"
                | "linkedin"
                | "tiktok"
                | "twitter"
                | "whatsapp"
                | "youtube"
                | "google_business"
                | "bluesky"
                | "discord";
            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";
            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";
          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";
          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;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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";
    }

    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;
              cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
              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";
              }[];
              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"
  • 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-544 auth, tokens and client apps · 601-612 user · 700-715 social accounts · 800-810 files · 900-960 publications · 1000-1003 general · 1100-1111 organizations · 1200-1207 roles · 1300-1307 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.

    • 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: {
            auto_publish?: boolean;
            id_accounts?: string[];
            import_image?: boolean;
            last_checked?: string;
            publication_type?: string;
            seen_guids?: string[];
            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";
    }

    Credentials are never returned. connected is the summary the panel paints: false means the connection failed and needs attention.

    • _id: string
    • config: {
          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 object for google_drive — the Picker supplies everything — so every field here is optional and only an rss integration fills them in.

      • 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
    • 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, 924 no publication allowance left…).

    • Optionalexternal_identifier?: string

      The Google account email, or the feed URL.

      ana@empresa.com
      
    • id_client: string
    • id_organization: string
    • Optionallast_used_date?: string

      Format: date-time

    • name: string
      Drive de ana@empresa.com
      
    • provider: "google_drive" | "rss"
  • IntegrationsIntegrationProvider: {
        accepted_formats: string[];
        config_fields: {
            default?: unknown;
            name: string;
            options?: string[];
            required?: boolean;
            type: "boolean" | "text" | "url" | "accounts" | "textarea" | "select";
        }[];
        content_feed: boolean;
        file_import: boolean;
        provider: "google_drive"
        | "rss";
        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"
      ]
    • config_fields: {
          default?: unknown;
          name: string;
          options?: string[];
          required?: boolean;
          type: "boolean" | "text" | "url" | "accounts" | "textarea" | "select";
      }[]
    • 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"
    • requires_oauth: boolean

      true = connect with connect_link + code. false = connect with a form built from config_fields.

  • IntegrationsIntegrationProviderName: "google_drive" | "rss"
  • 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
      
  • 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;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
            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;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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";
                  }[];
                  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;
          whatsappInteractive?: { [key: string]: unknown };
      }
      • files: (
            | string
            | {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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.

      • 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;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
        whatsappInteractive?: { [key: string]: unknown };
    }

    Everything a message can carry besides its text. Which block is required depends on message_type.

    • files: (
          | string
          | {
              _id: string;
              cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
              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";
              }[];
              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.

    • 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: {
        message_options?: {
            files: (
                | string
                | {
                    _id: string;
                    cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                    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";
                    }[];
                    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;
            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` cannot be sent through this endpoint today.** Both need `in_response_external_id` — the id of the post or comment being answered — and the endpoint does not read it from the body, so the message would leave with an empty recipient. Use them only through the network's own webhook flow.
    
    • Optionalmessage_options?: {
          files: (
              | string
              | {
                  _id: string;
                  cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                  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";
                  }[];
                  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;
          whatsappInteractive?: { [key: string]: unknown };
      }
      • files: (
            | string
            | {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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.

      • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        actual_use?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • Optionalactual_use?: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • 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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • 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;
        artificial_inteligence?: boolean;
        integrations: number;
        publications: number;
        space: number;
        stats?: boolean;
        twitter_credits?: number;
        users: number;
        whatsapp?: boolean;
    }

    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.

    • Optionalartificial_inteligence?: boolean

      Whether AI generation is enabled.

    • 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 is a Custom-plan feature of its own.

    • publications: number

      Publications that may be sent per month.

    • space: number

      Storage, in GB.

    • Optionalstats?: boolean

      Whether statistics collection is enabled.

    • 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.

    • users: number

      Users with access.

    • Optionalwhatsapp?: boolean

      Whether WhatsApp may be connected.

  • OrganizationsOrganizationCreate: {
        actual_plan?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        name: string;
    }

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

    • Optionalactual_plan?: {
          accounts: number;
          ai_credits?: number;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • name: string

      Organization name.

  • OrganizationsOrganizationList: {
        organizations: {
            _id: string;
            actual_asigned?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_plan?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            actual_use?: {
                accounts: number;
                ai_credits?: number;
                artificial_inteligence?: boolean;
                integrations: number;
                publications: number;
                space: number;
                stats?: boolean;
                twitter_credits?: number;
                users: number;
                whatsapp?: boolean;
            };
            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;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          actual_plan?: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          actual_use?: {
              accounts: number;
              ai_credits?: number;
              artificial_inteligence?: boolean;
              integrations: number;
              publications: number;
              space: number;
              stats?: boolean;
              twitter_credits?: number;
              users: number;
              whatsapp?: boolean;
          };
          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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • Optionalactual_plan?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • Optionalactual_use?: {
            accounts: number;
            ai_credits?: number;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        }

        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.

        • 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.

        • Optionalartificial_inteligence?: boolean

          Whether AI generation is enabled.

        • 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 is a Custom-plan feature of its own.

        • publications: number

          Publications that may be sent per month.

        • space: number

          Storage, in GB.

        • Optionalstats?: boolean

          Whether statistics collection is enabled.

        • 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.

        • users: number

          Users with access.

        • Optionalwhatsapp?: boolean

          Whether WhatsApp may be connected.

      • 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;
            artificial_inteligence?: boolean;
            integrations: number;
            publications: number;
            space: number;
            stats?: boolean;
            twitter_credits?: number;
            users: number;
            whatsapp?: boolean;
        };
        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;
          artificial_inteligence?: boolean;
          integrations: number;
          publications: number;
          space: number;
          stats?: boolean;
          twitter_credits?: number;
          users: number;
          whatsapp?: boolean;
      }

      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.

      • Optionalartificial_inteligence?: boolean

        Whether AI generation is enabled.

      • 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 is a Custom-plan feature of its own.

      • publications: number

        Publications that may be sent per month.

      • space: number

        Storage, in GB.

      • Optionalstats?: boolean

        Whether statistics collection is enabled.

      • 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.

      • users: number

        Users with access.

      • Optionalwhatsapp?: boolean

        Whether WhatsApp may be connected.

    • 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;
        artificial_inteligence?: boolean;
        integrations: number;
        publications: number;
        space: number;
        stats?: boolean;
        twitter_credits?: number;
        users: number;
        whatsapp?: boolean;
    }

    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.

    • 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.

    • Optionalartificial_inteligence?: boolean

      Whether AI generation is enabled.

    • 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 is a Custom-plan feature of its own.

    • publications: number

      Publications that may be sent per month.

    • space: number

      Storage, in GB.

    • Optionalstats?: boolean

      Whether statistics collection is enabled.

    • 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.

    • users: number

      Users with access.

    • Optionalwhatsapp?: boolean

      Whether WhatsApp may be connected.

  • 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;
        creation_date: string;
        engagement_base?: "reach" | "impressions" | "followers";
        external_identifier?: string;
        files: {
            _id: string;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
            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";
            username?: string;
        };
        id_integration?: string;
        id_organization: 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;
        };
        name?: string;
        next_stats_update?: string;
        publication_errors: {
            code: number;
            data?: { [key: string]: unknown };
            message: string;
        }[];
        publication_type: | "profile"
        | "page"
        | "group"
        | "reels"
        | "stories"
        | "message";
        publish_date?: string;
        retries: number;
        social_network: | "facebook"
        | "instagram"
        | "linkedin"
        | "tiktok"
        | "twitter"
        | "whatsapp"
        | "youtube"
        | "google_business"
        | "bluesky"
        | "discord";
        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;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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;
    }
    • _id: string
    • creation_date: string

      Format: date-time

    • Optionalengagement_base?: "reach" | "impressions" | "followers"

      What this publication's engagement rate is divided by.

    • Optionalexternal_identifier?: string

      The network's own identifier, once published.

    • files: {
          _id: string;
          cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
          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";
          }[];
          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;
              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";
              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
    • 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

    • 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` and the client-app webhook is fired.
      
    • publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message"
    • Optionalpublish_date?: string

      Format: date-time

    • 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"

      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.

    • Optionalstatistics?: {
          angers?: number;
          bookmarks?: number;
          clicks?: number;
          comments?: number;
          engagement?: number;
          follows?: number;
          hahas?: number;
          impressions?: number;
          likes?: number;
          loves?: number;
          negative_feedback?: number;
          page_likes?: 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;
          replys?: number;
          retwets?: number;
          saved?: 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
      • Optionalpage_likes?: number
      • 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
      • Optionalreplys?: number
      • Optionalretwets?: number
      • Optionalsaved?: number
      • 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.

  • PublicationsPublicationInput: {
        files?: string[];
        name?: string;
        publication_type?: "profile" | "page" | "group" | "reels" | "stories";
        publish_date?: string;
        social_network?:
            | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "bluesky"
            | "discord";
        state?: "ready"
        | "withErrors"
        | "sended"
        | "draft"
        | "publishing";
        text?: string;
        title?: string;
    }

    Body accepted when creating or updating a publication. Only these properties are read; anything else in the payload is ignored.

    • Optionalfiles?: string[]

      Identifiers of uploads previously created through the uploads endpoints, attached to this publication.

    • 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.

    • Optionalsocial_network?:
          | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "bluesky"
          | "discord"

      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.

    • 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.

  • PublicationsPublicationList: {
        publications: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        }[];
        total: number;
    }
  • PublicationsPublicationOne: {
        publication: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
    }
    • publication: {
          _id: string;
          creation_date: string;
          engagement_base?: "reach" | "impressions" | "followers";
          external_identifier?: string;
          files: {
              _id: string;
              cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
              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";
              }[];
              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;
              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";
              username?: string;
          };
          id_integration?: string;
          id_organization: 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;
          };
          name?: string;
          next_stats_update?: string;
          publication_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publication_type: | "profile"
          | "page"
          | "group"
          | "reels"
          | "stories"
          | "message";
          publish_date?: string;
          retries: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord";
          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;
              page_likes?: 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;
              replys?: number;
              retwets?: number;
              saved?: 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;
      }
      • _id: string
      • creation_date: string

        Format: date-time

      • Optionalengagement_base?: "reach" | "impressions" | "followers"

        What this publication's engagement rate is divided by.

      • Optionalexternal_identifier?: string

        The network's own identifier, once published.

      • files: {
            _id: string;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
                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";
                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
      • 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

      • 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` and the client-app webhook is fired.
        
      • publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message"
      • Optionalpublish_date?: string

        Format: date-time

      • 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"

        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.

      • Optionalstatistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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
        • Optionalpage_likes?: number
        • 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
        • Optionalreplys?: number
        • Optionalretwets?: number
        • Optionalsaved?: number
        • 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.

  • PublicationsPublicationRetry: {
        max_retries: number;
        publication: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        };
    }
    • 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;
          creation_date: string;
          engagement_base?: "reach" | "impressions" | "followers";
          external_identifier?: string;
          files: {
              _id: string;
              cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
              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";
              }[];
              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;
              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";
              username?: string;
          };
          id_integration?: string;
          id_organization: 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;
          };
          name?: string;
          next_stats_update?: string;
          publication_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publication_type: | "profile"
          | "page"
          | "group"
          | "reels"
          | "stories"
          | "message";
          publish_date?: string;
          retries: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord";
          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;
              page_likes?: 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;
              replys?: number;
              retwets?: number;
              saved?: 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;
      }
      • _id: string
      • creation_date: string

        Format: date-time

      • Optionalengagement_base?: "reach" | "impressions" | "followers"

        What this publication's engagement rate is divided by.

      • Optionalexternal_identifier?: string

        The network's own identifier, once published.

      • files: {
            _id: string;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
                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";
                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
      • 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

      • 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` and the client-app webhook is fired.
        
      • publication_type: "profile" | "page" | "group" | "reels" | "stories" | "message"
      • Optionalpublish_date?: string

        Format: date-time

      • 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"

        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.

      • Optionalstatistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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
        • Optionalpage_likes?: number
        • 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
        • Optionalreplys?: number
        • Optionalretwets?: number
        • Optionalsaved?: number
        • 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.

  • PublicationsPublicationsStatsList: {
        metric?: string;
        publications?: {
            _id: string;
            creation_date: string;
            engagement_base?: "reach" | "impressions" | "followers";
            external_identifier?: string;
            files: {
                _id: string;
                cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
                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";
                }[];
                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;
                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";
                username?: string;
            };
            id_integration?: string;
            id_organization: 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;
            };
            name?: string;
            next_stats_update?: string;
            publication_errors: {
                code: number;
                data?: { [key: string]: unknown };
                message: string;
            }[];
            publication_type: | "profile"
            | "page"
            | "group"
            | "reels"
            | "stories"
            | "message";
            publish_date?: string;
            retries: number;
            social_network: | "facebook"
            | "instagram"
            | "linkedin"
            | "tiktok"
            | "twitter"
            | "whatsapp"
            | "youtube"
            | "google_business"
            | "bluesky"
            | "discord";
            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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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;
        }[];
        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;
          creation_date: string;
          engagement_base?: "reach" | "impressions" | "followers";
          external_identifier?: string;
          files: {
              _id: string;
              cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
              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";
              }[];
              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;
              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";
              username?: string;
          };
          id_integration?: string;
          id_organization: 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;
          };
          name?: string;
          next_stats_update?: string;
          publication_errors: {
              code: number;
              data?: { [key: string]: unknown };
              message: string;
          }[];
          publication_type: | "profile"
          | "page"
          | "group"
          | "reels"
          | "stories"
          | "message";
          publish_date?: string;
          retries: number;
          social_network: | "facebook"
          | "instagram"
          | "linkedin"
          | "tiktok"
          | "twitter"
          | "whatsapp"
          | "youtube"
          | "google_business"
          | "bluesky"
          | "discord";
          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;
              page_likes?: 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;
              replys?: number;
              retwets?: number;
              saved?: 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;
      }[]

      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;
                page_likes?: 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;
                replys?: number;
                retwets?: number;
                saved?: 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";
        statistics?: {
            angers?: number;
            bookmarks?: number;
            clicks?: number;
            comments?: number;
            engagement?: number;
            follows?: number;
            hahas?: number;
            impressions?: number;
            likes?: number;
            loves?: number;
            negative_feedback?: number;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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;
              page_likes?: 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;
              replys?: number;
              retwets?: number;
              saved?: 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;
            page_likes?: 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;
            replys?: number;
            retwets?: number;
            saved?: 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
        • Optionalpage_likes?: number
        • 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
        • Optionalreplys?: number
        • Optionalretwets?: number
        • Optionalsaved?: number
        • 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"
    • Optionalstatistics?: {
          angers?: number;
          bookmarks?: number;
          clicks?: number;
          comments?: number;
          engagement?: number;
          follows?: number;
          hahas?: number;
          impressions?: number;
          likes?: number;
          loves?: number;
          negative_feedback?: number;
          page_likes?: 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;
          replys?: number;
          retwets?: number;
          saved?: 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
      • Optionalpage_likes?: number
      • 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
      • Optionalreplys?: number
      • Optionalretwets?: number
      • Optionalsaved?: number
      • 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;
        page_likes?: 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;
        replys?: number;
        retwets?: number;
        saved?: 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.
    
    • 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
    • Optionalpage_likes?: number
    • 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
    • Optionalreplys?: number
    • Optionalretwets?: number
    • Optionalsaved?: number
    • 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"

    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;
        cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
        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";
        }[];
        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
    • Optionalcover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; }

      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";
      }[]

      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;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
            cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
            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";
            }[];
            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;
          cover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; };
          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";
          }[];
          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
      • Optionalcover_image?: { _id: string; cover_image?: ...; cover_offset?: number; creation_date: string; file_externals: { external_identifier: string; external_url: string; social_network: "facebook" | "instagram" | ... 7 more ... | "discord"; }[]; ... 6 more ...; public_path: string; }

        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";
        }[]

        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=...