@ai4b-team/fsaos-gateway-sdk 4.1.0 → 4.2.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 +15 -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 +118 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +196 -7
- package/dist/index.d.ts +196 -7
- package/dist/index.js +109 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/iife/ui.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @fsaos/ui v2.0.0 — FSAOS UI Primitives — 2026-
|
|
1
|
+
/* @fsaos/ui v2.0.0 — FSAOS UI Primitives — 2026-11-04T20:43:58.926Z */
|
|
2
2
|
"use strict";var __FSAOS_UI__=(()=>{var m=Object.create;var r=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var y=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports),N=(e,i)=>{for(var a in i)r(e,a,{get:i[a],enumerable:!0})},s=(e,i,a,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of u(i))!h.call(e,t)&&t!==a&&r(e,t,{get:()=>i[t],enumerable:!(l=g(i,t))||l.enumerable});return e};var x=(e,i,a)=>(a=e!=null?m(f(e)):{},s(i||!e||!e.__esModule?r(a,"default",{value:e,enumerable:!0}):a,e)),b=e=>s(r({},"__esModule",{value:!0}),e);var d=y((V,c)=>{c.exports=React});var P={};N(P,{Badge:()=>z,Breadcrumbs:()=>A,Button:()=>D,Card:()=>w,DataView:()=>R,Detail:()=>_,Empty:()=>I,FilePreview:()=>O,Form:()=>F,Grid:()=>k,Image:()=>G,Link:()=>E,Page:()=>v,Router:()=>T,Sidebar:()=>S,Spinner:()=>B,Stack:()=>C,Table:()=>j,Tabs:()=>W,Video:()=>H});var n=x(d(),1);function o(){return(typeof window<"u"&&window.__FSAOS_CONFIG__||{}).edgeBaseUrl||""}function v(e){return(0,n.createElement)("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column"},className:e.className||""},e.children)}function C(e){let i=e.direction||"vertical";return(0,n.createElement)("div",{style:{display:"flex",flexDirection:i==="horizontal"?"row":"column",gap:e.gap||"0.5rem",padding:e.padding||"0",alignItems:e.align||"stretch",justifyContent:e.justify||"flex-start",flex:e.flex||"initial"},className:e.className||""},e.children)}function k(e){return(0,n.createElement)("div",{style:{display:"grid",gridTemplateColumns:"repeat("+(e.columns||3)+", 1fr)",gap:e.gap||"1rem",padding:e.padding||"0"},className:e.className||""},e.children)}function S(e){return(0,n.createElement)("div",{style:{display:"flex",flexDirection:"row",minHeight:"100vh"},className:e.className||""},e.children)}function w(e){return(0,n.createElement)("div",{style:{border:"1px solid var(--color-border, #e5e7eb)",borderRadius:"var(--border-radius, 0.5rem)",padding:e.padding||"1rem",background:"var(--color-surface, #fff)"},className:e.className||"",onClick:e.onClick},e.children)}function z(e){return(0,n.createElement)("span",{style:{display:"inline-flex",alignItems:"center",padding:"0.125rem 0.5rem",fontSize:"0.75rem",fontWeight:"500",borderRadius:"9999px",background:e.color||"#e5e7eb",color:e.textColor||"#374151"},className:e.className||""},e.children||e.label)}function B(e){let i=e.size||"1.5rem";return(0,n.createElement)("div",{style:{width:i,height:i,border:"2px solid #e5e7eb",borderTopColor:"var(--color-primary, #3b82f6)",borderRadius:"50%",animation:"fsaos-spin 0.6s linear infinite"}})}function D(e){return(0,n.createElement)("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:"500",borderRadius:"var(--border-radius, 0.375rem)",border:e.variant==="outline"?"1px solid var(--color-border, #d1d5db)":"none",background:e.variant==="outline"||e.variant==="ghost"?"transparent":"var(--color-primary, #3b82f6)",color:e.variant==="outline"||e.variant==="ghost"?"var(--color-text, #1a1a1a)":"#fff",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?"0.5":"1",gap:"0.5rem"},className:e.className||"",onClick:e.onClick,disabled:e.disabled},e.children||e.label)}function I(e){return(0,n.createElement)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"3rem",color:"var(--color-text-secondary, #6b7280)",textAlign:"center"}},e.icon?(0,n.createElement)("div",{style:{fontSize:"2rem",marginBottom:"0.5rem"}},e.icon):null,(0,n.createElement)("div",{style:{fontWeight:500,marginBottom:"0.25rem"}},e.title||e.message||e.children||"No items"),e.description?(0,n.createElement)("div",{style:{fontSize:"0.875rem",opacity:.7}},e.description):null)}function R(e){return(0,n.createElement)("div",{className:e.className||""},e.children)}function j(e){return(0,n.createElement)("table",{className:e.className||""},e.children)}function F(e){return(0,n.createElement)("form",{className:e.className||"",onSubmit:e.onSubmit},e.children)}function _(e){return(0,n.createElement)("div",{className:e.className||""},e.children)}function T(e){return(0,n.createElement)("div",null,e.children)}function E(e){return(0,n.createElement)("a",{href:e.href||e.to,className:e.className||"",onClick:e.onClick},e.children)}function W(e){return(0,n.createElement)("div",{className:e.className||""},e.children)}function A(e){return(0,n.createElement)("nav",{className:e.className||""},e.children)}function G(e){return(0,n.createElement)("img",{src:e.src||(e.path?o()+e.path:""),alt:e.alt||"",className:e.className||"",style:e.style})}function H(e){return(0,n.createElement)("video",{src:e.src||(e.path?o()+e.path:""),controls:!0,className:e.className||""})}function O(e){return(0,n.createElement)("div",{className:e.className||""},e.children||"File preview")}return b(P);})();
|
|
3
3
|
//# sourceMappingURL=ui.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -48,6 +48,8 @@ __export(src_exports, {
|
|
|
48
48
|
InteractionTrackingError: () => InteractionTrackingError,
|
|
49
49
|
KernelProvider: () => KernelProvider,
|
|
50
50
|
QueryClientProvider: () => reactQuery.QueryClientProvider,
|
|
51
|
+
acceptInvite: () => acceptInvite,
|
|
52
|
+
answerInput: () => answerInput,
|
|
51
53
|
assignPersonalSection: () => assignPersonalSection,
|
|
52
54
|
auth: () => auth,
|
|
53
55
|
awaitAnchorReady: () => awaitAnchorReady,
|
|
@@ -58,6 +60,7 @@ __export(src_exports, {
|
|
|
58
60
|
clearCachedToken: () => clearCachedToken,
|
|
59
61
|
clearSession: () => clearSession,
|
|
60
62
|
configureGatewayReads: () => configureGatewayReads,
|
|
63
|
+
createAgent: () => createAgent,
|
|
61
64
|
createItem: () => createItem,
|
|
62
65
|
disconnectSSE: () => disconnectSSE,
|
|
63
66
|
disposeVfsRealtimeWs: () => disposeVfsRealtimeWs,
|
|
@@ -114,6 +117,7 @@ __export(src_exports, {
|
|
|
114
117
|
invalidatePathAndParent: () => invalidatePathAndParent,
|
|
115
118
|
invalidateSubtree: () => invalidateSubtree,
|
|
116
119
|
invalidateTypes: () => invalidateTypes,
|
|
120
|
+
inviteMember: () => inviteMember,
|
|
117
121
|
isAnchorReady: () => isAnchorReady,
|
|
118
122
|
isChannelPath: () => isChannelPath,
|
|
119
123
|
isListableItemsFilter: () => isListableItemsFilter,
|
|
@@ -137,6 +141,7 @@ __export(src_exports, {
|
|
|
137
141
|
resetAllSdkState: () => resetAllSdkState,
|
|
138
142
|
resolvePrincipalId: () => resolvePrincipalId,
|
|
139
143
|
resubscribePath: () => resubscribePath,
|
|
144
|
+
seatMember: () => seatMember,
|
|
140
145
|
selectMount: () => selectMount,
|
|
141
146
|
serverDeadlinePassed: () => serverDeadlinePassed,
|
|
142
147
|
serverMsUntil: () => serverMsUntil,
|
|
@@ -163,9 +168,11 @@ __export(src_exports, {
|
|
|
163
168
|
unmountRealtimeScope: () => unmountRealtimeScope,
|
|
164
169
|
updateItem: () => updateItem,
|
|
165
170
|
uploadFile: () => uploadFile,
|
|
171
|
+
useAcceptInvite: () => useAcceptInvite,
|
|
166
172
|
useAccounts: () => useAccounts,
|
|
167
173
|
useAgentTimeline: () => useAgentTimeline,
|
|
168
174
|
useAllChannels: () => useAllChannels,
|
|
175
|
+
useAnswerInput: () => useAnswerInput,
|
|
169
176
|
useArrangement: () => useArrangement,
|
|
170
177
|
useArtifactStream: () => useArtifactStream,
|
|
171
178
|
useAsset: () => useAsset,
|
|
@@ -175,6 +182,7 @@ __export(src_exports, {
|
|
|
175
182
|
useChildren: () => useChildren,
|
|
176
183
|
useComponent: () => useComponent,
|
|
177
184
|
useCreate: () => useCreate,
|
|
185
|
+
useCreateAgent: () => useCreateAgent,
|
|
178
186
|
useDelete: () => useDelete,
|
|
179
187
|
useDmChannels: () => useDmChannels,
|
|
180
188
|
useEdges: () => useEdges,
|
|
@@ -184,6 +192,7 @@ __export(src_exports, {
|
|
|
184
192
|
useInfiniteChannelMessages: () => useInfiniteChannelMessages,
|
|
185
193
|
useInfiniteChildren: () => useInfiniteChildren,
|
|
186
194
|
useInfiniteItems: () => useInfiniteItems,
|
|
195
|
+
useInviteMember: () => useInviteMember,
|
|
187
196
|
useItem: () => useItem,
|
|
188
197
|
useItemById: () => useItemById,
|
|
189
198
|
useItemHistory: () => useItemHistory,
|
|
@@ -211,6 +220,7 @@ __export(src_exports, {
|
|
|
211
220
|
useScope: () => useScope,
|
|
212
221
|
useScopeReady: () => useScopeReady,
|
|
213
222
|
useSearch: () => useSearch,
|
|
223
|
+
useSeatMember: () => useSeatMember,
|
|
214
224
|
useTheme: () => useTheme,
|
|
215
225
|
useTimelineHistory: () => useTimelineHistory,
|
|
216
226
|
useTool: () => useTool,
|
|
@@ -2101,7 +2111,7 @@ async function fetchChannelMessages(channelPath, parentMessageId) {
|
|
|
2101
2111
|
`[gateway] Failed to fetch channel messages for ${channelPath}:`,
|
|
2102
2112
|
err
|
|
2103
2113
|
);
|
|
2104
|
-
|
|
2114
|
+
throw err;
|
|
2105
2115
|
}
|
|
2106
2116
|
}
|
|
2107
2117
|
async function fetchChannelMessagesWithCards(channelPath, parentMessageId) {
|
|
@@ -2136,18 +2146,22 @@ async function fetchChannelMessagesWithCards(channelPath, parentMessageId) {
|
|
|
2136
2146
|
`[gateway] Failed to fetch channel messages with cards for ${channelPath}:`,
|
|
2137
2147
|
err
|
|
2138
2148
|
);
|
|
2139
|
-
|
|
2149
|
+
throw err;
|
|
2140
2150
|
}
|
|
2141
2151
|
}
|
|
2142
2152
|
async function fetchChannelMessagesPage(channelPath, options) {
|
|
2143
2153
|
try {
|
|
2144
2154
|
const params = { channel_path: channelPath };
|
|
2145
2155
|
if (options?.parentMessageId) params.parent_message_id = options.parentMessageId;
|
|
2156
|
+
if (options?.conversationsOnly) params.conversations_only = true;
|
|
2146
2157
|
if (options?.limit) params.limit = options.limit;
|
|
2147
2158
|
if (options?.before_seq != null) params.before_seq = options.before_seq;
|
|
2148
2159
|
if (options?.after_seq != null) params.after_seq = options.after_seq;
|
|
2149
2160
|
const response = await gatewayCall("get-channel-messages", params);
|
|
2150
2161
|
const raw = response;
|
|
2162
|
+
if (options?.conversationsOnly && raw.conversations_only !== true) {
|
|
2163
|
+
throw new Error("This server does not support conversation history lists yet. Update the message reader.");
|
|
2164
|
+
}
|
|
2151
2165
|
const items = raw.messages || [];
|
|
2152
2166
|
const cards = parseChannelCards(items);
|
|
2153
2167
|
const messageCards = /* @__PURE__ */ new Map();
|
|
@@ -2173,7 +2187,7 @@ async function fetchChannelMessagesPage(channelPath, options) {
|
|
|
2173
2187
|
`[gateway] Failed to fetch channel messages page for ${channelPath}:`,
|
|
2174
2188
|
err
|
|
2175
2189
|
);
|
|
2176
|
-
|
|
2190
|
+
throw err;
|
|
2177
2191
|
}
|
|
2178
2192
|
}
|
|
2179
2193
|
function invalidateChildren(path) {
|
|
@@ -3880,31 +3894,31 @@ function useChannelMessages(options) {
|
|
|
3880
3894
|
}
|
|
3881
3895
|
function useInfiniteChannelMessages(options) {
|
|
3882
3896
|
useScopeKey();
|
|
3883
|
-
const { channelPath, parentMessageId, limit = 50, realtime = true, enabled: enabled2 = true } = options;
|
|
3897
|
+
const { channelPath, parentMessageId, limit = 50, realtime = true, enabled: enabled2 = true, conversationsOnly = false } = options;
|
|
3884
3898
|
const isThread = !!parentMessageId;
|
|
3885
3899
|
const queryEnabled = enabled2 && !!channelPath;
|
|
3886
3900
|
const query = reactQuery.useInfiniteQuery({
|
|
3887
|
-
queryKey: [...vfsKeys.channelMessages(channelPath || "", parentMessageId), "infinite", limit],
|
|
3901
|
+
queryKey: [...vfsKeys.channelMessages(channelPath || "", parentMessageId), "infinite", limit, "latest-first", ...conversationsOnly ? ["conversations"] : []],
|
|
3888
3902
|
queryFn: async ({ pageParam }) => {
|
|
3889
3903
|
return fetchChannelMessagesPage(channelPath, {
|
|
3890
3904
|
parentMessageId,
|
|
3891
3905
|
limit,
|
|
3892
|
-
|
|
3893
|
-
|
|
3906
|
+
conversationsOnly,
|
|
3907
|
+
before_seq: pageParam?.before_seq,
|
|
3908
|
+
after_seq: pageParam?.after_seq
|
|
3894
3909
|
});
|
|
3895
3910
|
},
|
|
3896
3911
|
initialPageParam: void 0,
|
|
3897
|
-
|
|
3912
|
+
getPreviousPageParam: (lastPage) => {
|
|
3898
3913
|
if (!isThread) return void 0;
|
|
3899
3914
|
if (lastPage.messages.length < limit) return void 0;
|
|
3900
3915
|
const maxSeq = lastPage.messages[lastPage.messages.length - 1]?.seq;
|
|
3901
|
-
return maxSeq;
|
|
3916
|
+
return maxSeq == null ? void 0 : { after_seq: maxSeq };
|
|
3902
3917
|
},
|
|
3903
|
-
|
|
3904
|
-
if (isThread) return void 0;
|
|
3918
|
+
getNextPageParam: (firstPage) => {
|
|
3905
3919
|
if (firstPage.messages.length < limit) return void 0;
|
|
3906
3920
|
const minSeq = firstPage.messages[0]?.seq;
|
|
3907
|
-
return minSeq;
|
|
3921
|
+
return minSeq == null ? void 0 : { before_seq: minSeq };
|
|
3908
3922
|
},
|
|
3909
3923
|
enabled: queryEnabled
|
|
3910
3924
|
});
|
|
@@ -3948,8 +3962,8 @@ function useInfiniteChannelMessages(options) {
|
|
|
3948
3962
|
const qc = reactQuery.useQueryClient();
|
|
3949
3963
|
const debounceRef = React.useRef(null);
|
|
3950
3964
|
const stableKey = React.useMemo(
|
|
3951
|
-
() => [...vfsKeys.channelMessages(channelPath || "", parentMessageId), "infinite", limit],
|
|
3952
|
-
[channelPath, parentMessageId, limit]
|
|
3965
|
+
() => [...vfsKeys.channelMessages(channelPath || "", parentMessageId), "infinite", limit, "latest-first", ...conversationsOnly ? ["conversations"] : []],
|
|
3966
|
+
[channelPath, parentMessageId, limit, conversationsOnly]
|
|
3953
3967
|
);
|
|
3954
3968
|
React.useEffect(() => {
|
|
3955
3969
|
if (!realtime || !channelPath || !queryEnabled) return;
|
|
@@ -3958,6 +3972,10 @@ function useInfiniteChannelMessages(options) {
|
|
|
3958
3972
|
let tailAgain = false;
|
|
3959
3973
|
let disposed = false;
|
|
3960
3974
|
const tailOnce = async () => {
|
|
3975
|
+
if (conversationsOnly) {
|
|
3976
|
+
reload();
|
|
3977
|
+
return;
|
|
3978
|
+
}
|
|
3961
3979
|
const currentData = qc.getQueryData(stableKey);
|
|
3962
3980
|
if (!currentData?.pages?.length) {
|
|
3963
3981
|
reload();
|
|
@@ -3996,7 +4014,7 @@ function useInfiniteChannelMessages(options) {
|
|
|
3996
4014
|
qc.setQueryData(stableKey, (old) => {
|
|
3997
4015
|
if (!old) return old;
|
|
3998
4016
|
const pages = [...old.pages];
|
|
3999
|
-
const lastIdx =
|
|
4017
|
+
const lastIdx = 0;
|
|
4000
4018
|
const lastPage = pages[lastIdx];
|
|
4001
4019
|
const existingIds = new Set(lastPage.messages.map((m) => m.id));
|
|
4002
4020
|
const uniqueNew = newPage.messages.filter((m) => !existingIds.has(m.id));
|
|
@@ -4048,7 +4066,7 @@ function useInfiniteChannelMessages(options) {
|
|
|
4048
4066
|
void tail();
|
|
4049
4067
|
}, 500);
|
|
4050
4068
|
},
|
|
4051
|
-
(data) => channelMessageChange(
|
|
4069
|
+
(data) => conversationsOnly && data?.item_type === "message" && (qc.getQueryData(stableKey)?.pages ?? []).some((page) => page.messages.some((root) => root.id === data.parent_id)) || channelMessageChange(
|
|
4052
4070
|
data,
|
|
4053
4071
|
channelPath,
|
|
4054
4072
|
parentMessageId,
|
|
@@ -4060,11 +4078,11 @@ function useInfiniteChannelMessages(options) {
|
|
|
4060
4078
|
unsub();
|
|
4061
4079
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
4062
4080
|
};
|
|
4063
|
-
}, [realtime, channelPath, queryEnabled, stableKey, qc, parentMessageId, limit]);
|
|
4081
|
+
}, [realtime, channelPath, queryEnabled, stableKey, qc, parentMessageId, limit, conversationsOnly]);
|
|
4064
4082
|
return {
|
|
4065
4083
|
messages,
|
|
4066
4084
|
// Activity is a current thread snapshot, not another reply page.
|
|
4067
|
-
activityMessages: query.data?.pages
|
|
4085
|
+
activityMessages: query.data?.pages[0]?.activityMessages ?? [],
|
|
4068
4086
|
/** Cards grouped by parent message path (child cards of messages). */
|
|
4069
4087
|
messageCards,
|
|
4070
4088
|
/** Cards that are direct siblings of the channel (not nested under a message). */
|
|
@@ -4076,14 +4094,14 @@ function useInfiniteChannelMessages(options) {
|
|
|
4076
4094
|
isFetching: query.isFetching,
|
|
4077
4095
|
error: query.error,
|
|
4078
4096
|
refetch: query.refetch,
|
|
4079
|
-
// Backward pagination (
|
|
4080
|
-
hasPreviousPage: query.
|
|
4081
|
-
fetchPreviousPage: query.
|
|
4082
|
-
isFetchingPreviousPage: query.
|
|
4097
|
+
// Backward pagination (channels and threads: load older)
|
|
4098
|
+
hasPreviousPage: query.hasNextPage ?? false,
|
|
4099
|
+
fetchPreviousPage: query.fetchNextPage,
|
|
4100
|
+
isFetchingPreviousPage: query.isFetchingNextPage ?? false,
|
|
4083
4101
|
// Forward pagination (thread: load newer)
|
|
4084
|
-
hasNextPage: query.
|
|
4085
|
-
fetchNextPage: query.
|
|
4086
|
-
isFetchingNextPage: query.
|
|
4102
|
+
hasNextPage: query.hasPreviousPage ?? false,
|
|
4103
|
+
fetchNextPage: query.fetchPreviousPage,
|
|
4104
|
+
isFetchingNextPage: query.isFetchingPreviousPage ?? false
|
|
4087
4105
|
};
|
|
4088
4106
|
}
|
|
4089
4107
|
var CHANNEL_AI_MODES = ["open", "active", "strict", "hand_raise"];
|
|
@@ -5479,6 +5497,71 @@ function setupRequireShim() {
|
|
|
5479
5497
|
};
|
|
5480
5498
|
window.__FSAOS_MOUNT__ = gateway.mount;
|
|
5481
5499
|
}
|
|
5500
|
+
function inviteMember(params) {
|
|
5501
|
+
return gatewayCall("invite-member", params);
|
|
5502
|
+
}
|
|
5503
|
+
function acceptInvite(params) {
|
|
5504
|
+
return gatewayCall("accept-invite", params);
|
|
5505
|
+
}
|
|
5506
|
+
function seatMember(params) {
|
|
5507
|
+
const context = {};
|
|
5508
|
+
if (params.role) context.role = params.role;
|
|
5509
|
+
return gatewayCall("link", {
|
|
5510
|
+
source_id: params.chat_id,
|
|
5511
|
+
target_id: params.member_id,
|
|
5512
|
+
edge_type: "has_member",
|
|
5513
|
+
context
|
|
5514
|
+
});
|
|
5515
|
+
}
|
|
5516
|
+
function createAgent(params) {
|
|
5517
|
+
return gatewayCall("create-agent", params);
|
|
5518
|
+
}
|
|
5519
|
+
function answerInput(params) {
|
|
5520
|
+
if (!params.input_request_id && !params.input_request) {
|
|
5521
|
+
return Promise.reject(new Error("answerInput needs input_request_id or the input_request object read from the step."));
|
|
5522
|
+
}
|
|
5523
|
+
return gatewayCall("todo-control", { action: "answer_input", ...params });
|
|
5524
|
+
}
|
|
5525
|
+
function useInviteMember() {
|
|
5526
|
+
return reactQuery.useMutation({ mutationFn: inviteMember });
|
|
5527
|
+
}
|
|
5528
|
+
function useAcceptInvite() {
|
|
5529
|
+
const qc = reactQuery.useQueryClient();
|
|
5530
|
+
return reactQuery.useMutation({
|
|
5531
|
+
mutationFn: acceptInvite,
|
|
5532
|
+
onSuccess: () => {
|
|
5533
|
+
qc.invalidateQueries({ queryKey: ["memberships"] });
|
|
5534
|
+
}
|
|
5535
|
+
});
|
|
5536
|
+
}
|
|
5537
|
+
function useSeatMember() {
|
|
5538
|
+
const qc = reactQuery.useQueryClient();
|
|
5539
|
+
return reactQuery.useMutation({
|
|
5540
|
+
mutationFn: seatMember,
|
|
5541
|
+
onSuccess: (_data, variables) => {
|
|
5542
|
+
qc.invalidateQueries({ queryKey: vfsKeys.edges(variables.chat_id) });
|
|
5543
|
+
qc.invalidateQueries({ queryKey: vfsKeys.edges(variables.member_id) });
|
|
5544
|
+
}
|
|
5545
|
+
});
|
|
5546
|
+
}
|
|
5547
|
+
function useCreateAgent() {
|
|
5548
|
+
const qc = reactQuery.useQueryClient();
|
|
5549
|
+
return reactQuery.useMutation({
|
|
5550
|
+
mutationFn: createAgent,
|
|
5551
|
+
onSuccess: () => {
|
|
5552
|
+
qc.invalidateQueries({ queryKey: ["memberships"] });
|
|
5553
|
+
}
|
|
5554
|
+
});
|
|
5555
|
+
}
|
|
5556
|
+
function useAnswerInput() {
|
|
5557
|
+
const qc = reactQuery.useQueryClient();
|
|
5558
|
+
return reactQuery.useMutation({
|
|
5559
|
+
mutationFn: answerInput,
|
|
5560
|
+
onSuccess: (_data, variables) => {
|
|
5561
|
+
qc.invalidateQueries({ queryKey: vfsKeys.itemById(variables.step_id) });
|
|
5562
|
+
}
|
|
5563
|
+
});
|
|
5564
|
+
}
|
|
5482
5565
|
|
|
5483
5566
|
// src/schema-utils.ts
|
|
5484
5567
|
function keyToLabel(key) {
|
|
@@ -6289,6 +6372,8 @@ exports.FormSubmissionError = FormSubmissionError;
|
|
|
6289
6372
|
exports.GatewayRequestError = GatewayRequestError;
|
|
6290
6373
|
exports.InteractionTrackingError = InteractionTrackingError;
|
|
6291
6374
|
exports.KernelProvider = KernelProvider;
|
|
6375
|
+
exports.acceptInvite = acceptInvite;
|
|
6376
|
+
exports.answerInput = answerInput;
|
|
6292
6377
|
exports.assignPersonalSection = assignPersonalSection;
|
|
6293
6378
|
exports.auth = auth;
|
|
6294
6379
|
exports.awaitAnchorReady = awaitAnchorReady;
|
|
@@ -6299,6 +6384,7 @@ exports.cancelTurn = cancelTurn;
|
|
|
6299
6384
|
exports.clearCachedToken = clearCachedToken;
|
|
6300
6385
|
exports.clearSession = clearSession;
|
|
6301
6386
|
exports.configureGatewayReads = configureGatewayReads;
|
|
6387
|
+
exports.createAgent = createAgent;
|
|
6302
6388
|
exports.createItem = createItem;
|
|
6303
6389
|
exports.disconnectSSE = disconnectSSE;
|
|
6304
6390
|
exports.disposeVfsRealtimeWs = disposeVfsRealtimeWs;
|
|
@@ -6355,6 +6441,7 @@ exports.invalidateOpenEnvelope = invalidateOpenEnvelope;
|
|
|
6355
6441
|
exports.invalidatePathAndParent = invalidatePathAndParent;
|
|
6356
6442
|
exports.invalidateSubtree = invalidateSubtree;
|
|
6357
6443
|
exports.invalidateTypes = invalidateTypes;
|
|
6444
|
+
exports.inviteMember = inviteMember;
|
|
6358
6445
|
exports.isAnchorReady = isAnchorReady;
|
|
6359
6446
|
exports.isChannelPath = isChannelPath;
|
|
6360
6447
|
exports.isListableItemsFilter = isListableItemsFilter;
|
|
@@ -6378,6 +6465,7 @@ exports.replaceMounts = replaceMounts;
|
|
|
6378
6465
|
exports.resetAllSdkState = resetAllSdkState;
|
|
6379
6466
|
exports.resolvePrincipalId = resolvePrincipalId;
|
|
6380
6467
|
exports.resubscribePath = resubscribePath;
|
|
6468
|
+
exports.seatMember = seatMember;
|
|
6381
6469
|
exports.selectMount = selectMount;
|
|
6382
6470
|
exports.serverDeadlinePassed = serverDeadlinePassed;
|
|
6383
6471
|
exports.serverMsUntil = serverMsUntil;
|
|
@@ -6404,9 +6492,11 @@ exports.trackPageView = trackPageView;
|
|
|
6404
6492
|
exports.unmountRealtimeScope = unmountRealtimeScope;
|
|
6405
6493
|
exports.updateItem = updateItem;
|
|
6406
6494
|
exports.uploadFile = uploadFile;
|
|
6495
|
+
exports.useAcceptInvite = useAcceptInvite;
|
|
6407
6496
|
exports.useAccounts = useAccounts;
|
|
6408
6497
|
exports.useAgentTimeline = useAgentTimeline;
|
|
6409
6498
|
exports.useAllChannels = useAllChannels;
|
|
6499
|
+
exports.useAnswerInput = useAnswerInput;
|
|
6410
6500
|
exports.useArrangement = useArrangement;
|
|
6411
6501
|
exports.useArtifactStream = useArtifactStream;
|
|
6412
6502
|
exports.useAsset = useAsset;
|
|
@@ -6416,6 +6506,7 @@ exports.useChannels = useChannels;
|
|
|
6416
6506
|
exports.useChildren = useChildren;
|
|
6417
6507
|
exports.useComponent = useComponent;
|
|
6418
6508
|
exports.useCreate = useCreate;
|
|
6509
|
+
exports.useCreateAgent = useCreateAgent;
|
|
6419
6510
|
exports.useDelete = useDelete;
|
|
6420
6511
|
exports.useDmChannels = useDmChannels;
|
|
6421
6512
|
exports.useEdges = useEdges;
|
|
@@ -6425,6 +6516,7 @@ exports.useIncrementalItems = useIncrementalItems;
|
|
|
6425
6516
|
exports.useInfiniteChannelMessages = useInfiniteChannelMessages;
|
|
6426
6517
|
exports.useInfiniteChildren = useInfiniteChildren;
|
|
6427
6518
|
exports.useInfiniteItems = useInfiniteItems;
|
|
6519
|
+
exports.useInviteMember = useInviteMember;
|
|
6428
6520
|
exports.useItem = useItem;
|
|
6429
6521
|
exports.useItemById = useItemById;
|
|
6430
6522
|
exports.useItemHistory = useItemHistory;
|
|
@@ -6452,6 +6544,7 @@ exports.useResolvedItems = useResolvedItems;
|
|
|
6452
6544
|
exports.useScope = useScope;
|
|
6453
6545
|
exports.useScopeReady = useScopeReady;
|
|
6454
6546
|
exports.useSearch = useSearch;
|
|
6547
|
+
exports.useSeatMember = useSeatMember;
|
|
6455
6548
|
exports.useTheme = useTheme;
|
|
6456
6549
|
exports.useTimelineHistory = useTimelineHistory;
|
|
6457
6550
|
exports.useTool = useTool;
|