@botpress/webchat-client 0.3.0 → 0.4.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.
@@ -1,7 +1,8 @@
1
- import { createClient as t, createUser as i, generateUserKey as a, initialize as n } from "./webchat-client2.js";
1
+ import { createClient as t, createUser as i, generateUserKey as a, initialize as n, sendPerfMetrics as s } from "./webchat-client2.js";
2
2
  export {
3
3
  t as createClient,
4
4
  i as createUser,
5
5
  a as generateUserKey,
6
- n as initialize
6
+ n as initialize,
7
+ s as sendPerfMetrics
7
8
  };
@@ -1,130 +1,147 @@
1
- import { createUser as f, generateUserKey as U, removeMessageFeedback as x, addMessageFeedback as F, getEvent as T, createEvent as k, deleteUser as R, updateUser as S, getUser as w, createFile as I, deleteMessage as K, getMessage as _, updateMessage as q, createMessage as N, listParticipants as O, getParticipant as z, removeParticipant as A, addParticipant as J, listConversationMessages as D, listConversations as L, deleteConversation as V, getConversation as X, createConversation as Y } from "./webchat-client3.js";
1
+ import { createUser as x, generateUserKey as y, sendPerfMetrics as k, removeMessageFeedback as F, addMessageFeedback as T, getEvent as R, createEvent as w, deleteUser as I, updateUser as K, getUser as O, createFile as S, deleteMessage as _, getMessage as q, updateMessage as N, createMessage as z, listParticipants as A, getParticipant as J, removeParticipant as j, addParticipant as D, listConversationMessages as L, listConversations as V, deleteConversation as X, getConversation as Y, createConversation as B } from "./webchat-client3.js";
2
2
  import { client as l } from "./webchat-client4.js";
3
- import { EventSource as j } from "./webchat-client5.js";
4
- import { throwErrorInterceptor as y } from "./webchat-client6.js";
3
+ import { EventSource as G } from "./webchat-client5.js";
4
+ import { throwErrorInterceptor as b } from "./webchat-client6.js";
5
5
  import { createEventEmitter as C } from "./webchat-client7.js";
