@fencyai/react 0.1.55 → 0.1.57

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.
@@ -1,9 +1,9 @@
1
- import { ZodTypeAny } from 'zod';
1
+ import { ZodType } from 'zod';
2
2
  import { CreateOpenAiChatCompletionParams } from './CreateOpenAiChatCompletionParams';
3
3
  import { CreateGeminiChatCompletionParams } from './CreateGeminiChatCompletionParams';
4
4
  import { CreateClaudeChatCompletionParams } from './CreateClaudeChatCompletionParams';
5
5
  import { CreateGenericChatCompletionParams } from './CreateGenericChatCompletionParams';
6
- export interface CreateStructuredChatCompletionParams<T extends ZodTypeAny> {
6
+ export interface CreateStructuredChatCompletionParams<T extends ZodType> {
7
7
  openai?: CreateOpenAiChatCompletionParams;
8
8
  gemini?: CreateGeminiChatCompletionParams;
9
9
  claude?: CreateClaudeChatCompletionParams;
@@ -1,7 +1,7 @@
1
1
  import { ApiError } from '@fencyai/js';
2
- import { ZodTypeAny } from 'zod';
2
+ import { ZodType } from 'zod';
3
3
  import { StructuredChatCompletionData } from './StructuredChatCompletionData';
4
- export interface StructuredChatCompletion<T extends ZodTypeAny> {
4
+ export interface StructuredChatCompletion<T extends ZodType> {
5
5
  triggeredAt: string;
6
6
  data: StructuredChatCompletionData<T> | null;
7
7
  error: ApiError | null;
@@ -1,5 +1,5 @@
1
- import { z, ZodTypeAny } from 'zod';
2
- export interface StructuredChatCompletionData<T extends ZodTypeAny> {
1
+ import { z, ZodType } from 'zod';
2
+ export interface StructuredChatCompletionData<T extends ZodType> {
3
3
  id: string;
4
4
  createdAt: string;
5
5
  response: object;
@@ -1,7 +1,7 @@
1
1
  import { ApiError } from '@fencyai/js';
2
- import { ZodTypeAny } from 'zod';
2
+ import { ZodType } from 'zod';
3
3
  import { StructuredChatCompletionData } from './StructuredChatCompletionData';
4
- export type StructuredChatCompletionResponse<T extends ZodTypeAny> = {
4
+ export type StructuredChatCompletionResponse<T extends ZodType> = {
5
5
  type: 'success';
6
6
  data: StructuredChatCompletionData<T>;
7
7
  } | {
@@ -1,9 +1,9 @@
1
- import { ZodTypeAny } from 'zod';
1
+ import { ZodType } from 'zod';
2
2
  import { CreateStructuredChatCompletionParams } from './CreateStructuredChatCompletionParams';
3
3
  import { StructuredChatCompletion } from './StructuredChatCompletion';
4
4
  import { StructuredChatCompletionResponse } from './StructuredChatCompletionResponse';
5
5
  export interface UseStructuredChatCompletions {
6
- chatCompletions: StructuredChatCompletion<ZodTypeAny>[];
7
- createStructuredChatCompletion: <T extends ZodTypeAny>(params: CreateStructuredChatCompletionParams<T>) => Promise<StructuredChatCompletionResponse<T>>;
8
- latest: StructuredChatCompletion<ZodTypeAny> | null;
6
+ chatCompletions: StructuredChatCompletion<ZodType>[];
7
+ createStructuredChatCompletion: <T extends ZodType>(params: CreateStructuredChatCompletionParams<T>) => Promise<StructuredChatCompletionResponse<T>>;
8
+ latest: StructuredChatCompletion<ZodType> | null;
9
9
  }
@@ -13,6 +13,7 @@ export * from './StreamingChatCompletion';
13
13
  export * from './CreateStreamingChatCompletionParams';
14
14
  export * from './CreateStreamingChatCompletionResponse';
15
15
  export * from './UseStreamingChatCompletions';
16
+ export * from './UseStreamingChatCompletionsProps';
16
17
  export * from './StructuredChatCompletionData';
17
18
  export * from './StructuredChatCompletion';
18
19
  export * from './StructuredChatCompletionResponse';
@@ -17,6 +17,7 @@ export * from './StreamingChatCompletion';
17
17
  export * from './CreateStreamingChatCompletionParams';
18
18
  export * from './CreateStreamingChatCompletionResponse';
19
19
  export * from './UseStreamingChatCompletions';
20
+ export * from './UseStreamingChatCompletionsProps';
20
21
  // Structured chat completion types
21
22
  export * from './StructuredChatCompletionData';
22
23
  export * from './StructuredChatCompletion';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fencyai/react",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "> TODO: description",
5
5
  "author": "staklau <steinaageklaussen@gmail.com>",
6
6
  "homepage": "",
@@ -33,7 +33,7 @@
33
33
  "prepublishOnly": "npm run build"
34
34
  },
35
35
  "devDependencies": {
36
- "@fencyai/js": "^0.1.55",
36
+ "@fencyai/js": "^0.1.57",
37
37
  "@types/jest": "^29.5.11",
38
38
  "@types/node": "^20.10.5",
39
39
  "@types/react": "^18.2.45",
@@ -42,7 +42,7 @@
42
42
  "typescript": "^5.3.3"
43
43
  },
44
44
  "peerDependencies": {
45
- "@fencyai/js": "^0.1.55",
45
+ "@fencyai/js": "^0.1.57",
46
46
  "react": ">=16.8.0",
47
47
  "zod": "^4.0.5"
48
48
  },
@@ -51,5 +51,5 @@
51
51
  "optional": false
52
52
  }
53
53
  },
54
- "gitHead": "b67b6f7fe71f8595f9c15ea85f365c1dd69ac76f"
54
+ "gitHead": "62c802daaad0e25cf4b807b9123ef09f17ca1090"
55
55
  }