@aui.io/aui-client 1.2.38 → 1.2.39
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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +8 -3
- package/dist/cjs/api/resources/controllerApi/client/Client.js +26 -10
- package/dist/cjs/api/resources/controllerApi/client/requests/DirectFollowupSuggestionsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/GetTraceInfoRequest.d.ts +13 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/GetTraceInfoRequest.js +3 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.ts +6 -2
- package/dist/cjs/api/resources/controllerApi/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/RecordOriginType.d.ts +1 -0
- package/dist/cjs/api/types/RecordOriginType.js +1 -0
- package/dist/cjs/api/types/RecordScope.d.ts +8 -0
- package/dist/cjs/api/types/RecordScope.js +3 -0
- package/dist/cjs/api/types/RecordScopeType.d.ts +8 -0
- package/dist/cjs/api/types/RecordScopeType.js +11 -0
- package/dist/cjs/api/types/TraceDecisionCallIntegration.d.ts +1 -1
- package/dist/cjs/api/types/TraceInfo.d.ts +2 -2
- package/dist/cjs/api/types/TraceMcpIntegration.d.ts +11 -0
- package/dist/cjs/api/types/TraceMcpIntegration.js +3 -0
- package/dist/cjs/api/types/TraceMcpToolCall.d.ts +6 -0
- package/dist/cjs/api/types/TraceMcpToolCall.js +3 -0
- package/dist/cjs/api/types/TraceRuleAction.d.ts +1 -0
- package/dist/cjs/api/types/TraceRuleAction.js +1 -0
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/controllerApi/client/Client.d.mts +8 -3
- package/dist/esm/api/resources/controllerApi/client/Client.mjs +26 -10
- package/dist/esm/api/resources/controllerApi/client/requests/DirectFollowupSuggestionsRequest.d.mts +2 -0
- package/dist/esm/api/resources/controllerApi/client/requests/GetTraceInfoRequest.d.mts +13 -0
- package/dist/esm/api/resources/controllerApi/client/requests/GetTraceInfoRequest.mjs +2 -0
- package/dist/esm/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.mts +6 -2
- package/dist/esm/api/resources/controllerApi/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/RecordOriginType.d.mts +1 -0
- package/dist/esm/api/types/RecordOriginType.mjs +1 -0
- package/dist/esm/api/types/RecordScope.d.mts +8 -0
- package/dist/esm/api/types/RecordScope.mjs +2 -0
- package/dist/esm/api/types/RecordScopeType.d.mts +8 -0
- package/dist/esm/api/types/RecordScopeType.mjs +8 -0
- package/dist/esm/api/types/TraceDecisionCallIntegration.d.mts +1 -1
- package/dist/esm/api/types/TraceInfo.d.mts +2 -2
- package/dist/esm/api/types/TraceMcpIntegration.d.mts +11 -0
- package/dist/esm/api/types/TraceMcpIntegration.mjs +2 -0
- package/dist/esm/api/types/TraceMcpToolCall.d.mts +6 -0
- package/dist/esm/api/types/TraceMcpToolCall.mjs +2 -0
- package/dist/esm/api/types/TraceRuleAction.d.mts +1 -0
- package/dist/esm/api/types/TraceRuleAction.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +15 -3
package/dist/cjs/Client.js
CHANGED
|
@@ -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.
|
|
49
|
-
"User-Agent": "@aui.io/aui-client/1.2.
|
|
48
|
+
"X-Fern-SDK-Version": "1.2.39",
|
|
49
|
+
"User-Agent": "@aui.io/aui-client/1.2.39",
|
|
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) });
|
|
@@ -69,7 +69,8 @@ export declare class ControllerApi {
|
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* await client.controllerApi.sendMessage({
|
|
72
|
-
*
|
|
72
|
+
* include_business_trace: true,
|
|
73
|
+
* include_context_trace: true,
|
|
73
74
|
* is_external_api: true,
|
|
74
75
|
* task_id: "task_id"
|
|
75
76
|
* })
|
|
@@ -116,14 +117,18 @@ export declare class ControllerApi {
|
|
|
116
117
|
/**
|
|
117
118
|
* @param {string} taskId
|
|
118
119
|
* @param {string} messageId
|
|
120
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
119
121
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
122
|
*
|
|
121
123
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
122
124
|
*
|
|
123
125
|
* @example
|
|
124
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
126
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
127
|
+
* include_business_logic: true,
|
|
128
|
+
* include_context_logic: true
|
|
129
|
+
* })
|
|
125
130
|
*/
|
|
126
|
-
getTraceInfo(taskId: string, messageId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
131
|
+
getTraceInfo(taskId: string, messageId: string, request?: Apollo.GetTraceInfoRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
127
132
|
private __getTraceInfo;
|
|
128
133
|
/**
|
|
129
134
|
* Start a text conversation (WhatsApp or SMS).
|
|
@@ -335,7 +335,8 @@ class ControllerApi {
|
|
|
335
335
|
*
|
|
336
336
|
* @example
|
|
337
337
|
* await client.controllerApi.sendMessage({
|
|
338
|
-
*
|
|
338
|
+
* include_business_trace: true,
|
|
339
|
+
* include_context_trace: true,
|
|
339
340
|
* is_external_api: true,
|
|
340
341
|
* task_id: "task_id"
|
|
341
342
|
* })
|
|
@@ -346,10 +347,13 @@ class ControllerApi {
|
|
|
346
347
|
__sendMessage(request, requestOptions) {
|
|
347
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
348
349
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
349
|
-
const {
|
|
350
|
+
const { include_business_trace: includeBusinessTrace, include_context_trace: includeContextTrace, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_business_trace", "include_context_trace", "is_external_api"]);
|
|
350
351
|
const _queryParams = {};
|
|
351
|
-
if (
|
|
352
|
-
_queryParams.
|
|
352
|
+
if (includeBusinessTrace != null) {
|
|
353
|
+
_queryParams.include_business_trace = includeBusinessTrace.toString();
|
|
354
|
+
}
|
|
355
|
+
if (includeContextTrace != null) {
|
|
356
|
+
_queryParams.include_context_trace = includeContextTrace.toString();
|
|
353
357
|
}
|
|
354
358
|
if (isExternalApi != null) {
|
|
355
359
|
_queryParams.is_external_api = isExternalApi.toString();
|
|
@@ -605,19 +609,31 @@ class ControllerApi {
|
|
|
605
609
|
/**
|
|
606
610
|
* @param {string} taskId
|
|
607
611
|
* @param {string} messageId
|
|
612
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
608
613
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
609
614
|
*
|
|
610
615
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
611
616
|
*
|
|
612
617
|
* @example
|
|
613
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
618
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
619
|
+
* include_business_logic: true,
|
|
620
|
+
* include_context_logic: true
|
|
621
|
+
* })
|
|
614
622
|
*/
|
|
615
|
-
getTraceInfo(taskId, messageId, requestOptions) {
|
|
616
|
-
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
|
|
623
|
+
getTraceInfo(taskId, messageId, request = {}, requestOptions) {
|
|
624
|
+
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, request, requestOptions));
|
|
617
625
|
}
|
|
618
|
-
__getTraceInfo(
|
|
619
|
-
return __awaiter(this,
|
|
626
|
+
__getTraceInfo(taskId_1, messageId_1) {
|
|
627
|
+
return __awaiter(this, arguments, void 0, function* (taskId, messageId, request = {}, requestOptions) {
|
|
620
628
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
629
|
+
const { include_business_logic: includeBusinessLogic, include_context_logic: includeContextLogic } = request;
|
|
630
|
+
const _queryParams = {};
|
|
631
|
+
if (includeBusinessLogic != null) {
|
|
632
|
+
_queryParams.include_business_logic = includeBusinessLogic.toString();
|
|
633
|
+
}
|
|
634
|
+
if (includeContextLogic != null) {
|
|
635
|
+
_queryParams.include_context_logic = includeContextLogic.toString();
|
|
636
|
+
}
|
|
621
637
|
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
622
638
|
"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,
|
|
623
639
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -625,7 +641,7 @@ class ControllerApi {
|
|
|
625
641
|
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)}/messages/${core.url.encodePathParam(messageId)}/trace-info`),
|
|
626
642
|
method: "GET",
|
|
627
643
|
headers: _headers,
|
|
628
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
644
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
629
645
|
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,
|
|
630
646
|
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,
|
|
631
647
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* include_business_logic: true,
|
|
5
|
+
* include_context_logic: true
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface GetTraceInfoRequest {
|
|
9
|
+
/** When false, omits NLU/understanding and business decisions (rules, tools, params, etc.); input and response stay populated. */
|
|
10
|
+
include_business_logic?: boolean;
|
|
11
|
+
/** When false, omits the context section and call_integration (REST/RAG/MCP) decisions. */
|
|
12
|
+
include_context_logic?: boolean;
|
|
13
|
+
}
|
|
@@ -2,13 +2,17 @@ import type * as Apollo from "../../../../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
*
|
|
5
|
+
* include_business_trace: true,
|
|
6
|
+
* include_context_trace: true,
|
|
6
7
|
* is_external_api: true,
|
|
7
8
|
* task_id: "task_id"
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface SubmitMessageRequest {
|
|
11
|
-
|
|
12
|
+
/** When true, includes NLU/understanding and business decisions (rules, tools, params, etc.) in trace_info. */
|
|
13
|
+
include_business_trace?: boolean;
|
|
14
|
+
/** When true, includes the context section and call_integration (REST/RAG/MCP) decisions in trace_info. */
|
|
15
|
+
include_context_trace?: boolean;
|
|
12
16
|
is_external_api?: boolean;
|
|
13
17
|
task_id: string;
|
|
14
18
|
text?: string;
|
|
@@ -2,6 +2,7 @@ export type { CreateTaskRequest } from "./CreateTaskRequest.js";
|
|
|
2
2
|
export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.js";
|
|
3
3
|
export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.js";
|
|
4
4
|
export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.js";
|
|
5
|
+
export type { GetTraceInfoRequest } from "./GetTraceInfoRequest.js";
|
|
5
6
|
export type { ListUserTasksRequest } from "./ListUserTasksRequest.js";
|
|
6
7
|
export type { SubmitMessageRequest } from "./SubmitMessageRequest.js";
|
|
7
8
|
export type { TextConversationInitiateRequest } from "./TextConversationInitiateRequest.js";
|
|
@@ -5,5 +5,6 @@ export declare const RecordOriginType: {
|
|
|
5
5
|
readonly FeedbackPlayground: "feedback-playground";
|
|
6
6
|
readonly LlmManagement: "llm-management";
|
|
7
7
|
readonly ThirdParty: "third-party";
|
|
8
|
+
readonly AgentBuilder: "agent-builder";
|
|
8
9
|
};
|
|
9
10
|
export type RecordOriginType = (typeof RecordOriginType)[keyof typeof RecordOriginType];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const RecordScopeType: {
|
|
2
|
+
readonly Network: "NETWORK";
|
|
3
|
+
readonly Account: "ACCOUNT";
|
|
4
|
+
readonly Seed: "SEED";
|
|
5
|
+
readonly NetworkCategory: "NETWORK_CATEGORY";
|
|
6
|
+
readonly Global: "GLOBAL";
|
|
7
|
+
};
|
|
8
|
+
export type RecordScopeType = (typeof RecordScopeType)[keyof typeof RecordScopeType];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RecordScopeType = void 0;
|
|
5
|
+
exports.RecordScopeType = {
|
|
6
|
+
Network: "NETWORK",
|
|
7
|
+
Account: "ACCOUNT",
|
|
8
|
+
Seed: "SEED",
|
|
9
|
+
NetworkCategory: "NETWORK_CATEGORY",
|
|
10
|
+
Global: "GLOBAL",
|
|
11
|
+
};
|
|
@@ -6,5 +6,5 @@ export interface TraceDecisionCallIntegration {
|
|
|
6
6
|
track_id?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace TraceDecisionCallIntegration {
|
|
9
|
-
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration;
|
|
9
|
+
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration | Apollo.TraceMcpIntegration;
|
|
10
10
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type * as Apollo from "../index.js";
|
|
2
2
|
/**
|
|
3
|
-
* Root trace.
|
|
3
|
+
* Root trace. input and response are always set; context and understanding may be omitted (None) when filtered.
|
|
4
4
|
*/
|
|
5
5
|
export interface TraceInfo {
|
|
6
6
|
input: Apollo.TraceInput;
|
|
7
7
|
context?: Apollo.TraceContext;
|
|
8
|
-
understanding
|
|
8
|
+
understanding?: Apollo.TraceUnderstanding;
|
|
9
9
|
decisions?: TraceInfo.Decisions.Item[];
|
|
10
10
|
response: Apollo.TraceResponse;
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Apollo from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* MCP integration call details.
|
|
4
|
+
*/
|
|
5
|
+
export interface TraceMcpIntegration {
|
|
6
|
+
code: string;
|
|
7
|
+
type?: Apollo.TraceIntegrationType;
|
|
8
|
+
name: string;
|
|
9
|
+
completion: string;
|
|
10
|
+
tool_calls?: Apollo.TraceMcpToolCall[];
|
|
11
|
+
}
|
|
@@ -8,5 +8,6 @@ export declare const TraceRuleAction: {
|
|
|
8
8
|
readonly BlockAndActivateAnotherTool: "BLOCK_AND_ACTIVATE_ANOTHER_TOOL";
|
|
9
9
|
readonly ActivateSubTool: "ACTIVATE_SUB_TOOL";
|
|
10
10
|
readonly Integration: "INTEGRATION";
|
|
11
|
+
readonly ActivateAnotherTool: "ACTIVATE_ANOTHER_TOOL";
|
|
11
12
|
};
|
|
12
13
|
export type TraceRuleAction = (typeof TraceRuleAction)[keyof typeof TraceRuleAction];
|
|
@@ -24,6 +24,8 @@ export * from "./ParameterType.js";
|
|
|
24
24
|
export * from "./ProductCard.js";
|
|
25
25
|
export * from "./ProductParameter.js";
|
|
26
26
|
export * from "./RecordOriginType.js";
|
|
27
|
+
export * from "./RecordScope.js";
|
|
28
|
+
export * from "./RecordScopeType.js";
|
|
27
29
|
export * from "./Source.js";
|
|
28
30
|
export * from "./StreamingUpdatePayload.js";
|
|
29
31
|
export * from "./TaskInteractionFacetsTaskParametersMatchGroup.js";
|
|
@@ -60,6 +62,8 @@ export * from "./TraceIntegrationRequest.js";
|
|
|
60
62
|
export * from "./TraceIntegrationResponse.js";
|
|
61
63
|
export * from "./TraceIntegrationResponseItem.js";
|
|
62
64
|
export * from "./TraceIntegrationType.js";
|
|
65
|
+
export * from "./TraceMcpIntegration.js";
|
|
66
|
+
export * from "./TraceMcpToolCall.js";
|
|
63
67
|
export * from "./TraceParamsCheckStatus.js";
|
|
64
68
|
export * from "./TraceQuestionReason.js";
|
|
65
69
|
export * from "./TraceRagIntegration.js";
|
|
@@ -40,6 +40,8 @@ __exportStar(require("./ParameterType.js"), exports);
|
|
|
40
40
|
__exportStar(require("./ProductCard.js"), exports);
|
|
41
41
|
__exportStar(require("./ProductParameter.js"), exports);
|
|
42
42
|
__exportStar(require("./RecordOriginType.js"), exports);
|
|
43
|
+
__exportStar(require("./RecordScope.js"), exports);
|
|
44
|
+
__exportStar(require("./RecordScopeType.js"), exports);
|
|
43
45
|
__exportStar(require("./Source.js"), exports);
|
|
44
46
|
__exportStar(require("./StreamingUpdatePayload.js"), exports);
|
|
45
47
|
__exportStar(require("./TaskInteractionFacetsTaskParametersMatchGroup.js"), exports);
|
|
@@ -76,6 +78,8 @@ __exportStar(require("./TraceIntegrationRequest.js"), exports);
|
|
|
76
78
|
__exportStar(require("./TraceIntegrationResponse.js"), exports);
|
|
77
79
|
__exportStar(require("./TraceIntegrationResponseItem.js"), exports);
|
|
78
80
|
__exportStar(require("./TraceIntegrationType.js"), exports);
|
|
81
|
+
__exportStar(require("./TraceMcpIntegration.js"), exports);
|
|
82
|
+
__exportStar(require("./TraceMcpToolCall.js"), exports);
|
|
79
83
|
__exportStar(require("./TraceParamsCheckStatus.js"), exports);
|
|
80
84
|
__exportStar(require("./TraceQuestionReason.js"), exports);
|
|
81
85
|
__exportStar(require("./TraceRagIntegration.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.39";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -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.
|
|
13
|
-
"User-Agent": "@aui.io/aui-client/1.2.
|
|
12
|
+
"X-Fern-SDK-Version": "1.2.39",
|
|
13
|
+
"User-Agent": "@aui.io/aui-client/1.2.39",
|
|
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) });
|
|
@@ -69,7 +69,8 @@ export declare class ControllerApi {
|
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* await client.controllerApi.sendMessage({
|
|
72
|
-
*
|
|
72
|
+
* include_business_trace: true,
|
|
73
|
+
* include_context_trace: true,
|
|
73
74
|
* is_external_api: true,
|
|
74
75
|
* task_id: "task_id"
|
|
75
76
|
* })
|
|
@@ -116,14 +117,18 @@ export declare class ControllerApi {
|
|
|
116
117
|
/**
|
|
117
118
|
* @param {string} taskId
|
|
118
119
|
* @param {string} messageId
|
|
120
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
119
121
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
122
|
*
|
|
121
123
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
122
124
|
*
|
|
123
125
|
* @example
|
|
124
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
126
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
127
|
+
* include_business_logic: true,
|
|
128
|
+
* include_context_logic: true
|
|
129
|
+
* })
|
|
125
130
|
*/
|
|
126
|
-
getTraceInfo(taskId: string, messageId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
131
|
+
getTraceInfo(taskId: string, messageId: string, request?: Apollo.GetTraceInfoRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
127
132
|
private __getTraceInfo;
|
|
128
133
|
/**
|
|
129
134
|
* Start a text conversation (WhatsApp or SMS).
|
|
@@ -299,7 +299,8 @@ export class ControllerApi {
|
|
|
299
299
|
*
|
|
300
300
|
* @example
|
|
301
301
|
* await client.controllerApi.sendMessage({
|
|
302
|
-
*
|
|
302
|
+
* include_business_trace: true,
|
|
303
|
+
* include_context_trace: true,
|
|
303
304
|
* is_external_api: true,
|
|
304
305
|
* task_id: "task_id"
|
|
305
306
|
* })
|
|
@@ -310,10 +311,13 @@ export class ControllerApi {
|
|
|
310
311
|
__sendMessage(request, requestOptions) {
|
|
311
312
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
313
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
313
|
-
const {
|
|
314
|
+
const { include_business_trace: includeBusinessTrace, include_context_trace: includeContextTrace, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_business_trace", "include_context_trace", "is_external_api"]);
|
|
314
315
|
const _queryParams = {};
|
|
315
|
-
if (
|
|
316
|
-
_queryParams.
|
|
316
|
+
if (includeBusinessTrace != null) {
|
|
317
|
+
_queryParams.include_business_trace = includeBusinessTrace.toString();
|
|
318
|
+
}
|
|
319
|
+
if (includeContextTrace != null) {
|
|
320
|
+
_queryParams.include_context_trace = includeContextTrace.toString();
|
|
317
321
|
}
|
|
318
322
|
if (isExternalApi != null) {
|
|
319
323
|
_queryParams.is_external_api = isExternalApi.toString();
|
|
@@ -569,19 +573,31 @@ export class ControllerApi {
|
|
|
569
573
|
/**
|
|
570
574
|
* @param {string} taskId
|
|
571
575
|
* @param {string} messageId
|
|
576
|
+
* @param {Apollo.GetTraceInfoRequest} request
|
|
572
577
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
573
578
|
*
|
|
574
579
|
* @throws {@link Apollo.UnprocessableEntityError}
|
|
575
580
|
*
|
|
576
581
|
* @example
|
|
577
|
-
* await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
582
|
+
* await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
583
|
+
* include_business_logic: true,
|
|
584
|
+
* include_context_logic: true
|
|
585
|
+
* })
|
|
578
586
|
*/
|
|
579
|
-
getTraceInfo(taskId, messageId, requestOptions) {
|
|
580
|
-
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
|
|
587
|
+
getTraceInfo(taskId, messageId, request = {}, requestOptions) {
|
|
588
|
+
return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, request, requestOptions));
|
|
581
589
|
}
|
|
582
|
-
__getTraceInfo(
|
|
583
|
-
return __awaiter(this,
|
|
590
|
+
__getTraceInfo(taskId_1, messageId_1) {
|
|
591
|
+
return __awaiter(this, arguments, void 0, function* (taskId, messageId, request = {}, requestOptions) {
|
|
584
592
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
593
|
+
const { include_business_logic: includeBusinessLogic, include_context_logic: includeContextLogic } = request;
|
|
594
|
+
const _queryParams = {};
|
|
595
|
+
if (includeBusinessLogic != null) {
|
|
596
|
+
_queryParams.include_business_logic = includeBusinessLogic.toString();
|
|
597
|
+
}
|
|
598
|
+
if (includeContextLogic != null) {
|
|
599
|
+
_queryParams.include_context_logic = includeContextLogic.toString();
|
|
600
|
+
}
|
|
585
601
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
586
602
|
"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,
|
|
587
603
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -589,7 +605,7 @@ export class ControllerApi {
|
|
|
589
605
|
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)}/messages/${core.url.encodePathParam(messageId)}/trace-info`),
|
|
590
606
|
method: "GET",
|
|
591
607
|
headers: _headers,
|
|
592
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
608
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
593
609
|
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,
|
|
594
610
|
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,
|
|
595
611
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* include_business_logic: true,
|
|
5
|
+
* include_context_logic: true
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface GetTraceInfoRequest {
|
|
9
|
+
/** When false, omits NLU/understanding and business decisions (rules, tools, params, etc.); input and response stay populated. */
|
|
10
|
+
include_business_logic?: boolean;
|
|
11
|
+
/** When false, omits the context section and call_integration (REST/RAG/MCP) decisions. */
|
|
12
|
+
include_context_logic?: boolean;
|
|
13
|
+
}
|
|
@@ -2,13 +2,17 @@ import type * as Apollo from "../../../../index.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
*
|
|
5
|
+
* include_business_trace: true,
|
|
6
|
+
* include_context_trace: true,
|
|
6
7
|
* is_external_api: true,
|
|
7
8
|
* task_id: "task_id"
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface SubmitMessageRequest {
|
|
11
|
-
|
|
12
|
+
/** When true, includes NLU/understanding and business decisions (rules, tools, params, etc.) in trace_info. */
|
|
13
|
+
include_business_trace?: boolean;
|
|
14
|
+
/** When true, includes the context section and call_integration (REST/RAG/MCP) decisions in trace_info. */
|
|
15
|
+
include_context_trace?: boolean;
|
|
12
16
|
is_external_api?: boolean;
|
|
13
17
|
task_id: string;
|
|
14
18
|
text?: string;
|
|
@@ -2,6 +2,7 @@ export type { CreateTaskRequest } from "./CreateTaskRequest.mjs";
|
|
|
2
2
|
export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.mjs";
|
|
3
3
|
export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.mjs";
|
|
4
4
|
export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.mjs";
|
|
5
|
+
export type { GetTraceInfoRequest } from "./GetTraceInfoRequest.mjs";
|
|
5
6
|
export type { ListUserTasksRequest } from "./ListUserTasksRequest.mjs";
|
|
6
7
|
export type { SubmitMessageRequest } from "./SubmitMessageRequest.mjs";
|
|
7
8
|
export type { TextConversationInitiateRequest } from "./TextConversationInitiateRequest.mjs";
|
|
@@ -5,5 +5,6 @@ export declare const RecordOriginType: {
|
|
|
5
5
|
readonly FeedbackPlayground: "feedback-playground";
|
|
6
6
|
readonly LlmManagement: "llm-management";
|
|
7
7
|
readonly ThirdParty: "third-party";
|
|
8
|
+
readonly AgentBuilder: "agent-builder";
|
|
8
9
|
};
|
|
9
10
|
export type RecordOriginType = (typeof RecordOriginType)[keyof typeof RecordOriginType];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const RecordScopeType: {
|
|
2
|
+
readonly Network: "NETWORK";
|
|
3
|
+
readonly Account: "ACCOUNT";
|
|
4
|
+
readonly Seed: "SEED";
|
|
5
|
+
readonly NetworkCategory: "NETWORK_CATEGORY";
|
|
6
|
+
readonly Global: "GLOBAL";
|
|
7
|
+
};
|
|
8
|
+
export type RecordScopeType = (typeof RecordScopeType)[keyof typeof RecordScopeType];
|
|
@@ -6,5 +6,5 @@ export interface TraceDecisionCallIntegration {
|
|
|
6
6
|
track_id?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace TraceDecisionCallIntegration {
|
|
9
|
-
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration;
|
|
9
|
+
type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration | Apollo.TraceMcpIntegration;
|
|
10
10
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type * as Apollo from "../index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* Root trace.
|
|
3
|
+
* Root trace. input and response are always set; context and understanding may be omitted (None) when filtered.
|
|
4
4
|
*/
|
|
5
5
|
export interface TraceInfo {
|
|
6
6
|
input: Apollo.TraceInput;
|
|
7
7
|
context?: Apollo.TraceContext;
|
|
8
|
-
understanding
|
|
8
|
+
understanding?: Apollo.TraceUnderstanding;
|
|
9
9
|
decisions?: TraceInfo.Decisions.Item[];
|
|
10
10
|
response: Apollo.TraceResponse;
|
|
11
11
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Apollo from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* MCP integration call details.
|
|
4
|
+
*/
|
|
5
|
+
export interface TraceMcpIntegration {
|
|
6
|
+
code: string;
|
|
7
|
+
type?: Apollo.TraceIntegrationType;
|
|
8
|
+
name: string;
|
|
9
|
+
completion: string;
|
|
10
|
+
tool_calls?: Apollo.TraceMcpToolCall[];
|
|
11
|
+
}
|
|
@@ -8,5 +8,6 @@ export declare const TraceRuleAction: {
|
|
|
8
8
|
readonly BlockAndActivateAnotherTool: "BLOCK_AND_ACTIVATE_ANOTHER_TOOL";
|
|
9
9
|
readonly ActivateSubTool: "ACTIVATE_SUB_TOOL";
|
|
10
10
|
readonly Integration: "INTEGRATION";
|
|
11
|
+
readonly ActivateAnotherTool: "ACTIVATE_ANOTHER_TOOL";
|
|
11
12
|
};
|
|
12
13
|
export type TraceRuleAction = (typeof TraceRuleAction)[keyof typeof TraceRuleAction];
|
|
@@ -24,6 +24,8 @@ export * from "./ParameterType.mjs";
|
|
|
24
24
|
export * from "./ProductCard.mjs";
|
|
25
25
|
export * from "./ProductParameter.mjs";
|
|
26
26
|
export * from "./RecordOriginType.mjs";
|
|
27
|
+
export * from "./RecordScope.mjs";
|
|
28
|
+
export * from "./RecordScopeType.mjs";
|
|
27
29
|
export * from "./Source.mjs";
|
|
28
30
|
export * from "./StreamingUpdatePayload.mjs";
|
|
29
31
|
export * from "./TaskInteractionFacetsTaskParametersMatchGroup.mjs";
|
|
@@ -60,6 +62,8 @@ export * from "./TraceIntegrationRequest.mjs";
|
|
|
60
62
|
export * from "./TraceIntegrationResponse.mjs";
|
|
61
63
|
export * from "./TraceIntegrationResponseItem.mjs";
|
|
62
64
|
export * from "./TraceIntegrationType.mjs";
|
|
65
|
+
export * from "./TraceMcpIntegration.mjs";
|
|
66
|
+
export * from "./TraceMcpToolCall.mjs";
|
|
63
67
|
export * from "./TraceParamsCheckStatus.mjs";
|
|
64
68
|
export * from "./TraceQuestionReason.mjs";
|
|
65
69
|
export * from "./TraceRagIntegration.mjs";
|
|
@@ -24,6 +24,8 @@ export * from "./ParameterType.mjs";
|
|
|
24
24
|
export * from "./ProductCard.mjs";
|
|
25
25
|
export * from "./ProductParameter.mjs";
|
|
26
26
|
export * from "./RecordOriginType.mjs";
|
|
27
|
+
export * from "./RecordScope.mjs";
|
|
28
|
+
export * from "./RecordScopeType.mjs";
|
|
27
29
|
export * from "./Source.mjs";
|
|
28
30
|
export * from "./StreamingUpdatePayload.mjs";
|
|
29
31
|
export * from "./TaskInteractionFacetsTaskParametersMatchGroup.mjs";
|
|
@@ -60,6 +62,8 @@ export * from "./TraceIntegrationRequest.mjs";
|
|
|
60
62
|
export * from "./TraceIntegrationResponse.mjs";
|
|
61
63
|
export * from "./TraceIntegrationResponseItem.mjs";
|
|
62
64
|
export * from "./TraceIntegrationType.mjs";
|
|
65
|
+
export * from "./TraceMcpIntegration.mjs";
|
|
66
|
+
export * from "./TraceMcpToolCall.mjs";
|
|
63
67
|
export * from "./TraceParamsCheckStatus.mjs";
|
|
64
68
|
export * from "./TraceQuestionReason.mjs";
|
|
65
69
|
export * from "./TraceRagIntegration.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.2.
|
|
1
|
+
export declare const SDK_VERSION = "1.2.39";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.2.
|
|
1
|
+
export const SDK_VERSION = "1.2.39";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -217,7 +217,8 @@ await client.controllerApi.getTaskMessages("task_id");
|
|
|
217
217
|
|
|
218
218
|
```typescript
|
|
219
219
|
await client.controllerApi.sendMessage({
|
|
220
|
-
|
|
220
|
+
include_business_trace: true,
|
|
221
|
+
include_context_trace: true,
|
|
221
222
|
is_external_api: true,
|
|
222
223
|
task_id: "task_id"
|
|
223
224
|
});
|
|
@@ -407,7 +408,7 @@ await client.controllerApi.getDirectFollowupSuggestions();
|
|
|
407
408
|
</dl>
|
|
408
409
|
</details>
|
|
409
410
|
|
|
410
|
-
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getTraceInfo</a>(taskId, messageId) -> Record<string, unknown></code></summary>
|
|
411
|
+
<details><summary><code>client.controllerApi.<a href="/src/api/resources/controllerApi/client/Client.ts">getTraceInfo</a>(taskId, messageId, { ...params }) -> Record<string, unknown></code></summary>
|
|
411
412
|
<dl>
|
|
412
413
|
<dd>
|
|
413
414
|
|
|
@@ -420,7 +421,10 @@ await client.controllerApi.getDirectFollowupSuggestions();
|
|
|
420
421
|
<dd>
|
|
421
422
|
|
|
422
423
|
```typescript
|
|
423
|
-
await client.controllerApi.getTraceInfo("task_id", "message_id"
|
|
424
|
+
await client.controllerApi.getTraceInfo("task_id", "message_id", {
|
|
425
|
+
include_business_logic: true,
|
|
426
|
+
include_context_logic: true
|
|
427
|
+
});
|
|
424
428
|
|
|
425
429
|
```
|
|
426
430
|
</dd>
|
|
@@ -452,6 +456,14 @@ await client.controllerApi.getTraceInfo("task_id", "message_id");
|
|
|
452
456
|
<dl>
|
|
453
457
|
<dd>
|
|
454
458
|
|
|
459
|
+
**request:** `Apollo.GetTraceInfoRequest`
|
|
460
|
+
|
|
461
|
+
</dd>
|
|
462
|
+
</dl>
|
|
463
|
+
|
|
464
|
+
<dl>
|
|
465
|
+
<dd>
|
|
466
|
+
|
|
455
467
|
**requestOptions:** `ControllerApi.RequestOptions`
|
|
456
468
|
|
|
457
469
|
</dd>
|