@aws-amplify/ui-react-ai 1.3.0 → 1.4.1

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,5 +1,5 @@
1
- import { V6Client } from '@aws-amplify/api-graphql';
2
- export type ConversationRoute = V6Client<any>['conversations'][string];
1
+ import type { ClientExtensions } from '@aws-amplify/data-schema/runtime';
2
+ export type ConversationRoute = ClientExtensions<any>['conversations'][string];
3
3
  export type Conversation = NonNullable<Awaited<ReturnType<ConversationRoute['create']>>['data']>;
4
4
  export type ConversationStreamEvent = Parameters<Parameters<Conversation['onStreamEvent']>[0]['next']>[0];
5
5
  export type ConversationMessage = NonNullable<Awaited<ReturnType<Conversation['sendMessage']>>['data']> & {
@@ -8,6 +8,7 @@ export type ConversationMessage = NonNullable<Awaited<ReturnType<Conversation['s
8
8
  export type ConversationMessageContent = ConversationMessage['content'][number];
9
9
  export type TextContentBlock = NonNullable<ConversationMessageContent['text']>;
10
10
  export type ImageContentBlock = NonNullable<ConversationMessageContent['image']>;
11
+ export type DocumentContentBlock = NonNullable<ConversationMessageContent['document']>;
11
12
  export type ToolUseContent = NonNullable<ConversationMessageContent['toolUse']>;
12
13
  export type ToolResultContent = NonNullable<ConversationMessageContent['toolResult']>;
13
14
  export type InputContent = Exclude<Parameters<Conversation['sendMessage']>[0], string>['content'][number];
@@ -20,7 +21,7 @@ export interface SendMesageParameters {
20
21
  toolConfiguration?: ToolConfiguration;
21
22
  }
22
23
  export type SendMessage = (input: SendMesageParameters) => void;
23
- type AIClient<T extends Record<any, any>> = Pick<V6Client<T>, 'generations' | 'conversations'>;
24
+ type AIClient<T extends Record<any, any>> = Pick<ClientExtensions<T>, 'generations' | 'conversations'>;
24
25
  export type getSchema<T> = T extends AIClient<infer Schema> ? Schema : never;
25
26
  export interface GraphQLFormattedError {
26
27
  readonly message: string;
@@ -1 +1 @@
1
- export declare const VERSION = "1.3.0";
1
+ export declare const VERSION = "1.4.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-ai",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "exports": {
@@ -42,32 +42,28 @@
42
42
  "typecheck": "tsc --noEmit"
43
43
  },
44
44
  "peerDependencies": {
45
- "@aws-amplify/api-graphql": "unstable",
46
- "aws-amplify": "^6.9.0",
45
+ "@aws-amplify/data-schema": "^1.19.0",
46
+ "aws-amplify": "^6.14.3",
47
47
  "react": "^16.14 || ^17 || ^18 || ^19",
48
48
  "react-dom": "^16.14 || ^17 || ^18 || ^19"
49
49
  },
50
50
  "dependencies": {
51
- "@aws-amplify/ui": "^6.8.0",
52
- "@aws-amplify/ui-react": "^6.9.0",
53
- "@aws-amplify/ui-react-core": "^3.3.0"
54
- },
55
- "devDependencies": {
56
- "@types/jest-when": "^3.5.0",
57
- "jest-when": "^3.5.1"
51
+ "@aws-amplify/ui": "^6.10.2",
52
+ "@aws-amplify/ui-react": "^6.11.1",
53
+ "@aws-amplify/ui-react-core": "^3.4.2"
58
54
  },
59
55
  "size-limit": [
60
56
  {
61
57
  "name": "AIConversation",
62
58
  "path": "dist/esm/index.mjs",
63
59
  "import": "{ AIConversation }",
64
- "limit": "25 kB"
60
+ "limit": "27 kB"
65
61
  },
66
62
  {
67
63
  "name": "createAIConversation",
68
64
  "path": "dist/esm/index.mjs",
69
65
  "import": "{ createAIConversation }",
70
- "limit": "7 kB"
66
+ "limit": "20 kB"
71
67
  }
72
68
  ]
73
69
  }