@aui.io/aui-client 1.2.37 → 1.2.38

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
@@ -352,23 +352,29 @@ const traceInfo = await client.controllerApi.getTraceInfo('your-task-id', messag
352
352
  console.log('Trace Info:', traceInfo);
353
353
  ```
354
354
 
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.
355
+ #### `getDirectFollowupSuggestions(request?)` - Get Direct Followup Suggestions
356
+ Retrieve AI-generated followup suggestions. Accepts optional `context` and `created_by` parameters.
357
357
 
358
358
  ```typescript
359
- const response = await client.controllerApi.getDirectFollowupSuggestions('your-task-id');
359
+ const response = await client.controllerApi.getDirectFollowupSuggestions({
360
+ context?: Record<string, unknown>, // Optional: context data (e.g., { task_id: 'xxx' })
361
+ created_by?: string // Optional: user identifier
362
+ });
360
363
 
361
364
  // Returns: DirectFollowupSuggestionsResponse
362
365
  // {
363
366
  // suggestions?: string[], // Array of suggested followup questions
364
- // metadata_id?: string // Metadata ID for tracking/analytics (NEW in v1.2.36)
367
+ // metadata_id?: string // Metadata ID for tracking/analytics
365
368
  // }
366
369
  ```
367
370
 
368
371
  **Example:**
369
372
 
370
373
  ```typescript
371
- const response = await client.controllerApi.getDirectFollowupSuggestions('your-task-id');
374
+ const response = await client.controllerApi.getDirectFollowupSuggestions({
375
+ context: { task_id: 'your-task-id' },
376
+ created_by: 'user123'
377
+ });
372
378
 
373
379
  console.log('Metadata ID:', response.metadata_id);
374
380
  console.log('Suggested followups:');
@@ -670,14 +676,15 @@ const client = new ApolloClient({
670
676
  networkApiKey: 'API_KEY_YOUR_KEY_HERE'
671
677
  });
672
678
 
673
- async function getSuggestedQuestions(taskId: string) {
679
+ async function getSuggestedQuestions(taskId: string, userId: string) {
674
680
  try {
675
- // Get AI-generated followup suggestions based on conversation context
676
- const response = await client.controllerApi.getDirectFollowupSuggestions(taskId);
681
+ // Get AI-generated followup suggestions with context and user info
682
+ const response = await client.controllerApi.getDirectFollowupSuggestions({
683
+ context: { task_id: taskId },
684
+ created_by: userId
685
+ });
677
686
 
678
- // metadata_id can be used for tracking/analytics
679
687
  console.log('Metadata ID:', response.metadata_id);
680
-
681
688
  console.log('Suggested followup questions:');
682
689
  response.suggestions?.forEach((suggestion, index) => {
683
690
  console.log(` ${index + 1}. ${suggestion}`);
@@ -691,7 +698,7 @@ async function getSuggestedQuestions(taskId: string) {
691
698
  }
692
699
 
693
700
  // Example usage
694
- getSuggestedQuestions('task-123');
701
+ getSuggestedQuestions('task-123', 'user-456');
695
702
  // Output:
696
703
  // Metadata ID: 69e4b4d4359671434fdff849
697
704
  // Suggested followup questions:
@@ -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.37",
49
- "User-Agent": "@aui.io/aui-client/1.2.37",
48
+ "X-Fern-SDK-Version": "1.2.38",
49
+ "User-Agent": "@aui.io/aui-client/1.2.38",
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) });
@@ -103,15 +103,15 @@ export declare class ControllerApi {
103
103
  getAgentContext(request: Record<string, unknown>, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTopicRequestBody>;
104
104
  private __getAgentContext;
105
105
  /**
106
- * @param {string} taskId
106
+ * @param {Apollo.DirectFollowupSuggestionsRequest} request
107
107
  * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
108
108
  *
109
109
  * @throws {@link Apollo.UnprocessableEntityError}
110
110
  *
111
111
  * @example
112
- * await client.controllerApi.getDirectFollowupSuggestions("task_id")
112
+ * await client.controllerApi.getDirectFollowupSuggestions()
113
113
  */
114
- getDirectFollowupSuggestions(taskId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.DirectFollowupSuggestionsResponse>;
114
+ getDirectFollowupSuggestions(request?: Apollo.DirectFollowupSuggestionsRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.DirectFollowupSuggestionsResponse>;
115
115
  private __getDirectFollowupSuggestions;
116
116
  /**
117
117
  * @param {string} taskId
@@ -536,28 +536,31 @@ class ControllerApi {
536
536
  });
537
537
  }
538
538
  /**
539
- * @param {string} taskId
539
+ * @param {Apollo.DirectFollowupSuggestionsRequest} request
540
540
  * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
541
541
  *
542
542
  * @throws {@link Apollo.UnprocessableEntityError}
543
543
  *
544
544
  * @example
545
- * await client.controllerApi.getDirectFollowupSuggestions("task_id")
545
+ * await client.controllerApi.getDirectFollowupSuggestions()
546
546
  */
547
- getDirectFollowupSuggestions(taskId, requestOptions) {
548
- return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(taskId, requestOptions));
547
+ getDirectFollowupSuggestions(request = {}, requestOptions) {
548
+ return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(request, requestOptions));
549
549
  }
550
- __getDirectFollowupSuggestions(taskId, requestOptions) {
551
- return __awaiter(this, void 0, void 0, function* () {
550
+ __getDirectFollowupSuggestions() {
551
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
552
552
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
553
553
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
554
554
  "x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
555
555
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
556
556
  const _response = yield core.fetcher({
557
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}/direct-followup-suggestions`),
558
- method: "GET",
557
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, "api/v1/external/direct-followup-suggestions"),
558
+ method: "POST",
559
559
  headers: _headers,
560
+ contentType: "application/json",
560
561
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
562
+ requestType: "json",
563
+ body: request,
561
564
  timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
562
565
  maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
563
566
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -590,7 +593,7 @@ class ControllerApi {
590
593
  rawResponse: _response.rawResponse,
591
594
  });
592
595
  case "timeout":
593
- throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}/direct-followup-suggestions.");
596
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling POST /api/v1/external/direct-followup-suggestions.");
594
597
  case "unknown":
595
598
  throw new errors.ApolloError({
596
599
  message: _response.error.errorMessage,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface DirectFollowupSuggestionsRequest {
6
+ context?: Record<string, unknown>;
7
+ created_by?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  export type { CreateTaskRequest } from "./CreateTaskRequest.js";
2
+ export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.js";
2
3
  export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.js";
3
4
  export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.js";
4
5
  export type { ListUserTasksRequest } from "./ListUserTasksRequest.js";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.37";
1
+ export declare const SDK_VERSION = "1.2.38";
@@ -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.37";
4
+ exports.SDK_VERSION = "1.2.38";
@@ -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.37",
13
- "User-Agent": "@aui.io/aui-client/1.2.37",
12
+ "X-Fern-SDK-Version": "1.2.38",
13
+ "User-Agent": "@aui.io/aui-client/1.2.38",
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) });
@@ -103,15 +103,15 @@ export declare class ControllerApi {
103
103
  getAgentContext(request: Record<string, unknown>, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.CreateTopicRequestBody>;
104
104
  private __getAgentContext;
105
105
  /**
106
- * @param {string} taskId
106
+ * @param {Apollo.DirectFollowupSuggestionsRequest} request
107
107
  * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
108
108
  *
109
109
  * @throws {@link Apollo.UnprocessableEntityError}
110
110
  *
111
111
  * @example
112
- * await client.controllerApi.getDirectFollowupSuggestions("task_id")
112
+ * await client.controllerApi.getDirectFollowupSuggestions()
113
113
  */
114
- getDirectFollowupSuggestions(taskId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.DirectFollowupSuggestionsResponse>;
114
+ getDirectFollowupSuggestions(request?: Apollo.DirectFollowupSuggestionsRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.DirectFollowupSuggestionsResponse>;
115
115
  private __getDirectFollowupSuggestions;
116
116
  /**
117
117
  * @param {string} taskId
@@ -500,28 +500,31 @@ export class ControllerApi {
500
500
  });
501
501
  }
502
502
  /**
503
- * @param {string} taskId
503
+ * @param {Apollo.DirectFollowupSuggestionsRequest} request
504
504
  * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
505
505
  *
506
506
  * @throws {@link Apollo.UnprocessableEntityError}
507
507
  *
508
508
  * @example
509
- * await client.controllerApi.getDirectFollowupSuggestions("task_id")
509
+ * await client.controllerApi.getDirectFollowupSuggestions()
510
510
  */
511
- getDirectFollowupSuggestions(taskId, requestOptions) {
512
- return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(taskId, requestOptions));
511
+ getDirectFollowupSuggestions(request = {}, requestOptions) {
512
+ return core.HttpResponsePromise.fromPromise(this.__getDirectFollowupSuggestions(request, requestOptions));
513
513
  }
514
- __getDirectFollowupSuggestions(taskId, requestOptions) {
515
- return __awaiter(this, void 0, void 0, function* () {
514
+ __getDirectFollowupSuggestions() {
515
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
516
516
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
517
517
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
518
518
  "x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
519
519
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
520
520
  const _response = yield core.fetcher({
521
- url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}/direct-followup-suggestions`),
522
- method: "GET",
521
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, "api/v1/external/direct-followup-suggestions"),
522
+ method: "POST",
523
523
  headers: _headers,
524
+ contentType: "application/json",
524
525
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
526
+ requestType: "json",
527
+ body: request,
525
528
  timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
526
529
  maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
527
530
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -554,7 +557,7 @@ export class ControllerApi {
554
557
  rawResponse: _response.rawResponse,
555
558
  });
556
559
  case "timeout":
557
- throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}/direct-followup-suggestions.");
560
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling POST /api/v1/external/direct-followup-suggestions.");
558
561
  case "unknown":
559
562
  throw new errors.ApolloError({
560
563
  message: _response.error.errorMessage,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface DirectFollowupSuggestionsRequest {
6
+ context?: Record<string, unknown>;
7
+ created_by?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,5 @@
1
1
  export type { CreateTaskRequest } from "./CreateTaskRequest.mjs";
2
+ export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.mjs";
2
3
  export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.mjs";
3
4
  export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.mjs";
4
5
  export type { ListUserTasksRequest } from "./ListUserTasksRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.2.37";
1
+ export declare const SDK_VERSION = "1.2.38";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.2.37";
1
+ export const SDK_VERSION = "1.2.38";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aui.io/aui-client",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
4
4
  "private": false,
5
5
  "repository": "github:aui-io/aui-client-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -358,7 +358,7 @@ await client.controllerApi.getAgentContext({
358
358
  </dl>
359
359
  </details>
360
360
 
361
- <details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getDirectFollowupSuggestions</a>(taskId) -> Apollo.DirectFollowupSuggestionsResponse</code></summary>
361
+ <details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getDirectFollowupSuggestions</a>({ ...params }) -> Apollo.DirectFollowupSuggestionsResponse</code></summary>
362
362
  <dl>
363
363
  <dd>
364
364
 
@@ -371,7 +371,7 @@ await client.controllerApi.getAgentContext({
371
371
  <dd>
372
372
 
373
373
  ```typescript
374
- await client.controllerApi.getDirectFollowupSuggestions("task_id");
374
+ await client.controllerApi.getDirectFollowupSuggestions();
375
375
 
376
376
  ```
377
377
  </dd>
@@ -387,7 +387,7 @@ await client.controllerApi.getDirectFollowupSuggestions("task_id");
387
387
  <dl>
388
388
  <dd>
389
389
 
390
- **taskId:** `string`
390
+ **request:** `Apollo.DirectFollowupSuggestionsRequest`
391
391
 
392
392
  </dd>
393
393
  </dl>