@umituz/web-ai 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +98 -2
  3. package/dist/ABTesting-DDqNhHtP.d.ts +184 -0
  4. package/dist/ABTesting-DWBtKTMQ.d.cts +184 -0
  5. package/dist/ContentGeneration-B6iK2B33.d.cts +93 -0
  6. package/dist/ContentGeneration-B6iK2B33.d.ts +93 -0
  7. package/dist/ProviderConfig-a55tLhWT.d.cts +99 -0
  8. package/dist/ProviderConfig-a55tLhWT.d.ts +99 -0
  9. package/dist/cache-manager-Df9LLYGA.d.cts +31 -0
  10. package/dist/cache-manager-Df9LLYGA.d.ts +31 -0
  11. package/dist/chat/index.cjs +534 -0
  12. package/dist/chat/index.cjs.map +1 -0
  13. package/dist/chat/index.d.cts +25 -0
  14. package/dist/chat/index.d.ts +25 -0
  15. package/dist/chat/index.js +527 -0
  16. package/dist/chat/index.js.map +1 -0
  17. package/dist/chat.service-DBKq9I2c.d.cts +124 -0
  18. package/dist/chat.service-RQn8UTXD.d.ts +124 -0
  19. package/dist/content/index.cjs +3769 -0
  20. package/dist/content/index.cjs.map +1 -0
  21. package/dist/content/index.d.cts +225 -0
  22. package/dist/content/index.d.ts +225 -0
  23. package/dist/content/index.js +3738 -0
  24. package/dist/content/index.js.map +1 -0
  25. package/dist/core/index.cjs +1040 -0
  26. package/dist/core/index.cjs.map +1 -0
  27. package/dist/core/index.d.cts +232 -0
  28. package/dist/core/index.d.ts +232 -0
  29. package/dist/core/index.js +969 -0
  30. package/dist/core/index.js.map +1 -0
  31. package/dist/create-ai-BhNaz86i.d.ts +268 -0
  32. package/dist/create-ai-DGZFBOA1.d.cts +268 -0
  33. package/dist/hooks/index.cjs +5056 -0
  34. package/dist/hooks/index.cjs.map +1 -0
  35. package/dist/hooks/index.d.cts +210 -0
  36. package/dist/hooks/index.d.ts +210 -0
  37. package/dist/hooks/index.js +5045 -0
  38. package/dist/hooks/index.js.map +1 -0
  39. package/dist/index-DjX9ZKuM.d.cts +14 -0
  40. package/dist/index-DxLvE588.d.ts +14 -0
  41. package/dist/index-fXjxTR5W.d.cts +66 -0
  42. package/dist/index-fXjxTR5W.d.ts +66 -0
  43. package/dist/index.cjs +3158 -0
  44. package/dist/index.cjs.map +1 -0
  45. package/dist/index.d.cts +11 -0
  46. package/dist/index.d.ts +11 -0
  47. package/dist/index.js +3048 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/provider.factory-COsnprLH.d.cts +110 -0
  50. package/dist/provider.factory-CpWFyjbw.d.ts +110 -0
  51. package/dist/providers/index.cjs +2410 -0
  52. package/dist/providers/index.cjs.map +1 -0
  53. package/dist/providers/index.d.cts +333 -0
  54. package/dist/providers/index.d.ts +333 -0
  55. package/dist/providers/index.js +2376 -0
  56. package/dist/providers/index.js.map +1 -0
  57. package/dist/request-deduplicator.util-NDo0_n1y.d.cts +50 -0
  58. package/dist/request-deduplicator.util-NDo0_n1y.d.ts +50 -0
  59. package/dist/wizard/index.cjs +230 -0
  60. package/dist/wizard/index.cjs.map +1 -0
  61. package/dist/wizard/index.d.cts +86 -0
  62. package/dist/wizard/index.d.ts +86 -0
  63. package/dist/wizard/index.js +223 -0
  64. package/dist/wizard/index.js.map +1 -0
  65. package/package.json +111 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 umituz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,99 @@
