@fencyai/react 0.1.83 → 0.1.85

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 (34) hide show
  1. package/dist/chat/Chat.d.ts +10 -4
  2. package/dist/chat/MentionInput.d.ts +6 -9
  3. package/dist/hooks/useListMemories/index.d.ts +2 -0
  4. package/dist/hooks/useListMemoryTypes/index.d.ts +2 -0
  5. package/dist/hooks/usePaginatedQuery/index.d.ts +51 -0
  6. package/dist/index.d.ts +4 -5
  7. package/dist/index.js +3382 -3419
  8. package/dist/types/ListMemoriesPage.d.ts +7 -0
  9. package/dist/types/ListMemoriesParams.d.ts +12 -0
  10. package/dist/types/ListMemoriesResult.d.ts +9 -0
  11. package/dist/types/ListMemoryTypesPage.d.ts +7 -0
  12. package/dist/types/{ListFilesParams.d.ts → ListMemoryTypesParams.d.ts} +1 -1
  13. package/dist/types/ListMemoryTypesResult.d.ts +9 -0
  14. package/dist/types/UseListMemories.d.ts +10 -0
  15. package/dist/types/UseListMemoryTypes.d.ts +10 -0
  16. package/dist/types/UseListMemoryTypesProps.d.ts +3 -0
  17. package/dist/types/index.d.ts +5 -13
  18. package/package.json +4 -4
  19. package/dist/hooks/useCreateFiles/index.d.ts +0 -3
  20. package/dist/hooks/useListFiles/index.d.ts +0 -3
  21. package/dist/hooks/useSearchFiles/index.d.ts +0 -2
  22. package/dist/hooks/useWebsites/index.d.ts +0 -3
  23. package/dist/types/CreateFileParams.d.ts +0 -9
  24. package/dist/types/CreateWebsiteParams.d.ts +0 -5
  25. package/dist/types/ListFilesPage.d.ts +0 -8
  26. package/dist/types/ListFilesResult.d.ts +0 -9
  27. package/dist/types/SearchFilesParams.d.ts +0 -6
  28. package/dist/types/UseCreateFiles.d.ts +0 -6
  29. package/dist/types/UseCreateFilesProps.d.ts +0 -6
  30. package/dist/types/UseListFiles.d.ts +0 -10
  31. package/dist/types/UseListFilesProps.d.ts +0 -3
  32. package/dist/types/UseSearchFiles.d.ts +0 -6
  33. package/dist/types/UseWebsites.d.ts +0 -6
  34. package/dist/types/UseWebsitesProps.d.ts +0 -5
