@ottocode/web-sdk 0.1.279 → 0.1.280

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 (27) hide show
  1. package/dist/components/chat/ChatInput.d.ts.map +1 -1
  2. package/dist/components/chat/ChatInputContainer.d.ts.map +1 -1
  3. package/dist/components/chat/NewSessionLanding.d.ts.map +1 -1
  4. package/dist/components/file-browser/FileViewerPanel.d.ts.map +1 -1
  5. package/dist/components/index.js +3337 -2842
  6. package/dist/components/index.js.map +20 -18
  7. package/dist/components/messages/MessagePartItem.d.ts.map +1 -1
  8. package/dist/components/messages/UserMessageGroup.d.ts.map +1 -1
  9. package/dist/components/messages/renderers/CopyAttachmentRenderer.d.ts +3 -0
  10. package/dist/components/messages/renderers/CopyAttachmentRenderer.d.ts.map +1 -0
  11. package/dist/components/messages/renderers/ReadImageRenderer.d.ts +3 -0
  12. package/dist/components/messages/renderers/ReadImageRenderer.d.ts.map +1 -0
  13. package/dist/components/messages/renderers/index.d.ts.map +1 -1
  14. package/dist/components/messages/renderers/types.d.ts +8 -0
  15. package/dist/components/messages/renderers/types.d.ts.map +1 -1
  16. package/dist/components/onboarding/OnboardingModal.d.ts.map +1 -1
  17. package/dist/components/settings/SettingsSidebar.d.ts.map +1 -1
  18. package/dist/components/workspace/ViewerTabs.d.ts.map +1 -1
  19. package/dist/hooks/index.js +71 -37
  20. package/dist/hooks/index.js.map +3 -3
  21. package/dist/hooks/useFileUpload.d.ts +19 -2
  22. package/dist/hooks/useFileUpload.d.ts.map +1 -1
  23. package/dist/index.js +3337 -2842
  24. package/dist/index.js.map +20 -18
  25. package/dist/types/api.d.ts +9 -2
  26. package/dist/types/api.d.ts.map +1 -1
  27. package/package.json +3 -3
@@ -1,14 +1,30 @@
1
1
  import { type DragEvent, type ClipboardEvent } from 'react';
2
- export type FileAttachmentType = 'image' | 'pdf' | 'text';
2
+ export type FileAttachmentType = 'image' | 'pdf' | 'text' | 'binary';
3
+ export type FileUploadStatus = 'uploading' | 'ready' | 'failed';
4
+ export interface UploadedAttachment {
5
+ id: string;
6
+ filename: string;
7
+ mimeType: string;
8
+ size: number;
9
+ sha256: string;
10
+ kind: FileAttachmentType;
11
+ originalPath: string;
12
+ originalUrl: string;
13
+ metadataUrl: string;
14
+ status: 'ready';
15
+ }
3
16
  export interface FileAttachment {
4
17
  id: string;
5
18
  file: File;
6
19
  type: FileAttachmentType;
7
20
  name: string;
8
21
  preview?: string;
9
- data: string;
22
+ data?: string;
10
23
  mediaType: string;
11
24
  textContent?: string;
25
+ uploadStatus: FileUploadStatus;
26
+ uploadedAttachment?: UploadedAttachment;
27
+ uploadError?: string;
12
28
  }
13
29
  interface UseFileUploadOptions {
14
30
  maxFiles?: number;
@@ -16,6 +32,7 @@ interface UseFileUploadOptions {
16
32
  pageWide?: boolean;
17
33
  supportsImages?: boolean;
18
34
  supportsFileAttachments?: boolean;
35
+ sessionId?: string;
19
36
  onError?: (message: string) => void;
20
37
  }
21
38
  export declare function useFileUpload(options?: UseFileUploadOptions): {
@@ -1 +1 @@
1
- {"version":3,"file":"useFileUpload.d.ts","sourceRoot":"","sources":["../../src/hooks/useFileUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAgHD,UAAU,oBAAoB;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;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