Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

1.6 KB
Raw Blame
import type { ChannelAccount } from '@/types/channel';
import type { PublishStatusValue } from '@/types/post';
import type { PauseReasonValue, RepurposeItemStatusValue, RepurposeStatusValue } from '@/types/repurpose-status';

export type RepurposeSourceFormat = 'reel' | 'video' | 'story';

export type RepurposePublishMode = 'publish' | 'draft';

export interface PublishModeOption {
    value: RepurposePublishMode;
    label: string;
    description: string;
}

export interface SourceFormatOption {
    value: RepurposeSourceFormat;
    label: string;
}

export interface RepurposeDestination {
    social_account_id: string;
    content_type: string;
    meta: Record<string, any>;
}

export interface Repurpose {
    id: string;
    source_social_account_id: string | null;
    source_format: RepurposeSourceFormat;
    publish_mode: RepurposePublishMode;
    source_account?: ChannelAccount | null;
    destinations: RepurposeDestination[];
    status: RepurposeStatusValue;
    paused_reason: PauseReasonValue | null;
    activated_at: string | null;
    last_polled_at: string | null;
    next_poll_at: string | null;
    last_error: string | null;
    published_items_count?: number;
    created_at: string;
    updated_at: string;
}

export interface RepurposeItemPost {
    id: string;
    platform: string | null;
    publish_status: PublishStatusValue;
}

export interface RepurposeItem {
    id: string;
    source_media_id: string;
    source_permalink: string | null;
    source_created_at: string | null;
    status: RepurposeItemStatusValue;
    reason: string | null;
    error: string | null;
    posts?: RepurposeItemPost[];
    created_at: string;
}