@xpert-ai/chatkit-types 0.4.2 → 0.4.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/index.d.ts +108 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -330,6 +330,15 @@ export declare interface ChatkitMessage {
|
|
|
330
330
|
visibleAt?: string | Date | null;
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
+
export declare type ChatKitMessageNavigationOptions = {
|
|
334
|
+
/**
|
|
335
|
+
* Whether to show the message quick navigation rail.
|
|
336
|
+
*
|
|
337
|
+
* @default true
|
|
338
|
+
*/
|
|
339
|
+
enabled?: boolean;
|
|
340
|
+
};
|
|
341
|
+
|
|
333
342
|
export declare type ChatKitOptions = {
|
|
334
343
|
/**
|
|
335
344
|
* ChatKit iframe URL for web component integrations.
|
|
@@ -371,6 +380,10 @@ export declare type ChatKitOptions = {
|
|
|
371
380
|
* Layout configuration for the ChatKit UI.
|
|
372
381
|
*/
|
|
373
382
|
layout?: ChatKitLayoutOptions;
|
|
383
|
+
/**
|
|
384
|
+
* Message list quick navigation controls.
|
|
385
|
+
*/
|
|
386
|
+
messageNavigation?: ChatKitMessageNavigationOptions;
|
|
374
387
|
/**
|
|
375
388
|
* Optional animated pet companion rendered by the ChatKit web component over
|
|
376
389
|
* the host page viewport.
|
|
@@ -829,6 +842,100 @@ export declare enum ChatMessageTypeEnum {
|
|
|
829
842
|
EVENT = "event"
|
|
830
843
|
}
|
|
831
844
|
|
|
845
|
+
/**
|
|
846
|
+
* @deprecated Raw browser File shape used before upload completion. External
|
|
847
|
+
* chat API callers should upload first and submit ChatRequestFileAssetHandle.
|
|
848
|
+
*/
|
|
849
|
+
export declare type ChatRequestBrowserFile = Partial<File>;
|
|
850
|
+
|
|
851
|
+
export declare type ChatRequestFile = ChatRequestFileAssetHandle | ChatRequestStorageFileHandle | ChatRequestInlineDataUrlFile | ChatRequestLegacyFileHandle | ChatRequestBrowserFile;
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Preferred chat file shape. This is the AgentFile/FileAsset handle returned by
|
|
855
|
+
* the file upload endpoint; new callers should submit this shape.
|
|
856
|
+
*/
|
|
857
|
+
export declare type ChatRequestFileAssetHandle = ChatRequestFileBase & ChatRequestFileAssetMetadata & ({
|
|
858
|
+
fileAssetId: string;
|
|
859
|
+
fileId?: string;
|
|
860
|
+
storageFileId?: string;
|
|
861
|
+
} | {
|
|
862
|
+
id: string;
|
|
863
|
+
fileId: string;
|
|
864
|
+
storageFileId: string;
|
|
865
|
+
fileAssetId?: string;
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
export declare type ChatRequestFileAssetMetadata = {
|
|
869
|
+
objectKey?: string;
|
|
870
|
+
url?: string;
|
|
871
|
+
fileUrl?: string;
|
|
872
|
+
thumbUrl?: string;
|
|
873
|
+
status?: ChatRequestFileAssetStatus;
|
|
874
|
+
parseStatus?: ChatRequestFileAssetStatus;
|
|
875
|
+
purpose?: ChatRequestFileAssetPurpose;
|
|
876
|
+
parseMode?: ChatRequestFileParseMode;
|
|
877
|
+
capabilities?: string[];
|
|
878
|
+
summary?: string;
|
|
879
|
+
workspacePath?: string;
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
export declare type ChatRequestFileAssetPurpose = 'chat_attachment' | 'workspace' | 'knowledge';
|
|
883
|
+
|
|
884
|
+
export declare type ChatRequestFileAssetStatus = 'uploaded' | 'scanning' | 'parsing' | 'ready' | 'partial' | 'failed';
|
|
885
|
+
|
|
886
|
+
declare type ChatRequestFileBase = Partial<File> & {
|
|
887
|
+
id?: string;
|
|
888
|
+
name?: string;
|
|
889
|
+
originalName?: string;
|
|
890
|
+
fileName?: string;
|
|
891
|
+
mimeType?: string;
|
|
892
|
+
mimetype?: string;
|
|
893
|
+
type?: string;
|
|
894
|
+
size?: number;
|
|
895
|
+
extension?: string;
|
|
896
|
+
fileKey?: string;
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
export declare type ChatRequestFileParseMode = 'auto' | 'fast' | 'deep' | 'none';
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Integration fallback for platforms such as webhooks that receive bytes but
|
|
903
|
+
* cannot call the upload endpoint first. Only data URLs are expected here;
|
|
904
|
+
* arbitrary remote URLs should not be submitted as chat files.
|
|
905
|
+
*/
|
|
906
|
+
export declare type ChatRequestInlineDataUrlFile = ChatRequestFileBase & ({
|
|
907
|
+
fileUrl: `data:${string}`;
|
|
908
|
+
url?: string;
|
|
909
|
+
} | {
|
|
910
|
+
url: `data:${string}`;
|
|
911
|
+
fileUrl?: string;
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* @deprecated Old ChatKit/browser attachment placeholder. It may be accepted by
|
|
916
|
+
* legacy backends but is not a FileAsset handle.
|
|
917
|
+
*/
|
|
918
|
+
export declare type ChatRequestLegacyFileHandle = ChatRequestFileBase & {
|
|
919
|
+
id: string;
|
|
920
|
+
fileId?: string;
|
|
921
|
+
fileAssetId?: never;
|
|
922
|
+
storageFileId?: never;
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @deprecated Compatibility bridge for clients that still submit storage-layer
|
|
927
|
+
* handles. New callers should upload first and submit ChatRequestFileAssetHandle.
|
|
928
|
+
*/
|
|
929
|
+
export declare type ChatRequestStorageFileHandle = ChatRequestFileBase & {
|
|
930
|
+
storageFileId: string;
|
|
931
|
+
file?: string;
|
|
932
|
+
url?: string;
|
|
933
|
+
fileUrl?: string;
|
|
934
|
+
thumb?: string;
|
|
935
|
+
thumbUrl?: string;
|
|
936
|
+
storageProvider?: string;
|
|
937
|
+
};
|
|
938
|
+
|
|
832
939
|
export declare type Checkbox = {
|
|
833
940
|
type: 'Checkbox';
|
|
834
941
|
key?: string;
|
|
@@ -1671,7 +1778,7 @@ export declare type TChatRequestHuman = {
|
|
|
1671
1778
|
* AgentFile/FileAsset-shaped objects here; raw browser File objects should be
|
|
1672
1779
|
* uploaded before submission.
|
|
1673
1780
|
*/
|
|
1674
|
-
files?:
|
|
1781
|
+
files?: ChatRequestFile[];
|
|
1675
1782
|
references?: ChatKitReference[];
|
|
1676
1783
|
referenceComposition?: ChatKitReferenceCompositionMode;
|
|
1677
1784
|
planMode?: boolean;
|