@xpert-ai/chatkit-types 0.4.2 → 0.4.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.
- package/dist/index.d.ts +95 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -829,6 +829,100 @@ export declare enum ChatMessageTypeEnum {
|
|
|
829
829
|
EVENT = "event"
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
+
/**
|
|
833
|
+
* @deprecated Raw browser File shape used before upload completion. External
|
|
834
|
+
* chat API callers should upload first and submit ChatRequestFileAssetHandle.
|
|
835
|
+
*/
|
|
836
|
+
export declare type ChatRequestBrowserFile = Partial<File>;
|
|
837
|
+
|
|
838
|
+
export declare type ChatRequestFile = ChatRequestFileAssetHandle | ChatRequestStorageFileHandle | ChatRequestInlineDataUrlFile | ChatRequestLegacyFileHandle | ChatRequestBrowserFile;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Preferred chat file shape. This is the AgentFile/FileAsset handle returned by
|
|
842
|
+
* the file upload endpoint; new callers should submit this shape.
|
|
843
|
+
*/
|
|
844
|
+
export declare type ChatRequestFileAssetHandle = ChatRequestFileBase & ChatRequestFileAssetMetadata & ({
|
|
845
|
+
fileAssetId: string;
|
|
846
|
+
fileId?: string;
|
|
847
|
+
storageFileId?: string;
|
|
848
|
+
} | {
|
|
849
|
+
id: string;
|
|
850
|
+
fileId: string;
|
|
851
|
+
storageFileId: string;
|
|
852
|
+
fileAssetId?: string;
|
|
853
|
+
});
|
|
854
|
+
|
|
855
|
+
export declare type ChatRequestFileAssetMetadata = {
|
|
856
|
+
objectKey?: string;
|
|
857
|
+
url?: string;
|
|
858
|
+
fileUrl?: string;
|
|
859
|
+
thumbUrl?: string;
|
|
860
|
+
status?: ChatRequestFileAssetStatus;
|
|
861
|
+
parseStatus?: ChatRequestFileAssetStatus;
|
|
862
|
+
purpose?: ChatRequestFileAssetPurpose;
|
|
863
|
+
parseMode?: ChatRequestFileParseMode;
|
|
864
|
+
capabilities?: string[];
|
|
865
|
+
summary?: string;
|
|
866
|
+
workspacePath?: string;
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
export declare type ChatRequestFileAssetPurpose = 'chat_attachment' | 'workspace' | 'knowledge';
|
|
870
|
+
|
|
871
|
+
export declare type ChatRequestFileAssetStatus = 'uploaded' | 'scanning' | 'parsing' | 'ready' | 'partial' | 'failed';
|
|
872
|
+
|
|
873
|
+
declare type ChatRequestFileBase = Partial<File> & {
|
|
874
|
+
id?: string;
|
|
875
|
+
name?: string;
|
|
876
|
+
originalName?: string;
|
|
877
|
+
fileName?: string;
|
|
878
|
+
mimeType?: string;
|
|
879
|
+
mimetype?: string;
|
|
880
|
+
type?: string;
|
|
881
|
+
size?: number;
|
|
882
|
+
extension?: string;
|
|
883
|
+
fileKey?: string;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
export declare type ChatRequestFileParseMode = 'auto' | 'fast' | 'deep' | 'none';
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Integration fallback for platforms such as webhooks that receive bytes but
|
|
890
|
+
* cannot call the upload endpoint first. Only data URLs are expected here;
|
|
891
|
+
* arbitrary remote URLs should not be submitted as chat files.
|
|
892
|
+
*/
|
|
893
|
+
export declare type ChatRequestInlineDataUrlFile = ChatRequestFileBase & ({
|
|
894
|
+
fileUrl: `data:${string}`;
|
|
895
|
+
url?: string;
|
|
896
|
+
} | {
|
|
897
|
+
url: `data:${string}`;
|
|
898
|
+
fileUrl?: string;
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* @deprecated Old ChatKit/browser attachment placeholder. It may be accepted by
|
|
903
|
+
* legacy backends but is not a FileAsset handle.
|
|
904
|
+
*/
|
|
905
|
+
export declare type ChatRequestLegacyFileHandle = ChatRequestFileBase & {
|
|
906
|
+
id: string;
|
|
907
|
+
fileId?: string;
|
|
908
|
+
fileAssetId?: never;
|
|
909
|
+
storageFileId?: never;
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* @deprecated Compatibility bridge for clients that still submit storage-layer
|
|
914
|
+
* handles. New callers should upload first and submit ChatRequestFileAssetHandle.
|
|
915
|
+
*/
|
|
916
|
+
export declare type ChatRequestStorageFileHandle = ChatRequestFileBase & {
|
|
917
|
+
storageFileId: string;
|
|
918
|
+
file?: string;
|
|
919
|
+
url?: string;
|
|
920
|
+
fileUrl?: string;
|
|
921
|
+
thumb?: string;
|
|
922
|
+
thumbUrl?: string;
|
|
923
|
+
storageProvider?: string;
|
|
924
|
+
};
|
|
925
|
+
|
|
832
926
|
export declare type Checkbox = {
|
|
833
927
|
type: 'Checkbox';
|
|
834
928
|
key?: string;
|
|
@@ -1671,7 +1765,7 @@ export declare type TChatRequestHuman = {
|
|
|
1671
1765
|
* AgentFile/FileAsset-shaped objects here; raw browser File objects should be
|
|
1672
1766
|
* uploaded before submission.
|
|
1673
1767
|
*/
|
|
1674
|
-
files?:
|
|
1768
|
+
files?: ChatRequestFile[];
|
|
1675
1769
|
references?: ChatKitReference[];
|
|
1676
1770
|
referenceComposition?: ChatKitReferenceCompositionMode;
|
|
1677
1771
|
planMode?: boolean;
|