@8wave/ai-elements 0.114.0 → 0.115.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CgQePKKb.js} +3 -3
  2. package/dist/_chunks/PkToolRequestOAuthConnection-CgQePKKb.js.map +1 -0
  3. package/dist/_chunks/{PkToolShowSources-VFoI0YS8.js → PkToolShowSources-kGQlIKaN.js} +2 -2
  4. package/dist/_chunks/{PkToolShowSources-VFoI0YS8.js.map → PkToolShowSources-kGQlIKaN.js.map} +1 -1
  5. package/dist/_chunks/{markdown-BL7WANiX.js → markdown-B4cYQGBo.js} +19 -10
  6. package/dist/_chunks/{markdown-BL7WANiX.js.map → markdown-B4cYQGBo.js.map} +1 -1
  7. package/dist/ai-elements.es.js +1670 -1563
  8. package/dist/ai-elements.es.js.map +1 -1
  9. package/dist-vue/PkChatbot.js +1 -1
  10. package/dist-vue/PkChatbotMessages.js +1 -1
  11. package/dist-vue/PkChatbotViewChat.js +1 -1
  12. package/dist-vue/PkChatbotViewConversations.js +1 -1
  13. package/dist-vue/PkChatbotViewFiles.js +1 -1
  14. package/dist-vue/PkChatbotViewProfile.js +1 -1
  15. package/dist-vue/_chunks/{Document-nCWwJC2h.js → Document-BWz2HySu.js} +20 -11
  16. package/dist-vue/_chunks/{Document-nCWwJC2h.js.map → Document-BWz2HySu.js.map} +1 -1
  17. package/dist-vue/_chunks/{PkChatbot-BMIs94QB.js → PkChatbot-Cw5sScma.js} +6 -6
  18. package/dist-vue/_chunks/{PkChatbot-BMIs94QB.js.map → PkChatbot-Cw5sScma.js.map} +1 -1
  19. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -1
  20. package/dist-vue/_chunks/{PkChatbotMessages-Bj7mjhqN.js → PkChatbotMessages-62rYpwcM.js} +110 -101
  21. package/dist-vue/_chunks/PkChatbotMessages-62rYpwcM.js.map +1 -0
  22. package/dist-vue/_chunks/{PkChatbotViewChat-CQ5WcZs8.js → PkChatbotViewChat-ML8aaCVN.js} +4 -4
  23. package/dist-vue/_chunks/{PkChatbotViewChat-CQ5WcZs8.js.map → PkChatbotViewChat-ML8aaCVN.js.map} +1 -1
  24. package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js → PkChatbotViewConversations-DvmRjVND.js} +2 -2
  25. package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js.map → PkChatbotViewConversations-DvmRjVND.js.map} +1 -1
  26. package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js → PkChatbotViewFiles-DrMUsTv5.js} +3 -3
  27. package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js.map → PkChatbotViewFiles-DrMUsTv5.js.map} +1 -1
  28. package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js → PkChatbotViewProfile-C1eLHU7x.js} +2 -2
  29. package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js.map → PkChatbotViewProfile-C1eLHU7x.js.map} +1 -1
  30. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-a2LegFoE.js} +3 -3
  31. package/dist-vue/_chunks/PkToolRequestOAuthConnection-a2LegFoE.js.map +1 -0
  32. package/dist-vue/_chunks/{PkToolShowDiagram-BziggKVa.js → PkToolShowDiagram-CssUiP3o.js} +2 -2
  33. package/dist-vue/_chunks/{PkToolShowDiagram-BziggKVa.js.map → PkToolShowDiagram-CssUiP3o.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkToolShowSources-TzkNgwnr.js → PkToolShowSources-C8r1vKJk.js} +2 -2
  35. package/dist-vue/_chunks/{PkToolShowSources-TzkNgwnr.js.map → PkToolShowSources-C8r1vKJk.js.map} +1 -1
  36. package/dist-vue/_chunks/{createChatbotApiClient-BlWs282E.js → createChatbotApiClient-BJz36z7v.js} +110 -110
  37. package/dist-vue/_chunks/createChatbotApiClient-BJz36z7v.js.map +1 -0
  38. package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js → useChatbotStore-D3Q1ZgQg.js} +2 -2
  39. package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js.map → useChatbotStore-D3Q1ZgQg.js.map} +1 -1
  40. package/dist-vue/api.js +1 -1
  41. package/dist-vue/composables.js +108 -10
  42. package/dist-vue/composables.js.map +1 -1
  43. package/dist-vue/index.js +15 -12
  44. package/dist-vue/index.js.map +1 -1
  45. package/dist-vue/locales.js +4 -0
  46. package/dist-vue/packages/auth/src/active-membership.d.ts +36 -0
  47. package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +5 -1
  48. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +1 -1
  49. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +3 -3
  50. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +1 -1
  51. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +5 -0
  52. package/dist-vue/packages/models/src/schema/AgentApiTool.d.ts +40 -8
  53. package/dist-vue/packages/models/src/schema/ConversationAnalysis.d.ts +6 -1
  54. package/dist-vue/packages/models/src/schema/Document.d.ts +477 -0
  55. package/dist-vue/packages/models/src/schema/McpServer.d.ts +56 -0
  56. package/dist-vue/packages/models/src/schema/Notification.d.ts +2 -0
  57. package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +1 -1
  58. package/package.json +1 -1
  59. package/dist/_chunks/PkToolRequestOAuthConnection-ChGMAKV7.js.map +0 -1
  60. package/dist-vue/_chunks/PkChatbotMessages-Bj7mjhqN.js.map +0 -1
  61. package/dist-vue/_chunks/PkToolRequestOAuthConnection-DMvCGPuX.js.map +0 -1
  62. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { C as e, S as t, _ as n, a as r, b as i, g as a, l as o, n as s, o as c, p as l, y as u } from "./schemas-DxbHVg3r.js";
