@ai4b-team/fsaos-gateway-sdk 2.0.0 → 2.0.2
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/iife/gateway.js +3 -3
- package/dist/iife/gateway.js.map +3 -3
- package/dist/iife/ui.js +1 -1
- package/dist/index.cjs +20 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -3
- package/dist/index.d.ts +45 -3
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10,6 +10,44 @@ import react__default from 'react';
|
|
|
10
10
|
* All types used by the gateway SDK. These are inferred from the deployed
|
|
11
11
|
* gateway.js bundle and the VFS data structures it operates on.
|
|
12
12
|
*/
|
|
13
|
+
/** Parameters for the resolve (multi-signal search) kernel method. */
|
|
14
|
+
interface ResolveParams {
|
|
15
|
+
/** Search query — keywords or natural language. Required. */
|
|
16
|
+
query: string;
|
|
17
|
+
/** VFS path to scope the search (defaults to caller's auth scope). */
|
|
18
|
+
scope_path?: string;
|
|
19
|
+
/** Optional item_type filter (e.g. ['message', 'note']). */
|
|
20
|
+
types?: string[];
|
|
21
|
+
/** Max results (default 10, max 50). */
|
|
22
|
+
limit?: number;
|
|
23
|
+
/** Minimum score threshold (default 0.3). */
|
|
24
|
+
min_score?: number;
|
|
25
|
+
/** Include full type_data in results (default false). */
|
|
26
|
+
include_schema?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A single result from the resolve kernel method. */
|
|
29
|
+
interface ResolveResultItem {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
item_type: string;
|
|
33
|
+
path: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
score: number;
|
|
36
|
+
match_type: string;
|
|
37
|
+
semantic_score: number;
|
|
38
|
+
type_data?: Record<string, any>;
|
|
39
|
+
}
|
|
40
|
+
/** Response from the resolve kernel method. */
|
|
41
|
+
interface ResolveResponse {
|
|
42
|
+
success: boolean;
|
|
43
|
+
results: ResolveResultItem[];
|
|
44
|
+
meta: {
|
|
45
|
+
query: string;
|
|
46
|
+
total_results: number;
|
|
47
|
+
elapsed_ms: number;
|
|
48
|
+
used_semantic: boolean;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
13
51
|
/** A normalized VFS item as returned by all gateway read operations. */
|
|
14
52
|
interface VFSItem {
|
|
15
53
|
id: string;
|
|
@@ -29,6 +67,8 @@ interface VFSItem {
|
|
|
29
67
|
owner_principal_id?: string;
|
|
30
68
|
created_by_principal_id?: string;
|
|
31
69
|
parent_id?: string;
|
|
70
|
+
space_item_id?: string;
|
|
71
|
+
account_item_id?: string;
|
|
32
72
|
}
|
|
33
73
|
/** A type definition from the os_item_types registry. */
|
|
34
74
|
interface TypeDefinition {
|
|
@@ -488,7 +528,7 @@ declare const vfsKeys: {
|
|
|
488
528
|
/** Fractal instances (scope-independent). */
|
|
489
529
|
fractalInstances: () => readonly ["vfs", "fractal-instances"];
|
|
490
530
|
/** Recent activity (scope-aware). */
|
|
491
|
-
recentActivity: (a: string, b: string, c: string) => readonly ["vfs", string, "
|
|
531
|
+
recentActivity: (a: string, b: string, c: string) => readonly ["vfs", string, "get-activity-feed", string, string, string];
|
|
492
532
|
/** Item versions (scope-independent — by item UUID). */
|
|
493
533
|
itemVersions: (a: string, b: string, c: string, d: string) => readonly ["vfs", "item-versions", string, string, string, string];
|
|
494
534
|
/** @deprecated Use itemVersions instead. */
|
|
@@ -604,7 +644,7 @@ interface ItemsFilter {
|
|
|
604
644
|
}
|
|
605
645
|
/**
|
|
606
646
|
* Fetch items by type with structured filters.
|
|
607
|
-
* Calls kernel_query (gateway '
|
|
647
|
+
* Calls kernel_query (gateway 'query' method) with the extended filter support.
|
|
608
648
|
*/
|
|
609
649
|
declare function fetchItems(filter: ItemsFilter): Promise<{
|
|
610
650
|
items: VFSItem[];
|
|
@@ -1019,6 +1059,8 @@ declare function useChildren(path: string | undefined | null): {
|
|
|
1019
1059
|
declare function useTree(path: string | undefined | null, depth?: number): _tanstack_react_query.UseQueryResult<VFSItem[], Error>;
|
|
1020
1060
|
/** Search VFS items by query string, optionally filtered by item types. */
|
|
1021
1061
|
declare function useSearch(query: string | undefined | null, itemTypes?: string[]): _tanstack_react_query.UseQueryResult<VFSItem[], Error>;
|
|
1062
|
+
/** Multi-signal search (exact + trigram + keyword + semantic vector) via kernel resolve. */
|
|
1063
|
+
declare function useResolve(params: ResolveParams | null | undefined): _tanstack_react_query.UseQueryResult<ResolveResponse, Error>;
|
|
1022
1064
|
/** Fetch items by type with structured filters. */
|
|
1023
1065
|
declare function useItems(filter: ItemsFilter | null | undefined): _tanstack_react_query.UseQueryResult<VFSItem[], Error>;
|
|
1024
1066
|
/** Infinite-scroll item fetching by type. */
|
|
@@ -1833,4 +1875,4 @@ declare function uploadFile(file: File | Blob, options: UploadOptions, onProgres
|
|
|
1833
1875
|
*/
|
|
1834
1876
|
declare function useFileUpload(): UseFileUploadReturn;
|
|
1835
1877
|
|
|
1836
|
-
export { type AccountInfo, type Channel, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FileRef, type GatewayParams, type GatewayResponse, type InfiniteChannelMessagesOptions, type ItemVersionsOptions, type ItemVersionsResult, type ItemsFilter, KernelProvider, type LinkParams, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PrincipalData, type SessionEntry, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UploadItem, type UploadOptions, type UploadResult, type UseFileUploadReturn, type VFSEdge, type VFSItem, auth, awaitScopeReady, callTool, clearCachedToken, clearSession, createItem, disconnectSSE, disposeVfsRealtimeWs, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAssetUrl, getDefaultSort, getRequiredFormFields, getScope, getScopeVersion, getSessionEntry, initSession, initVfsRealtimeWs, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isScopeReady, listChildren, mount, mountRealtimeScope, normalizeItem, ping, pushChanges, queryClient, readItem, registerCleanup, resetAllSdkState, resolvePrincipalId, setCachedToken, setScope, setupRequireShim, signal, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAllChannels, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePrincipal, useRealtimeQuery, useRecentActivity, useScope, useScopeReady, useSearch, useTheme, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, vfsKeys };
|
|
1878
|
+
export { type AccountInfo, type Channel, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FileRef, type GatewayParams, type GatewayResponse, type InfiniteChannelMessagesOptions, type ItemVersionsOptions, type ItemVersionsResult, type ItemsFilter, KernelProvider, type LinkParams, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PrincipalData, type ResolveParams, type ResolveResponse, type ResolveResultItem, type SessionEntry, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UploadItem, type UploadOptions, type UploadResult, type UseFileUploadReturn, type VFSEdge, type VFSItem, auth, awaitScopeReady, callTool, clearCachedToken, clearSession, createItem, disconnectSSE, disposeVfsRealtimeWs, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAssetUrl, getDefaultSort, getRequiredFormFields, getScope, getScopeVersion, getSessionEntry, initSession, initVfsRealtimeWs, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isScopeReady, listChildren, mount, mountRealtimeScope, normalizeItem, ping, pushChanges, queryClient, readItem, registerCleanup, resetAllSdkState, resolvePrincipalId, setCachedToken, setScope, setupRequireShim, signal, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAllChannels, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePrincipal, useRealtimeQuery, useRecentActivity, useResolve, useScope, useScopeReady, useSearch, useTheme, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, vfsKeys };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,44 @@ import react__default from 'react';
|
|
|
10
10
|
* All types used by the gateway SDK. These are inferred from the deployed
|
|
11
11
|
* gateway.js bundle and the VFS data structures it operates on.
|
|
12
12
|
*/
|
|
13
|
+
/** Parameters for the resolve (multi-signal search) kernel method. */
|
|
14
|
+
interface ResolveParams {
|
|
15
|
+
/** Search query — keywords or natural language. Required. */
|
|
16
|
+
query: string;
|
|
17
|
+
/** VFS path to scope the search (defaults to caller's auth scope). */
|
|
18
|
+
scope_path?: string;
|
|
19
|
+
/** Optional item_type filter (e.g. ['message', 'note']). */
|
|
20
|
+
types?: string[];
|
|
21
|
+
/** Max results (default 10, max 50). */
|
|
22
|
+
limit?: number;
|
|
23
|
+
/** Minimum score threshold (default 0.3). */
|
|
24
|
+
min_score?: number;
|
|
25
|
+
/** Include full type_data in results (default false). */
|
|
26
|
+
include_schema?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A single result from the resolve kernel method. */
|
|
29
|
+
interface ResolveResultItem {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
item_type: string;
|
|
33
|
+
path: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
score: number;
|
|
36
|
+
match_type: string;
|
|
37
|
+
semantic_score: number;
|
|
38
|
+
type_data?: Record<string, any>;
|
|
39
|
+
}
|
|
40
|
+
/** Response from the resolve kernel method. */
|
|
41
|
+
interface ResolveResponse {
|
|
42
|
+
success: boolean;
|
|
43
|
+
results: ResolveResultItem[];
|
|
44
|
+
meta: {
|
|
45
|
+
query: string;
|
|
46
|
+
total_results: number;
|
|
47
|
+
elapsed_ms: number;
|
|
48
|
+
used_semantic: boolean;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
13
51
|
/** A normalized VFS item as returned by all gateway read operations. */
|
|
14
52
|
interface VFSItem {
|
|
15
53
|
id: string;
|
|
@@ -29,6 +67,8 @@ interface VFSItem {
|
|
|
29
67
|
owner_principal_id?: string;
|
|
30
68
|
created_by_principal_id?: string;
|
|
31
69
|
parent_id?: string;
|
|
70
|
+
space_item_id?: string;
|
|
71
|
+
account_item_id?: string;
|
|
32
72
|
}
|
|
33
73
|
/** A type definition from the os_item_types registry. */
|
|
34
74
|
interface TypeDefinition {
|
|
@@ -488,7 +528,7 @@ declare const vfsKeys: {
|
|
|
488
528
|
/** Fractal instances (scope-independent). */
|
|
489
529
|
fractalInstances: () => readonly ["vfs", "fractal-instances"];
|
|
490
530
|
/** Recent activity (scope-aware). */
|
|
491
|
-
recentActivity: (a: string, b: string, c: string) => readonly ["vfs", string, "
|
|
531
|
+
recentActivity: (a: string, b: string, c: string) => readonly ["vfs", string, "get-activity-feed", string, string, string];
|
|
492
532
|
/** Item versions (scope-independent — by item UUID). */
|
|
493
533
|
itemVersions: (a: string, b: string, c: string, d: string) => readonly ["vfs", "item-versions", string, string, string, string];
|
|
494
534
|
/** @deprecated Use itemVersions instead. */
|
|
@@ -604,7 +644,7 @@ interface ItemsFilter {
|
|
|
604
644
|
}
|
|
605
645
|
/**
|
|
606
646
|
* Fetch items by type with structured filters.
|
|
607
|
-
* Calls kernel_query (gateway '
|
|
647
|
+
* Calls kernel_query (gateway 'query' method) with the extended filter support.
|
|
608
648
|
*/
|
|
609
649
|
declare function fetchItems(filter: ItemsFilter): Promise<{
|
|
610
650
|
items: VFSItem[];
|
|
@@ -1019,6 +1059,8 @@ declare function useChildren(path: string | undefined | null): {
|
|
|
1019
1059
|
declare function useTree(path: string | undefined | null, depth?: number): _tanstack_react_query.UseQueryResult<VFSItem[], Error>;
|
|
1020
1060
|
/** Search VFS items by query string, optionally filtered by item types. */
|
|
1021
1061
|
declare function useSearch(query: string | undefined | null, itemTypes?: string[]): _tanstack_react_query.UseQueryResult<VFSItem[], Error>;
|
|
1062
|
+
/** Multi-signal search (exact + trigram + keyword + semantic vector) via kernel resolve. */
|
|
1063
|
+
declare function useResolve(params: ResolveParams | null | undefined): _tanstack_react_query.UseQueryResult<ResolveResponse, Error>;
|
|
1022
1064
|
/** Fetch items by type with structured filters. */
|
|
1023
1065
|
declare function useItems(filter: ItemsFilter | null | undefined): _tanstack_react_query.UseQueryResult<VFSItem[], Error>;
|
|
1024
1066
|
/** Infinite-scroll item fetching by type. */
|
|
@@ -1833,4 +1875,4 @@ declare function uploadFile(file: File | Blob, options: UploadOptions, onProgres
|
|
|
1833
1875
|
*/
|
|
1834
1876
|
declare function useFileUpload(): UseFileUploadReturn;
|
|
1835
1877
|
|
|
1836
|
-
export { type AccountInfo, type Channel, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FileRef, type GatewayParams, type GatewayResponse, type InfiniteChannelMessagesOptions, type ItemVersionsOptions, type ItemVersionsResult, type ItemsFilter, KernelProvider, type LinkParams, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PrincipalData, type SessionEntry, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UploadItem, type UploadOptions, type UploadResult, type UseFileUploadReturn, type VFSEdge, type VFSItem, auth, awaitScopeReady, callTool, clearCachedToken, clearSession, createItem, disconnectSSE, disposeVfsRealtimeWs, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAssetUrl, getDefaultSort, getRequiredFormFields, getScope, getScopeVersion, getSessionEntry, initSession, initVfsRealtimeWs, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isScopeReady, listChildren, mount, mountRealtimeScope, normalizeItem, ping, pushChanges, queryClient, readItem, registerCleanup, resetAllSdkState, resolvePrincipalId, setCachedToken, setScope, setupRequireShim, signal, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAllChannels, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePrincipal, useRealtimeQuery, useRecentActivity, useScope, useScopeReady, useSearch, useTheme, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, vfsKeys };
|
|
1878
|
+
export { type AccountInfo, type Channel, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FileRef, type GatewayParams, type GatewayResponse, type InfiniteChannelMessagesOptions, type ItemVersionsOptions, type ItemVersionsResult, type ItemsFilter, KernelProvider, type LinkParams, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PrincipalData, type ResolveParams, type ResolveResponse, type ResolveResultItem, type SessionEntry, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UploadItem, type UploadOptions, type UploadResult, type UseFileUploadReturn, type VFSEdge, type VFSItem, auth, awaitScopeReady, callTool, clearCachedToken, clearSession, createItem, disconnectSSE, disposeVfsRealtimeWs, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAssetUrl, getDefaultSort, getRequiredFormFields, getScope, getScopeVersion, getSessionEntry, initSession, initVfsRealtimeWs, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isScopeReady, listChildren, mount, mountRealtimeScope, normalizeItem, ping, pushChanges, queryClient, readItem, registerCleanup, resetAllSdkState, resolvePrincipalId, setCachedToken, setScope, setupRequireShim, signal, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAllChannels, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePrincipal, useRealtimeQuery, useRecentActivity, useResolve, useScope, useScopeReady, useSearch, useTheme, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, vfsKeys };
|
package/dist/index.js
CHANGED
|
@@ -119,6 +119,7 @@ __export(src_exports, {
|
|
|
119
119
|
usePrincipal: () => usePrincipal,
|
|
120
120
|
useRealtimeQuery: () => useRealtimeQuery,
|
|
121
121
|
useRecentActivity: () => useRecentActivity,
|
|
122
|
+
useResolve: () => useResolve,
|
|
122
123
|
useScope: () => useScope,
|
|
123
124
|
useScopeReady: () => useScopeReady,
|
|
124
125
|
useSearch: () => useSearch,
|
|
@@ -438,7 +439,7 @@ var vfsKeys = {
|
|
|
438
439
|
/** Fractal instances (scope-independent). */
|
|
439
440
|
fractalInstances: () => ["vfs", "fractal-instances"],
|
|
440
441
|
/** Recent activity (scope-aware). */
|
|
441
|
-
recentActivity: (a, b, c) => ["vfs", sk(), "
|
|
442
|
+
recentActivity: (a, b, c) => ["vfs", sk(), "get-activity-feed", a, b, c],
|
|
442
443
|
/** Item versions (scope-independent — by item UUID). */
|
|
443
444
|
itemVersions: (a, b, c, d) => ["vfs", "item-versions", a, b, c, d],
|
|
444
445
|
/** @deprecated Use itemVersions instead. */
|
|
@@ -495,7 +496,9 @@ function normalizeItem(raw) {
|
|
|
495
496
|
parent_instance_id: raw.parent_instance_id,
|
|
496
497
|
owner_principal_id: raw.owner_principal_id,
|
|
497
498
|
created_by_principal_id: raw.created_by_principal_id,
|
|
498
|
-
parent_id: raw.parent_id
|
|
499
|
+
parent_id: raw.parent_id,
|
|
500
|
+
space_item_id: raw.space_item_id,
|
|
501
|
+
account_item_id: raw.account_item_id
|
|
499
502
|
};
|
|
500
503
|
}
|
|
501
504
|
function extractItems(response) {
|
|
@@ -658,7 +661,7 @@ async function fetchVfsTree(path, maxDepth = 1, itemTypes, limit) {
|
|
|
658
661
|
}
|
|
659
662
|
async function fetchRecentActivity(scopePath, limit = 50, offset = 0) {
|
|
660
663
|
try {
|
|
661
|
-
const response = await gatewayCall("
|
|
664
|
+
const response = await gatewayCall("get-activity-feed", {
|
|
662
665
|
scope_path: scopePath,
|
|
663
666
|
limit,
|
|
664
667
|
offset
|
|
@@ -751,7 +754,7 @@ async function fetchItems(filter) {
|
|
|
751
754
|
params.limit = filter.limit;
|
|
752
755
|
}
|
|
753
756
|
try {
|
|
754
|
-
const response = await gatewayCall("
|
|
757
|
+
const response = await gatewayCall("query", params);
|
|
755
758
|
const items = extractItems(response);
|
|
756
759
|
for (const item of items) {
|
|
757
760
|
queryClient.setQueryData(vfsKeys.item(item.path), item);
|
|
@@ -1453,6 +1456,18 @@ function useSearch(query, itemTypes) {
|
|
|
1453
1456
|
enabled: !!query && query.length > 0
|
|
1454
1457
|
});
|
|
1455
1458
|
}
|
|
1459
|
+
function useResolve(params) {
|
|
1460
|
+
useScopeKey();
|
|
1461
|
+
const stableParams = useMemo(() => params, [JSON.stringify(params)]);
|
|
1462
|
+
return useQuery({
|
|
1463
|
+
queryKey: ["vfs", getScope() ?? "__unscoped__", "resolve", JSON.stringify(stableParams ?? {})],
|
|
1464
|
+
queryFn: async () => {
|
|
1465
|
+
const response = await gatewayCall("resolve", stableParams);
|
|
1466
|
+
return response;
|
|
1467
|
+
},
|
|
1468
|
+
enabled: !!stableParams?.query && stableParams.query.length > 0
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1456
1471
|
function useItems(filter) {
|
|
1457
1472
|
useScopeKey();
|
|
1458
1473
|
const stableFilter = useMemo(() => filter, [JSON.stringify(filter)]);
|
|
@@ -3100,6 +3115,6 @@ function useFileUpload() {
|
|
|
3100
3115
|
// src/index.ts
|
|
3101
3116
|
__registerSdkExports(src_exports);
|
|
3102
3117
|
|
|
3103
|
-
export { ComponentRenderer, EnforcementDeniedError, KernelProvider, auth, awaitScopeReady, callTool, clearCachedToken, clearSession, createItem, disconnectSSE, disposeVfsRealtimeWs, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAssetUrl, getDefaultSort, getRequiredFormFields, getScope, getScopeVersion, getSessionEntry, initSession, initVfsRealtimeWs, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isScopeReady, listChildren, mount, mountRealtimeScope, normalizeItem, ping, pushChanges, queryClient, readItem, registerCleanup, resetAllSdkState, resolvePrincipalId, setCachedToken, setScope, setupRequireShim, signal, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAllChannels, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePrincipal, useRealtimeQuery, useRecentActivity, useScope, useScopeReady, useSearch, useTheme, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, vfsKeys };
|
|
3118
|
+
export { ComponentRenderer, EnforcementDeniedError, KernelProvider, auth, awaitScopeReady, callTool, clearCachedToken, clearSession, createItem, disconnectSSE, disposeVfsRealtimeWs, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAssetUrl, getDefaultSort, getRequiredFormFields, getScope, getScopeVersion, getSessionEntry, initSession, initVfsRealtimeWs, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isScopeReady, listChildren, mount, mountRealtimeScope, normalizeItem, ping, pushChanges, queryClient, readItem, registerCleanup, resetAllSdkState, resolvePrincipalId, setCachedToken, setScope, setupRequireShim, signal, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAllChannels, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePrincipal, useRealtimeQuery, useRecentActivity, useResolve, useScope, useScopeReady, useSearch, useTheme, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, vfsKeys };
|
|
3104
3119
|
//# sourceMappingURL=index.js.map
|
|
3105
3120
|
//# sourceMappingURL=index.js.map
|