@umituz/web-ai 1.0.1 → 1.0.3

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.
@@ -2,11 +2,13 @@ import { B as BlogGenerationRequest, G as GeneratedBlog, b as SocialContentReque
2
2
  import { A as AIErrorCode, S as SentimentAnalysisResult, C as ContentAnalysisRequest, a as ContentAnalysisResult, b as SEOOptimizationRequest, c as SEOOptimizationResult, d as SEOScoreBreakdown, e as ABTestRequest, f as ABTestPrediction, g as ABTestComparison, G as GenerationResult, h as GenerationProgress, i as GenerationStatus, I as ImageGenerationInput, V as VideoGenerationInput, j as GenerationType, k as ImageQuality, l as VideoQuality } from '../AIErrors-C5EasV_c.cjs';
3
3
  import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-DIFa9nmG.cjs';
4
4
  import { f as ITextGenerator, b as ITextProvider, c as ProviderFactory } from '../provider.factory-BxsfK4WW.cjs';
5
- import { A as AIProviderConfig } from '../create-ai-DOI9jD3v.cjs';
5
+ import { A as AIProviderConfig, q as GroqGenerationConfig } from '../create-ai-CXYKPK6G.cjs';
6
6
  import { ContentWizardStep, ContentWizardData, ImageWizardStep, ImageWizardData, VideoWizardStep, VideoWizardData } from '../wizard/index.cjs';
7
7
  import { c as TextTier } from '../index-fXjxTR5W.cjs';
8
8
  import { C as CacheManager, b as CacheStats } from '../cache-manager-Df9LLYGA.cjs';
9
9
  import { d as ChatService, U as UseChatOptions, k as UseChatReturn } from '../chat.service-CL1qtYxe.cjs';
10
+ import { l as TextGenerationService, j as PrunaResult, G as GenerateOptions, e as PrunaInput, a as GenerationStage } from '../cancellation-error-DwHrDKBz.cjs';
11
+ export { C as CancellationError } from '../cancellation-error-DwHrDKBz.cjs';
10
12
  import '../index-DKHNcMbl.cjs';
11
13
 
12
14
  /** Provider config for the underlying AIContentService — new AIProviderConfig,
@@ -207,4 +209,64 @@ interface UseChatDeps {
207
209
  }
208
210
  declare function useChat(options: UseChatOptions, deps?: UseChatDeps): UseChatReturn;
209
211
 
210
- export { type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useBlogGenerator, useCacheStats, useChat, useContentWizard, useImageWizard, useSocialContentGenerator, useText, useVideoWizard };
212
+ interface UseGroqOptions {
213
+ readonly model?: string;
214
+ readonly generationConfig?: GroqGenerationConfig;
215
+ readonly onStart?: () => void;
216
+ readonly onSuccess?: (result: string) => void;
217
+ readonly onError?: (error: string) => void;
218
+ }
219
+ interface UseGroqReturn {
220
+ readonly isLoading: boolean;
221
+ readonly error: string | null;
222
+ readonly result: string | null;
223
+ generate: (prompt: string, options?: GroqGenerationConfig) => Promise<string | null>;
224
+ generateJSON: <T = Record<string, unknown>>(prompt: string, options?: GroqGenerationConfig & {
225
+ schema?: Record<string, unknown>;
226
+ }) => Promise<T | null>;
227
+ stream: (prompt: string, onChunk: (chunk: string) => void, options?: GroqGenerationConfig) => Promise<string | null>;
228
+ cancel: () => void;
229
+ reset: () => void;
230
+ clearError: () => void;
231
+ }
232
+ interface UseGroqDeps {
233
+ readonly textGeneration?: TextGenerationService;
234
+ }
235
+ declare function useGroq(options?: UseGroqOptions, deps?: UseGroqDeps): UseGroqReturn;
236
+
237
+ interface AsyncActionState<TResult> {
238
+ result: TResult | null;
239
+ isLoading: boolean;
240
+ error: Error | null;
241
+ }
242
+ interface AsyncActionApi<TResult, TInput> extends AsyncActionState<TResult> {
243
+ run: (input: TInput) => Promise<TResult | null>;
244
+ cancel: () => void;
245
+ reset: () => void;
246
+ }
247
+ interface UseAsyncActionOptions<TResult> {
248
+ onSuccess?: (result: TResult) => void;
249
+ onError?: (error: Error) => void;
250
+ onCancelled?: () => void;
251
+ }
252
+ type AsyncActionExecutor<TResult, TInput> = (input: TInput, signal: AbortSignal) => Promise<TResult>;
253
+ declare function useAsyncAction<TResult, TInput>(executor: AsyncActionExecutor<TResult, TInput>, options?: UseAsyncActionOptions<TResult>): AsyncActionApi<TResult, TInput>;
254
+
255
+ interface UsePrunaGenerationOptions {
256
+ onSuccess?: (result: PrunaResult) => void;
257
+ onError?: (error: Error) => void;
258
+ onProgress?: GenerateOptions['onProgress'];
259
+ }
260
+ type UsePrunaGenerationReturn = AsyncActionApi<PrunaResult, PrunaInput>;
261
+ declare function usePrunaGeneration(apiKey: string, options?: UsePrunaGenerationOptions): UsePrunaGenerationReturn;
262
+
263
+ interface UsePrunaProxyOptions {
264
+ proxyUrl: string;
265
+ onSuccess?: (result: PrunaResult) => void;
266
+ onError?: (error: Error) => void;
267
+ onProgress?: (stage: GenerationStage) => void;
268
+ }
269
+ type UsePrunaProxyReturn = AsyncActionApi<PrunaResult, PrunaInput>;
270
+ declare function usePrunaProxy(options: UsePrunaProxyOptions): UsePrunaProxyReturn;
271
+
272
+ export { type AsyncActionApi, type AsyncActionExecutor, type AsyncActionState, type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseAsyncActionOptions, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseGroqDeps, type UseGroqOptions, type UseGroqReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UsePrunaGenerationOptions, type UsePrunaGenerationReturn, type UsePrunaProxyOptions, type UsePrunaProxyReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useAsyncAction, useBlogGenerator, useCacheStats, useChat, useContentWizard, useGroq, useImageWizard, usePrunaGeneration, usePrunaProxy, useSocialContentGenerator, useText, useVideoWizard };
@@ -2,11 +2,13 @@ import { B as BlogGenerationRequest, G as GeneratedBlog, b as SocialContentReque
2
2
  import { A as AIErrorCode, S as SentimentAnalysisResult, C as ContentAnalysisRequest, a as ContentAnalysisResult, b as SEOOptimizationRequest, c as SEOOptimizationResult, d as SEOScoreBreakdown, e as ABTestRequest, f as ABTestPrediction, g as ABTestComparison, G as GenerationResult, h as GenerationProgress, i as GenerationStatus, I as ImageGenerationInput, V as VideoGenerationInput, j as GenerationType, k as ImageQuality, l as VideoQuality } from '../AIErrors-B2ogd1PB.js';
3
3
  import { d as ProviderConfig, I as ImageGenerationRequest, G as GeneratedContent, V as VideoGenerationRequest, a as ImageToVideoRequest, b as VideoToVideoRequest } from '../ProviderConfig-DIFa9nmG.js';
4
4
  import { f as ITextGenerator, b as ITextProvider, c as ProviderFactory } from '../provider.factory-DfDfk0dK.js';
5
- import { A as AIProviderConfig } from '../create-ai-DXEoke8-.js';
5
+ import { A as AIProviderConfig, q as GroqGenerationConfig } from '../create-ai-9PW752z8.js';
6
6
  import { ContentWizardStep, ContentWizardData, ImageWizardStep, ImageWizardData, VideoWizardStep, VideoWizardData } from '../wizard/index.js';
7
7
  import { c as TextTier } from '../index-fXjxTR5W.js';
8
8
  import { C as CacheManager, b as CacheStats } from '../cache-manager-Df9LLYGA.js';
9
9
  import { d as ChatService, U as UseChatOptions, k as UseChatReturn } from '../chat.service-q05GnhEm.js';
10
+ import { l as TextGenerationService, j as PrunaResult, G as GenerateOptions, e as PrunaInput, a as GenerationStage } from '../cancellation-error-CKcZRhFg.js';
11
+ export { C as CancellationError } from '../cancellation-error-CKcZRhFg.js';
10
12
  import '../index-DIHz8_OJ.js';
11
13
 
12
14
  /** Provider config for the underlying AIContentService — new AIProviderConfig,
@@ -207,4 +209,64 @@ interface UseChatDeps {
207
209
  }
208
210
  declare function useChat(options: UseChatOptions, deps?: UseChatDeps): UseChatReturn;
209
211
 
210
- export { type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useBlogGenerator, useCacheStats, useChat, useContentWizard, useImageWizard, useSocialContentGenerator, useText, useVideoWizard };
212
+ interface UseGroqOptions {
213
+ readonly model?: string;
214
+ readonly generationConfig?: GroqGenerationConfig;
215
+ readonly onStart?: () => void;
216
+ readonly onSuccess?: (result: string) => void;
217
+ readonly onError?: (error: string) => void;
218
+ }
219
+ interface UseGroqReturn {
220
+ readonly isLoading: boolean;
221
+ readonly error: string | null;
222
+ readonly result: string | null;
223
+ generate: (prompt: string, options?: GroqGenerationConfig) => Promise<string | null>;
224
+ generateJSON: <T = Record<string, unknown>>(prompt: string, options?: GroqGenerationConfig & {
225
+ schema?: Record<string, unknown>;
226
+ }) => Promise<T | null>;
227
+ stream: (prompt: string, onChunk: (chunk: string) => void, options?: GroqGenerationConfig) => Promise<string | null>;
228
+ cancel: () => void;
229
+ reset: () => void;
230
+ clearError: () => void;
231
+ }
232
+ interface UseGroqDeps {
233
+ readonly textGeneration?: TextGenerationService;
234
+ }
235
+ declare function useGroq(options?: UseGroqOptions, deps?: UseGroqDeps): UseGroqReturn;
236
+
237
+ interface AsyncActionState<TResult> {
238
+ result: TResult | null;
239
+ isLoading: boolean;
240
+ error: Error | null;
241
+ }
242
+ interface AsyncActionApi<TResult, TInput> extends AsyncActionState<TResult> {
243
+ run: (input: TInput) => Promise<TResult | null>;
244
+ cancel: () => void;
245
+ reset: () => void;
246
+ }
247
+ interface UseAsyncActionOptions<TResult> {
248
+ onSuccess?: (result: TResult) => void;
249
+ onError?: (error: Error) => void;
250
+ onCancelled?: () => void;
251
+ }
252
+ type AsyncActionExecutor<TResult, TInput> = (input: TInput, signal: AbortSignal) => Promise<TResult>;
253
+ declare function useAsyncAction<TResult, TInput>(executor: AsyncActionExecutor<TResult, TInput>, options?: UseAsyncActionOptions<TResult>): AsyncActionApi<TResult, TInput>;
254
+
255
+ interface UsePrunaGenerationOptions {
256
+ onSuccess?: (result: PrunaResult) => void;
257
+ onError?: (error: Error) => void;
258
+ onProgress?: GenerateOptions['onProgress'];
259
+ }
260
+ type UsePrunaGenerationReturn = AsyncActionApi<PrunaResult, PrunaInput>;
261
+ declare function usePrunaGeneration(apiKey: string, options?: UsePrunaGenerationOptions): UsePrunaGenerationReturn;
262
+
263
+ interface UsePrunaProxyOptions {
264
+ proxyUrl: string;
265
+ onSuccess?: (result: PrunaResult) => void;
266
+ onError?: (error: Error) => void;
267
+ onProgress?: (stage: GenerationStage) => void;
268
+ }
269
+ type UsePrunaProxyReturn = AsyncActionApi<PrunaResult, PrunaInput>;
270
+ declare function usePrunaProxy(options: UsePrunaProxyOptions): UsePrunaProxyReturn;
271
+
272
+ export { type AsyncActionApi, type AsyncActionExecutor, type AsyncActionState, type ContentWizardRequest, type CreditCheckFunction, type SaveFunction, type UploadFunction, type UseAIContentOptions, type UseAIContentReturn, type UseAIGenerationOptions, type UseAIGenerationReturn, type UseAsyncActionOptions, type UseBlogGeneratorOptions, type UseBlogGeneratorReturn, type UseCacheStatsOptions, type UseChatDeps, type UseContentWizardOptions, type UseContentWizardReturn, type UseGroqDeps, type UseGroqOptions, type UseGroqReturn, type UseImageWizardOptions, type UseImageWizardReturn, type UsePrunaGenerationOptions, type UsePrunaGenerationReturn, type UsePrunaProxyOptions, type UsePrunaProxyReturn, type UseSocialContentGeneratorOptions, type UseSocialContentGeneratorReturn, type UseTextConfig, type UseTextDeps, type UseTextOptions, type UseTextReturn, type UseVideoWizardOptions, type UseVideoWizardReturn, type VideoWizardRequest, useAIContent, useAIGeneration, useAsyncAction, useBlogGenerator, useCacheStats, useChat, useContentWizard, useGroq, useImageWizard, usePrunaGeneration, usePrunaProxy, useSocialContentGenerator, useText, useVideoWizard };