@xpert-ai/chatkit-types 0.4.1 → 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +112 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -305,6 +305,19 @@ export declare type ChatKitImageReference = ChatKitReferenceBase & {
305
305
  height?: number;
306
306
  };
307
307
 
308
+ export declare type ChatKitLayoutOptions = {
309
+ /**
310
+ * Maximum width of the internal chat column on wide screens. The ChatKit root
311
+ * still fills its host container; message content and composer remain centered
312
+ * within this width.
313
+ *
314
+ * Accepts any CSS max-width value, or a number interpreted by React as pixels.
315
+ *
316
+ * @example "960px"
317
+ */
318
+ maxWidth?: number | string;
319
+ };
320
+
308
321
  export declare interface ChatkitMessage {
309
322
  status?: string;
310
323
  content: TMessageItems | string;
@@ -354,6 +367,10 @@ export declare type ChatKitOptions = {
354
367
  * * @default "light"
355
368
  */
356
369
  theme?: ColorScheme | ChatKitTheme;
370
+ /**
371
+ * Layout configuration for the ChatKit UI.
372
+ */
373
+ layout?: ChatKitLayoutOptions;
357
374
  /**
358
375
  * Optional animated pet companion rendered by the ChatKit web component over
359
376
  * the host page viewport.
@@ -812,6 +829,100 @@ export declare enum ChatMessageTypeEnum {
812
829
  EVENT = "event"
813
830
  }
814
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
+
815
926
  export declare type Checkbox = {
816
927
  type: 'Checkbox';
817
928
  key?: string;
@@ -1654,7 +1765,7 @@ export declare type TChatRequestHuman = {
1654
1765
  * AgentFile/FileAsset-shaped objects here; raw browser File objects should be
1655
1766
  * uploaded before submission.
1656
1767
  */
1657
- files?: Partial<File>[];
1768
+ files?: ChatRequestFile[];
1658
1769
  references?: ChatKitReference[];
1659
1770
  referenceComposition?: ChatKitReferenceCompositionMode;
1660
1771
  planMode?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/chatkit-types",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Type definitions for the ChatKit.",
5
5
  "sideEffects": false,
6
6
  "type": "module",