@uptiqai/widgets-sdk 1.264.0 → 1.267.0
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/headless.js +34 -24
- package/dist/index.css +1 -1
- package/dist/index.d.ts +9 -12
- package/dist/index.js +76514 -76375
- package/dist/index.umd.cjs +178 -178
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -2285,23 +2285,23 @@ W.getAdapter = Mc.getAdapter;
|
|
|
2285
2285
|
W.HttpStatusCode = Si;
|
|
2286
2286
|
W.default = W;
|
|
2287
2287
|
const {
|
|
2288
|
-
Axios:
|
|
2289
|
-
AxiosError:
|
|
2290
|
-
CanceledError:
|
|
2291
|
-
isCancel:
|
|
2292
|
-
CancelToken:
|
|
2293
|
-
VERSION:
|
|
2294
|
-
all:
|
|
2295
|
-
Cancel:
|
|
2296
|
-
isAxiosError:
|
|
2297
|
-
spread:
|
|
2298
|
-
toFormData:
|
|
2299
|
-
AxiosHeaders:
|
|
2300
|
-
HttpStatusCode:
|
|
2301
|
-
formToJSON:
|
|
2302
|
-
getAdapter:
|
|
2303
|
-
mergeConfig:
|
|
2304
|
-
create:
|
|
2288
|
+
Axios: Lw,
|
|
2289
|
+
AxiosError: Zw,
|
|
2290
|
+
CanceledError: Fw,
|
|
2291
|
+
isCancel: Bw,
|
|
2292
|
+
CancelToken: qw,
|
|
2293
|
+
VERSION: Jw,
|
|
2294
|
+
all: Vw,
|
|
2295
|
+
Cancel: Kw,
|
|
2296
|
+
isAxiosError: Ww,
|
|
2297
|
+
spread: Hw,
|
|
2298
|
+
toFormData: Gw,
|
|
2299
|
+
AxiosHeaders: Qw,
|
|
2300
|
+
HttpStatusCode: Yw,
|
|
2301
|
+
formToJSON: Xw,
|
|
2302
|
+
getAdapter: e1,
|
|
2303
|
+
mergeConfig: t1,
|
|
2304
|
+
create: n1
|
|
2305
2305
|
} = W, Ke = W.create({
|
|
2306
2306
|
baseURL: "",
|
|
2307
2307
|
// will be set at runtime in widgets-initialization
|
|
@@ -18229,7 +18229,13 @@ const bi = () => {
|
|
|
18229
18229
|
e.message, i.meta?.disableErrorMessage;
|
|
18230
18230
|
}
|
|
18231
18231
|
})
|
|
18232
|
-
}),
|
|
18232
|
+
}), jw = (e, t) => [
|
|
18233
|
+
"agents",
|
|
18234
|
+
e,
|
|
18235
|
+
"conversations",
|
|
18236
|
+
t,
|
|
18237
|
+
"elicitation-requests"
|
|
18238
|
+
], gc = {
|
|
18233
18239
|
getConversation: ({ executionId: e, agentId: t }) => ({
|
|
18234
18240
|
queryKey: ["agents", t, "conversation", e]
|
|
18235
18241
|
}),
|
|
@@ -18240,8 +18246,12 @@ const bi = () => {
|
|
|
18240
18246
|
initiatedBy: i
|
|
18241
18247
|
}) => ({
|
|
18242
18248
|
queryKey: ["agents", e, "conversations", { pageSize: r, pageNumber: t, initiatedBy: i }]
|
|
18249
|
+
}),
|
|
18250
|
+
/** The questions the conversation is waiting on, whichever run raised them — the main agent's or a delegate's. */
|
|
18251
|
+
getQuestionRequests: ({ agentId: e, conversationId: t }) => ({
|
|
18252
|
+
queryKey: [...jw(e, t), { type: "question" }]
|
|
18243
18253
|
})
|
|
18244
|
-
},
|
|
18254
|
+
}, Uw = (e) => {
|
|
18245
18255
|
const { agentId: t, instanceUserId: r } = e;
|
|
18246
18256
|
return { getConversation: async (o) => {
|
|
18247
18257
|
if (!o) throw new Error("executionId is required");
|
|
@@ -18261,7 +18271,7 @@ const bi = () => {
|
|
|
18261
18271
|
);
|
|
18262
18272
|
return { conversations: s ?? [], total: c ?? 0 };
|
|
18263
18273
|
} };
|
|
18264
|
-
},
|
|
18274
|
+
}, Pw = (e) => `AgentInterrupt-${e}`, Aw = (e) => `AgentQueueUpdate-${e}`, i1 = (e) => {
|
|
18265
18275
|
const { config: t, user: r, instanceId: i } = e, n = t$({ config: t, user: r, instanceId: i });
|
|
18266
18276
|
if ("error" in n)
|
|
18267
18277
|
throw new Error(n.error);
|
|
@@ -18274,7 +18284,7 @@ const bi = () => {
|
|
|
18274
18284
|
l.notifyListeners(Z);
|
|
18275
18285
|
}, m = (x) => {
|
|
18276
18286
|
c?.();
|
|
18277
|
-
const Z =
|
|
18287
|
+
const Z = Pw(x);
|
|
18278
18288
|
o.on(Z, f);
|
|
18279
18289
|
const X = () => {
|
|
18280
18290
|
o.off(Z, f);
|
|
@@ -18284,7 +18294,7 @@ const bi = () => {
|
|
|
18284
18294
|
u?.(), u = void 0;
|
|
18285
18295
|
}, y = (x) => {
|
|
18286
18296
|
g();
|
|
18287
|
-
const Z =
|
|
18297
|
+
const Z = Aw(x), X = () => {
|
|
18288
18298
|
d.notifyListeners({ executionId: x });
|
|
18289
18299
|
};
|
|
18290
18300
|
o.on(Z, X), u = () => {
|
|
@@ -18313,7 +18323,7 @@ const bi = () => {
|
|
|
18313
18323
|
}, I = (x, Z) => {
|
|
18314
18324
|
x === "query" && b(Z).catch(() => {
|
|
18315
18325
|
});
|
|
18316
|
-
}, { getConversation: k, listConversations: S } =
|
|
18326
|
+
}, { getConversation: k, listConversations: S } = Uw({
|
|
18317
18327
|
agentId: t.agentId,
|
|
18318
18328
|
instanceUserId: r.uid
|
|
18319
18329
|
});
|
|
@@ -18329,5 +18339,5 @@ const bi = () => {
|
|
|
18329
18339
|
};
|
|
18330
18340
|
};
|
|
18331
18341
|
export {
|
|
18332
|
-
|
|
18342
|
+
i1 as createHeadlessAgentInstance
|
|
18333
18343
|
};
|