@@ -0,0 +1,7 @@
1
+ import { PaginationDto, PubMemoryDto } from '@fencyai/js/lib/openapi';
2
+ export interface ListMemoriesPage {
3
+ items: PubMemoryDto[];
4
+ hasNextPage: boolean;
5
+ hasPreviousPage: boolean;
6
+ pagination: PaginationDto;
7
+ }
@@ -0,0 +1,12 @@
1
+ export interface ListMemoriesParams {
2
+ memoryIds?: string[];
3
+ typeId?: string;
4
+ title?: string;
5
+ meta: Record<string, string>;
6
+ nextPageToken?: string;
7
+ previousPageToken?: string;
8
+ limit?: number;
9
+ fetchClientSecret: () => Promise<{
10
+ clientSecret: string;
11
+ }>;
12
+ }
@@ -0,0 +1,9 @@
1
+ import { ApiError } from '@fencyai/js';
2
+ import { ListMemoriesPage } from './ListMemoriesPage';
3
+ export type ListMemoriesResult = {
4
+ type: 'success';
5
+ page: ListMemoriesPage;
6
+ } | {
7
+ type: 'error';
8
+ error: ApiError;
9
+ };
@@ -0,0 +1,7 @@
1
+ import { PaginationDto, PubMemoryTypeDto } from '@fencyai/js/lib/openapi';
2
+ export interface ListMemoryTypesPage {
3
+ items: PubMemoryTypeDto[];
4
+ hasNextPage: boolean;
5
+ hasPreviousPage: boolean;
6
+ pagination: PaginationDto;
7
+ }
@@ -1,4 +1,4 @@
1
- export interface ListFilesParams {
1
+ export interface ListMemoryTypesParams {
2
2
  fetchClientSecret: () => Promise<{
3
3
  clientSecret: string;
4
4
  }>;
@@ -0,0 +1,9 @@
1
+ import { ApiError } from '@fencyai/js';
2
+ import { ListMemoryTypesPage } from './ListMemoryTypesPage';
3
+ export type ListMemoryTypesResult = {
4
+ type: 'success';
5
+ page: ListMemoryTypesPage;
6
+ } | {
7
+ type: 'error';
8
+ error: ApiError;
9
+ };
@@ -0,0 +1,10 @@
1
+ import { ListMemoriesPage } from './ListMemoriesPage';
2
+ import { ListMemoriesParams } from './ListMemoriesParams';
3
+ import { ListMemoriesResult } from './ListMemoriesResult';
4
+ export interface UseListMemories {
5
+ listFirstPage: (params: ListMemoriesParams) => Promise<ListMemoriesResult>;
6
+ listNextPage: (params: ListMemoriesParams) => Promise<ListMemoriesResult>;
7
+ listPreviousPage: (params: ListMemoriesParams) => Promise<ListMemoriesResult>;
8
+ refetchCurrentPage: () => Promise<ListMemoriesResult>;
9
+ currentPage: ListMemoriesPage | null;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { ListMemoryTypesPage } from './ListMemoryTypesPage';
2
+ import { ListMemoryTypesParams } from './ListMemoryTypesParams';
3
+ import { ListMemoryTypesResult } from './ListMemoryTypesResult';
4
+ export interface UseListMemoryTypes {
5
+ listFirstPage: (params: ListMemoryTypesParams) => Promise<ListMemoryTypesResult>;
6
+ listNextPage: (params: ListMemoryTypesParams) => Promise<ListMemoryTypesResult>;
7
+ listPreviousPage: (params: ListMemoryTypesParams) => Promise<ListMemoryTypesResult>;
8
+ refetchCurrentPage: () => Promise<ListMemoryTypesResult>;
9
+ currentPage: ListMemoryTypesPage | null;
10
+ }
@@ -0,0 +1,3 @@
1
+ export interface UseListMemoryTypesProps {
2
+ pageSize?: number;
3
+ }
@@ -23,16 +23,8 @@ export * from './CreateStreamResponse';
23
23
  export * from './StreamError';
24
24
  export * from './UseStream';
25
25
  export * from './UseStreamProps';
26
- export * from './CreateFileParams';
27
- export * from './SearchFilesParams';
28
- export * from './UseSearchFiles';
29
- export * from './CreateWebsiteParams';
30
- export * from './UseWebsites';
31
- export * from './UseWebsitesProps';
32
- export * from './ListFilesPage';
33
- export * from './ListFilesParams';
34
- export * from './ListFilesResult';
35
- export * from './UseListFiles';
36
- export * from './UseListFilesProps';
37
- export * from './SearchFilesParams';
38
- export * from './UseSearchFiles';
26
+ export * from './ListMemoryTypesPage';
27
+ export * from './ListMemoryTypesParams';
28
+ export * from './ListMemoryTypesResult';
29
+ export * from './UseListMemoryTypes';
30
+ export * from './UseListMemoryTypesProps';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fencyai/react",
3
- "version": "0.1.83",
3
+ "version": "0.1.85",
4
4
  "description": "> TODO: description",
5
5
  "author": "staklau <steinaageklaussen@gmail.com>",
6
6
  "homepage": "",
@@ -32,7 +32,7 @@
32
32
  "prepublishOnly": "npm run build"
33
33
  },
34
34
  "devDependencies": {
35
- "@fencyai/js": "^0.1.83",
35
+ "@fencyai/js": "^0.1.85",
36
36
  "@types/jest": "^29.5.11",
37
37
  "@types/node": "^20.10.5",
38
38
  "@types/react": "^18.2.45",
@@ -46,7 +46,7 @@
46
46
  "vite-plugin-lib-inject-css": "^2.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@fencyai/js": "^0.1.83",
49
+ "@fencyai/js": "^0.1.85",
50
50
  "@radix-ui/react-popover": "^1.1.15",
51
51
  "react": ">=16.8.0",
52
52
  "react-markdown": "^10.1.0",
@@ -60,5 +60,5 @@
60
60
  "optional": false
61
61
  }
62
62
  },
63
- "gitHead": "1d219106b354fb15ad73f96a5f50244a7dcde26a"
63
+ "gitHead": "fc0cdc699f3b28db051eb93b868708763c7f7990"
64
64
  }
