@trailheadai/chat 0.1.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,20 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
- import { Message } from '@trailhead/shared';
2
+ import { z } from 'zod';
3
3
 
4
4
  export declare function initTrailheadWidget(elementId: string, props: TrailheadChatProps): {
5
5
  unmount: () => void;
6
6
  };
7
7
 
8
+ declare type Message = z.infer<typeof MessageSchema>;
9
+
10
+ declare const MessageSchema: z.ZodObject<{
11
+ role: z.ZodEnum<{
12
+ user: "user";
13
+ assistant: "assistant";
14
+ }>;
15
+ content: z.ZodString;
16
+ }, z.core.$strip>;
17
+
8
18
  export declare function TrailheadChat<T = object>({ projectId, type, onFormUpdated, onReady, onSubmit, onError, }: TrailheadChatProps<T>): JSX.Element | null;
9
19
 
10
20
  export declare interface TrailheadChatProps<T = object> {