@umituz/web-ai 1.0.2 → 1.0.4
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.
- package/dist/{AIErrors-B2ogd1PB.d.ts → AIErrors-CLjXRty-.d.ts} +99 -92
- package/dist/{AIErrors-C5EasV_c.d.cts → AIErrors-DjZXUiLT.d.cts} +99 -92
- package/dist/PromptBuilder-B5Lm1znm.d.ts +215 -0
- package/dist/PromptBuilder-DIUZlfV6.d.cts +215 -0
- package/dist/{text-generation.service-BQO3Tvz2.d.cts → cancellation-error-Cj7fJyCg.d.cts} +66 -3
- package/dist/{text-generation.service-CcYQM6Ch.d.ts → cancellation-error-CkMn5Kft.d.ts} +66 -3
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +3 -3
- package/dist/chat/index.d.ts +3 -3
- package/dist/chat/index.js.map +1 -1
- package/dist/{chat.service-CL1qtYxe.d.cts → chat.service-9M-KpLo-.d.cts} +1 -1
- package/dist/{chat.service-q05GnhEm.d.ts → chat.service-B4FLFxR1.d.ts} +1 -1
- package/dist/content/index.cjs +1582 -452
- package/dist/content/index.cjs.map +1 -1
- package/dist/content/index.d.cts +165 -219
- package/dist/content/index.d.ts +165 -219
- package/dist/content/index.js +1525 -453
- package/dist/content/index.js.map +1 -1
- package/dist/{create-ai-9PW752z8.d.ts → create-ai-0eZFFqTw.d.ts} +1 -1
- package/dist/{create-ai-CXYKPK6G.d.cts → create-ai-BrKR_5fQ.d.cts} +1 -1
- package/dist/hooks/index.cjs +924 -31
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +44 -8
- package/dist/hooks/index.d.ts +44 -8
- package/dist/hooks/index.js +919 -32
- package/dist/hooks/index.js.map +1 -1
- package/dist/index-BUVULo3h.d.ts +177 -0
- package/dist/index-BulSkB2L.d.cts +177 -0
- package/dist/index.cjs +3057 -563
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -5
- package/dist/index.d.ts +8 -5
- package/dist/index.js +3011 -564
- package/dist/index.js.map +1 -1
- package/dist/{provider.factory-DfDfk0dK.d.ts → provider.factory-BwPnqSEU.d.ts} +3 -1
- package/dist/{provider.factory-BxsfK4WW.d.cts → provider.factory-DyfJtR8M.d.cts} +3 -1
- package/dist/providers/index.cjs +818 -27
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.d.cts +50 -8
- package/dist/providers/index.d.ts +50 -8
- package/dist/providers/index.js +806 -28
- package/dist/providers/index.js.map +1 -1
- package/dist/wizard/index.d.cts +2 -86
- package/dist/wizard/index.d.ts +2 -86
- package/package.json +21 -1
- package/dist/ContentGeneration-B6iK2B33.d.cts +0 -93
- package/dist/ContentGeneration-B6iK2B33.d.ts +0 -93
|
@@ -1,96 +1,6 @@
|
|
|
1
|
-
import { S as Sentiment, E as Emotion,
|
|
1
|
+
import { S as Sentiment, E as Emotion, d as ContentType, c as ContentTone } from './index-BUVULo3h.js';
|
|
2
2
|
import { A as AIError } from './index-DIHz8_OJ.js';
|
|
3
3
|
|
|
4
|
-
type AspectRatio = '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
|
|
5
|
-
type ImageQuality = 'standard' | 'hd' | '4k';
|
|
6
|
-
type VideoQuality = '720p' | '1080p' | '4k';
|
|
7
|
-
type MotionStrength = 'slow' | 'medium' | 'fast';
|
|
8
|
-
type ImageStyle = 'realistic' | 'artistic' | 'anime' | 'cinematic' | 'vintage' | 'fantasy' | 'minimalist' | 'abstract';
|
|
9
|
-
interface AspectRatioOption {
|
|
10
|
-
value: AspectRatio;
|
|
11
|
-
label: string;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
}
|
|
15
|
-
interface ImageQualityOption {
|
|
16
|
-
value: ImageQuality;
|
|
17
|
-
label: string;
|
|
18
|
-
description: string;
|
|
19
|
-
resolution: string;
|
|
20
|
-
}
|
|
21
|
-
interface VideoQualityOption {
|
|
22
|
-
value: VideoQuality;
|
|
23
|
-
label: string;
|
|
24
|
-
resolution: string;
|
|
25
|
-
}
|
|
26
|
-
interface MotionOption {
|
|
27
|
-
value: MotionStrength;
|
|
28
|
-
label: string;
|
|
29
|
-
description: string;
|
|
30
|
-
}
|
|
31
|
-
interface StylePreset {
|
|
32
|
-
value: ImageStyle;
|
|
33
|
-
label: string;
|
|
34
|
-
promptFragment: string;
|
|
35
|
-
}
|
|
36
|
-
declare const ASPECT_RATIO_OPTIONS: ReadonlyArray<AspectRatioOption>;
|
|
37
|
-
declare const IMAGE_QUALITY_OPTIONS: ReadonlyArray<ImageQualityOption>;
|
|
38
|
-
declare const VIDEO_QUALITY_OPTIONS: ReadonlyArray<VideoQualityOption>;
|
|
39
|
-
declare const VIDEO_DURATION_OPTIONS_SECONDS: ReadonlyArray<number>;
|
|
40
|
-
declare const MOTION_OPTIONS: ReadonlyArray<MotionOption>;
|
|
41
|
-
declare const STYLE_PRESETS: ReadonlyArray<StylePreset>;
|
|
42
|
-
|
|
43
|
-
type GenerationType = 'text-to-image' | 'image-to-image' | 'image-to-video' | 'text-to-video';
|
|
44
|
-
type GenerationStatus = 'idle' | 'uploading' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
45
|
-
|
|
46
|
-
interface ImageGenerationInput {
|
|
47
|
-
type: 'text-to-image' | 'image-to-image';
|
|
48
|
-
prompt: string;
|
|
49
|
-
image?: string;
|
|
50
|
-
aspectRatio?: AspectRatio;
|
|
51
|
-
quality?: ImageQuality;
|
|
52
|
-
style?: string;
|
|
53
|
-
seed?: number;
|
|
54
|
-
}
|
|
55
|
-
interface VideoGenerationInput {
|
|
56
|
-
type: 'text-to-video' | 'image-to-video';
|
|
57
|
-
prompt: string;
|
|
58
|
-
image?: string;
|
|
59
|
-
duration?: number;
|
|
60
|
-
aspectRatio?: AspectRatio;
|
|
61
|
-
quality?: VideoQuality;
|
|
62
|
-
motion?: MotionStrength;
|
|
63
|
-
}
|
|
64
|
-
interface GenerationResult {
|
|
65
|
-
id: string;
|
|
66
|
-
type: GenerationType;
|
|
67
|
-
url: string;
|
|
68
|
-
thumbnailUrl?: string;
|
|
69
|
-
status: GenerationStatus;
|
|
70
|
-
error?: string;
|
|
71
|
-
metadata?: GenerationMetadata;
|
|
72
|
-
createdAt: string;
|
|
73
|
-
}
|
|
74
|
-
interface GenerationMetadata {
|
|
75
|
-
provider: 'pruna' | 'fal' | 'groq' | 'gemini';
|
|
76
|
-
model: string;
|
|
77
|
-
prompt: string;
|
|
78
|
-
duration?: number;
|
|
79
|
-
quality?: string;
|
|
80
|
-
aspectRatio?: string;
|
|
81
|
-
style?: string;
|
|
82
|
-
}
|
|
83
|
-
interface GenerationProgress {
|
|
84
|
-
stage: 'uploading' | 'processing' | 'polling';
|
|
85
|
-
progress: number;
|
|
86
|
-
message?: string;
|
|
87
|
-
}
|
|
88
|
-
interface CreditCost {
|
|
89
|
-
standard: number;
|
|
90
|
-
hd: number;
|
|
91
|
-
'4k': number;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
4
|
interface SentimentAnalysisResult {
|
|
95
5
|
sentiment: Sentiment;
|
|
96
6
|
confidence: number;
|
|
@@ -182,6 +92,103 @@ interface ABTestRequest {
|
|
|
182
92
|
goals: string[];
|
|
183
93
|
}
|
|
184
94
|
|
|
95
|
+
type AspectRatio = '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
|
|
96
|
+
type ImageQuality = 'standard' | 'hd' | '4k';
|
|
97
|
+
type VideoQuality = '720p' | '1080p' | '4k';
|
|
98
|
+
type MotionStrength = 'slow' | 'medium' | 'fast';
|
|
99
|
+
type ImageStyle = 'realistic' | 'artistic' | 'anime' | 'cinematic' | 'vintage' | 'fantasy' | 'minimalist' | 'abstract';
|
|
100
|
+
interface AspectRatioOption {
|
|
101
|
+
value: AspectRatio;
|
|
102
|
+
label: string;
|
|
103
|
+
width: number;
|
|
104
|
+
height: number;
|
|
105
|
+
}
|
|
106
|
+
interface ImageQualityOption {
|
|
107
|
+
value: ImageQuality;
|
|
108
|
+
label: string;
|
|
109
|
+
description: string;
|
|
110
|
+
resolution: string;
|
|
111
|
+
}
|
|
112
|
+
interface VideoQualityOption {
|
|
113
|
+
value: VideoQuality;
|
|
114
|
+
label: string;
|
|
115
|
+
resolution: string;
|
|
116
|
+
}
|
|
117
|
+
interface MotionOption {
|
|
118
|
+
value: MotionStrength;
|
|
119
|
+
label: string;
|
|
120
|
+
description: string;
|
|
121
|
+
}
|
|
122
|
+
interface StylePreset {
|
|
123
|
+
value: ImageStyle;
|
|
124
|
+
label: string;
|
|
125
|
+
promptFragment: string;
|
|
126
|
+
}
|
|
127
|
+
declare const ASPECT_RATIO_OPTIONS: ReadonlyArray<AspectRatioOption>;
|
|
128
|
+
declare const IMAGE_QUALITY_OPTIONS: ReadonlyArray<ImageQualityOption>;
|
|
129
|
+
declare const VIDEO_QUALITY_OPTIONS: ReadonlyArray<VideoQualityOption>;
|
|
130
|
+
declare const VIDEO_DURATION_OPTIONS_SECONDS: ReadonlyArray<number>;
|
|
131
|
+
declare const MOTION_OPTIONS: ReadonlyArray<MotionOption>;
|
|
132
|
+
declare const STYLE_PRESETS: ReadonlyArray<StylePreset>;
|
|
133
|
+
|
|
134
|
+
type QualityTier = 'standard' | 'hd' | '4k';
|
|
135
|
+
declare const CREDIT_COSTS: Readonly<Record<GenerationType, Readonly<Record<QualityTier, number>>>>;
|
|
136
|
+
declare const DEFAULT_CREDIT_COST: number;
|
|
137
|
+
type AnyQuality = QualityTier | ImageQuality | VideoQuality;
|
|
138
|
+
declare function toQualityTier(quality: AnyQuality | undefined): QualityTier;
|
|
139
|
+
declare function calculateContentCreditCost(type: GenerationType, quality?: AnyQuality): number;
|
|
140
|
+
|
|
141
|
+
type GenerationType = 'text-to-image' | 'image-to-image' | 'image-to-video' | 'text-to-video';
|
|
142
|
+
type GenerationStatus = 'idle' | 'uploading' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
143
|
+
|
|
144
|
+
interface ImageGenerationInput {
|
|
145
|
+
type: 'text-to-image' | 'image-to-image';
|
|
146
|
+
prompt: string;
|
|
147
|
+
image?: string;
|
|
148
|
+
aspectRatio?: AspectRatio;
|
|
149
|
+
quality?: ImageQuality;
|
|
150
|
+
style?: string;
|
|
151
|
+
seed?: number;
|
|
152
|
+
}
|
|
153
|
+
interface VideoGenerationInput {
|
|
154
|
+
type: 'text-to-video' | 'image-to-video';
|
|
155
|
+
prompt: string;
|
|
156
|
+
image?: string;
|
|
157
|
+
duration?: number;
|
|
158
|
+
aspectRatio?: AspectRatio;
|
|
159
|
+
quality?: VideoQuality;
|
|
160
|
+
motion?: MotionStrength;
|
|
161
|
+
}
|
|
162
|
+
interface GenerationResult {
|
|
163
|
+
id: string;
|
|
164
|
+
type: GenerationType;
|
|
165
|
+
url: string;
|
|
166
|
+
thumbnailUrl?: string;
|
|
167
|
+
status: GenerationStatus;
|
|
168
|
+
error?: string;
|
|
169
|
+
metadata?: GenerationMetadata;
|
|
170
|
+
createdAt: string;
|
|
171
|
+
}
|
|
172
|
+
interface GenerationMetadata {
|
|
173
|
+
provider: 'pruna' | 'fal' | 'groq' | 'gemini';
|
|
174
|
+
model: string;
|
|
175
|
+
prompt: string;
|
|
176
|
+
duration?: number;
|
|
177
|
+
quality?: string;
|
|
178
|
+
aspectRatio?: string;
|
|
179
|
+
style?: string;
|
|
180
|
+
}
|
|
181
|
+
interface GenerationProgress {
|
|
182
|
+
stage: 'uploading' | 'processing' | 'polling';
|
|
183
|
+
progress: number;
|
|
184
|
+
message?: string;
|
|
185
|
+
}
|
|
186
|
+
interface CreditCost {
|
|
187
|
+
standard: number;
|
|
188
|
+
hd: number;
|
|
189
|
+
'4k': number;
|
|
190
|
+
}
|
|
191
|
+
|
|
185
192
|
type AIErrorCode = 'VALIDATION_ERROR' | 'PROVIDER_UNAVAILABLE' | 'PROVIDER_QUOTA_EXHAUSTED' | 'PROVIDER_ERROR' | 'NETWORK_ERROR' | 'TIMEOUT' | 'ABORTED' | 'PARSE_ERROR' | 'NO_RESULT' | 'UNKNOWN';
|
|
186
193
|
|
|
187
194
|
declare class ValidationError extends AIError {
|
|
@@ -194,4 +201,4 @@ declare class ProviderQuotaExhaustedError extends AIError {
|
|
|
194
201
|
constructor(providerId: string);
|
|
195
202
|
}
|
|
196
203
|
|
|
197
|
-
export { type
|
|
204
|
+
export { type ABTestComparison as A, type ImageQualityOption as B, type ContentAnalysisRequest as C, DEFAULT_CREDIT_COST as D, type EmotionScore as E, type ImageStyle as F, type GenerationResult as G, type MotionOption as H, IMAGE_QUALITY_OPTIONS as I, type MotionStrength as J, type KeywordAnalysis as K, type StylePreset as L, MOTION_OPTIONS as M, ValidationError as N, type VideoQualityOption as O, ProviderQuotaExhaustedError as P, type QualityTier as Q, toQualityTier as R, type SEOOptimizationRequest as S, VIDEO_DURATION_OPTIONS_SECONDS as V, type ABTestPrediction as a, type ABTestRequest as b, type ABTestVariant as c, type AIErrorCode as d, ASPECT_RATIO_OPTIONS as e, type AspectRatio as f, type ContentAnalysisResult as g, type CreditCost as h, CREDIT_COSTS as i, type GenerationMetadata as j, type GenerationProgress as k, type GenerationStatus as l, type GenerationType as m, type ImageGenerationInput as n, type ImageQuality as o, ProviderUnavailableError as p, type SEOOptimizationResult as q, type SEOScoreBreakdown as r, STYLE_PRESETS as s, type SentimentAnalysisResult as t, VIDEO_QUALITY_OPTIONS as u, type VideoGenerationInput as v, type VideoQuality as w, calculateContentCreditCost as x, type AnyQuality as y, type AspectRatioOption as z };
|
|
@@ -1,96 +1,6 @@
|
|
|
1
|
-
import { S as Sentiment, E as Emotion,
|
|
1
|
+
import { S as Sentiment, E as Emotion, d as ContentType, c as ContentTone } from './index-BulSkB2L.cjs';
|
|
2
2
|
import { A as AIError } from './index-DKHNcMbl.cjs';
|
|
3
3
|
|
|
4
|
-
type AspectRatio = '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
|
|
5
|
-
type ImageQuality = 'standard' | 'hd' | '4k';
|
|
6
|
-
type VideoQuality = '720p' | '1080p' | '4k';
|
|
7
|
-
type MotionStrength = 'slow' | 'medium' | 'fast';
|
|
8
|
-
type ImageStyle = 'realistic' | 'artistic' | 'anime' | 'cinematic' | 'vintage' | 'fantasy' | 'minimalist' | 'abstract';
|
|
9
|
-
interface AspectRatioOption {
|
|
10
|
-
value: AspectRatio;
|
|
11
|
-
label: string;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
}
|
|
15
|
-
interface ImageQualityOption {
|
|
16
|
-
value: ImageQuality;
|
|
17
|
-
label: string;
|
|
18
|
-
description: string;
|
|
19
|
-
resolution: string;
|
|
20
|
-
}
|
|
21
|
-
interface VideoQualityOption {
|
|
22
|
-
value: VideoQuality;
|
|
23
|
-
label: string;
|
|
24
|
-
resolution: string;
|
|
25
|
-
}
|
|
26
|
-
interface MotionOption {
|
|
27
|
-
value: MotionStrength;
|
|
28
|
-
label: string;
|
|
29
|
-
description: string;
|
|
30
|
-
}
|
|
31
|
-
interface StylePreset {
|
|
32
|
-
value: ImageStyle;
|
|
33
|
-
label: string;
|
|
34
|
-
promptFragment: string;
|
|
35
|
-
}
|
|
36
|
-
declare const ASPECT_RATIO_OPTIONS: ReadonlyArray<AspectRatioOption>;
|
|
37
|
-
declare const IMAGE_QUALITY_OPTIONS: ReadonlyArray<ImageQualityOption>;
|
|
38
|
-
declare const VIDEO_QUALITY_OPTIONS: ReadonlyArray<VideoQualityOption>;
|
|
39
|
-
declare const VIDEO_DURATION_OPTIONS_SECONDS: ReadonlyArray<number>;
|
|
40
|
-
declare const MOTION_OPTIONS: ReadonlyArray<MotionOption>;
|
|
41
|
-
declare const STYLE_PRESETS: ReadonlyArray<StylePreset>;
|
|
42
|
-
|
|
43
|
-
type GenerationType = 'text-to-image' | 'image-to-image' | 'image-to-video' | 'text-to-video';
|
|
44
|
-
type GenerationStatus = 'idle' | 'uploading' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
45
|
-
|
|
46
|
-
interface ImageGenerationInput {
|
|
47
|
-
type: 'text-to-image' | 'image-to-image';
|
|
48
|
-
prompt: string;
|
|
49
|
-
image?: string;
|
|
50
|
-
aspectRatio?: AspectRatio;
|
|
51
|
-
quality?: ImageQuality;
|
|
52
|
-
style?: string;
|
|
53
|
-
seed?: number;
|
|
54
|
-
}
|
|
55
|
-
interface VideoGenerationInput {
|
|
56
|
-
type: 'text-to-video' | 'image-to-video';
|
|
57
|
-
prompt: string;
|
|
58
|
-
image?: string;
|
|
59
|
-
duration?: number;
|
|
60
|
-
aspectRatio?: AspectRatio;
|
|
61
|
-
quality?: VideoQuality;
|
|
62
|
-
motion?: MotionStrength;
|
|
63
|
-
}
|
|
64
|
-
interface GenerationResult {
|
|
65
|
-
id: string;
|
|
66
|
-
type: GenerationType;
|
|
67
|
-
url: string;
|
|
68
|
-
thumbnailUrl?: string;
|
|
69
|
-
status: GenerationStatus;
|
|
70
|
-
error?: string;
|
|
71
|
-
metadata?: GenerationMetadata;
|
|
72
|
-
createdAt: string;
|
|
73
|
-
}
|
|
74
|
-
interface GenerationMetadata {
|
|
75
|
-
provider: 'pruna' | 'fal' | 'groq' | 'gemini';
|
|
76
|
-
model: string;
|
|
77
|
-
prompt: string;
|
|
78
|
-
duration?: number;
|
|
79
|
-
quality?: string;
|
|
80
|
-
aspectRatio?: string;
|
|
81
|
-
style?: string;
|
|
82
|
-
}
|
|
83
|
-
interface GenerationProgress {
|
|
84
|
-
stage: 'uploading' | 'processing' | 'polling';
|
|
85
|
-
progress: number;
|
|
86
|
-
message?: string;
|
|
87
|
-
}
|
|
88
|
-
interface CreditCost {
|
|
89
|
-
standard: number;
|
|
90
|
-
hd: number;
|
|
91
|
-
'4k': number;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
4
|
interface SentimentAnalysisResult {
|
|
95
5
|
sentiment: Sentiment;
|
|
96
6
|
confidence: number;
|
|
@@ -182,6 +92,103 @@ interface ABTestRequest {
|
|
|
182
92
|
goals: string[];
|
|
183
93
|
}
|
|
184
94
|
|
|
95
|
+
type AspectRatio = '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
|
|
96
|
+
type ImageQuality = 'standard' | 'hd' | '4k';
|
|
97
|
+
type VideoQuality = '720p' | '1080p' | '4k';
|
|
98
|
+
type MotionStrength = 'slow' | 'medium' | 'fast';
|
|
99
|
+
type ImageStyle = 'realistic' | 'artistic' | 'anime' | 'cinematic' | 'vintage' | 'fantasy' | 'minimalist' | 'abstract';
|
|
100
|
+
interface AspectRatioOption {
|
|
101
|
+
value: AspectRatio;
|
|
102
|
+
label: string;
|
|
103
|
+
width: number;
|
|
104
|
+
height: number;
|
|
105
|
+
}
|
|
106
|
+
interface ImageQualityOption {
|
|
107
|
+
value: ImageQuality;
|
|
108
|
+
label: string;
|
|
109
|
+
description: string;
|
|
110
|
+
resolution: string;
|
|
111
|
+
}
|
|
112
|
+
interface VideoQualityOption {
|
|
113
|
+
value: VideoQuality;
|
|
114
|
+
label: string;
|
|
115
|
+
resolution: string;
|
|
116
|
+
}
|
|
117
|
+
interface MotionOption {
|
|
118
|
+
value: MotionStrength;
|
|
119
|
+
label: string;
|
|
120
|
+
description: string;
|
|
121
|
+
}
|
|
122
|
+
interface StylePreset {
|
|
123
|
+
value: ImageStyle;
|
|
124
|
+
label: string;
|
|
125
|
+
promptFragment: string;
|
|
126
|
+
}
|
|
127
|
+
declare const ASPECT_RATIO_OPTIONS: ReadonlyArray<AspectRatioOption>;
|
|
128
|
+
declare const IMAGE_QUALITY_OPTIONS: ReadonlyArray<ImageQualityOption>;
|
|
129
|
+
declare const VIDEO_QUALITY_OPTIONS: ReadonlyArray<VideoQualityOption>;
|
|
130
|
+
declare const VIDEO_DURATION_OPTIONS_SECONDS: ReadonlyArray<number>;
|
|
131
|
+
declare const MOTION_OPTIONS: ReadonlyArray<MotionOption>;
|
|
132
|
+
declare const STYLE_PRESETS: ReadonlyArray<StylePreset>;
|
|
133
|
+
|
|
134
|
+
type QualityTier = 'standard' | 'hd' | '4k';
|
|
135
|
+
declare const CREDIT_COSTS: Readonly<Record<GenerationType, Readonly<Record<QualityTier, number>>>>;
|
|
136
|
+
declare const DEFAULT_CREDIT_COST: number;
|
|
137
|
+
type AnyQuality = QualityTier | ImageQuality | VideoQuality;
|
|
138
|
+
declare function toQualityTier(quality: AnyQuality | undefined): QualityTier;
|
|
139
|
+
declare function calculateContentCreditCost(type: GenerationType, quality?: AnyQuality): number;
|
|
140
|
+
|
|
141
|
+
type GenerationType = 'text-to-image' | 'image-to-image' | 'image-to-video' | 'text-to-video';
|
|
142
|
+
type GenerationStatus = 'idle' | 'uploading' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
143
|
+
|
|
144
|
+
interface ImageGenerationInput {
|
|
145
|
+
type: 'text-to-image' | 'image-to-image';
|
|
146
|
+
prompt: string;
|
|
147
|
+
image?: string;
|
|
148
|
+
aspectRatio?: AspectRatio;
|
|
149
|
+
quality?: ImageQuality;
|
|
150
|
+
style?: string;
|
|
151
|
+
seed?: number;
|
|
152
|
+
}
|
|
153
|
+
interface VideoGenerationInput {
|
|
154
|
+
type: 'text-to-video' | 'image-to-video';
|
|
155
|
+
prompt: string;
|
|
156
|
+
image?: string;
|
|
157
|
+
duration?: number;
|
|
158
|
+
aspectRatio?: AspectRatio;
|
|
159
|
+
quality?: VideoQuality;
|
|
160
|
+
motion?: MotionStrength;
|
|
161
|
+
}
|
|
162
|
+
interface GenerationResult {
|
|
163
|
+
id: string;
|
|
164
|
+
type: GenerationType;
|
|
165
|
+
url: string;
|
|
166
|
+
thumbnailUrl?: string;
|
|
167
|
+
status: GenerationStatus;
|
|
168
|
+
error?: string;
|
|
169
|
+
metadata?: GenerationMetadata;
|
|
170
|
+
createdAt: string;
|
|
171
|
+
}
|
|
172
|
+
interface GenerationMetadata {
|
|
173
|
+
provider: 'pruna' | 'fal' | 'groq' | 'gemini';
|
|
174
|
+
model: string;
|
|
175
|
+
prompt: string;
|
|
176
|
+
duration?: number;
|
|
177
|
+
quality?: string;
|
|
178
|
+
aspectRatio?: string;
|
|
179
|
+
style?: string;
|
|
180
|
+
}
|
|
181
|
+
interface GenerationProgress {
|
|
182
|
+
stage: 'uploading' | 'processing' | 'polling';
|
|
183
|
+
progress: number;
|
|
184
|
+
message?: string;
|
|
185
|
+
}
|
|
186
|
+
interface CreditCost {
|
|
187
|
+
standard: number;
|
|
188
|
+
hd: number;
|
|
189
|
+
'4k': number;
|
|
190
|
+
}
|
|
191
|
+
|
|
185
192
|
type AIErrorCode = 'VALIDATION_ERROR' | 'PROVIDER_UNAVAILABLE' | 'PROVIDER_QUOTA_EXHAUSTED' | 'PROVIDER_ERROR' | 'NETWORK_ERROR' | 'TIMEOUT' | 'ABORTED' | 'PARSE_ERROR' | 'NO_RESULT' | 'UNKNOWN';
|
|
186
193
|
|
|
187
194
|
declare class ValidationError extends AIError {
|
|
@@ -194,4 +201,4 @@ declare class ProviderQuotaExhaustedError extends AIError {
|
|
|
194
201
|
constructor(providerId: string);
|
|
195
202
|
}
|
|
196
203
|
|
|
197
|
-
export { type
|
|
204
|
+
export { type ABTestComparison as A, type ImageQualityOption as B, type ContentAnalysisRequest as C, DEFAULT_CREDIT_COST as D, type EmotionScore as E, type ImageStyle as F, type GenerationResult as G, type MotionOption as H, IMAGE_QUALITY_OPTIONS as I, type MotionStrength as J, type KeywordAnalysis as K, type StylePreset as L, MOTION_OPTIONS as M, ValidationError as N, type VideoQualityOption as O, ProviderQuotaExhaustedError as P, type QualityTier as Q, toQualityTier as R, type SEOOptimizationRequest as S, VIDEO_DURATION_OPTIONS_SECONDS as V, type ABTestPrediction as a, type ABTestRequest as b, type ABTestVariant as c, type AIErrorCode as d, ASPECT_RATIO_OPTIONS as e, type AspectRatio as f, type ContentAnalysisResult as g, type CreditCost as h, CREDIT_COSTS as i, type GenerationMetadata as j, type GenerationProgress as k, type GenerationStatus as l, type GenerationType as m, type ImageGenerationInput as n, type ImageQuality as o, ProviderUnavailableError as p, type SEOOptimizationResult as q, type SEOScoreBreakdown as r, STYLE_PRESETS as s, type SentimentAnalysisResult as t, VIDEO_QUALITY_OPTIONS as u, type VideoGenerationInput as v, type VideoQuality as w, calculateContentCreditCost as x, type AnyQuality as y, type AspectRatioOption as z };
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { f as AspectRatio, o as ImageQuality, w as VideoQuality, t as SentimentAnalysisResult, C as ContentAnalysisRequest, g as ContentAnalysisResult, S as SEOOptimizationRequest, q as SEOOptimizationResult, r as SEOScoreBreakdown, K as KeywordAnalysis, b as ABTestRequest, a as ABTestPrediction, A as ABTestComparison } from './AIErrors-CLjXRty-.js';
|
|
2
|
+
import { B as BlogGenerationRequest, G as GeneratedBlog, m as SocialContentRequest, h as GeneratedSocialContent, q as VideoScriptRequest, i as GeneratedVideoScript, c as ContentTone, b as ContentCalendarEntry, n as SocialPlatform, E as Emotion } from './index-BUVULo3h.js';
|
|
3
|
+
import { c as ITextGenerator, e as ProviderFactory, T as TextGenerationOptions } from './provider.factory-BwPnqSEU.js';
|
|
4
|
+
import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from './ProviderConfig-DIFa9nmG.js';
|
|
5
|
+
import { A as AIProviderConfig } from './create-ai-0eZFFqTw.js';
|
|
6
|
+
import { T as TextRequest, G as GenerationResult } from './index-fXjxTR5W.js';
|
|
7
|
+
|
|
8
|
+
declare function resolveDimensionsForAspectRatio(ratio: AspectRatio): {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
declare function recommendQualityForAspectRatio(ratio: AspectRatio): ImageQuality | VideoQuality;
|
|
14
|
+
|
|
15
|
+
declare const ASPECT_RATIO_VALUES: AspectRatio[];
|
|
16
|
+
declare const IMAGE_QUALITY_VALUES: ImageQuality[];
|
|
17
|
+
declare const VIDEO_QUALITY_VALUES: VideoQuality[];
|
|
18
|
+
declare const VIDEO_DURATION_OPTIONS: readonly number[];
|
|
19
|
+
|
|
20
|
+
declare const getDimensionsForAspectRatio: typeof resolveDimensionsForAspectRatio;
|
|
21
|
+
declare const getRecommendedQuality: typeof recommendQualityForAspectRatio;
|
|
22
|
+
|
|
23
|
+
interface IAIContentService {
|
|
24
|
+
generateBlogPost(request: BlogGenerationRequest): Promise<GeneratedBlog>;
|
|
25
|
+
generateSocialContent(request: SocialContentRequest): Promise<GeneratedSocialContent>;
|
|
26
|
+
generateVideoScript(request: VideoScriptRequest): Promise<GeneratedVideoScript>;
|
|
27
|
+
generateForAllPlatforms(topic: string, tone: ContentTone): Promise<GeneratedSocialContent[]>;
|
|
28
|
+
generateContentCalendar(niche: string, days: number): Promise<ContentCalendarEntry[]>;
|
|
29
|
+
analyzeSentiment(content: string): Promise<SentimentAnalysisResult>;
|
|
30
|
+
analyzeContent(request: ContentAnalysisRequest): Promise<ContentAnalysisResult>;
|
|
31
|
+
optimizeSEO(request: SEOOptimizationRequest): Promise<SEOOptimizationResult>;
|
|
32
|
+
calculateSEOScore(content: string, keywords: string[]): Promise<SEOScoreBreakdown>;
|
|
33
|
+
analyzeKeywords(content: string, keywords: string[]): Promise<KeywordAnalysis[]>;
|
|
34
|
+
predictABTest(request: ABTestRequest): Promise<ABTestPrediction[]>;
|
|
35
|
+
compareVariants(variantA: string, variantB: string): Promise<ABTestComparison>;
|
|
36
|
+
generateHashtags(content: string, count: number): Promise<string[]>;
|
|
37
|
+
optimizeHashtags(hashtags: string[], platform: SocialPlatform): Promise<string[]>;
|
|
38
|
+
generateImagePrompt(description: string, style: string): Promise<string>;
|
|
39
|
+
generateImagePromptsForBlog(blogContent: string): Promise<string[]>;
|
|
40
|
+
generateVoiceScript(topic: string, emotion: Emotion, duration: number): Promise<GeneratedVideoScript>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class AIContentService implements IAIContentService {
|
|
44
|
+
private readonly providerFactory;
|
|
45
|
+
private readonly blogService;
|
|
46
|
+
private readonly socialService;
|
|
47
|
+
private readonly videoScriptService;
|
|
48
|
+
private readonly analysisService;
|
|
49
|
+
private readonly seoService;
|
|
50
|
+
private readonly abTestService;
|
|
51
|
+
private readonly imagePromptService;
|
|
52
|
+
private readonly contentCalendarService;
|
|
53
|
+
private readonly mediaGenerationService;
|
|
54
|
+
constructor(configOrGenerator: AIProviderConfig | ProviderConfig | ITextGenerator);
|
|
55
|
+
/** The composed factory — chat()/chatStream() with usage, health, fallback. */
|
|
56
|
+
get providers(): ProviderFactory;
|
|
57
|
+
generateBlogPost(request: BlogGenerationRequest): Promise<GeneratedBlog>;
|
|
58
|
+
generateSocialContent(request: SocialContentRequest): Promise<GeneratedSocialContent>;
|
|
59
|
+
generateForAllPlatforms(topic: string, tone: ContentTone): Promise<GeneratedSocialContent[]>;
|
|
60
|
+
generateHashtags(content: string, count: number): Promise<string[]>;
|
|
61
|
+
optimizeHashtags(hashtags: string[], platform: SocialPlatform): Promise<string[]>;
|
|
62
|
+
generateVideoScript(request: VideoScriptRequest): Promise<GeneratedVideoScript>;
|
|
63
|
+
generateVoiceScript(topic: string, emotion: Emotion, duration: number): Promise<GeneratedVideoScript>;
|
|
64
|
+
generateContentCalendar(niche: string, days: number): Promise<ContentCalendarEntry[]>;
|
|
65
|
+
analyzeSentiment(content: string): Promise<SentimentAnalysisResult>;
|
|
66
|
+
analyzeContent(request: ContentAnalysisRequest): Promise<ContentAnalysisResult>;
|
|
67
|
+
optimizeSEO(request: SEOOptimizationRequest): Promise<SEOOptimizationResult>;
|
|
68
|
+
calculateSEOScore(content: string, keywords: string[]): Promise<SEOScoreBreakdown>;
|
|
69
|
+
analyzeKeywords(content: string, keywords: string[]): Promise<KeywordAnalysis[]>;
|
|
70
|
+
predictABTest(request: ABTestRequest): Promise<ABTestPrediction[]>;
|
|
71
|
+
compareVariants(variantA: string, variantB: string): Promise<ABTestComparison>;
|
|
72
|
+
generateImagePrompt(description: string, style: string): Promise<string>;
|
|
73
|
+
generateImagePromptsForBlog(blogContent: string): Promise<string[]>;
|
|
74
|
+
generateImage(request: ImageGenerationRequest): Promise<GeneratedContent>;
|
|
75
|
+
generateVideo(request: VideoGenerationRequest): Promise<GeneratedContent>;
|
|
76
|
+
convertImageToVideo(request: ImageToVideoRequest): Promise<GeneratedContent>;
|
|
77
|
+
transformVideo(request: VideoToVideoRequest): Promise<GeneratedContent>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The single LLM seam for the content services. runJson/runText keep the
|
|
82
|
+
* string facade the nine services were built against; runChat passes a full
|
|
83
|
+
* TextRequest through to the factory and returns the usage-complete
|
|
84
|
+
* GenerationResult.
|
|
85
|
+
*/
|
|
86
|
+
declare class GenerationExecutor {
|
|
87
|
+
private readonly generator;
|
|
88
|
+
constructor(generator: ITextGenerator | ProviderFactory);
|
|
89
|
+
runJson<T>(prompt: string, fallback: T, generationOptions?: TextGenerationOptions): Promise<T>;
|
|
90
|
+
runText(prompt: string, options?: TextGenerationOptions): Promise<string>;
|
|
91
|
+
/** Usage-complete pass-through; requires a ProviderFactory engine. */
|
|
92
|
+
runChat(request: TextRequest): Promise<GenerationResult>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare class BlogService {
|
|
96
|
+
private readonly executor;
|
|
97
|
+
constructor(executor: GenerationExecutor);
|
|
98
|
+
generateBlogPost(request: BlogGenerationRequest): Promise<GeneratedBlog>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class SocialService {
|
|
102
|
+
private readonly executor;
|
|
103
|
+
constructor(executor: GenerationExecutor);
|
|
104
|
+
generateSocialContent(request: SocialContentRequest): Promise<GeneratedSocialContent>;
|
|
105
|
+
generateForAllPlatforms(topic: string, tone: ContentTone): Promise<GeneratedSocialContent[]>;
|
|
106
|
+
generateHashtags(content: string, count: number): Promise<string[]>;
|
|
107
|
+
optimizeHashtags(hashtags: string[], platform: SocialPlatform): string[];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare class VideoScriptService {
|
|
111
|
+
private readonly executor;
|
|
112
|
+
constructor(executor: GenerationExecutor);
|
|
113
|
+
generateVideoScript(request: VideoScriptRequest): Promise<GeneratedVideoScript>;
|
|
114
|
+
generateVoiceScript(topic: string, emotion: Emotion, duration: number): Promise<GeneratedVideoScript>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare class AnalysisService {
|
|
118
|
+
private readonly executor;
|
|
119
|
+
constructor(executor: GenerationExecutor);
|
|
120
|
+
analyzeSentiment(content: string): Promise<SentimentAnalysisResult>;
|
|
121
|
+
analyzeContent(request: ContentAnalysisRequest): Promise<ContentAnalysisResult>;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class SeoService {
|
|
125
|
+
private readonly executor;
|
|
126
|
+
constructor(executor: GenerationExecutor);
|
|
127
|
+
optimizeSEO(request: SEOOptimizationRequest): Promise<SEOOptimizationResult>;
|
|
128
|
+
calculateSEOScore(content: string, keywords: string[]): Promise<SEOScoreBreakdown>;
|
|
129
|
+
analyzeKeywords(content: string, keywords: string[]): KeywordAnalysis[];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare class ABTestService {
|
|
133
|
+
private readonly executor;
|
|
134
|
+
constructor(executor: GenerationExecutor);
|
|
135
|
+
predictABTest(request: ABTestRequest): Promise<ABTestPrediction[]>;
|
|
136
|
+
compareVariants(variantA: string, variantB: string): Promise<ABTestComparison>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare class ImagePromptService {
|
|
140
|
+
private readonly executor;
|
|
141
|
+
constructor(executor: GenerationExecutor);
|
|
142
|
+
generateImagePrompt(description: string, style: string): Promise<string>;
|
|
143
|
+
generateImagePromptsForBlog(blogContent: string): Promise<string[]>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare class ContentCalendarService {
|
|
147
|
+
private readonly executor;
|
|
148
|
+
constructor(executor: GenerationExecutor);
|
|
149
|
+
generateContentCalendar(niche: string, days: number): Promise<ContentCalendarEntry[]>;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare class MediaGenerationService {
|
|
153
|
+
private readonly providerFactory;
|
|
154
|
+
constructor(providerFactory: ProviderFactory);
|
|
155
|
+
generateImage(request: ImageGenerationRequest): Promise<GeneratedContent>;
|
|
156
|
+
generateVideo(request: VideoGenerationRequest): Promise<GeneratedContent>;
|
|
157
|
+
convertImageToVideo(request: ImageToVideoRequest): Promise<GeneratedContent>;
|
|
158
|
+
transformVideo(request: VideoToVideoRequest): Promise<GeneratedContent>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare class PromptBuilder {
|
|
162
|
+
static blogPost(input: {
|
|
163
|
+
topic: string;
|
|
164
|
+
blogType: string;
|
|
165
|
+
keywords: string[];
|
|
166
|
+
tone: string;
|
|
167
|
+
targetAudience: string;
|
|
168
|
+
wordCount: number;
|
|
169
|
+
language?: string;
|
|
170
|
+
seoOptimization: boolean;
|
|
171
|
+
includeSchema: boolean;
|
|
172
|
+
includeImages: boolean;
|
|
173
|
+
}): string;
|
|
174
|
+
static socialPost(input: {
|
|
175
|
+
topic: string;
|
|
176
|
+
platform: string;
|
|
177
|
+
tone: string;
|
|
178
|
+
style: string;
|
|
179
|
+
maxLength: number;
|
|
180
|
+
includeHashtags: boolean;
|
|
181
|
+
includeCallToAction: boolean;
|
|
182
|
+
}): string;
|
|
183
|
+
static videoScript(input: {
|
|
184
|
+
topic: string;
|
|
185
|
+
tone: string;
|
|
186
|
+
duration: number;
|
|
187
|
+
targetAudience: string;
|
|
188
|
+
includeVisuals: boolean;
|
|
189
|
+
includeCallToAction: boolean;
|
|
190
|
+
}): string;
|
|
191
|
+
static voiceScript(input: {
|
|
192
|
+
topic: string;
|
|
193
|
+
emotion: string;
|
|
194
|
+
duration: number;
|
|
195
|
+
}): string;
|
|
196
|
+
static contentCalendar(niche: string, days: number): string;
|
|
197
|
+
static sentiment(content: string): string;
|
|
198
|
+
static contentAnalysis(content: string): string;
|
|
199
|
+
static seoOptimization(content: string, keywords: string[]): string;
|
|
200
|
+
static seoScore(content: string, keywords: string[]): string;
|
|
201
|
+
static abTestVariant(input: {
|
|
202
|
+
content: string;
|
|
203
|
+
contentType: string;
|
|
204
|
+
tone: string;
|
|
205
|
+
targetAudience: string;
|
|
206
|
+
platform: string;
|
|
207
|
+
goals: string[];
|
|
208
|
+
}): string;
|
|
209
|
+
static hashtags(content: string, count: number): string;
|
|
210
|
+
static imagePrompt(description: string, style: string): string;
|
|
211
|
+
static blogImagePrompts(blogContent: string): string;
|
|
212
|
+
static maxTokensForDuration(durationSeconds: number): number;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export { ABTestService as A, BlogService as B, ContentCalendarService as C, GenerationExecutor as G, type IAIContentService as I, MediaGenerationService as M, PromptBuilder as P, SeoService as S, VIDEO_DURATION_OPTIONS as V, AIContentService as a, ASPECT_RATIO_VALUES as b, AnalysisService as c, IMAGE_QUALITY_VALUES as d, ImagePromptService as e, SocialService as f, VIDEO_QUALITY_VALUES as g, VideoScriptService as h, getDimensionsForAspectRatio as i, getRecommendedQuality as j, resolveDimensionsForAspectRatio as k, recommendQualityForAspectRatio as r };
|