iframe-pubsub 1.0.16 → 1.0.18

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/index.d.mts CHANGED
@@ -88,6 +88,8 @@ declare enum AIChatNameEnum {
88
88
  SET_USER_ID = "setUserId",
89
89
  SET_CUSTOM_HEADERS = "setCustomHeaders",
90
90
  SET_CUSTOM_PAYLOAD = "setCustomPayload",
91
+ SET_METADATA = "setMetadata",
92
+ ADD_SYSTEM_MESSAGE = "addSystemMessage",
91
93
  SET_SUGGESTIONS = "setSuggestions",
92
94
  SHOW_SUGGESTIONS = "showSuggestions",
93
95
  SHOW_CHAT_MESSAGE = "showChatMessage",
@@ -137,6 +139,17 @@ declare class AIChatClient extends Client {
137
139
  * @param suggestions The suggestions to set.
138
140
  */
139
141
  setSuggestions(suggestions: any[]): void;
142
+ /**
143
+ * Product metadata for the AI Chat component.
144
+ * @param metadata JSON object containing metadata for the AI Chat component.
145
+ */
146
+ setMetadata(metadata: any): void;
147
+ /**
148
+ * Add a system message to the AI Chat component.
149
+ *
150
+ * @param systemMessage The system message to add.
151
+ */
152
+ addSystemMessage(systemMessage: string): void;
140
153
  /**
141
154
  * Show suggestions in the AI Chat component.
142
155
  *
package/dist/index.d.ts CHANGED
@@ -88,6 +88,8 @@ declare enum AIChatNameEnum {
88
88
  SET_USER_ID = "setUserId",
89
89
  SET_CUSTOM_HEADERS = "setCustomHeaders",
90
90
  SET_CUSTOM_PAYLOAD = "setCustomPayload",
91
+ SET_METADATA = "setMetadata",
92
+ ADD_SYSTEM_MESSAGE = "addSystemMessage",
91
93
  SET_SUGGESTIONS = "setSuggestions",
92
94
  SHOW_SUGGESTIONS = "showSuggestions",
93
95
  SHOW_CHAT_MESSAGE = "showChatMessage",
@@ -137,6 +139,17 @@ declare class AIChatClient extends Client {
137
139
  * @param suggestions The suggestions to set.
138
140
  */
139
141
  setSuggestions(suggestions: any[]): void;
142
+ /**
143
+ * Product metadata for the AI Chat component.
144
+ * @param metadata JSON object containing metadata for the AI Chat component.
145
+ */
146
+ setMetadata(metadata: any): void;
147
+ /**
148
+ * Add a system message to the AI Chat component.
149
+ *
150
+ * @param systemMessage The system message to add.
151
+ */
152
+ addSystemMessage(systemMessage: string): void;
140
153
  /**
141
154
  * Show suggestions in the AI Chat component.
142
155
  *
package/dist/index.js CHANGED
@@ -322,6 +322,8 @@ var AIChatNameEnum = /* @__PURE__ */ ((AIChatNameEnum2) => {
322
322
  AIChatNameEnum2["SET_USER_ID"] = "setUserId";
323
323
  AIChatNameEnum2["SET_CUSTOM_HEADERS"] = "setCustomHeaders";
324
324
  AIChatNameEnum2["SET_CUSTOM_PAYLOAD"] = "setCustomPayload";
325
+ AIChatNameEnum2["SET_METADATA"] = "setMetadata";
326
+ AIChatNameEnum2["ADD_SYSTEM_MESSAGE"] = "addSystemMessage";
325
327
  AIChatNameEnum2["SET_SUGGESTIONS"] = "setSuggestions";
326
328
  AIChatNameEnum2["SHOW_SUGGESTIONS"] = "showSuggestions";
327
329
  AIChatNameEnum2["SHOW_CHAT_MESSAGE"] = "showChatMessage";
@@ -393,6 +395,21 @@ var AIChatClient = class extends Client {
393
395
  setSuggestions(suggestions) {
394
396
  this.sendAIChatPubsubMethod("setSuggestions" /* SET_SUGGESTIONS */, suggestions);
395
397
  }
398
+ /**
399
+ * Product metadata for the AI Chat component.
400
+ * @param metadata JSON object containing metadata for the AI Chat component.
401
+ */
402
+ setMetadata(metadata) {
403
+ this.sendAIChatPubsubMethod("setMetadata" /* SET_METADATA */, metadata);
404
+ }
405
+ /**
406
+ * Add a system message to the AI Chat component.
407
+ *
408
+ * @param systemMessage The system message to add.
409
+ */
410
+ addSystemMessage(systemMessage) {
411
+ this.sendAIChatPubsubMethod("addSystemMessage" /* ADD_SYSTEM_MESSAGE */, systemMessage);
412
+ }
396
413
  /**
397
414
  * Show suggestions in the AI Chat component.
398
415
  *
package/dist/index.mjs CHANGED
@@ -295,6 +295,8 @@ var AIChatNameEnum = /* @__PURE__ */ ((AIChatNameEnum2) => {
295
295
  AIChatNameEnum2["SET_USER_ID"] = "setUserId";
296
296
  AIChatNameEnum2["SET_CUSTOM_HEADERS"] = "setCustomHeaders";
297
297
  AIChatNameEnum2["SET_CUSTOM_PAYLOAD"] = "setCustomPayload";
298
+ AIChatNameEnum2["SET_METADATA"] = "setMetadata";
299
+ AIChatNameEnum2["ADD_SYSTEM_MESSAGE"] = "addSystemMessage";
298
300
  AIChatNameEnum2["SET_SUGGESTIONS"] = "setSuggestions";
299
301
  AIChatNameEnum2["SHOW_SUGGESTIONS"] = "showSuggestions";
300
302
  AIChatNameEnum2["SHOW_CHAT_MESSAGE"] = "showChatMessage";
@@ -366,6 +368,21 @@ var AIChatClient = class extends Client {
366
368
  setSuggestions(suggestions) {
367
369
  this.sendAIChatPubsubMethod("setSuggestions" /* SET_SUGGESTIONS */, suggestions);
368
370
  }
371
+ /**
372
+ * Product metadata for the AI Chat component.
373
+ * @param metadata JSON object containing metadata for the AI Chat component.
374
+ */
375
+ setMetadata(metadata) {
376
+ this.sendAIChatPubsubMethod("setMetadata" /* SET_METADATA */, metadata);
377
+ }
378
+ /**
379
+ * Add a system message to the AI Chat component.
380
+ *
381
+ * @param systemMessage The system message to add.
382
+ */
383
+ addSystemMessage(systemMessage) {
384
+ this.sendAIChatPubsubMethod("addSystemMessage" /* ADD_SYSTEM_MESSAGE */, systemMessage);
385
+ }
369
386
  /**
370
387
  * Show suggestions in the AI Chat component.
371
388
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iframe-pubsub",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "A PubSub library for iframe communication.",
5
5
  "author": "Lap Tran",
6
6
  "license": "ISC",