@@ -1,3 +0,0 @@
1
- import { UseCreateFiles } from '../../types/UseCreateFiles';
2
- import { UseCreateFilesProps } from '../../types/UseCreateFilesProps';
3
- export declare function useCreateFiles(props?: UseCreateFilesProps): UseCreateFiles;
@@ -1,3 +0,0 @@
1
- import { UseListFiles } from '../../types/UseListFiles';
2
- import { UseListFilesProps } from '../../types/UseListFilesProps';
3
- export declare function useListFiles(props?: UseListFilesProps): UseListFiles;
@@ -1,2 +0,0 @@
1
- import { UseSearchFiles } from '../../types/UseSearchFiles';
2
- export declare function useSearchFiles(): UseSearchFiles;
@@ -1,3 +0,0 @@
1
- import { UseWebsites } from '../../types/UseWebsites';
2
- import { UseWebsitesProps } from '../../types/UseWebsitesProps';
3
- export declare function useWebsites(props?: UseWebsitesProps): UseWebsites;
@@ -1,9 +0,0 @@
1
- export interface CreateFileParams {
2
- fileName: string;
3
- fileType: string;
4
- fileSize: number;
5
- extractTextContent?: boolean;
6
- fetchClientSecret?: () => Promise<{
7
- clientSecret: string;
8
- }>;
9
- }
@@ -1,5 +0,0 @@
1
- export interface CreateWebsiteParams {
2
- url: string;
3
- extractHtmlContent?: boolean;
4
- extractTextContent?: boolean;
5
- }
@@ -1,8 +0,0 @@
1
- import { PaginationDto } from '@fencyai/js/lib/openapi';
2
- import { FencyListFileItem } from '@fencyai/js/lib/types/FencyListFileItem';
3
- export interface ListFilesPage {
4
- items: FencyListFileItem[];
5
- hasNextPage: boolean;
6
- hasPreviousPage: boolean;
7
- pagination: PaginationDto;
8
- }
@@ -1,9 +0,0 @@
1
- import { ApiError } from '@fencyai/js';
2
- import { ListFilesPage } from './ListFilesPage';
3
- export type ListFilesResult = {
4
- type: 'success';
5
- page: ListFilesPage;
6
- } | {
7
- type: 'error';
8
- error: ApiError;
9
- };
@@ -1,6 +0,0 @@
1
- export interface SearchFilesParams {
2
- text: string;
3
- fetchClientSecret: () => Promise<{
4
- clientSecret: string;
5
- }>;
6
- }
@@ -1,6 +0,0 @@
1
- import { CreateFileResponse, FencyFile } from '@fencyai/js';
2
- import { CreateFileParams } from './CreateFileParams';
3
- export interface UseCreateFiles {
4
- createFile: (params: CreateFileParams) => Promise<CreateFileResponse>;
5
- files: FencyFile[];
6
- }
@@ -1,6 +0,0 @@
1
- import { FileSearchIndexReady, FileTextContentReady, FileUploadCompleted } from './StreamData';
2
- export interface UseCreateFilesProps {
3
- onUploadCompleted?: (event: FileUploadCompleted) => void;
4
- onTextContentReady?: (event: FileTextContentReady) => void;
5
- onFileSearchIndexReady?: (event: FileSearchIndexReady) => void;
6
- }
@@ -1,10 +0,0 @@
1
- import { ListFilesPage } from './ListFilesPage';
2
- import { ListFilesParams } from './ListFilesParams';
3
- import { ListFilesResult } from './ListFilesResult';
4
- export interface UseListFiles {
5
- listFirstPage: (params: ListFilesParams) => Promise<ListFilesResult>;
6
- listNextPage: (params: ListFilesParams) => Promise<ListFilesResult>;
7
- listPreviousPage: (params: ListFilesParams) => Promise<ListFilesResult>;
8
- refetchCurrentPage: () => Promise<ListFilesResult>;
9
- currentPage: ListFilesPage | null;
10
- }
@@ -1,3 +0,0 @@
1
- export interface UseListFilesProps {
2
- pageSize?: number;
3
- }
@@ -1,6 +0,0 @@
1
- import { FileSearchItem, SearchFilesResponse } from '@fencyai/js';
2
- import { SearchFilesParams } from './SearchFilesParams';
3
- export interface UseSearchFiles {
4
- searchFiles: (params: SearchFilesParams) => Promise<SearchFilesResponse>;
5
- searchResults?: FileSearchItem[];
6
- }
@@ -1,6 +0,0 @@
1
- import { CreateWebsiteResponse, Website } from '@fencyai/js';
2
- import { CreateWebsiteParams } from './CreateWebsiteParams';
3
- export interface UseWebsites {
4
- websites: Website[];
5
- createWebsite: (params: CreateWebsiteParams) => Promise<CreateWebsiteResponse>;
6
- }
@@ -1,5 +0,0 @@
1
- import { WebsiteHtmlContentReady, WebsiteTextContentReady } from './StreamData';
2
- export interface UseWebsitesProps {
3
- onHtmlContentReady?: (event: WebsiteHtmlContentReady) => void;
4
- onTextContentReady?: (event: WebsiteTextContentReady) => void;
5
- }