@aui.io/aui-client 1.2.36 → 1.2.37

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/README.md CHANGED
@@ -272,15 +272,16 @@ Submit a new message to an existing task (non-streaming).
272
272
  ```typescript
273
273
  const messageResponse = await client.controllerApi.sendMessage({
274
274
  task_id: string, // Task identifier
275
- text: string, // Message text
275
+ text?: string, // Message text (optional in v1.2.36+)
276
276
  is_external_api?: boolean, // Optional: mark as external API call
277
- include_trace_info?: boolean, // Optional: include trace/debug info in response (NEW)
277
+ include_trace_info?: boolean, // Optional: include trace/debug info in response (NEW in v1.2.35)
278
278
  context?: { // Optional: additional context
279
279
  url?: string,
280
280
  lead_details?: Record<string, any>,
281
281
  welcome_message?: string
282
282
  },
283
- agent_variables?: Record<string, unknown> // Optional: custom agent variables
283
+ agent_variables?: Record<string, unknown>, // Optional: custom agent variables
284
+ static_context?: Record<string, unknown> // Optional: static context data (NEW in v1.2.36)
284
285
  });
285
286
 
286
287
  // Returns: Message - Complete agent response with optional product cards
@@ -351,23 +352,27 @@ const traceInfo = await client.controllerApi.getTraceInfo('your-task-id', messag
351
352
  console.log('Trace Info:', traceInfo);
352
353
  ```
353
354
 
354
- #### `getDirectFollowupSuggestions(taskId)` - Get Direct Followup Suggestions (NEW in v1.2.28)
355
- Retrieve AI-generated followup suggestions for a specific task.
355
+ #### `getDirectFollowupSuggestions(taskId)` - Get Direct Followup Suggestions
356
+ Retrieve AI-generated followup suggestions for a specific task. Returns a response object containing the suggestions array and a metadata ID for tracking.
356
357
 
357
358
  ```typescript
358
- const suggestions: string[] = await client.controllerApi.getDirectFollowupSuggestions('your-task-id');
359
+ const response = await client.controllerApi.getDirectFollowupSuggestions('your-task-id');
359
360
 
360
- // Returns: string[] - Array of suggested followup questions
361
+ // Returns: DirectFollowupSuggestionsResponse
362
+ // {
363
+ // suggestions?: string[], // Array of suggested followup questions
364
+ // metadata_id?: string // Metadata ID for tracking/analytics (NEW in v1.2.36)
365
+ // }
361
366
  ```
362
367
 
363
368
  **Example:**
364
369
 
365
370
  ```typescript
366
- // Get followup suggestions for a task
367
- const suggestions: string[] = await client.controllerApi.getDirectFollowupSuggestions('your-task-id');
371
+ const response = await client.controllerApi.getDirectFollowupSuggestions('your-task-id');
368
372
 
373
+ console.log('Metadata ID:', response.metadata_id);
369
374
  console.log('Suggested followups:');
370
- suggestions.forEach((suggestion, index) => {
375
+ response.suggestions?.forEach((suggestion, index) => {
371
376
  console.log(`${index + 1}. ${suggestion}`);
372
377
  });
373
378
  ```
@@ -656,7 +661,7 @@ async function debugAgentResponse(taskId: string) {
656
661
  debugAgentResponse('task-123');
657
662
  ```
658
663
 
659
- ### Get Direct Followup Suggestions (NEW in v1.2.28)
664
+ ### Get Direct Followup Suggestions
660
665
 
661
666
  ```typescript
662
667
  import { ApolloClient } from '@aui.io/aui-client';
@@ -668,15 +673,17 @@ const client = new ApolloClient({
668
673
  async function getSuggestedQuestions(taskId: string) {
669
674
  try {
670
675
  // Get AI-generated followup suggestions based on conversation context
671
- const suggestions = await client.controllerApi.getDirectFollowupSuggestions(taskId);
676
+ const response = await client.controllerApi.getDirectFollowupSuggestions(taskId);
677
+
678
+ // metadata_id can be used for tracking/analytics
679
+ console.log('Metadata ID:', response.metadata_id);
672
680
 
673
681
  console.log('Suggested followup questions:');
674
- suggestions.forEach((suggestion, index) => {
682
+ response.suggestions?.forEach((suggestion, index) => {
675
683
  console.log(` ${index + 1}. ${suggestion}`);
676
684
  });
677
685
 
678
- // Use these suggestions to guide the user's next interaction
679
- return suggestions;
686
+ return response;
680
687
  } catch (error) {
681
688
  console.error('Error getting suggestions:', error);
682
689
  throw error;
@@ -686,6 +693,7 @@ async function getSuggestedQuestions(taskId: string) {
686
693
  // Example usage
687
694
  getSuggestedQuestions('task-123');
688
695
  // Output:
696
+ // Metadata ID: 69e4b4d4359671434fdff849
689
697
  // Suggested followup questions:
690
698
  // 1. "What colors are available?"
691
699
  // 2. "Do you offer financing options?"
@@ -45,8 +45,8 @@ class ApolloClient {
45
45
  "x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
46
46
  "X-Fern-Language": "JavaScript",
47
47
  "X-Fern-SDK-Name": "@aui.io/aui-client",
48
- "X-Fern-SDK-Version": "1.2.36",
49
- "User-Agent": "@aui.io/aui-client/1.2.36",
48
+ "X-Fern-SDK-Version": "1.2.37",
49
+ "User-Agent": "@aui.io/aui-client/1.2.37",
50
50
  "X-Fern-Runtime": core.RUNTIME.type,
51
51
  "X-Fern-Runtime-Version": core.RUNTIME.version,
52
52
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.36";
1
+ export declare const SDK_VERSION = "1.2.37";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.2.36";
4
+ exports.SDK_VERSION = "1.2.37";
@@ -9,8 +9,8 @@ export class ApolloClient {
9
9
  "x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
10
10
  "X-Fern-Language": "JavaScript",
11
11
  "X-Fern-SDK-Name": "@aui.io/aui-client",
12
- "X-Fern-SDK-Version": "1.2.36",
13
- "User-Agent": "@aui.io/aui-client/1.2.36",
12
+ "X-Fern-SDK-Version": "1.2.37",
13
+ "User-Agent": "@aui.io/aui-client/1.2.37",
14
14
  "X-Fern-Runtime": core.RUNTIME.type,
15
15
  "X-Fern-Runtime-Version": core.RUNTIME.version,
16
16
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.36";
1
+ export declare const SDK_VERSION = "1.2.37";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.2.36";
1
+ export const SDK_VERSION = "1.2.37";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aui.io/aui-client",
3
- "version": "1.2.36",
3
+ "version": "1.2.37",
4
4
  "private": false,
5
5
  "repository": "github:aui-io/aui-client-typescript",
6
6
  "type": "commonjs",