6
- const r = (a) => a.data, b = 10, E = 3e3, B = "60000", m = {
6
+ const n = (a) => a.data, $ = 10, M = 3e3, H = "60000", v = {
7
7
  throwOnError: !0
8
- }, ee = async ({
8
+ }, se = async ({
9
9
  clientId: a,
10
- apiUrl: o,
11
- adminSecret: i
10
+ apiUrl: c,
11
+ adminSecret: i,
12
+ customHeaders: o,
13
+ ...s
12
14
  }) => {
13
- const t = `${o || l.getConfig().baseUrl}/${a}`;
14
- l.interceptors.response._fns.length === 0 && l.interceptors.response.use(y);
15
- const c = {
16
- ...m,
17
- baseUrl: t
15
+ const d = `${c || l.getConfig().baseUrl}/${a}`;
16
+ l.interceptors.response._fns.length === 0 && l.interceptors.response.use(b);
17
+ const t = {
18
+ ...v,
19
+ baseUrl: d
20
+ }, h = {
21
+ ...i ? { "x-admin-secret": i } : {},
22
+ ...o
18
23
  };
19
- return f({
20
- ...c,
21
- body: {},
22
- headers: i ? { "x-admin-secret": i } : void 0
23
- }).then(r);
24
- }, te = ({
24
+ return x({
25
+ ...t,
26
+ headers: Object.keys(h).length > 0 ? h : void 0,
27
+ body: s
28
+ }).then(n);
29
+ }, ne = ({
25
30
  conversationId: a,
26
- userToken: o,
31
+ userToken: c,
27
32
  clientId: i,
28
- apiUrl: t
33
+ apiUrl: o,
34
+ adminSecret: s
29
35
  }) => {
30
- let c = 0, n = null;
31
- const p = C(), e = () => {
32
- n && n.close();
33
- const d = `${`${t || l.getConfig().baseUrl}/${i}`}/initialize${a ? `?conversationId=${a}` : ""}`;
34
- n = M(d, o ? { "x-user-token": o } : {}), n.onopen = () => p.emit("open"), n.onerror = (h) => {
35
- c < b ? (c++, setTimeout(() => e(), E)) : p.emit("error", h);
36
- }, n.onmessage = (h) => {
37
- const g = $(h.data);
38
- p.emit(g.type, g.data);
36
+ let d = 0, t = null;
37
+ const h = C(), e = () => {
38
+ t && t.close();
39
+ const g = `${`${o || l.getConfig().baseUrl}/${i}`}/initialize${a ? `?conversationId=${a}` : ""}`, p = {
40
+ ...s ? { "x-admin-secret": s } : {},
41
+ ...c ? { "x-user-key": c } : {}
42
+ };
43
+ t = P(g, p), t.onopen = () => h.emit("open"), t.onerror = (u) => {
44
+ d < $ ? (d++, setTimeout(() => e(), M)) : h.emit("error", u);
45
+ }, t.onmessage = (u) => {
46
+ const m = E(u.data);
47
+ h.emit(m.type, m.data);
39
48
  };
40
49
  };
41
- return e(), p.on;
42
- }, ne = async ({
50
+ return e(), h.on;
51
+ }, re = async ({
43
52
  adminSecret: a,
44
- expiresAt: o,
53
+ expiresAt: c,
45
54
  userId: i,
46
- apiUrl: t,
47
- clientId: c
55
+ apiUrl: o,
56
+ clientId: s
48
57
  }) => {
49
- const n = { "x-admin-secret": a }, p = `${t || l.getConfig().baseUrl}/${c}`, e = {
50
- ...m,
51
- baseUrl: p
58
+ const d = { "x-admin-secret": a }, t = `${o || l.getConfig().baseUrl}/${s}`, h = {
59
+ ...v,
60
+ baseUrl: t
61
+ };
62
+ return y({ ...h, headers: d, body: { id: i, expiresAt: c } }).then(n);
63
+ }, ae = async (a, c, i, o) => {
64
+ const s = `${i || l.getConfig().baseUrl}/${a}`, d = {
65
+ ...v,
66
+ baseUrl: s
52
67
  };
53
- return U({ ...e, headers: n, body: { id: i, expiresAt: o } }).then(r);
54
- }, re = ({
68
+ return k({ ...d, body: c, headers: o }).then(n);
69
+ }, oe = ({
55
70
  userKey: a,
56
- clientId: o,
57
- apiUrl: i
71
+ clientId: c,
72
+ apiUrl: i,
73
+ customHeaders: o
58
74
  }) => {
59
- const t = {
60
- "x-user-key": a
61
- }, c = `${i || l.getConfig().baseUrl}/${o}`, n = {
62
- ...m,
63
- baseUrl: c
75
+ const s = {
76
+ "x-user-key": a,
77
+ ...o
78
+ }, d = `${i || l.getConfig().baseUrl}/${c}`, t = {
79
+ ...v,
80
+ baseUrl: d
64
81
  };
65
- return l.interceptors.response._fns.length === 0 && l.interceptors.response.use(y), {
66
- createConversation: () => Y({ ...n, headers: t, body: {} }).then(r),
67
- getConversation: ({ conversationId: e }) => X({ ...n, headers: t, path: { id: e } }).then(r),
68
- deleteConversation: ({ conversationId: e }) => V({ ...n, headers: t, path: { id: e } }).then(r),
69
- listConversations: ({ nextToken: e }) => L({ ...n, headers: t, query: { nextToken: e } }).then(r),
70
- listConversationMessages: ({ conversationId: e, nextToken: s }) => D({
71
- ...n,
72
- headers: t,
82
+ return l.interceptors.response._fns.length === 0 && l.interceptors.response.use(b), {
83
+ createConversation: () => B({ ...t, headers: s, body: {} }).then(n),
84
+ getConversation: ({ conversationId: e }) => Y({ ...t, headers: s, path: { id: e } }).then(n),
85
+ deleteConversation: ({ conversationId: e }) => X({ ...t, headers: s, path: { id: e } }).then(n),
86
+ listConversations: ({ nextToken: e }) => V({ ...t, headers: s, query: { nextToken: e } }).then(n),
87
+ listConversationMessages: ({ conversationId: e, nextToken: r }) => L({
88
+ ...t,
89
+ headers: s,
73
90
  path: { id: e },
74
- query: { nextToken: s }
75
- }).then(r),
76
- addParticipant: ({ conversationId: e, userId: s }) => J({ ...n, headers: t, path: { id: e }, body: { userId: s } }).then(r),
77
- removeParticipant: ({ conversationId: e, userId: s }) => A({ ...n, headers: t, path: { id: e, userId: s } }).then(r),
78
- getParticipant: ({ conversationId: e, userId: s }) => z({ ...n, headers: t, path: { id: e, userId: s } }).then(r),
79
- listParticipants: ({ conversationId: e, nextToken: s }) => O({ ...n, headers: t, path: { id: e }, query: { nextToken: s } }).then(r),
80
- createMessage: (e) => N({ ...n, headers: t, body: e }).then(r),
81
- updateMessage: ({ messageId: e, ...s }) => q({ ...n, headers: t, path: { id: e }, body: s }).then(r),
82
- getMessage: ({ messageId: e }) => _({ ...n, headers: t, path: { id: e } }).then(r),
83
- deleteMessage: ({ messageId: e }) => K({ ...n, headers: t, path: { id: e } }).then(r),
84
- createFile: (e) => I({ ...n, headers: t, body: e }).then(r),
85
- createUser: (e) => f({ ...n, headers: t, body: e }).then(r),
86
- getUser: () => w({ ...n, headers: t }).then(r),
87
- updateUser: (e) => S({ ...n, headers: t, body: e }).then(r),
88
- deleteUser: () => R({ ...n, headers: t }).then(r),
89
- createEvent: (e) => k({ ...n, headers: t, body: e }).then(r),
90
- getEvent: ({ eventId: e }) => T({ ...n, headers: t, path: { id: e } }).then(r),
91
- addMessageFeedback: ({ messageId: e, ...s }) => F({ ...n, headers: t, path: { id: e }, body: s }).then(r),
92
- removeMessageFeedback: ({ messageId: e }) => x({ ...n, headers: t, path: { id: e } }).then(r),
93
- generateUserKey: ({ adminSecret: e, ...s }) => U({ ...n, headers: { "x-admin-secret": e }, body: s }).then(r),
91
+ query: { nextToken: r }
92
+ }).then(n),
93
+ addParticipant: ({ conversationId: e, userId: r }) => D({ ...t, headers: s, path: { id: e }, body: { userId: r } }).then(n),
94
+ removeParticipant: ({ conversationId: e, userId: r }) => j({ ...t, headers: s, path: { id: e, userId: r } }).then(n),
95
+ getParticipant: ({ conversationId: e, userId: r }) => J({ ...t, headers: s, path: { id: e, userId: r } }).then(n),
96
+ listParticipants: ({ conversationId: e, nextToken: r }) => A({ ...t, headers: s, path: { id: e }, query: { nextToken: r } }).then(n),
97
+ createMessage: (e) => z({ ...t, headers: s, body: e }).then(n),
98
+ updateMessage: ({ messageId: e, ...r }) => N({ ...t, headers: s, path: { id: e }, body: r }).then(n),
99
+ getMessage: ({ messageId: e }) => q({ ...t, headers: s, path: { id: e } }).then(n),
100
+ deleteMessage: ({ messageId: e }) => _({ ...t, headers: s, path: { id: e } }).then(n),
101
+ createFile: (e) => S({ ...t, headers: s, body: e }).then(n),
102
+ getUser: () => O({ ...t, headers: s }).then(n),
103
+ updateUser: (e) => K({ ...t, headers: s, body: e }).then(n),
104
+ deleteUser: () => I({ ...t, headers: s }).then(n),
105
+ createEvent: (e) => w({ ...t, headers: s, body: e }).then(n),
106
+ getEvent: ({ eventId: e }) => R({ ...t, headers: s, path: { id: e } }).then(n),
107
+ addMessageFeedback: ({ messageId: e, ...r }) => T({ ...t, headers: s, path: { id: e }, body: r }).then(n),
108
+ removeMessageFeedback: ({ messageId: e }) => F({ ...t, headers: s, path: { id: e } }).then(n),
109
+ generateUserKey: ({ adminSecret: e, ...r }) => y({ ...t, headers: { "x-admin-secret": e }, body: r }).then(n),
94
110
  listenConversation: ({ conversationId: e }) => {
95
- let s = 0, d = null;
96
- const h = C(), g = () => {
97
- d && d.close();
98
- const P = `${c}/conversations/${e}/listen`;
99
- d = M(P, t), d.onopen = () => h.emit("open"), d.onerror = (u) => {
100
- s < b ? (s++, setTimeout(() => g(), E)) : h.emit("error", u);
101
- }, d.onmessage = (u) => {
102
- const v = $(u.data);
103
- h.emit(v.type, v.data);
111
+ let r = 0, g = null;
112
+ const p = C(), u = () => {
113
+ g && g.close();
114
+ const m = `${d}/conversations/${e}/listen`;
115
+ g = P(m, s), g.onopen = () => p.emit("open"), g.onerror = (f) => {
116
+ r < $ ? (r++, setTimeout(() => u(), M)) : p.emit("error", f);
117
+ }, g.onmessage = (f) => {
118
+ const U = E(f.data);
119
+ p.emit(U.type, U.data);
104
120
  };
105
121
  };
106
- return g(), h.on;
122
+ return u(), p.on;
107
123
  }
108
124
  };
109
- }, $ = (a) => {
125
+ }, E = (a) => {
110
126
  try {
111
127
  return JSON.parse(a);
112
128
  } catch {
113
129
  return a;
114
130
  }
115
- }, M = (a, o) => new j(a, {
116
- fetch: (i, t) => fetch(i, {
117
- ...t,
131
+ }, P = (a, c) => new G(a, {
132
+ fetch: (i, o) => fetch(i, {
133
+ ...o,
118
134
  headers: {
119
- ...t == null ? void 0 : t.headers,
120
- ...o,
121
- timeout: B
135
+ ...o == null ? void 0 : o.headers,
136
+ ...c,
137
+ timeout: H
122
138
  }
123
139
  })
124
140
  });
125
141
  export {
126
- re as createClient,
127
- ee as createUser,
128
- ne as generateUserKey,
129
- te as initialize
142
+ oe as createClient,
143
+ se as createUser,
144
+ re as generateUserKey,
145
+ ne as initialize,
146
+ ae as sendPerfMetrics
130
147
  };
@@ -47,54 +47,54 @@ const t = (e) => (e.client ?? r).delete({
47
47
  "Content-Type": "application/json",
48
48
  ...e == null ? void 0 : e.headers
49
49
  }
50
- }), i = (e) => (e.client ?? r).post({
50
+ }), y = (e) => (e.client ?? r).post({
51
51
  url: "/messages",
52
52
  ...e,
53
53
  headers: {
54
54
  "Content-Type": "application/json",
55
55
  ...e == null ? void 0 : e.headers
56
56
  }
57
- }), y = (e) => (e.client ?? r).delete({
57
+ }), j = (e) => (e.client ?? r).delete({
58
58
  url: "/messages/{id}/feedback",
59
59
  ...e
60
- }), j = (e) => (e.client ?? r).put({
60
+ }), T = (e) => (e.client ?? r).put({
61
61
  url: "/messages/{id}/feedback",
62
62
  ...e,
63
63
  headers: {
64
64
  "Content-Type": "application/json",
65
65
  ...e == null ? void 0 : e.headers
66
66
  }
67
- }), T = (e) => (e.client ?? r).delete({
67
+ }), M = (e) => (e.client ?? r).delete({
68
68
  url: "/users/me",
69
69
  ...e
70
- }), M = (e) => (e.client ?? r).get({
70
+ }), i = (e) => (e.client ?? r).get({
71
71
  url: "/users/me",
72
72
  ...e
73
- }), k = (e) => (e.client ?? r).put({
73
+ }), f = (e) => (e.client ?? r).put({
74
74
  url: "/users/me",
75
75
  ...e,
76
76
  headers: {
77
77
  "Content-Type": "application/json",
78
78
  ...e == null ? void 0 : e.headers
79
79
  }
80
- }), U = (e) => ((e == null ? void 0 : e.client) ?? r).post({
80
+ }), k = (e) => ((e == null ? void 0 : e.client) ?? r).post({
81
81
  url: "/users",
82
82
  ...e,
83
83
  headers: {
84
84
  "Content-Type": "application/json",
85
85
  ...e == null ? void 0 : e.headers
86
86
  }
87
- }), b = (e) => ((e == null ? void 0 : e.client) ?? r).post({
87
+ }), P = (e) => ((e == null ? void 0 : e.client) ?? r).post({
88
88
  url: "/users/key",
89
89
  ...e,
90
90
  headers: {
91
91
  "Content-Type": "application/json",
92
92
  ...e == null ? void 0 : e.headers
93
93
  }
94
- }), f = (e) => (e.client ?? r).get({
94
+ }), U = (e) => (e.client ?? r).get({
95
95
  url: "/events/{id}",
96
96
  ...e
97
- }), P = (e) => (e.client ?? r).post({
97
+ }), b = (e) => (e.client ?? r).post({
98
98
  url: "/events",
99
99
  ...e,
100
100
  headers: {
@@ -108,29 +108,37 @@ const t = (e) => (e.client ?? r).delete({
108
108
  "Content-Type": "application/json",
109
109
  ...e == null ? void 0 : e.headers
110
110
  }
111
+ }), E = (e) => ((e == null ? void 0 : e.client) ?? r).post({
112
+ url: "/p",
113
+ ...e,
114
+ headers: {
115
+ "Content-Type": "application/json",
116
+ ...e == null ? void 0 : e.headers
117
+ }
111
118
  });
112
119
  export {
113
- j as addMessageFeedback,
120
+ T as addMessageFeedback,
114
121
  d as addParticipant,
115
122
  n as createConversation,
116
- P as createEvent,
123
+ b as createEvent,
117
124
  F as createFile,
118
- i as createMessage,
119
- U as createUser,
125
+ y as createMessage,
126
+ k as createUser,
120
127
  t as deleteConversation,
121
128
  v as deleteMessage,
122
- T as deleteUser,
123
- b as generateUserKey,
129
+ M as deleteUser,
130
+ P as generateUserKey,
124
131
  c as getConversation,
125
- f as getEvent,
132
+ U as getEvent,
126
133
  C as getMessage,
127
134
  h as getParticipant,
128
- M as getUser,
135
+ i as getUser,
129
136
  s as listConversationMessages,
130
137
  l as listConversations,
131
138
  u as listParticipants,
132
- y as removeMessageFeedback,
139
+ j as removeMessageFeedback,
133
140
  g as removeParticipant,
141
+ E as sendPerfMetrics,
134
142
  m as updateMessage,
135
- k as updateUser
143
+ f as updateUser
136
144
  };
@@ -1,22 +1,22 @@
1
1
  class E extends Error {
2
- constructor(d, s) {
3
- super(d), this.name = "ParseError", this.type = s.type, this.field = s.field, this.value = s.value, this.line = s.line;
2
+ constructor(d, i) {
3
+ super(d), this.name = "ParseError", this.type = i.type, this.field = i.field, this.value = i.value, this.line = i.line;
4
4
  }
5
5
  }
6
6
  function x(n) {
7
7
  }
8
- function I(n) {
8
+ function w(n) {
9
9
  if (typeof n == "function")
10
10
  throw new TypeError(
11
11
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
12
12
  );
13
- const { onEvent: d = x, onError: s = x, onRetry: r = x, onComment: a } = n;
14
- let i = "", o = !0, f, c = "", p = "";
13
+ const { onEvent: d = x, onError: i = x, onRetry: r = x, onComment: c } = n;
14
+ let o = "", s = !0, f, a = "", p = "";
15
15
  function b(e) {
16
- const t = o ? e.replace(/^\xEF\xBB\xBF/, "") : e, [l, u] = w(`${i}${t}`);
16
+ const t = s ? e.replace(/^\xEF\xBB\xBF/, "") : e, [l, u] = g(`${o}${t}`);
17
17
  for (const h of l)
18
18
  y(h);
19
- i = u, o = !1;
19
+ o = u, s = !1;
20
20
  }
21
21
  function y(e) {
22
22
  if (e === "") {
@@ -24,7 +24,7 @@ function I(n) {
24
24
  return;
25
25
  }
26
26
  if (e.startsWith(":")) {
27
- a && a(e.slice(e.startsWith(": ") ? 2 : 1));
27
+ c && c(e.slice(e.startsWith(": ") ? 2 : 1));
28
28
  return;
29
29
  }
30
30
  const t = e.indexOf(":");
@@ -41,14 +41,14 @@ function I(n) {
41
41
  p = t;
42
42
  break;
43
43
  case "data":
44
- c = `${c}${t}
44
+ a = `${a}${t}
45
45
  `;
46
46
  break;
47
47
  case "id":
48
48
  f = t.includes("\0") ? void 0 : t;
49
49
  break;
50
50
  case "retry":
51
- /^\d+$/.test(t) ? r(parseInt(t, 10)) : s(
51
+ /^\d+$/.test(t) ? r(parseInt(t, 10)) : i(
52
52
  new E(`Invalid \`retry\` value: "${t}"`, {
53
53
  type: "invalid-retry",
54
54
  value: t,
@@ -57,7 +57,7 @@ function I(n) {
57
57
  );
58
58
  break;
59
59
  default:
60
- s(
60
+ i(
61
61
  new E(
62
62
  `Unknown field "${e.length > 20 ? `${e.slice(0, 20)}…` : e}"`,
63
63
  { type: "unknown-field", field: e, value: t, line: l }
@@ -67,39 +67,39 @@ function I(n) {
67
67
  }
68
68
  }
69
69
  function v() {
70
- c.length > 0 && d({
70
+ a.length > 0 && d({
71
71
  id: f,
72
72
  event: p || void 0,
73
73
  // If the data buffer's last character is a U+000A LINE FEED (LF) character,
74
74
  // then remove the last character from the data buffer.
75
- data: c.endsWith(`
76
- `) ? c.slice(0, -1) : c
77
- }), f = void 0, c = "", p = "";
75
+ data: a.endsWith(`
76
+ `) ? a.slice(0, -1) : a
77
+ }), f = void 0, a = "", p = "";
78
78
  }
79
79
  function $(e = {}) {
80
- i && e.consume && y(i), o = !0, f = void 0, c = "", p = "", i = "";
80
+ o && e.consume && y(o), s = !0, f = void 0, a = "", p = "", o = "";
81
81
  }
82
82
  return { feed: b, reset: $ };
83
83
  }
84
- function w(n) {
84
+ function g(n) {
85
85
  const d = [];
86
- let s = "", r = 0;
86
+ let i = "", r = 0;
87
87
  for (; r < n.length; ) {
88
- const a = n.indexOf("\r", r), i = n.indexOf(`
88
+ const c = n.indexOf("\r", r), o = n.indexOf(`
89
89
  `, r);
90
- let o = -1;
91
- if (a !== -1 && i !== -1 ? o = Math.min(a, i) : a !== -1 ? o = a : i !== -1 && (o = i), o === -1) {
92
- s = n.slice(r);
90
+ let s = -1;
91
+ if (c !== -1 && o !== -1 ? s = Math.min(c, o) : c !== -1 ? c === n.length - 1 ? s = -1 : s = c : o !== -1 && (s = o), s === -1) {
92
+ i = n.slice(r);
93
93
  break;
94
94
  } else {
95
- const f = n.slice(r, o);
96
- d.push(f), r = o + 1, n[r - 1] === "\r" && n[r] === `
95
+ const f = n.slice(r, s);
96
+ d.push(f), r = s + 1, n[r - 1] === "\r" && n[r] === `
97
97
  ` && r++;
98
98
  }
99
99
  }
100
- return [d, s];
100
+ return [d, i];
101
101
  }
102
102
  export {
103
103
  E as ParseError,
104
- I as createParser
104
+ w as createParser
105
105
  };
@@ -0,0 +1,10 @@
1
+ import { clientInternalConfig } from '@repo/eslint-config/client-internal'
2
+ import { defineConfig } from 'eslint/config'
3
+
4
+ export default defineConfig([clientInternalConfig], {
5
+ languageOptions: {
6
+ parserOptions: {
7
+ tsconfigRootDir: import.meta.dirname,
8
+ },
9
+ },
10
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/webchat-client",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "exports": {
20
20
  ".": {
21
21
  "import": "./dist/webchat-client.js",
22
+ "require": "./dist/webchat-client.js",
22
23
  "types": "./dist/index.d.ts"
23
24
  }
24
25
  },
@@ -29,7 +30,7 @@
29
30
  "eventsource": "^3.0.6"
30
31
  },
31
32
  "devDependencies": {
32
- "@bpinternal/webchat-http-client": "0.5.1",
33
+ "@bpinternal/webchat-http-client": "0.8.0",
33
34
  "@hey-api/client-fetch": "^0.10.0",
34
35
  "@hey-api/openapi-ts": "^0.66.4",
35
36
  "@repo/eslint-config": "workspace:*",