2
2
  import { i as d, t as ee } from "./Media-_HfFLHGD.js";
3
- import { M as f, a as p, b as te, c as ne, f as re, j as ie, k as ae, l as oe, n as se, s as ce } from "./Agent-tbKw8Mdt.js";
4
- import { t as le } from "./StreamError-D1AtGgS3.js";
3
+ import { M as f, a as te, b as p, c as m, f as h, j as g, k as ne, l as re, n as ie, s as ae } from "./Agent-tbKw8Mdt.js";
4
+ import { t as oe } from "./StreamError-D1AtGgS3.js";
5
5
  import "./src-DT8FLE4_.js";
6
- import { r as m, t as ue } from "./url-validation-uLMZ5-AU.js";
7
- import { buildMongoQueryMatcher as h, createAliasResolver as g } from "@casl/ability";
8
- import { createAccessControl as de } from "better-auth/plugins";
9
- import { adminAc as fe, defaultStatements as pe, memberAc as _, ownerAc as me } from "better-auth/plugins/organization/access";
6
+ import { r as _, t as se } from "./url-validation-uLMZ5-AU.js";
7
+ import { buildMongoQueryMatcher as ce, createAliasResolver as le } from "@casl/ability";
8
+ import { createAccessControl as ue } from "better-auth/plugins";
9
+ import { adminAc as de, defaultStatements as fe, memberAc as v, ownerAc as pe } from "better-auth/plugins/organization/access";
10
10
  //#region ../../packages/models/src/schema/ConversationAnalysis.ts