1
- # Temporary Holding Version
1
+ # @umituz/web-ai
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Provider-agnostic AI engine for web and edge runtimes. Text, chat, structured
4
+ output and streaming over swappable providers — **switching Claude ↔ Groq ↔
5
+ Gemini is a config edit, not a code change.**
6
+
7
+ Merges and supersedes `@umituz/web-ai-groq-provider` (engine: dedupe/retry/
8
+ queue, cache, SSE bridge, chat domain) and `@umituz/web-ai-content` (content
9
+ generation suite, wizards, React hooks) into one provider-neutral package.
10
+
11
+ ```bash
12
+ npm i @umituz/web-ai
13
+ ```
14
+
15
+ ## Quick start
16
+
17
+ ```ts
18
+ import { createAI } from "@umituz/web-ai";
19
+
20
+ const ai = createAI({
21
+ anthropic: { apiKey: env.ANTHROPIC_API_KEY }, // registered when apiKey present
22
+ groq: { apiKey: env.GROQ_API_KEY },
23
+ priority: ["anthropic", "groq"], // fallback walk order
24
+ defaultTier: "balanced",
25
+ });
26
+
27
+ const result = await ai.chat({
28
+ messages: [{ role: "user", content: "What units are available?" }],
29
+ systemPrompt: "You are a real-estate assistant.",
30
+ maxTokens: 2048,
31
+ });
32
+
33
+ result.text; // "Two 2-bedroom units…"
34
+ result.usage; // { inputTokens, outputTokens } — never discarded
35
+ result.model; // e.g. claude-sonnet-5-5
36
+ result.finishReason; // "stop" | "length" | "content_filter" | "refusal"
37
+ ```
38
+
39
+ Swap providers by editing config only — the code above is untouched:
40
+
41
+ ```ts
42
+ const ai = createAI({ groq: { apiKey: env.GROQ_API_KEY } }); // now served by Groq
43
+ ```
44
+
45
+ ## Tiers, not model IDs
46
+
47
+ Requests name a **tier** (`fast` | `balanced` | `powerful`); each provider
48
+ maps it onto its own catalogue (Anthropic: haiku/sonnet/opus · Groq:
49
+ 8b/70b/120b · Gemini: flash-lite/flash/pro). An explicit `model` on a request
50
+ overrides the tier. Per-instance overrides via each provider's `models` block.
51
+
52
+ Streaming is callback-based, with an async-generator adapter when you prefer it:
53
+
54
+ ```ts
55
+ const result = await ai.chatStream(request, { onChunk: (t) => render(t) });
56
+
57
+ for await (const chunk of ai.streamText(request)) render(chunk);
58
+ ```
59
+
60
+ ## Entries
61
+
62
+ | Entry | Contents | React? |
63
+ |---|---|---|
64
+ | `@umituz/web-ai` | `createAI`, `ProviderFactory`, providers, core types — **root is Workers-safe** | no |
65
+ | `/core` | errors, executor strategies (dedupe→retry→queue), cache, SSE bridge, tiers | no |
66
+ | `/providers` | provider classes + factory | no |
67
+ | `/chat` | `ChatService`, chat entities, `IChatStorage` | no |
68
+ | `/content` | content domain, 9 services, `PromptBuilder`, `GenerationExecutor` | no |
69
+ | `/wizard` | content wizard flows | no |
70
+ | `/hooks` | React hooks: `useChat`, `useText`, `useAIContent`, wizards… | **yes** |
71
+
72
+ React and `@umituz/pruna-provider` are optional peer dependencies — install
73
+ them only if you use `/hooks` or the Pruna media provider.
74
+
75
+ ## Migration from the old packages
76
+
77
+ One screen, both ancestors:
78
+
79
+ | Before | After |
80
+ |---|---|
81
+ | `configureProvider({...})` singleton | `createAI(config)` → per-app `ProviderFactory` instance |
82
+ | `new GroqProvider()` + manual client wiring | `createAI({ groq: { apiKey } })` (or import the class from `/providers`) |
83
+ | `GroqError` / `GroqErrorType` | `AIError` / `AIErrorType` — same semantic codes (`INVALID_API_KEY`, `RATE_LIMIT`, …) |
84
+ | `IAIProvider` with `'multimodal'` flag | `ITextProvider` / `IMediaProvider` with `capabilities: ('text'\|'image'\|'video')[]` |
85
+ | Model IDs hardcoded per call | `tier: 'fast'\|'balanced'\|'powerful'` (explicit `model` still wins) |
86
+ | Services returned `string`, token usage dropped | `GenerationResult { text, usage?, model, providerId, finishReason? }` |
87
+ | `generateText(prompt)` string API (content services) | Unchanged — factory keeps the string facade |
88
+ | `useGroq({ apiKey, model })` | `useText({ config })` or `useText({}, { engine })` |
89
+ | `useAIContent({ apiKey, model })` | `useAIContent({ config })` (`AIProviderConfig`, legacy `ProviderConfig` still accepted) |
90
+ | `toGroqMessages(messages)` | `toCoreMessages(messages)` (internal; `messageFormatter` is public) |
91
+ | SSE chat endpoint wiring | `createSseResponse(stream, { extractDelta, ... })` — same, now provider-neutral |
92
+
93
+ Content services (`AIContentService`, `GenerationExecutor`, wizards) compile
94
+ against the same public API; only construction changed — pass `AIProviderConfig`
95
+ instead of wiring a generator.
96
+
97
+ ## License
98
+
99
+ MIT © umituz
@@ -0,0 +1,184 @@
1
+ import { S as Sentiment, E as Emotion, C as ContentType, a as ContentTone } from './ContentGeneration-B6iK2B33.js';
2
+
3
+ type AspectRatio = '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
4
+ type ImageQuality = 'standard' | 'hd' | '4k';
5
+ type VideoQuality = '720p' | '1080p' | '4k';
6
+ type MotionStrength = 'slow' | 'medium' | 'fast';
7
+ type ImageStyle = 'realistic' | 'artistic' | 'anime' | 'cinematic' | 'vintage' | 'fantasy' | 'minimalist' | 'abstract';
8
+ interface AspectRatioOption {
9
+ value: AspectRatio;
10
+ label: string;
11
+ width: number;
12
+ height: number;
13
+ }
14
+ interface ImageQualityOption {
15
+ value: ImageQuality;
16
+ label: string;
17
+ description: string;
18
+ resolution: string;
19
+ }
20
+ interface VideoQualityOption {
21
+ value: VideoQuality;
22
+ label: string;
23
+ resolution: string;
24
+ }
25
+ interface MotionOption {
26
+ value: MotionStrength;
27
+ label: string;
28
+ description: string;
29
+ }
30
+ interface StylePreset {
31
+ value: ImageStyle;
32
+ label: string;
33
+ promptFragment: string;
34
+ }
35
+ declare const ASPECT_RATIO_OPTIONS: ReadonlyArray<AspectRatioOption>;
36
+ declare const IMAGE_QUALITY_OPTIONS: ReadonlyArray<ImageQualityOption>;
37
+ declare const VIDEO_QUALITY_OPTIONS: ReadonlyArray<VideoQualityOption>;
38
+ declare const VIDEO_DURATION_OPTIONS_SECONDS: ReadonlyArray<number>;
39
+ declare const MOTION_OPTIONS: ReadonlyArray<MotionOption>;
40
+ declare const STYLE_PRESETS: ReadonlyArray<StylePreset>;
41
+
42
+ type GenerationType = 'text-to-image' | 'image-to-image' | 'image-to-video' | 'text-to-video';
43
+ type GenerationStatus = 'idle' | 'uploading' | 'processing' | 'completed' | 'failed' | 'cancelled';
44
+
45
+ interface ImageGenerationInput {
46
+ type: 'text-to-image' | 'image-to-image';
47
+ prompt: string;
48
+ image?: string;
49
+ aspectRatio?: AspectRatio;
50
+ quality?: ImageQuality;
51
+ style?: string;
52
+ seed?: number;
53
+ }
54
+ interface VideoGenerationInput {
55
+ type: 'text-to-video' | 'image-to-video';
56
+ prompt: string;
57
+ image?: string;
58
+ duration?: number;
59
+ aspectRatio?: AspectRatio;
60
+ quality?: VideoQuality;
61
+ motion?: MotionStrength;
62
+ }
63
+ interface GenerationResult {
64
+ id: string;
65
+ type: GenerationType;
66
+ url: string;
67
+ thumbnailUrl?: string;
68
+ status: GenerationStatus;
69
+ error?: string;
70
+ metadata?: GenerationMetadata;
71
+ createdAt: string;
72
+ }
73
+ interface GenerationMetadata {
74
+ provider: 'pruna' | 'fal' | 'groq' | 'gemini';
75
+ model: string;
76
+ prompt: string;
77
+ duration?: number;
78
+ quality?: string;
79
+ aspectRatio?: string;
80
+ style?: string;
81
+ }
82
+ interface GenerationProgress {
83
+ stage: 'uploading' | 'processing' | 'polling';
84
+ progress: number;
85
+ message?: string;
86
+ }
87
+ interface CreditCost {
88
+ standard: number;
89
+ hd: number;
90
+ '4k': number;
91
+ }
92
+
93
+ interface SentimentAnalysisResult {
94
+ sentiment: Sentiment;
95
+ confidence: number;
96
+ emotions: EmotionScore[];
97
+ }
98
+ interface EmotionScore {
99
+ emotion: Emotion;
100
+ score: number;
101
+ }
102
+ interface ContentAnalysisRequest {
103
+ content: string;
104
+ detectEmotions?: boolean;
105
+ detectKeywords?: boolean;
106
+ detectEntities?: boolean;
107
+ }
108
+ interface ContentAnalysisResult {
109
+ sentiment: SentimentAnalysisResult;
110
+ keywords: string[];
111
+ entities: string[];
112
+ suggestedImprovements: string[];
113
+ readabilityScore: number;
114
+ estimatedEngagement: number;
115
+ }
116
+
117
+ interface SEOOptimizationRequest {
118
+ content: string;
119
+ keywords: string[];
120
+ targetPlatform?: string;
121
+ includeSchemaMarkup?: boolean;
122
+ language?: string;
123
+ }
124
+ interface SEOOptimizationResult {
125
+ optimized: string;
126
+ score: number;
127
+ suggestions: string[];
128
+ addedKeywords: string[];
129
+ removedFillerWords: number;
130
+ readabilityImprovements: string[];
131
+ metaDescription?: string;
132
+ titleSuggestions?: string[];
133
+ schemaMarkup?: string;
134
+ }
135
+ interface SEOScoreBreakdown {
136
+ keywordDensity: number;
137
+ readabilityScore: number;
138
+ titleOptimization: number;
139
+ metaDescription: number;
140
+ headingStructure: number;
141
+ internalLinking: number;
142
+ overall: number;
143
+ }
144
+ interface KeywordAnalysis {
145
+ keyword: string;
146
+ count: number;
147
+ density: number;
148
+ prominence: 'high' | 'medium' | 'low';
149
+ suggestions: string[];
150
+ }
151
+
152
+ interface ABTestVariant {
153
+ id: string;
154
+ name?: string;
155
+ content: string;
156
+ contentType: ContentType;
157
+ tone: ContentTone;
158
+ }
159
+ interface ABTestPrediction {
160
+ variantId: string;
161
+ predictedEngagement: number;
162
+ predictedCTR: number;
163
+ predictedConversions: number;
164
+ confidence: number;
165
+ reasoning: string;
166
+ strengths: string[];
167
+ weaknesses: string[];
168
+ suggestions: string[];
169
+ }
170
+ interface ABTestComparison {
171
+ winner: string;
172
+ confidence: number;
173
+ improvement: string;
174
+ reasoning: string;
175
+ recommendations: string[];
176
+ }
177
+ interface ABTestRequest {
178
+ variants: ABTestVariant[];
179
+ targetAudience: string;
180
+ platform: string;
181
+ goals: string[];
182
+ }
183
+
184
+ export { type ABTestRequest as A, type ContentAnalysisRequest as C, type GenerationResult as G, type ImageGenerationInput as I, type KeywordAnalysis as K, MOTION_OPTIONS as M, type SentimentAnalysisResult as S, type VideoGenerationInput as V, type ContentAnalysisResult as a, type SEOOptimizationRequest as b, type SEOOptimizationResult as c, type SEOScoreBreakdown as d, type ABTestPrediction as e, type ABTestComparison as f, type GenerationProgress as g, type GenerationStatus as h, type GenerationType as i, type ImageQuality as j, type VideoQuality as k, type AspectRatio as l, type ABTestVariant as m, ASPECT_RATIO_OPTIONS as n, type CreditCost as o, type GenerationMetadata as p, IMAGE_QUALITY_OPTIONS as q, STYLE_PRESETS as r, VIDEO_DURATION_OPTIONS_SECONDS as s, VIDEO_QUALITY_OPTIONS as t };
@@ -0,0 +1,184 @@
1
+ import { S as Sentiment, E as Emotion, C as ContentType, a as ContentTone } from './ContentGeneration-B6iK2B33.cjs';
2
+
3
+ type AspectRatio = '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
4
+ type ImageQuality = 'standard' | 'hd' | '4k';
5
+ type VideoQuality = '720p' | '1080p' | '4k';
6
+ type MotionStrength = 'slow' | 'medium' | 'fast';
7
+ type ImageStyle = 'realistic' | 'artistic' | 'anime' | 'cinematic' | 'vintage' | 'fantasy' | 'minimalist' | 'abstract';
8
+ interface AspectRatioOption {
9
+ value: AspectRatio;
10
+ label: string;
11
+ width: number;
12
+ height: number;
13
+ }
14
+ interface ImageQualityOption {
15
+ value: ImageQuality;
16
+ label: string;
17
+ description: string;
18
+ resolution: string;
19
+ }
20
+ interface VideoQualityOption {
21
+ value: VideoQuality;
22
+ label: string;
23
+ resolution: string;
24
+ }
25
+ interface MotionOption {
26
+ value: MotionStrength;
27
+ label: string;
28
+ description: string;
29
+ }
30
+ interface StylePreset {
31
+ value: ImageStyle;
32
+ label: string;
33
+ promptFragment: string;
34
+ }
35
+ declare const ASPECT_RATIO_OPTIONS: ReadonlyArray<AspectRatioOption>;
36
+ declare const IMAGE_QUALITY_OPTIONS: ReadonlyArray<ImageQualityOption>;
37
+ declare const VIDEO_QUALITY_OPTIONS: ReadonlyArray<VideoQualityOption>;
38
+ declare const VIDEO_DURATION_OPTIONS_SECONDS: ReadonlyArray<number>;
39
+ declare const MOTION_OPTIONS: ReadonlyArray<MotionOption>;
40
+ declare const STYLE_PRESETS: ReadonlyArray<StylePreset>;
41
+
42
+ type GenerationType = 'text-to-image' | 'image-to-image' | 'image-to-video' | 'text-to-video';
43
+ type GenerationStatus = 'idle' | 'uploading' | 'processing' | 'completed' | 'failed' | 'cancelled';
44
+
45
+ interface ImageGenerationInput {
46
+ type: 'text-to-image' | 'image-to-image';
47
+ prompt: string;
48
+ image?: string;
49
+ aspectRatio?: AspectRatio;
50
+ quality?: ImageQuality;
51
+ style?: string;
52
+ seed?: number;
53
+ }
54
+ interface VideoGenerationInput {
55
+ type: 'text-to-video' | 'image-to-video';
56
+ prompt: string;
57
+ image?: string;
58
+ duration?: number;
59
+ aspectRatio?: AspectRatio;
60
+ quality?: VideoQuality;
61
+ motion?: MotionStrength;
62
+ }
63
+ interface GenerationResult {
64
+ id: string;
65
+ type: GenerationType;
66
+ url: string;
67
+ thumbnailUrl?: string;
68
+ status: GenerationStatus;
69
+ error?: string;
70
+ metadata?: GenerationMetadata;
71
+ createdAt: string;
72
+ }
73
+ interface GenerationMetadata {
74
+ provider: 'pruna' | 'fal' | 'groq' | 'gemini';
75
+ model: string;
76
+ prompt: string;
77
+ duration?: number;
78
+ quality?: string;
79
+ aspectRatio?: string;
80
+ style?: string;
81
+ }
82
+ interface GenerationProgress {
83
+ stage: 'uploading' | 'processing' | 'polling';
84
+ progress: number;
85
+ message?: string;
86
+ }
87
+ interface CreditCost {
88
+ standard: number;
89
+ hd: number;
90
+ '4k': number;
91
+ }
92
+
93
+ interface SentimentAnalysisResult {
94
+ sentiment: Sentiment;
95
+ confidence: number;
96
+ emotions: EmotionScore[];
97
+ }
98
+ interface EmotionScore {
99
+ emotion: Emotion;
100
+ score: number;
101
+ }
102
+ interface ContentAnalysisRequest {
103
+ content: string;
104
+ detectEmotions?: boolean;
105
+ detectKeywords?: boolean;
106
+ detectEntities?: boolean;
107
+ }
108
+ interface ContentAnalysisResult {
109
+ sentiment: SentimentAnalysisResult;
110
+ keywords: string[];
111
+ entities: string[];
112
+ suggestedImprovements: string[];
113
+ readabilityScore: number;
114
+ estimatedEngagement: number;
115
+ }
116
+
117
+ interface SEOOptimizationRequest {
118
+ content: string;
119
+ keywords: string[];
120
+ targetPlatform?: string;
121
+ includeSchemaMarkup?: boolean;
122
+ language?: string;
123
+ }
124
+ interface SEOOptimizationResult {
125
+ optimized: string;
126
+ score: number;
127
+ suggestions: string[];
128
+ addedKeywords: string[];
129
+ removedFillerWords: number;
130
+ readabilityImprovements: string[];
131
+ metaDescription?: string;
132
+ titleSuggestions?: string[];
133
+ schemaMarkup?: string;
134
+ }
135
+ interface SEOScoreBreakdown {
136
+ keywordDensity: number;
137
+ readabilityScore: number;
138
+ titleOptimization: number;
139
+ metaDescription: number;
140
+ headingStructure: number;
141
+ internalLinking: number;
142
+ overall: number;
143
+ }
144
+ interface KeywordAnalysis {
145
+ keyword: string;
146
+ count: number;
147
+ density: number;
148
+ prominence: 'high' | 'medium' | 'low';
149
+ suggestions: string[];
150
+ }
151
+
152
+ interface ABTestVariant {
153
+ id: string;
154
+ name?: string;
155
+ content: string;
156
+ contentType: ContentType;
157
+ tone: ContentTone;
158
+ }
159
+ interface ABTestPrediction {
160
+ variantId: string;
161
+ predictedEngagement: number;
162
+ predictedCTR: number;
163
+ predictedConversions: number;
164
+ confidence: number;
165
+ reasoning: string;
166
+ strengths: string[];
167
+ weaknesses: string[];
168
+ suggestions: string[];
169
+ }
170
+ interface ABTestComparison {
171
+ winner: string;
172
+ confidence: number;
173
+ improvement: string;
174
+ reasoning: string;
175
+ recommendations: string[];
176
+ }
177
+ interface ABTestRequest {
178
+ variants: ABTestVariant[];
179
+ targetAudience: string;
180
+ platform: string;
181
+ goals: string[];
182
+ }
183
+
184
+ export { type ABTestRequest as A, type ContentAnalysisRequest as C, type GenerationResult as G, type ImageGenerationInput as I, type KeywordAnalysis as K, MOTION_OPTIONS as M, type SentimentAnalysisResult as S, type VideoGenerationInput as V, type ContentAnalysisResult as a, type SEOOptimizationRequest as b, type SEOOptimizationResult as c, type SEOScoreBreakdown as d, type ABTestPrediction as e, type ABTestComparison as f, type GenerationProgress as g, type GenerationStatus as h, type GenerationType as i, type ImageQuality as j, type VideoQuality as k, type AspectRatio as l, type ABTestVariant as m, ASPECT_RATIO_OPTIONS as n, type CreditCost as o, type GenerationMetadata as p, IMAGE_QUALITY_OPTIONS as q, STYLE_PRESETS as r, VIDEO_DURATION_OPTIONS_SECONDS as s, VIDEO_QUALITY_OPTIONS as t };
@@ -0,0 +1,93 @@
1
+ type SocialPlatform = 'twitter' | 'linkedin' | 'instagram' | 'threads' | 'tiktok' | 'facebook';
2
+ type ContentTone = 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational' | 'inspirational';
3
+ type ContentType = 'blog' | 'video' | 'social' | 'email' | 'advertisement' | 'caption' | 'script';
4
+ type Emotion = 'happy' | 'excited' | 'calm' | 'sad' | 'angry' | 'surprised' | 'fearful' | 'disgusted' | 'neutral';
5
+ type Sentiment = 'positive' | 'neutral' | 'negative';
6
+ type BlogType = 'tutorial' | 'listicle' | 'review' | 'opinion' | 'howto';
7
+ interface PlatformSpecs {
8
+ maxLength: number;
9
+ style: string;
10
+ emojiSupport: boolean;
11
+ hashtagSupport: boolean;
12
+ imageSupport: boolean;
13
+ videoSupport: boolean;
14
+ maxHashtags: number;
15
+ }
16
+ declare const PLATFORM_SPECS: Record<SocialPlatform, PlatformSpecs>;
17
+
18
+ interface BlogGenerationRequest {
19
+ topic: string;
20
+ blogType: 'tutorial' | 'listicle' | 'review' | 'opinion' | 'howto';
21
+ targetKeywords: string[];
22
+ tone: ContentTone;
23
+ wordCount: number;
24
+ targetAudience: string;
25
+ seoOptimization: boolean;
26
+ includeImages: boolean;
27
+ includeSchema: boolean;
28
+ language?: string;
29
+ }
30
+ interface GeneratedBlog {
31
+ id: string;
32
+ title: string;
33
+ content: string;
34
+ metaDescription: string;
35
+ blogType: string;
36
+ tone: string;
37
+ wordCount: number;
38
+ createdAt: string;
39
+ seoScore: number;
40
+ readabilityScore: number;
41
+ keywords: string[];
42
+ performance: {
43
+ readingTime: number;
44
+ shareability: number;
45
+ seoRank: number;
46
+ };
47
+ schemaMarkup?: string;
48
+ imagePrompts?: string[];
49
+ }
50
+ interface SocialContentRequest {
51
+ topic: string;
52
+ platform: SocialPlatform;
53
+ tone: ContentTone;
54
+ hashtags?: boolean;
55
+ maxLength?: number;
56
+ targetAudience?: string;
57
+ includeCallToAction?: boolean;
58
+ }
59
+ interface GeneratedSocialContent {
60
+ content: string;
61
+ platform: SocialPlatform;
62
+ hashtags: string[];
63
+ emojis: string[];
64
+ characterCount: number;
65
+ estimatedEngagement: number;
66
+ }
67
+ interface VideoScriptRequest {
68
+ topic: string;
69
+ tone: ContentTone;
70
+ duration: number;
71
+ targetAudience: string;
72
+ includeVisuals: boolean;
73
+ includeCallToAction: boolean;
74
+ }
75
+ interface GeneratedVideoScript {
76
+ script: string;
77
+ visualCues: string[];
78
+ duration: number;
79
+ wordCount: number;
80
+ estimatedEngagement: number;
81
+ callToAction?: string;
82
+ }
83
+ interface ContentCalendarEntry {
84
+ date: Date;
85
+ topic: string;
86
+ contentType: ContentType;
87
+ platform: SocialPlatform;
88
+ description: string;
89
+ estimatedEngagement: number;
90
+ priority: 'high' | 'medium' | 'low';
91
+ }
92
+
93
+ export { type BlogGenerationRequest as B, type ContentType as C, type Emotion as E, type GeneratedBlog as G, PLATFORM_SPECS as P, type Sentiment as S, type VideoScriptRequest as V, type ContentTone as a, type SocialContentRequest as b, type GeneratedSocialContent as c, type GeneratedVideoScript as d, type ContentCalendarEntry as e, type SocialPlatform as f, type BlogType as g, type PlatformSpecs as h };
@@ -0,0 +1,93 @@
1
+ type SocialPlatform = 'twitter' | 'linkedin' | 'instagram' | 'threads' | 'tiktok' | 'facebook';
2
+ type ContentTone = 'professional' | 'casual' | 'enthusiastic' | 'humorous' | 'dramatic' | 'educational' | 'inspirational';
3
+ type ContentType = 'blog' | 'video' | 'social' | 'email' | 'advertisement' | 'caption' | 'script';
4
+ type Emotion = 'happy' | 'excited' | 'calm' | 'sad' | 'angry' | 'surprised' | 'fearful' | 'disgusted' | 'neutral';
5
+ type Sentiment = 'positive' | 'neutral' | 'negative';
6
+ type BlogType = 'tutorial' | 'listicle' | 'review' | 'opinion' | 'howto';
7
+ interface PlatformSpecs {
8
+ maxLength: number;
9
+ style: string;
10
+ emojiSupport: boolean;
11
+ hashtagSupport: boolean;
12
+ imageSupport: boolean;
13
+ videoSupport: boolean;
14
+ maxHashtags: number;
15
+ }
16
+ declare const PLATFORM_SPECS: Record<SocialPlatform, PlatformSpecs>;
17
+
18
+ interface BlogGenerationRequest {
19
+ topic: string;
20
+ blogType: 'tutorial' | 'listicle' | 'review' | 'opinion' | 'howto';
21
+ targetKeywords: string[];
22
+ tone: ContentTone;
23
+ wordCount: number;
24
+ targetAudience: string;
25
+ seoOptimization: boolean;
26
+ includeImages: boolean;
27
+ includeSchema: boolean;
28
+ language?: string;
29
+ }
30
+ interface GeneratedBlog {
31
+ id: string;
32
+ title: string;
33
+ content: string;
34
+ metaDescription: string;
35
+ blogType: string;
36
+ tone: string;
37
+ wordCount: number;
38
+ createdAt: string;
39
+ seoScore: number;
40
+ readabilityScore: number;
41
+ keywords: string[];
42
+ performance: {
43
+ readingTime: number;
44
+ shareability: number;
45
+ seoRank: number;
46
+ };
47
+ schemaMarkup?: string;
48
+ imagePrompts?: string[];
49
+ }
50
+ interface SocialContentRequest {
51
+ topic: string;
52
+ platform: SocialPlatform;
53
+ tone: ContentTone;
54
+ hashtags?: boolean;
55
+ maxLength?: number;
56
+ targetAudience?: string;
57
+ includeCallToAction?: boolean;
58
+ }
59
+ interface GeneratedSocialContent {
60
+ content: string;
61
+ platform: SocialPlatform;
62
+ hashtags: string[];
63
+ emojis: string[];
64
+ characterCount: number;
65
+ estimatedEngagement: number;
66
+ }
67
+ interface VideoScriptRequest {
68
+ topic: string;
69
+ tone: ContentTone;
70
+ duration: number;
71
+ targetAudience: string;
72
+ includeVisuals: boolean;
73
+ includeCallToAction: boolean;
74
+ }
75
+ interface GeneratedVideoScript {
76
+ script: string;
77
+ visualCues: string[];
78
+ duration: number;
79
+ wordCount: number;
80
+ estimatedEngagement: number;
81
+ callToAction?: string;
82
+ }
83
+ interface ContentCalendarEntry {
84
+ date: Date;
85
+ topic: string;
86
+ contentType: ContentType;
87
+ platform: SocialPlatform;
88
+ description: string;
89
+ estimatedEngagement: number;
90
+ priority: 'high' | 'medium' | 'low';
91
+ }
92
+
93
+ export { type BlogGenerationRequest as B, type ContentType as C, type Emotion as E, type GeneratedBlog as G, PLATFORM_SPECS as P, type Sentiment as S, type VideoScriptRequest as V, type ContentTone as a, type SocialContentRequest as b, type GeneratedSocialContent as c, type GeneratedVideoScript as d, type ContentCalendarEntry as e, type SocialPlatform as f, type BlogType as g, type PlatformSpecs as h };