UNPKG

editia-core

Version:

Core services and utilities for Editia applications - Authentication, Monetization, Video Generation Types, and Database Management

123 lines 3.89 kB
/** * Editia Core Constants * * This file contains all the constants used throughout the Editia Core package, * including plan limits, feature flags, and other configuration values. */ import type { PlanIdentifier } from './database'; /** * Default plan limits for new users */ export declare const DEFAULT_PLAN_LIMITS: { readonly free: { readonly videos_generated_limit: 1; readonly source_videos_limit: 5; readonly voice_clones_limit: 0; readonly account_analysis_limit: 1; readonly script_conversations_limit: 10; }; readonly creator: { readonly videos_generated_limit: 15; readonly source_videos_limit: 50; readonly voice_clones_limit: 1; readonly account_analysis_limit: 4; readonly script_conversations_limit: 100; }; readonly pro: { readonly videos_generated_limit: -1; readonly source_videos_limit: -1; readonly voice_clones_limit: 2; readonly account_analysis_limit: -1; readonly script_conversations_limit: -1; }; }; /** * Plan hierarchy for access control */ export declare const PLAN_HIERARCHY: Record<PlanIdentifier, number>; /** * Feature flag IDs for common features */ export declare const FEATURE_FLAGS: { readonly ACCOUNT_ANALYSIS: "account_analysis"; readonly CHAT_AI: "chat_ai"; readonly SCRIPT_GENERATION: "script_generation"; readonly VIDEO_GENERATION: "video_generation"; readonly SOURCE_VIDEOS: "source_videos"; readonly ADVANCED_SUBTITLES: "advanced_subtitles"; readonly VOICE_CLONE: "voice_clone"; readonly MULTIPLE_VOICES: "multiple_voices"; readonly NICHE_ANALYSIS: "niche_analysis"; readonly CONTENT_IDEAS: "content_ideas"; readonly SCHEDULING: "scheduling"; readonly SCRIPT_CONVERSATIONS: "script_conversations"; }; /** * Feature flag type */ export type FeatureFlagId = typeof FEATURE_FLAGS[keyof typeof FEATURE_FLAGS]; /** * Default usage reset periods (in days) */ export declare const USAGE_RESET_PERIODS: { readonly videos_generated: 30; readonly source_videos_used: 30; readonly voice_clones_used: 30; readonly account_analysis_used: 30; readonly script_conversations_used: 30; }; /** * Usage warning thresholds (percentage) */ export declare const USAGE_WARNING_THRESHOLDS: { readonly LOW: 25; readonly MEDIUM: 50; readonly HIGH: 75; readonly CRITICAL: 90; }; /** * Maximum values for various limits */ export declare const MAXIMUM_LIMITS: { readonly VIDEOS_GENERATED: 1000; readonly SOURCE_VIDEOS: 10000; readonly VOICE_CLONES: 10; readonly ACCOUNT_ANALYSIS: 100; readonly SCRIPT_CONVERSATIONS: 10000; }; /** * Minimum values for various limits */ export declare const MINIMUM_LIMITS: { readonly VIDEOS_GENERATED: 0; readonly SOURCE_VIDEOS: 0; readonly VOICE_CLONES: 0; readonly ACCOUNT_ANALYSIS: 0; readonly SCRIPT_CONVERSATIONS: 0; }; /** * Cache timeouts (in milliseconds) */ export declare const CACHE_TIMEOUTS: { readonly USER_USAGE: number; readonly FEATURE_FLAGS: number; readonly SUBSCRIPTION_PLANS: number; readonly USER_PROFILE: number; }; /** * Standard error codes for monetization */ export declare const MONETIZATION_ERROR_CODES: { readonly FEATURE_ACCESS_DENIED: "FEATURE_ACCESS_DENIED"; readonly USAGE_LIMIT_REACHED: "USAGE_LIMIT_REACHED"; readonly INVALID_FEATURE_ID: "INVALID_FEATURE_ID"; readonly INVALID_ACTION: "INVALID_ACTION"; readonly AUTHENTICATION_REQUIRED: "AUTHENTICATION_REQUIRED"; readonly MONETIZATION_SERVICE_ERROR: "MONETIZATION_SERVICE_ERROR"; readonly PLAN_UPGRADE_REQUIRED: "PLAN_UPGRADE_REQUIRED"; }; /** * Error code type */ export type MonetizationErrorCode = typeof MONETIZATION_ERROR_CODES[keyof typeof MONETIZATION_ERROR_CODES]; //# sourceMappingURL=constants.d.ts.map