@ai4b-team/fsaos-gateway-sdk 5.6.2 → 5.7.1
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/README.md +64 -0
- package/dist/iife/gateway.js +5 -5
- package/dist/iife/gateway.js.map +4 -4
- package/dist/iife/ui.js +1 -1
- package/dist/index.cjs +234 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -15
- package/dist/index.d.ts +75 -15
- package/dist/index.js +233 -59
- package/dist/index.js.map +1 -1
- package/dist/ui.d.cts +1 -1
- package/dist/ui.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -867,6 +867,53 @@ declare class FormSubmissionError extends Error {
|
|
|
867
867
|
*/
|
|
868
868
|
declare function submitForm(capabilityId: string, fields: Record<string, unknown>, options?: SubmitFormOptions): Promise<FormSubmissionReceipt>;
|
|
869
869
|
|
|
870
|
+
interface PurchaseJourneyRequest {
|
|
871
|
+
page_url: string;
|
|
872
|
+
capability_id: string;
|
|
873
|
+
}
|
|
874
|
+
interface FilePurchaseReceipt {
|
|
875
|
+
success: true;
|
|
876
|
+
license_id: string;
|
|
877
|
+
state: string;
|
|
878
|
+
item_id?: string | null;
|
|
879
|
+
file_id?: string | null;
|
|
880
|
+
checkout_url?: string | null;
|
|
881
|
+
journey?: {
|
|
882
|
+
funnel_id: string;
|
|
883
|
+
step_id: string;
|
|
884
|
+
page_id: string;
|
|
885
|
+
capability_id: string;
|
|
886
|
+
release_id: string;
|
|
887
|
+
return_url: string;
|
|
888
|
+
next_url?: string | null;
|
|
889
|
+
} | null;
|
|
890
|
+
}
|
|
891
|
+
/** A RevDev page can use its own signed-in SDK session and the same commerce
|
|
892
|
+
* door as the host UI. Price, seller connection, access and next step are all
|
|
893
|
+
* resolved by the server. Reuse requestKey after an uncertain response. */
|
|
894
|
+
declare function startFileCheckout(options: {
|
|
895
|
+
productId: string;
|
|
896
|
+
productRevisionId: string;
|
|
897
|
+
destinationId: string;
|
|
898
|
+
requestKey: string;
|
|
899
|
+
scopePath: string;
|
|
900
|
+
journey?: PurchaseJourneyRequest;
|
|
901
|
+
}): Promise<FilePurchaseReceipt>;
|
|
902
|
+
/** Read once, or on the existing SDK vfs_change event for this license. No
|
|
903
|
+
* timer or new subscription transport is created by the commerce API. */
|
|
904
|
+
declare function getFilePurchase(licenseId: string, scopePath: string): Promise<FilePurchaseReceipt>;
|
|
905
|
+
/** Public pages may send buyers to the host app for sign-in, destination
|
|
906
|
+
* selection and checkout. This URL cannot set a price or next destination. */
|
|
907
|
+
declare function funnelCheckoutLink(options: {
|
|
908
|
+
hostOrigin: string;
|
|
909
|
+
productId: string;
|
|
910
|
+
capabilityId: string;
|
|
911
|
+
pageUrl?: string;
|
|
912
|
+
}): string;
|
|
913
|
+
/** Use only on the authenticated kernel receipt, never on URL parameters or
|
|
914
|
+
* a browser-reported payment event. The next URL shares the saved funnel origin. */
|
|
915
|
+
declare function filePurchaseNextUrl(receipt: FilePurchaseReceipt): string | null;
|
|
916
|
+
|
|
870
917
|
interface SourceIdentityStorage {
|
|
871
918
|
storage: 'local' | 'session' | 'memory';
|
|
872
919
|
key: string;
|
|
@@ -1663,6 +1710,32 @@ type TranscriptPage = ChannelMessagesPage & {
|
|
|
1663
1710
|
olderBefore?: number;
|
|
1664
1711
|
};
|
|
1665
1712
|
|
|
1713
|
+
/** Native item actions supported by the existing check-item-access method. */
|
|
1714
|
+
type PermissionAction = 'view' | 'edit' | 'delete' | 'admin';
|
|
1715
|
+
/**
|
|
1716
|
+
* Native item access for the seated identity. Pass an already-known item UUID
|
|
1717
|
+
* to avoid resolving its path. This does not predict approval, entitlement or
|
|
1718
|
+
* method-specific mutation checks; the actual operation remains authoritative.
|
|
1719
|
+
* Disabled, loading, refreshing and failed checks never expose cached grants.
|
|
1720
|
+
*/
|
|
1721
|
+
declare function usePermissions(item?: string | null, requested?: string[]): {
|
|
1722
|
+
data: Record<string, boolean>;
|
|
1723
|
+
loading: boolean;
|
|
1724
|
+
error: Error | null;
|
|
1725
|
+
/** Explicit refresh for a user action; no automatic retry or polling. */
|
|
1726
|
+
refetch: () => Promise<void>;
|
|
1727
|
+
};
|
|
1728
|
+
/** Shares the same query as usePermissions for this identity/item/action. */
|
|
1729
|
+
declare function usePermission(action?: string, item?: string | null): {
|
|
1730
|
+
data: {
|
|
1731
|
+
allowed: boolean;
|
|
1732
|
+
};
|
|
1733
|
+
loading: boolean;
|
|
1734
|
+
error: Error | null;
|
|
1735
|
+
/** Explicit refresh for a user action; no automatic retry or polling. */
|
|
1736
|
+
refetch: () => Promise<void>;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1666
1739
|
/**
|
|
1667
1740
|
* Returns whether scope has been established. Useful for gating UI that
|
|
1668
1741
|
* depends on scope-aware data.
|
|
@@ -2417,20 +2490,7 @@ declare function useTheme(): {
|
|
|
2417
2490
|
loading: boolean;
|
|
2418
2491
|
error: null;
|
|
2419
2492
|
};
|
|
2420
|
-
|
|
2421
|
-
declare function usePermission(_action?: string, _path?: string): {
|
|
2422
|
-
data: {
|
|
2423
|
-
allowed: boolean;
|
|
2424
|
-
};
|
|
2425
|
-
loading: boolean;
|
|
2426
|
-
error: null;
|
|
2427
|
-
};
|
|
2428
|
-
/** Check multiple permissions at once. */
|
|
2429
|
-
declare function usePermissions(_path?: string, actions?: string[]): {
|
|
2430
|
-
data: Record<string, boolean>;
|
|
2431
|
-
loading: boolean;
|
|
2432
|
-
error: null;
|
|
2433
|
-
};
|
|
2493
|
+
|
|
2434
2494
|
interface PrincipalData {
|
|
2435
2495
|
id: string;
|
|
2436
2496
|
principalId: string | null;
|
|
@@ -4153,4 +4213,4 @@ declare function usePersonalSections(contextId: string | null, collection: Secti
|
|
|
4153
4213
|
contextKey: string;
|
|
4154
4214
|
};
|
|
4155
4215
|
|
|
4156
|
-
export { type AcceptInviteParams, type AcceptInviteResult, type AccountInfo, type AnswerInputParams, type ArtifactDeltaEvent, type ArtifactDoneEvent, type ArtifactEvent, type ArtifactOpenedEvent, type ArtifactState, type ArtifactStatus, type ArtifactStreamState, type ArtifactSurfaceType, CHANNEL_AI_MODES, type CancelQueuedTurnOptions, type CancelQueuedTurnResponse, type CancelQueuedTurnState, type CancelTurnOptions, type CancelTurnResponse, type CancelTurnState, type Channel, type ChannelAiMode, type ChannelCard, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelMessagesResponse, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type ConnectionState, type CreateAgentParams, type CreateAgentResult, type CreateInvitationParams, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FileRef, FormSubmissionError, type FormSubmissionReceipt, type FsaosRuntime, type GatewayParams, GatewayRequestError, type GatewayRequestOptions, type GatewayResponse, HostSessionUnavailableError, type HostSessionWelcome, type IncrementalItemsOptions, type InfiniteChannelMessagesOptions, type InfiniteItemsOptions, type InitializeFsaosOptions, type InteractionReceipt, InteractionTrackingError, type InvitationChangeReceipt, type InvitationPage, type InvitationReceipt, type InvitationSummary, type InviteMemberParams, type InviteMemberResult, type ItemVersionsOptions, type ItemVersionsResult, type ItemsDiscovery, type ItemsFilter, type ItemsFilterGroup, KernelProvider, type LinkParams, type LoadMountsOptions, type MemberRole, type MessageRepliesCursor, type MessageRepliesOptions, type MessageRepliesPage, type MessageReplyContext, type MintedAsset, type MintedAssetState, type MountRef, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PathSubscriptionState, type PersonalItemOrderKey, type PersonalSection, type PinTarget, type PinnedItem, type PrincipalData, type PublicSourceConfig, type PublishedBundle, type PublishedComponentSource, type PublishedComponentStatus, type ReadPriority, type ReadTiming, type ResolveItemsResponse, type ResolveParams, type ResolveResponse, type ResolveResultItem, type ResolvedItem, type SeatMemberParams, type SectionChange, type SectionCollection, type SectionDestination, type SectionSnapshot, type SectionTarget, type SendMessageParams, type SendMessageResult, type ServeHostSessionOptions, type SessionEntry, type SourceCaptureAdapter, type SourceIdentityStorage, type StartTrackingOptions, type SteerTurnOptions, type SteerTurnResponse, type SteerTurnState, type SubmitFormOptions, type SwitcherAccount, type TimelineEvent, type TimelineHistoryEvent, type TimelineHistoryOptions, type TrackEventOptions, type TurnQueueEntry, type TurnQueueEntryState, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UpdatePrincipalParams, type UploadItem, type UploadOptions, type UploadResult, type UseArtifactStreamReturn, type UseFileUploadReturn, type UseTimelineHistoryReturn, type VFSEdge, type VFSItem, type VfsItemChange, type WorkCorrelation, type WorkspaceOptions, type WorkspaceSession, acceptInvitation, acceptInvite, answerInput, assignPersonalSection, auth, awaitAnchorReady, awaitScopeReady, callTool, cancelInvitation, cancelQueuedTurn, cancelTurn, clearCachedToken, clearSession, configureGatewayReads, connectHostSession, createAgent, createInvitation, createItem, disconnectSSE, disposeVfsRealtimeWs, electHomeAnchor, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchChannelMessagesWithCards, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchMessageReplies, fetchMessageReplyContexts, fetchOpenEnvelope, fetchRecentActivity, fetchResolvedItems, fetchTimelineHistory, fetchTurnQueueEntries, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAnchor, getAnchorRef, getAnchorVersion, getAssetUrl, getDefaultSort, getHomeAnchor, getInvitation, getMountVersion, getMounts, getPathSubscriptionState, getQueryClient, getRequiredFormFields, getScope, getScopeVersion, getServerClockOffsetMs, getServerClockSyncedAt, getSessionEntry, hasServerClock, initSession, initVfsRealtimeWs, initializeFsaos, initializeWorkspace, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, inviteMember, isAnchorReady, isChannelPath, isListableItemsFilter, isScopeReady, itemsFilterFromQueryFilter, listChildren, listInvitations, loadMounts, loadPublishedBundle, mount, mountRealtimeScope, normalizeItem, onConnectionStateChange, pathSubscriptionMatches, personalSectionsKey, ping, pushChanges, queryClient, readItem, refreshQuery, registerCleanup, rejectInvitation, replaceMounts, resendInvitation, resetAllSdkState, resolvePrincipalId, resubscribePath, seatMember, selectMount, sendMessage, serveHostSession, serverDeadlinePassed, serverMsUntil, serverNow, setAnchor, setCachedToken, setQueryClient, setScope, setupRequireShim, signal, startTracking, steerTurn, submitForm, subscribeAnchor, subscribeArtifactStream, subscribeMounts, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, trackAction, trackEvent, trackPageView, unmountRealtimeScope, updateItem, uploadFile, useAcceptInvite, useAccounts, useAgentTimeline, useAllChannels, useAnswerInput, useArrangement, useArtifactStream, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useCreateAgent, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useIncrementalItems, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useInviteMember, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMessageReplies, useMintedAsset, useMounts, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePersonalItemOrder, usePersonalSections, usePinnedItems, usePrincipal, usePublishedComponent, useRealtimeQuery, useRecentActivity, useResolve, useResolvedItems, useScope, useScopeReady, useSearch, useSeatMember, useTheme, useTimelineHistory, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, useUpdatePrincipal, vfsKeys, waitForPathReady };
|
|
4216
|
+
export { type AcceptInviteParams, type AcceptInviteResult, type AccountInfo, type AnswerInputParams, type ArtifactDeltaEvent, type ArtifactDoneEvent, type ArtifactEvent, type ArtifactOpenedEvent, type ArtifactState, type ArtifactStatus, type ArtifactStreamState, type ArtifactSurfaceType, CHANNEL_AI_MODES, type CancelQueuedTurnOptions, type CancelQueuedTurnResponse, type CancelQueuedTurnState, type CancelTurnOptions, type CancelTurnResponse, type CancelTurnState, type Channel, type ChannelAiMode, type ChannelCard, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelMessagesResponse, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type ConnectionState, type CreateAgentParams, type CreateAgentResult, type CreateInvitationParams, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FilePurchaseReceipt, type FileRef, FormSubmissionError, type FormSubmissionReceipt, type FsaosRuntime, type GatewayParams, GatewayRequestError, type GatewayRequestOptions, type GatewayResponse, HostSessionUnavailableError, type HostSessionWelcome, type IncrementalItemsOptions, type InfiniteChannelMessagesOptions, type InfiniteItemsOptions, type InitializeFsaosOptions, type InteractionReceipt, InteractionTrackingError, type InvitationChangeReceipt, type InvitationPage, type InvitationReceipt, type InvitationSummary, type InviteMemberParams, type InviteMemberResult, type ItemVersionsOptions, type ItemVersionsResult, type ItemsDiscovery, type ItemsFilter, type ItemsFilterGroup, KernelProvider, type LinkParams, type LoadMountsOptions, type MemberRole, type MessageRepliesCursor, type MessageRepliesOptions, type MessageRepliesPage, type MessageReplyContext, type MintedAsset, type MintedAssetState, type MountRef, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PathSubscriptionState, type PermissionAction, type PersonalItemOrderKey, type PersonalSection, type PinTarget, type PinnedItem, type PrincipalData, type PublicSourceConfig, type PublishedBundle, type PublishedComponentSource, type PublishedComponentStatus, type PurchaseJourneyRequest, type ReadPriority, type ReadTiming, type ResolveItemsResponse, type ResolveParams, type ResolveResponse, type ResolveResultItem, type ResolvedItem, type SeatMemberParams, type SectionChange, type SectionCollection, type SectionDestination, type SectionSnapshot, type SectionTarget, type SendMessageParams, type SendMessageResult, type ServeHostSessionOptions, type SessionEntry, type SourceCaptureAdapter, type SourceIdentityStorage, type StartTrackingOptions, type SteerTurnOptions, type SteerTurnResponse, type SteerTurnState, type SubmitFormOptions, type SwitcherAccount, type TimelineEvent, type TimelineHistoryEvent, type TimelineHistoryOptions, type TrackEventOptions, type TurnQueueEntry, type TurnQueueEntryState, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UpdatePrincipalParams, type UploadItem, type UploadOptions, type UploadResult, type UseArtifactStreamReturn, type UseFileUploadReturn, type UseTimelineHistoryReturn, type VFSEdge, type VFSItem, type VfsItemChange, type WorkCorrelation, type WorkspaceOptions, type WorkspaceSession, acceptInvitation, acceptInvite, answerInput, assignPersonalSection, auth, awaitAnchorReady, awaitScopeReady, callTool, cancelInvitation, cancelQueuedTurn, cancelTurn, clearCachedToken, clearSession, configureGatewayReads, connectHostSession, createAgent, createInvitation, createItem, disconnectSSE, disposeVfsRealtimeWs, electHomeAnchor, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchChannelMessagesWithCards, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchMessageReplies, fetchMessageReplyContexts, fetchOpenEnvelope, fetchRecentActivity, fetchResolvedItems, fetchTimelineHistory, fetchTurnQueueEntries, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, filePurchaseNextUrl, funnelCheckoutLink, gatewayCall, getAccessToken, getAnchor, getAnchorRef, getAnchorVersion, getAssetUrl, getDefaultSort, getFilePurchase, getHomeAnchor, getInvitation, getMountVersion, getMounts, getPathSubscriptionState, getQueryClient, getRequiredFormFields, getScope, getScopeVersion, getServerClockOffsetMs, getServerClockSyncedAt, getSessionEntry, hasServerClock, initSession, initVfsRealtimeWs, initializeFsaos, initializeWorkspace, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, inviteMember, isAnchorReady, isChannelPath, isListableItemsFilter, isScopeReady, itemsFilterFromQueryFilter, listChildren, listInvitations, loadMounts, loadPublishedBundle, mount, mountRealtimeScope, normalizeItem, onConnectionStateChange, pathSubscriptionMatches, personalSectionsKey, ping, pushChanges, queryClient, readItem, refreshQuery, registerCleanup, rejectInvitation, replaceMounts, resendInvitation, resetAllSdkState, resolvePrincipalId, resubscribePath, seatMember, selectMount, sendMessage, serveHostSession, serverDeadlinePassed, serverMsUntil, serverNow, setAnchor, setCachedToken, setQueryClient, setScope, setupRequireShim, signal, startFileCheckout, startTracking, steerTurn, submitForm, subscribeAnchor, subscribeArtifactStream, subscribeMounts, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, trackAction, trackEvent, trackPageView, unmountRealtimeScope, updateItem, uploadFile, useAcceptInvite, useAccounts, useAgentTimeline, useAllChannels, useAnswerInput, useArrangement, useArtifactStream, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useCreateAgent, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useIncrementalItems, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useInviteMember, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMessageReplies, useMintedAsset, useMounts, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePersonalItemOrder, usePersonalSections, usePinnedItems, usePrincipal, usePublishedComponent, useRealtimeQuery, useRecentActivity, useResolve, useResolvedItems, useScope, useScopeReady, useSearch, useSeatMember, useTheme, useTimelineHistory, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, useUpdatePrincipal, vfsKeys, waitForPathReady };
|
package/dist/index.d.ts
CHANGED
|
@@ -867,6 +867,53 @@ declare class FormSubmissionError extends Error {
|
|
|
867
867
|
*/
|
|
868
868
|
declare function submitForm(capabilityId: string, fields: Record<string, unknown>, options?: SubmitFormOptions): Promise<FormSubmissionReceipt>;
|
|
869
869
|
|
|
870
|
+
interface PurchaseJourneyRequest {
|
|
871
|
+
page_url: string;
|
|
872
|
+
capability_id: string;
|
|
873
|
+
}
|
|
874
|
+
interface FilePurchaseReceipt {
|
|
875
|
+
success: true;
|
|
876
|
+
license_id: string;
|
|
877
|
+
state: string;
|
|
878
|
+
item_id?: string | null;
|
|
879
|
+
file_id?: string | null;
|
|
880
|
+
checkout_url?: string | null;
|
|
881
|
+
journey?: {
|
|
882
|
+
funnel_id: string;
|
|
883
|
+
step_id: string;
|
|
884
|
+
page_id: string;
|
|
885
|
+
capability_id: string;
|
|
886
|
+
release_id: string;
|
|
887
|
+
return_url: string;
|
|
888
|
+
next_url?: string | null;
|
|
889
|
+
} | null;
|
|
890
|
+
}
|
|
891
|
+
/** A RevDev page can use its own signed-in SDK session and the same commerce
|
|
892
|
+
* door as the host UI. Price, seller connection, access and next step are all
|
|
893
|
+
* resolved by the server. Reuse requestKey after an uncertain response. */
|
|
894
|
+
declare function startFileCheckout(options: {
|
|
895
|
+
productId: string;
|
|
896
|
+
productRevisionId: string;
|
|
897
|
+
destinationId: string;
|
|
898
|
+
requestKey: string;
|
|
899
|
+
scopePath: string;
|
|
900
|
+
journey?: PurchaseJourneyRequest;
|
|
901
|
+
}): Promise<FilePurchaseReceipt>;
|
|
902
|
+
/** Read once, or on the existing SDK vfs_change event for this license. No
|
|
903
|
+
* timer or new subscription transport is created by the commerce API. */
|
|
904
|
+
declare function getFilePurchase(licenseId: string, scopePath: string): Promise<FilePurchaseReceipt>;
|
|
905
|
+
/** Public pages may send buyers to the host app for sign-in, destination
|
|
906
|
+
* selection and checkout. This URL cannot set a price or next destination. */
|
|
907
|
+
declare function funnelCheckoutLink(options: {
|
|
908
|
+
hostOrigin: string;
|
|
909
|
+
productId: string;
|
|
910
|
+
capabilityId: string;
|
|
911
|
+
pageUrl?: string;
|
|
912
|
+
}): string;
|
|
913
|
+
/** Use only on the authenticated kernel receipt, never on URL parameters or
|
|
914
|
+
* a browser-reported payment event. The next URL shares the saved funnel origin. */
|
|
915
|
+
declare function filePurchaseNextUrl(receipt: FilePurchaseReceipt): string | null;
|
|
916
|
+
|
|
870
917
|
interface SourceIdentityStorage {
|
|
871
918
|
storage: 'local' | 'session' | 'memory';
|
|
872
919
|
key: string;
|
|
@@ -1663,6 +1710,32 @@ type TranscriptPage = ChannelMessagesPage & {
|
|
|
1663
1710
|
olderBefore?: number;
|
|
1664
1711
|
};
|
|
1665
1712
|
|
|
1713
|
+
/** Native item actions supported by the existing check-item-access method. */
|
|
1714
|
+
type PermissionAction = 'view' | 'edit' | 'delete' | 'admin';
|
|
1715
|
+
/**
|
|
1716
|
+
* Native item access for the seated identity. Pass an already-known item UUID
|
|
1717
|
+
* to avoid resolving its path. This does not predict approval, entitlement or
|
|
1718
|
+
* method-specific mutation checks; the actual operation remains authoritative.
|
|
1719
|
+
* Disabled, loading, refreshing and failed checks never expose cached grants.
|
|
1720
|
+
*/
|
|
1721
|
+
declare function usePermissions(item?: string | null, requested?: string[]): {
|
|
1722
|
+
data: Record<string, boolean>;
|
|
1723
|
+
loading: boolean;
|
|
1724
|
+
error: Error | null;
|
|
1725
|
+
/** Explicit refresh for a user action; no automatic retry or polling. */
|
|
1726
|
+
refetch: () => Promise<void>;
|
|
1727
|
+
};
|
|
1728
|
+
/** Shares the same query as usePermissions for this identity/item/action. */
|
|
1729
|
+
declare function usePermission(action?: string, item?: string | null): {
|
|
1730
|
+
data: {
|
|
1731
|
+
allowed: boolean;
|
|
1732
|
+
};
|
|
1733
|
+
loading: boolean;
|
|
1734
|
+
error: Error | null;
|
|
1735
|
+
/** Explicit refresh for a user action; no automatic retry or polling. */
|
|
1736
|
+
refetch: () => Promise<void>;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1666
1739
|
/**
|
|
1667
1740
|
* Returns whether scope has been established. Useful for gating UI that
|
|
1668
1741
|
* depends on scope-aware data.
|
|
@@ -2417,20 +2490,7 @@ declare function useTheme(): {
|
|
|
2417
2490
|
loading: boolean;
|
|
2418
2491
|
error: null;
|
|
2419
2492
|
};
|
|
2420
|
-
|
|
2421
|
-
declare function usePermission(_action?: string, _path?: string): {
|
|
2422
|
-
data: {
|
|
2423
|
-
allowed: boolean;
|
|
2424
|
-
};
|
|
2425
|
-
loading: boolean;
|
|
2426
|
-
error: null;
|
|
2427
|
-
};
|
|
2428
|
-
/** Check multiple permissions at once. */
|
|
2429
|
-
declare function usePermissions(_path?: string, actions?: string[]): {
|
|
2430
|
-
data: Record<string, boolean>;
|
|
2431
|
-
loading: boolean;
|
|
2432
|
-
error: null;
|
|
2433
|
-
};
|
|
2493
|
+
|
|
2434
2494
|
interface PrincipalData {
|
|
2435
2495
|
id: string;
|
|
2436
2496
|
principalId: string | null;
|
|
@@ -4153,4 +4213,4 @@ declare function usePersonalSections(contextId: string | null, collection: Secti
|
|
|
4153
4213
|
contextKey: string;
|
|
4154
4214
|
};
|
|
4155
4215
|
|
|
4156
|
-
export { type AcceptInviteParams, type AcceptInviteResult, type AccountInfo, type AnswerInputParams, type ArtifactDeltaEvent, type ArtifactDoneEvent, type ArtifactEvent, type ArtifactOpenedEvent, type ArtifactState, type ArtifactStatus, type ArtifactStreamState, type ArtifactSurfaceType, CHANNEL_AI_MODES, type CancelQueuedTurnOptions, type CancelQueuedTurnResponse, type CancelQueuedTurnState, type CancelTurnOptions, type CancelTurnResponse, type CancelTurnState, type Channel, type ChannelAiMode, type ChannelCard, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelMessagesResponse, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type ConnectionState, type CreateAgentParams, type CreateAgentResult, type CreateInvitationParams, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FileRef, FormSubmissionError, type FormSubmissionReceipt, type FsaosRuntime, type GatewayParams, GatewayRequestError, type GatewayRequestOptions, type GatewayResponse, HostSessionUnavailableError, type HostSessionWelcome, type IncrementalItemsOptions, type InfiniteChannelMessagesOptions, type InfiniteItemsOptions, type InitializeFsaosOptions, type InteractionReceipt, InteractionTrackingError, type InvitationChangeReceipt, type InvitationPage, type InvitationReceipt, type InvitationSummary, type InviteMemberParams, type InviteMemberResult, type ItemVersionsOptions, type ItemVersionsResult, type ItemsDiscovery, type ItemsFilter, type ItemsFilterGroup, KernelProvider, type LinkParams, type LoadMountsOptions, type MemberRole, type MessageRepliesCursor, type MessageRepliesOptions, type MessageRepliesPage, type MessageReplyContext, type MintedAsset, type MintedAssetState, type MountRef, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PathSubscriptionState, type PersonalItemOrderKey, type PersonalSection, type PinTarget, type PinnedItem, type PrincipalData, type PublicSourceConfig, type PublishedBundle, type PublishedComponentSource, type PublishedComponentStatus, type ReadPriority, type ReadTiming, type ResolveItemsResponse, type ResolveParams, type ResolveResponse, type ResolveResultItem, type ResolvedItem, type SeatMemberParams, type SectionChange, type SectionCollection, type SectionDestination, type SectionSnapshot, type SectionTarget, type SendMessageParams, type SendMessageResult, type ServeHostSessionOptions, type SessionEntry, type SourceCaptureAdapter, type SourceIdentityStorage, type StartTrackingOptions, type SteerTurnOptions, type SteerTurnResponse, type SteerTurnState, type SubmitFormOptions, type SwitcherAccount, type TimelineEvent, type TimelineHistoryEvent, type TimelineHistoryOptions, type TrackEventOptions, type TurnQueueEntry, type TurnQueueEntryState, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UpdatePrincipalParams, type UploadItem, type UploadOptions, type UploadResult, type UseArtifactStreamReturn, type UseFileUploadReturn, type UseTimelineHistoryReturn, type VFSEdge, type VFSItem, type VfsItemChange, type WorkCorrelation, type WorkspaceOptions, type WorkspaceSession, acceptInvitation, acceptInvite, answerInput, assignPersonalSection, auth, awaitAnchorReady, awaitScopeReady, callTool, cancelInvitation, cancelQueuedTurn, cancelTurn, clearCachedToken, clearSession, configureGatewayReads, connectHostSession, createAgent, createInvitation, createItem, disconnectSSE, disposeVfsRealtimeWs, electHomeAnchor, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchChannelMessagesWithCards, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchMessageReplies, fetchMessageReplyContexts, fetchOpenEnvelope, fetchRecentActivity, fetchResolvedItems, fetchTimelineHistory, fetchTurnQueueEntries, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAnchor, getAnchorRef, getAnchorVersion, getAssetUrl, getDefaultSort, getHomeAnchor, getInvitation, getMountVersion, getMounts, getPathSubscriptionState, getQueryClient, getRequiredFormFields, getScope, getScopeVersion, getServerClockOffsetMs, getServerClockSyncedAt, getSessionEntry, hasServerClock, initSession, initVfsRealtimeWs, initializeFsaos, initializeWorkspace, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, inviteMember, isAnchorReady, isChannelPath, isListableItemsFilter, isScopeReady, itemsFilterFromQueryFilter, listChildren, listInvitations, loadMounts, loadPublishedBundle, mount, mountRealtimeScope, normalizeItem, onConnectionStateChange, pathSubscriptionMatches, personalSectionsKey, ping, pushChanges, queryClient, readItem, refreshQuery, registerCleanup, rejectInvitation, replaceMounts, resendInvitation, resetAllSdkState, resolvePrincipalId, resubscribePath, seatMember, selectMount, sendMessage, serveHostSession, serverDeadlinePassed, serverMsUntil, serverNow, setAnchor, setCachedToken, setQueryClient, setScope, setupRequireShim, signal, startTracking, steerTurn, submitForm, subscribeAnchor, subscribeArtifactStream, subscribeMounts, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, trackAction, trackEvent, trackPageView, unmountRealtimeScope, updateItem, uploadFile, useAcceptInvite, useAccounts, useAgentTimeline, useAllChannels, useAnswerInput, useArrangement, useArtifactStream, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useCreateAgent, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useIncrementalItems, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useInviteMember, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMessageReplies, useMintedAsset, useMounts, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePersonalItemOrder, usePersonalSections, usePinnedItems, usePrincipal, usePublishedComponent, useRealtimeQuery, useRecentActivity, useResolve, useResolvedItems, useScope, useScopeReady, useSearch, useSeatMember, useTheme, useTimelineHistory, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, useUpdatePrincipal, vfsKeys, waitForPathReady };
|
|
4216
|
+
export { type AcceptInviteParams, type AcceptInviteResult, type AccountInfo, type AnswerInputParams, type ArtifactDeltaEvent, type ArtifactDoneEvent, type ArtifactEvent, type ArtifactOpenedEvent, type ArtifactState, type ArtifactStatus, type ArtifactStreamState, type ArtifactSurfaceType, CHANNEL_AI_MODES, type CancelQueuedTurnOptions, type CancelQueuedTurnResponse, type CancelQueuedTurnState, type CancelTurnOptions, type CancelTurnResponse, type CancelTurnState, type Channel, type ChannelAiMode, type ChannelCard, type ChannelMessage, type ChannelMessagesOptions, type ChannelMessagesPage, type ChannelMessagesResponse, type ChannelsOptions, type ComponentOpener, ComponentRenderer, type ConnectionState, type CreateAgentParams, type CreateAgentResult, type CreateInvitationParams, type CreateParams, type DeleteParams, EnforcementDeniedError, type EnforcementPayload, type FieldDescriptor, type FilePurchaseReceipt, type FileRef, FormSubmissionError, type FormSubmissionReceipt, type FsaosRuntime, type GatewayParams, GatewayRequestError, type GatewayRequestOptions, type GatewayResponse, HostSessionUnavailableError, type HostSessionWelcome, type IncrementalItemsOptions, type InfiniteChannelMessagesOptions, type InfiniteItemsOptions, type InitializeFsaosOptions, type InteractionReceipt, InteractionTrackingError, type InvitationChangeReceipt, type InvitationPage, type InvitationReceipt, type InvitationSummary, type InviteMemberParams, type InviteMemberResult, type ItemVersionsOptions, type ItemVersionsResult, type ItemsDiscovery, type ItemsFilter, type ItemsFilterGroup, KernelProvider, type LinkParams, type LoadMountsOptions, type MemberRole, type MessageRepliesCursor, type MessageRepliesOptions, type MessageRepliesPage, type MessageReplyContext, type MintedAsset, type MintedAssetState, type MountRef, type MoveParams, type Notification, type NotificationsOptions, type OpenEnvelope, type OpenOptions, type PathSubscriptionState, type PermissionAction, type PersonalItemOrderKey, type PersonalSection, type PinTarget, type PinnedItem, type PrincipalData, type PublicSourceConfig, type PublishedBundle, type PublishedComponentSource, type PublishedComponentStatus, type PurchaseJourneyRequest, type ReadPriority, type ReadTiming, type ResolveItemsResponse, type ResolveParams, type ResolveResponse, type ResolveResultItem, type ResolvedItem, type SeatMemberParams, type SectionChange, type SectionCollection, type SectionDestination, type SectionSnapshot, type SectionTarget, type SendMessageParams, type SendMessageResult, type ServeHostSessionOptions, type SessionEntry, type SourceCaptureAdapter, type SourceIdentityStorage, type StartTrackingOptions, type SteerTurnOptions, type SteerTurnResponse, type SteerTurnState, type SubmitFormOptions, type SwitcherAccount, type TimelineEvent, type TimelineHistoryEvent, type TimelineHistoryOptions, type TrackEventOptions, type TurnQueueEntry, type TurnQueueEntryState, type TypeDefinition, type TypeHelpers, type TypeSchema, type UnreadCountsOptions, type UpdateParams, type UpdatePrincipalParams, type UploadItem, type UploadOptions, type UploadResult, type UseArtifactStreamReturn, type UseFileUploadReturn, type UseTimelineHistoryReturn, type VFSEdge, type VFSItem, type VfsItemChange, type WorkCorrelation, type WorkspaceOptions, type WorkspaceSession, acceptInvitation, acceptInvite, answerInput, assignPersonalSection, auth, awaitAnchorReady, awaitScopeReady, callTool, cancelInvitation, cancelQueuedTurn, cancelTurn, clearCachedToken, clearSession, configureGatewayReads, connectHostSession, createAgent, createInvitation, createItem, disconnectSSE, disposeVfsRealtimeWs, electHomeAnchor, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchChannelMessagesWithCards, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchMessageReplies, fetchMessageReplyContexts, fetchOpenEnvelope, fetchRecentActivity, fetchResolvedItems, fetchTimelineHistory, fetchTurnQueueEntries, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, filePurchaseNextUrl, funnelCheckoutLink, gatewayCall, getAccessToken, getAnchor, getAnchorRef, getAnchorVersion, getAssetUrl, getDefaultSort, getFilePurchase, getHomeAnchor, getInvitation, getMountVersion, getMounts, getPathSubscriptionState, getQueryClient, getRequiredFormFields, getScope, getScopeVersion, getServerClockOffsetMs, getServerClockSyncedAt, getSessionEntry, hasServerClock, initSession, initVfsRealtimeWs, initializeFsaos, initializeWorkspace, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, inviteMember, isAnchorReady, isChannelPath, isListableItemsFilter, isScopeReady, itemsFilterFromQueryFilter, listChildren, listInvitations, loadMounts, loadPublishedBundle, mount, mountRealtimeScope, normalizeItem, onConnectionStateChange, pathSubscriptionMatches, personalSectionsKey, ping, pushChanges, queryClient, readItem, refreshQuery, registerCleanup, rejectInvitation, replaceMounts, resendInvitation, resetAllSdkState, resolvePrincipalId, resubscribePath, seatMember, selectMount, sendMessage, serveHostSession, serverDeadlinePassed, serverMsUntil, serverNow, setAnchor, setCachedToken, setQueryClient, setScope, setupRequireShim, signal, startFileCheckout, startTracking, steerTurn, submitForm, subscribeAnchor, subscribeArtifactStream, subscribeMounts, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, trackAction, trackEvent, trackPageView, unmountRealtimeScope, updateItem, uploadFile, useAcceptInvite, useAccounts, useAgentTimeline, useAllChannels, useAnswerInput, useArrangement, useArtifactStream, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useCreateAgent, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useIncrementalItems, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useInviteMember, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMessageReplies, useMintedAsset, useMounts, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePersonalItemOrder, usePersonalSections, usePinnedItems, usePrincipal, usePublishedComponent, useRealtimeQuery, useRecentActivity, useResolve, useResolvedItems, useScope, useScopeReady, useSearch, useSeatMember, useTheme, useTimelineHistory, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, useUpdatePrincipal, vfsKeys, waitForPathReady };
|