lr-chatbot 0.39.18 → 0.39.19

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 (3) hide show
  1. package/index.js +28 -23
  2. package/index.js.map +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -21866,11 +21866,11 @@ const Ge = class Ge extends vo {
21866
21866
  * @summary Gets a conversation
21867
21867
  * @request GET:/api/chatbot/conversations/{id}
21868
21868
  */
21869
- B(this, "chatbotConversationsGet", (e, n = {}) => this.request({
21869
+ B(this, "chatbotConversationsGet", ({ id: e, ...n }, i = {}) => this.request({
21870
21870
  path: Ge.Endpoints.chatbotConversationsGet({ id: e }),
21871
21871
  method: "GET",
21872
21872
  format: "json",
21873
- ...n
21873
+ ...i
21874
21874
  }));
21875
21875
  /**
21876
21876
  * @description Gets a current user conversation summary
@@ -21879,11 +21879,11 @@ const Ge = class Ge extends vo {
21879
21879
  * @summary Gets a conversation summary
21880
21880
  * @request GET:/api/chatbot/conversations/{id}/summary
21881
21881
  */
21882
- B(this, "chatbotConversationsSummaryGet", (e, n = {}) => this.request({
21882
+ B(this, "chatbotConversationsSummaryGet", ({ id: e, ...n }, i = {}) => this.request({
21883
21883
  path: Ge.Endpoints.chatbotConversationsSummaryGet({ id: e }),
21884
21884
  method: "GET",
21885
21885
  format: "json",
21886
- ...n
21886
+ ...i
21887
21887
  }));
21888
21888
  /**
21889
21889
  * @description Asks a new question on the current or new conversation
@@ -21907,12 +21907,12 @@ const Ge = class Ge extends vo {
21907
21907
  * @summary Rates a conversation
21908
21908
  * @request POST:/api/chatbot/conversations/{id}/rate
21909
21909
  */
21910
- B(this, "chatbotConversationsRatePost", (e, n, i = {}) => this.request({
21910
+ B(this, "chatbotConversationsRatePost", ({ id: e, ...n }, i, a = {}) => this.request({
21911
21911
  path: Ge.Endpoints.chatbotConversationsRatePost({ id: e }),
21912
21912
  method: "POST",
21913
- body: n,
21913
+ body: i,
21914
21914
  type: "application/json",
21915
- ...i
21915
+ ...a
21916
21916
  }));
21917
21917
  /**
21918
21918
  * @description Rates an existing message from within a conversation
@@ -21921,12 +21921,15 @@ const Ge = class Ge extends vo {
21921
21921
  * @summary Rates a message inside a conversation
21922
21922
  * @request POST:/api/chatbot/conversations/{id}/messages/{message_id}/rate
21923
21923
  */
21924
- B(this, "chatbotConversationsMessagesRatePost", (e, n, i, a = {}) => this.request({
21925
- path: Ge.Endpoints.chatbotConversationsMessagesRatePost({ id: e, messageId: n }),
21924
+ B(this, "chatbotConversationsMessagesRatePost", ({ id: e, messageId: n, ...i }, a, s = {}) => this.request({
21925
+ path: Ge.Endpoints.chatbotConversationsMessagesRatePost({
21926
+ id: e,
21927
+ messageId: n
21928
+ }),
21926
21929
  method: "POST",
21927
- body: i,
21930
+ body: a,
21928
21931
  type: "application/json",
21929
- ...a
21932
+ ...s
21930
21933
  }));
21931
21934
  /**
21932
21935
  * @description Rates an existing message from within a conversation
@@ -21935,13 +21938,13 @@ const Ge = class Ge extends vo {
21935
21938
  * @summary Summarizes a conversation and wraps with a hermes ticket
21936
21939
  * @request POST:/api/chatbot/conversations/{id}/interactions/summarize
21937
21940
  */
21938
- B(this, "chatbotConversationsInteractionsSummarizePost", (e, n, i = {}) => this.request({
21941
+ B(this, "chatbotConversationsInteractionsSummarizePost", ({ id: e, ...n }, i, a = {}) => this.request({
21939
21942
  path: Ge.Endpoints.chatbotConversationsInteractionsSummarizePost({ id: e }),
21940
21943
  method: "POST",
21941
- body: n,
21944
+ body: i,
21942
21945
  type: "application/json",
21943
21946
  format: "json",
21944
- ...i
21947
+ ...a
21945
21948
  }));
21946
21949
  /**
21947
21950
  * No description
@@ -22606,10 +22609,13 @@ let Ln = class extends On {
22606
22609
  baseURL: this.messageContext.apiUrl,
22607
22610
  withCredentials: !0,
22608
22611
  method: "POST"
22609
- }), { ticketId: a } = await i.chatbotConversationsInteractionsSummarizePost(n, {
22610
- language: this.language,
22611
- origin: ""
22612
- }), s = this.channel === "whatsapp" ? `HERMES ${a}` : a;
22612
+ }), { ticketId: a } = await i.chatbotConversationsInteractionsSummarizePost(
22613
+ { id: n },
22614
+ {
22615
+ language: this.language,
22616
+ origin: ""
22617
+ }
22618
+ ), s = this.channel === "whatsapp" ? `HERMES ${a}` : a;
22613
22619
  t = be("chatbot:escalation.message", {
22614
22620
  context: this.channel,
22615
22621
  conversationId: s
@@ -22719,8 +22725,7 @@ let Yt = class extends fe {
22719
22725
  feedback: ""
22720
22726
  };
22721
22727
  await r.chatbotConversationsMessagesRatePost(
22722
- this.messageContext.conversationId,
22723
- this.messageContext.messageId,
22728
+ { id: this.messageContext.conversationId, messageId: this.messageContext.messageId },
22724
22729
  e
22725
22730
  ), await So(500);
22726
22731
  }
@@ -23151,7 +23156,7 @@ let Lt = class extends fe {
23151
23156
  score: s,
23152
23157
  feedback: this.feedback
23153
23158
  };
23154
- await a.chatbotConversationsRatePost(this.messageContext.conversationId, l);
23159
+ await a.chatbotConversationsRatePost({ id: this.messageContext.conversationId }, l);
23155
23160
  }
23156
23161
  this.getConversationId() || !this.feedback && this.score && this._broadcastController.send({
23157
23162
  action: "addMessage",
@@ -23420,7 +23425,7 @@ let It = class extends fe {
23420
23425
  Jn(this, mi, t);
23421
23426
  }
23422
23427
  getVersion() {
23423
- return "LR Chatbot - v0.39.17";
23428
+ return "LR Chatbot - v0.39.18";
23424
23429
  }
23425
23430
  async connectedCallback() {
23426
23431
  super.connectedCallback(), this._conversationHistoryTask.run();
@@ -23482,7 +23487,7 @@ let It = class extends fe {
23482
23487
  baseURL: this.apiUrl,
23483
23488
  withCredentials: !0,
23484
23489
  method: "GET"
23485
- }).chatbotConversationsGet(t);
23490
+ }).chatbotConversationsGet({ id: t });
23486
23491
  } catch {
23487
23492
  console.error("Error while fetching chatbot conversation history"), localStorage.removeItem(kn);
23488
23493
  }