11
- var he = /* @__PURE__ */ function(e) {
11
+ var me = /* @__PURE__ */ function(e) {
12
12
  return e.Harassment = "harassment", e.HateSpeech = "hate_speech", e.SexualContent = "sexual_content", e.SelfHarm = "self_harm", e.Violence = "violence", e.PromptInjection = "prompt_injection", e.DataExtraction = "data_extraction", e.Spam = "spam", e.OffTopicPersistent = "off_topic_persistent", e.Impersonation = "impersonation", e;
13
- }({}), ge = /* @__PURE__ */ function(e) {
13
+ }({}), he = /* @__PURE__ */ function(e) {
14
14
  return e.Low = "low", e.Medium = "medium", e.High = "high", e;
15
- }({}), v = /* @__PURE__ */ function(e) {
16
- return e.FalseSuccess = "false_success", e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e;
15
+ }({}), ge = /* @__PURE__ */ function(e) {
16
+ return e.FalseSuccess = "false_success", e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e.FailedAction = "failed_action", e.EmptyReply = "empty_reply", e.StuckFlow = "stuck_flow", e;
17
17
  }({}), y = /* @__PURE__ */ function(e) {
18
18
  return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
19
19
  }({}), b = /* @__PURE__ */ function(e) {
@@ -24,7 +24,7 @@ var he = /* @__PURE__ */ function(e) {
24
24
  return e.Positive = "positive", e.Neutral = "neutral", e.Negative = "negative", e.Frustrated = "frustrated", e.Excited = "excited", e;
25
25
  }({}), C = /* @__PURE__ */ function(e) {
26
26
  return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
27
- }({}), w = n({
27
+ }({}), w = 1e3, T = n({
28
28
  analyzedAt: d().describe("When the analysis was generated."),
29
29
  analysisTrigger: s(y).describe("What triggered this analysis run."),
30
30
  sentiment: s(S).describe("Overall user sentiment in the conversation."),
@@ -33,32 +33,32 @@ var he = /* @__PURE__ */ function(e) {
33
33
  language: i().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
34
34
  topics: r(i().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
35
35
  userAbuseDetected: c().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
36
- userAbuseCategories: r(s(he)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
- userAbuseConfidence: s(ge).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
38
- userAbuseSummary: i().max(500).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
36
+ userAbuseCategories: r(s(me)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
+ userAbuseConfidence: s(he).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
38
+ userAbuseSummary: i().max(w).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
39
39
  llmIssueDetected: c().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
40
- llmIssueCategories: r(s(v)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
41
- llmIssueSummary: i().max(500).optional().describe("Brief description of the LLM quality issue detected. Always write in English. Set only if llmIssueDetected is true."),
40
+ llmIssueCategories: r(s(ge)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
41
+ llmIssueSummary: i().max(w).optional().describe("Brief description of the LLM quality issue detected. Always write in English. Set only if llmIssueDetected is true."),
42
42
  userEngagement: s(b).describe("Level of user engagement in the conversation."),
43
43
  conversationGoalMet: c().optional().describe("Whether the user seems to have achieved what they came for. Leave undefined if unclear."),
44
44
  riskScore: a().int().min(0).max(100).describe("Overall risk score (0 = safe, 100 = critical). Combination of abuse severity, persistence and escalation.")
45
- }), T = n({
45
+ }), E = n({
46
46
  type: l("text"),
47
47
  text: i()
48
- }), E = n({
48
+ }), D = n({
49
49
  type: l("file"),
50
50
  mediaType: i().regex(ee),
51
51
  url: e(),
52
52
  filename: i().optional(),
53
53
  providerMetadata: u(i(), u(i(), t())).optional()
54
- }), D = o("type", [T, E]);
54
+ }), O = o("type", [E, D]);
55
55
  n({
56
56
  id: i(),
57
57
  messages: r(n({
58
58
  id: i().optional(),
59
59
  role: s(["assistant", "user"]),
60
60
  content: i(),
61
- parts: r(D),
61
+ parts: r(O),
62
62
  createdAt: i().optional()
63
63
  })),
64
64
  model: i().optional(),
@@ -67,29 +67,29 @@ n({
67
67
  maxOutputTokens: a().positive().optional(),
68
68
  presencePenalty: a().min(-2).max(2).optional(),
69
69
  frequencyPenalty: a().min(-2).max(2).optional(),
70
- searchMode: s(oe).optional(),
70
+ searchMode: s(re).optional(),
71
71
  limit: a().optional(),
72
- ranking: ce.optional(),
73
- reasoning: ne,
74
- webSearch: re.optional(),
72
+ ranking: ae.optional(),
73
+ reasoning: m,
74
+ webSearch: h.optional(),
75
75
  maxStepCount: a().int().min(1).max(40).optional(),
76
- disabledTools: r(s(se)).optional(),
76
+ disabledTools: r(s(ie)).optional(),
77
77
  fallbackModels: r(i()).optional(),
78
- gatewayOptions: p.partial().optional(),
79
- deviceContext: ae.optional(),
78
+ gatewayOptions: te.partial().optional(),
79
+ deviceContext: ne.optional(),
80
80
  externalContext: u(i(), t()).optional(),
81
81
  smoothStream: c().optional()
82
82
  }), n({
83
83
  id: i().min(1),
84
84
  messages: r(n({ role: i() }).loose()).min(1)
85
85
  }).loose();
86
- var O = /* @__PURE__ */ function(e) {
86
+ var k = /* @__PURE__ */ function(e) {
87
87
  return e.SevereAbuse = "severe_abuse", e.HighRiskScore = "high_risk_score", e.RepeatedWarnings = "repeated_warnings", e;
88
88
  }({});
89
89
  s(/* @__PURE__ */ function(e) {
90
90
  return e.Web = "web", e.WhatsApp = "whatsapp", e.Teams = "teams", e.Voice = "voice", e.Api = "api", e.Reasoning = "reasoning", e.Endpoint = "endpoint", e;
91
91
  }({}));
92
- function k(e) {
92
+ function A(e) {
93
93
  let t = e.metadata?.toolCatalogue, n = t?.workingSet;
94
94
  if (!t || !n) return;
95
95
  let r = new Map(t.groups.flatMap((e) => e.keys.map((t) => [t, e.id]))), i = new Map(t.groups.map((e) => [e.name, e.id])), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
@@ -104,8 +104,8 @@ function k(e) {
104
104
  }
105
105
  continue;
106
106
  }
107
- let n = ie(e, r.keys()), s = n && r.get(n);
108
- s && (t.state === "output-error" && le.test(t.errorText ?? "") ? o.add(s) : a.add(s));
107
+ let n = g(e, r.keys()), s = n && r.get(n);
108
+ s && (t.state === "output-error" && oe.test(t.errorText ?? "") ? o.add(s) : a.add(s));
109
109
  }
110
110
  let s = new Set(n.selected), c = new Set(n.seeded), l = t.groups.map((e) => ({
111
111
  id: e.id,
@@ -124,18 +124,18 @@ function k(e) {
124
124
  missed: l.filter((e) => e.used && !e.selected).length
125
125
  };
126
126
  }
127
- var A = [
127
+ var j = [
128
128
  "durableFact",
129
129
  "abusive",
130
130
  "manipulation",
131
131
  "asksHuman",
132
132
  "missingInfo",
133
133
  "informationGap"
134
- ], j = /* @__PURE__ */ new Set([
134
+ ], M = /* @__PURE__ */ new Set([
135
135
  "output-available",
136
136
  "output-error",
137
137
  "output-denied"
138
- ]), M = n({
138
+ ]), N = n({
139
139
  id: i(),
140
140
  messages: r(t()),
141
141
  title: i().nullable(),
@@ -152,10 +152,10 @@ var A = [
152
152
  deleted: c(),
153
153
  deletedAt: d().nullable(),
154
154
  deletedBy: i().nullable(),
155
- conversationAnalysis: w.nullable().optional(),
155
+ conversationAnalysis: T.nullable().optional(),
156
156
  blocked: c(),
157
157
  blockedAt: d().nullable(),
158
- blockedReasonCode: s(O).nullable(),
158
+ blockedReasonCode: s(k).nullable(),
159
159
  blockedReason: i().nullable(),
160
160
  warningCount: a(),
161
161
  lastMessageAt: d()
@@ -174,7 +174,7 @@ n({
174
174
  startDate: i().optional(),
175
175
  endDate: i().optional()
176
176
  });
177
- var N = n({
177
+ var P = n({
178
178
  id: i(),
179
179
  agentId: i().optional(),
180
180
  organizationId: i(),
@@ -186,7 +186,7 @@ var N = n({
186
186
  lastMessageAt: d(),
187
187
  messages: r(t()),
188
188
  blocked: c()
189
- }), P = class {
189
+ }), F = class {
190
190
  constructor(e, t) {
191
191
  this.operator = e, this.value = t, Object.defineProperty(this, "_notes", { writable: !0 });
192
192
  }
@@ -196,22 +196,22 @@ var N = n({
196
196
  addNote(e) {
197
197
  this._notes = this._notes || [], this._notes.push(e);
198
198
  }
199
- }, F = class extends P {}, I = class extends F {
199
+ }, I = class extends F {}, L = class extends I {
200
200
  constructor(e, t) {
201
201
  if (!Array.isArray(t)) throw Error(`"${e}" operator expects to receive an array of conditions`);
202
202
  super(e, t);
203
203
  }
204
- }, L = "__itself__", R = class extends P {
204
+ }, _e = "__itself__", R = class extends F {
205
205
  constructor(e, t, n) {
206
206
  super(e, n), this.field = t;
207
207
  }
208
- }, _e = new F("__null__", null);
208
+ }, ve = new I("__null__", null);
209
209
  Object.hasOwn;
210
- function ve(e, t) {
210
+ function ye(e, t) {
211
211
  let n;
212
212
  for (let r = 0, i = t.length; r < i; r++) {
213
213
  let i = t[r];
214
- if (i instanceof I) {
214
+ if (i instanceof L) {
215
215
  if (i.operator !== e) {
216
216
  n && n.push(i);
217
217
  continue;
@@ -224,11 +224,11 @@ function ve(e, t) {
224
224
  }
225
225
  return n || t;
226
226
  }
227
- function ye(e, t) {
227
+ function be(e, t) {
228
228
  if (t.length === 1) return t[0];
229
- if (t.length === 0) return new I(e, t);
230
- let n = ve(e, t);
231
- return n.length === 1 ? n[0] : (n.length, new I(e, n));
229
+ if (t.length === 0) return new L(e, t);
230
+ let n = ye(e, t);
231
+ return n.length === 1 ? n[0] : (n.length, new L(e, n));
232
232
  }
233
233
  Object.defineProperty(Object.create(null), "__@type@__", { value: "ignore value" });
234
234
  //#endregion
@@ -242,86 +242,86 @@ var z = Object.defineProperty;
242
242
  });
243
243
  return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
244
244
  })({
245
- $all: () => we,
245
+ $all: () => Ee,
246
246
  $and: () => B,
247
- $elemMatch: () => xe,
248
- $eq: () => q,
249
- $exists: () => Ee,
250
- $gt: () => K,
251
- $gte: () => G,
252
- $in: () => W,
253
- $lt: () => De,
254
- $lte: () => Oe,
255
- $mod: () => Te,
256
- $ne: () => ke,
257
- $nin: () => Ce,
258
- $nor: () => H,
259
- $not: () => be,
260
- $options: () => je,
247
+ $elemMatch: () => Ce,
248
+ $eq: () => K,
249
+ $exists: () => Oe,
250
+ $gt: () => G,
251
+ $gte: () => W,
252
+ $in: () => U,
253
+ $lt: () => ke,
254
+ $lte: () => Ae,
255
+ $mod: () => De,
256
+ $ne: () => je,
257
+ $nin: () => Te,
258
+ $nor: () => xe,
259
+ $not: () => Se,
260
+ $options: () => Ne,
261
261
  $or: () => V,
262
- $regex: () => Ae,
263
- $size: () => Se,
264
- $where: () => Me
262
+ $regex: () => Me,
263
+ $size: () => we,
264
+ $where: () => Pe
265
265
  });
266
266
  var B = {
267
267
  type: "compound",
268
- validate: Y,
268
+ validate: J,
269
269
  parse(e, t, n) {
270
- let r = U(e, t, n);
271
- return ye(e.name, r);
270
+ let r = H(e, t, n);
271
+ return be(e.name, r);
272
272
  }
273
- }, V = B, H = {
273
+ }, V = B, xe = {
274
274
  type: "compound",
275
- validate: Y,
275
+ validate: J,
276
276
  parse(e, t, n) {
277
- let r = U(e, t, n);
278
- return new I(e.name, r);
277
+ let r = H(e, t, n);
278
+ return new L(e.name, r);
279
279
  }
280
280
  };
281
- function U(e, t, n) {
281
+ function H(e, t, n) {
282
282
  let r = Array(t.length);
283
283
  for (let i = 0; i < t.length; i++) {
284
284
  let a = t[i];
285
- Pe(e, a, i), r[i] = n.parse(a);
285
+ Fe(e, a, i), r[i] = n.parse(a);
286
286
  }
287
287
  return r;
288
288
  }
289
- var be = {
289
+ var Se = {
290
290
  type: "field",
291
291
  validate(e, t) {
292
292
  if (!(t && (t instanceof RegExp || t.constructor === Object))) throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`);
293
293
  },
294
294
  parse(e, t, n) {
295
295
  let r = t instanceof RegExp ? new R("regex", n.field, t) : n.parse(t, n);
296
- return new I(e.name, [r]);
296
+ return new L(e.name, [r]);
297
297
  }
298
- }, xe = {
298
+ }, Ce = {
299
299
  type: "field",
300
300
  validate(e, t) {
301
301
  if (!t || t.constructor !== Object) throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`);
302
302
  },
303
303
  parse(e, t, { parse: n, field: r, hasOperators: i }) {
304
- let a = i(t) ? n(t, { field: L }) : n(t);
304
+ let a = i(t) ? n(t, { field: _e }) : n(t);
305
305
  return new R(e.name, r, a);
306
306
  }
307
- }, Se = {
307
+ }, we = {
308
308
  type: "field",
309
309
  validate: X("number")
310
- }, W = {
310
+ }, U = {
311
311
  type: "field",
312
- validate: J
313
- }, Ce = W, we = W, Te = {
312
+ validate: q
313
+ }, Te = U, Ee = U, De = {
314
314
  type: "field",
315
315
  validate(e, t) {
316
316
  if (!Array.isArray(t) || t.length !== 2) throw Error(`"${e.name}" expects an array with 2 numeric elements`);
317
317
  }
318
- }, Ee = {
318
+ }, Oe = {
319
319
  type: "field",
320
320
  validate: X("boolean")
321
- }, G = {
321
+ }, W = {
322
322
  type: "field",
323
- validate: Ne
324
- }, K = G, De = K, Oe = K, q = { type: "field" }, ke = q, Ae = {
323
+ validate: Y
324
+ }, G = W, ke = G, Ae = G, K = { type: "field" }, je = K, Me = {
325
325
  type: "field",
326
326
  validate(e, t) {
327
327
  if (!(t instanceof RegExp) && typeof t != "string") throw Error(`"${e.name}" expects value to be a regular expression or a string that represents regular expression`);
@@ -330,20 +330,20 @@ var be = {
330
330
  let r = typeof t == "string" ? new RegExp(t, n.query.$options || "") : t;
331
331
  return new R(e.name, n.field, r);
332
332
  }
333
- }, je = {
333
+ }, Ne = {
334
334
  type: "field",
335
- parse: () => _e
336
- }, Me = {
335
+ parse: () => ve
336
+ }, Pe = {
337
337
  type: "document",
338
338
  validate: X("function")
339
339
  };
340
- function J(e, t) {
340
+ function q(e, t) {
341
341
  if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
342
342
  }
343
- function Y(e, t) {
344
- if (J(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
343
+ function J(e, t) {
344
+ if (q(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
345
345
  }
346
- function Ne(e, t) {
346
+ function Y(e, t) {
347
347
  if (!(typeof t == "string" || typeof t == "number" || t instanceof Date)) throw Error(`"${e.name}" expects value to be comparable (i.e., string, number or date)`);
348
348
  }
349
349
  function X(e) {
@@ -351,7 +351,7 @@ function X(e) {
351
351
  if (typeof n !== e) throw Error(`"${t.name}" expects value to be a "${e}"`);
352
352
  };
353
353
  }
354
- function Pe(e, t, n) {
354
+ function Fe(e, t, n) {
355
355
  let r = t;
356
356
  if (!r || r.constructor !== Object) throw Error(`"${e.name}" expects item at index ${n} to be an object`);
357
357
  }
@@ -360,18 +360,18 @@ function Pe(e, t, n) {
360
360
  var Z = /* @__PURE__ */ function(e) {
361
361
  return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
362
362
  }({});
363
- g({ modify: [
363
+ le({ modify: [
364
364
  "read",
365
365
  "update",
366
366
  "delete"
367
- ] }), h({ $or: V });
368
- var Q = de(pe);
369
- Q.newRole(fe.statements), Q.newRole(me.statements), Q.newRole(_.statements), Q.newRole(_.statements);
367
+ ] }), ce({ $or: V });
368
+ var Q = ue(fe);
369
+ Q.newRole(de.statements), Q.newRole(pe.statements), Q.newRole(v.statements), Q.newRole(v.statements);
370
370
  //#endregion
371
371
  //#region ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
372
- async function Fe(e, t, n = {}) {
372
+ async function Ie(e, t, n = {}) {
373
373
  try {
374
- let r = m(e), i = await fetch(`${r}/api/r/resolve`, {
374
+ let r = _(e), i = await fetch(`${r}/api/r/resolve`, {
375
375
  method: "POST",
376
376
  credentials: n.credentials ?? "include",
377
377
  headers: {
@@ -387,12 +387,12 @@ async function Fe(e, t, n = {}) {
387
387
  }
388
388
  //#endregion
389
389
  //#region ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
390
- var Ie = M.or(N);
390
+ var Le = N.or(P);
391
391
  function $(e) {
392
- let t = Ie.safeParse(e);
392
+ let t = Le.safeParse(e);
393
393
  return t.success ? t.data : e;
394
394
  }
395
- async function Le(e) {
395
+ async function Re(e) {
396
396
  let t = `${e.status} ${e.statusText}`.trim();
397
397
  try {
398
398
  let n = await e.json();
@@ -401,8 +401,8 @@ async function Le(e) {
401
401
  return t;
402
402
  }
403
403
  }
404
- function Re(e) {
405
- let t = e.basePath ? ue(e.basePath) : `/api/v1/${Z.Public}`, n = `${m(e.baseUrl)}${t}`, r = `${m(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`;
404
+ function ze(e) {
405
+ let t = e.basePath ? se(e.basePath) : `/api/v1/${Z.Public}`, n = `${_(e.baseUrl)}${t}`, r = `${_(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`;
406
406
  async function i(t, r, i = "json") {
407
407
  let a = await fetch(`${n}${t}`, {
408
408
  credentials: e.credentials ?? "include",
@@ -412,7 +412,7 @@ function Re(e) {
412
412
  ...r?.headers
413
413
  }
414
414
  });
415
- if (!a.ok) throw Error(await Le(a));
415
+ if (!a.ok) throw Error(await Re(a));
416
416
  if (i !== "void" && a.status !== 204) return a.json();
417
417
  }
418
418
  return {
@@ -553,7 +553,7 @@ function Re(e) {
553
553
  return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/status?${n}`);
554
554
  },
555
555
  async createVoiceSession(e, t, n) {
556
- return te.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
556
+ return p.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
557
557
  method: "POST",
558
558
  headers: { "Content-Type": "application/json" },
559
559
  body: JSON.stringify({
@@ -570,7 +570,7 @@ function Re(e) {
570
570
  }, "void");
571
571
  },
572
572
  resolveShortUrls(t) {
573
- return Fe(e.baseUrl, t, {
573
+ return Ie(e.baseUrl, t, {
574
574
  headers: e.headers?.(),
575
575
  credentials: e.credentials
576
576
  });
@@ -578,6 +578,6 @@ function Re(e) {
578
578
  };
579
579
  }
580
580
  //#endregion
581
- export { k as a, A as i, Z as n, j as r, Re as t };
581
+ export { A as a, j as i, Z as n, M as r, ze as t };
582
582
 
583
- //# sourceMappingURL=createChatbotApiClient-BlWs282E.js.map
583
+ //# sourceMappingURL=createChatbotApiClient-BJz36z7v.js.map