@aui.io/aui-client 1.2.41 → 2.0.0
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 +2 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +0 -13
- package/dist/cjs/api/resources/controllerApi/client/Client.js +0 -66
- package/dist/cjs/api/resources/controllerApi/client/requests/CreateTaskRequest.d.ts +1 -0
- package/dist/cjs/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.ts +0 -1
- package/dist/cjs/api/resources/controllerApi/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/types/AgentMetadata.d.ts +6 -0
- package/dist/cjs/api/types/ConstraintTriggerType.d.ts +5 -0
- package/dist/cjs/api/types/ConstraintTriggerType.js +8 -0
- package/dist/cjs/api/types/LatencyMetadata.d.ts +6 -0
- package/dist/cjs/api/types/LatencyUnit.d.ts +7 -0
- package/dist/cjs/api/types/LatencyUnit.js +10 -0
- package/dist/cjs/api/types/OffsetType.d.ts +6 -0
- package/dist/cjs/api/types/OffsetType.js +9 -0
- package/dist/cjs/api/types/OffsetUnit.d.ts +10 -0
- package/dist/cjs/api/types/OffsetUnit.js +13 -0
- package/dist/cjs/api/types/OptionsSearchSelfReviewMethod.d.ts +2 -0
- package/dist/cjs/api/types/OptionsSearchSelfReviewMethod.js +2 -0
- package/dist/cjs/api/types/SimpleViewCondition.d.ts +66 -0
- package/dist/cjs/api/types/SimpleViewCondition.js +3 -0
- package/dist/cjs/api/types/SimpleViewMethod.d.ts +19 -0
- package/dist/cjs/api/types/SimpleViewMethod.js +22 -0
- package/dist/cjs/api/types/SimpleViewOperation.d.ts +48 -0
- package/dist/cjs/api/types/SimpleViewOperation.js +51 -0
- package/dist/cjs/api/types/TaskParameter.d.ts +4 -1
- package/dist/cjs/api/types/TraceDecisionRuleTriggered.d.ts +2 -1
- package/dist/cjs/api/types/TraceDecisionToolTextResponse.d.ts +2 -0
- package/dist/cjs/api/types/TraceInfo.d.ts +2 -0
- package/dist/cjs/api/types/TraceMcpIntegration.d.ts +2 -0
- package/dist/cjs/api/types/TraceMcpToolCall.d.ts +2 -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/TraceRuleAskForConfirmation.d.ts +13 -0
- package/dist/cjs/api/types/TraceRuleAskForConfirmation.js +3 -0
- package/dist/cjs/api/types/TraceRuleConditionResult.d.ts +5 -0
- package/dist/cjs/api/types/TraceRuleConditionResult.js +3 -0
- package/dist/cjs/api/types/TraceRuleTriggerEvaluation.d.ts +6 -0
- package/dist/cjs/api/types/TraceRuleTriggerEvaluation.js +3 -0
- package/dist/cjs/api/types/TraceRuleType.d.ts +1 -0
- package/dist/cjs/api/types/TraceRuleType.js +1 -0
- package/dist/cjs/api/types/TraceSelfReviewEntity.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +12 -1
- package/dist/cjs/api/types/index.js +12 -1
- 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 +0 -13
- package/dist/esm/api/resources/controllerApi/client/Client.mjs +0 -66
- package/dist/esm/api/resources/controllerApi/client/requests/CreateTaskRequest.d.mts +1 -0
- package/dist/esm/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.mts +0 -1
- package/dist/esm/api/resources/controllerApi/client/requests/index.d.mts +0 -1
- package/dist/esm/api/types/AgentMetadata.d.mts +6 -0
- package/dist/esm/api/types/ConstraintTriggerType.d.mts +5 -0
- package/dist/esm/api/types/ConstraintTriggerType.mjs +5 -0
- package/dist/esm/api/types/LatencyMetadata.d.mts +6 -0
- package/dist/esm/api/types/LatencyUnit.d.mts +7 -0
- package/dist/esm/api/types/LatencyUnit.mjs +7 -0
- package/dist/esm/api/types/OffsetType.d.mts +6 -0
- package/dist/esm/api/types/OffsetType.mjs +6 -0
- package/dist/esm/api/types/OffsetUnit.d.mts +10 -0
- package/dist/esm/api/types/OffsetUnit.mjs +10 -0
- package/dist/esm/api/types/OptionsSearchSelfReviewMethod.d.mts +2 -0
- package/dist/esm/api/types/OptionsSearchSelfReviewMethod.mjs +2 -0
- package/dist/esm/api/types/SimpleViewCondition.d.mts +66 -0
- package/dist/esm/api/types/SimpleViewCondition.mjs +2 -0
- package/dist/esm/api/types/SimpleViewMethod.d.mts +19 -0
- package/dist/esm/api/types/SimpleViewMethod.mjs +19 -0
- package/dist/esm/api/types/SimpleViewOperation.d.mts +48 -0
- package/dist/esm/api/types/SimpleViewOperation.mjs +48 -0
- package/dist/esm/api/types/TaskParameter.d.mts +4 -1
- package/dist/esm/api/types/TraceDecisionRuleTriggered.d.mts +2 -1
- package/dist/esm/api/types/TraceDecisionToolTextResponse.d.mts +2 -0
- package/dist/esm/api/types/TraceInfo.d.mts +2 -0
- package/dist/esm/api/types/TraceMcpIntegration.d.mts +2 -0
- package/dist/esm/api/types/TraceMcpToolCall.d.mts +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/TraceRuleAskForConfirmation.d.mts +13 -0
- package/dist/esm/api/types/TraceRuleAskForConfirmation.mjs +2 -0
- package/dist/esm/api/types/TraceRuleConditionResult.d.mts +5 -0
- package/dist/esm/api/types/TraceRuleConditionResult.mjs +2 -0
- package/dist/esm/api/types/TraceRuleTriggerEvaluation.d.mts +6 -0
- package/dist/esm/api/types/TraceRuleTriggerEvaluation.mjs +2 -0
- package/dist/esm/api/types/TraceRuleType.d.mts +1 -0
- package/dist/esm/api/types/TraceRuleType.mjs +1 -0
- package/dist/esm/api/types/TraceSelfReviewEntity.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +12 -1
- package/dist/esm/api/types/index.mjs +12 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +0 -51
- package/dist/cjs/api/resources/controllerApi/client/requests/GetProductMetadataRequest.d.ts +0 -9
- package/dist/cjs/api/types/TracSelfReviewSubEntity.d.ts +0 -4
- package/dist/esm/api/resources/controllerApi/client/requests/GetProductMetadataRequest.d.mts +0 -9
- package/dist/esm/api/types/TracSelfReviewSubEntity.d.mts +0 -4
- /package/dist/cjs/api/{resources/controllerApi/client/requests/GetProductMetadataRequest.js → types/AgentMetadata.js} +0 -0
- /package/dist/cjs/api/types/{TracSelfReviewSubEntity.js → LatencyMetadata.js} +0 -0
- /package/dist/esm/api/{resources/controllerApi/client/requests/GetProductMetadataRequest.mjs → types/AgentMetadata.mjs} +0 -0
- /package/dist/esm/api/types/{TracSelfReviewSubEntity.mjs → LatencyMetadata.mjs} +0 -0
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ socket.on('open', () => {
|
|
|
100
100
|
// Handle streaming responses
|
|
101
101
|
socket.on('message', (message) => {
|
|
102
102
|
// Streaming updates (partial responses)
|
|
103
|
-
if (message.channel?.
|
|
103
|
+
if (message.channel?.event_name === 'thread-message-text-content-updated') {
|
|
104
104
|
console.log('Agent is typing:', message.data?.text);
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -538,7 +538,7 @@ async function searchProducts(userId: string, query: string) {
|
|
|
538
538
|
});
|
|
539
539
|
|
|
540
540
|
socket.on('message', (message) => {
|
|
541
|
-
if (message.channel?.
|
|
541
|
+
if (message.channel?.event_name === 'thread-message-text-content-updated') {
|
|
542
542
|
// Show real-time updates
|
|
543
543
|
console.log('Agent:', message.data?.text);
|
|
544
544
|
}
|
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": "
|
|
49
|
-
"User-Agent": "@aui.io/aui-client/
|
|
48
|
+
"X-Fern-SDK-Version": "2.0.0",
|
|
49
|
+
"User-Agent": "@aui.io/aui-client/2.0.0",
|
|
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) });
|
|
@@ -77,19 +77,6 @@ export declare class ControllerApi {
|
|
|
77
77
|
*/
|
|
78
78
|
sendMessage(request: Apollo.SubmitMessageRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.Message>;
|
|
79
79
|
private __sendMessage;
|
|
80
|
-
/**
|
|
81
|
-
* @param {Apollo.GetProductMetadataRequest} request
|
|
82
|
-
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
83
|
-
*
|
|
84
|
-
* @throws {@link Apollo.UnprocessableEntityError}
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* await client.controllerApi.getProductMetadata({
|
|
88
|
-
* link: "link"
|
|
89
|
-
* })
|
|
90
|
-
*/
|
|
91
|
-
getProductMetadata(request: Apollo.GetProductMetadataRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
92
|
-
private __getProductMetadata;
|
|
93
80
|
/**
|
|
94
81
|
* @param {Record<string, unknown>} request
|
|
95
82
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -407,72 +407,6 @@ class ControllerApi {
|
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
-
/**
|
|
411
|
-
* @param {Apollo.GetProductMetadataRequest} request
|
|
412
|
-
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
413
|
-
*
|
|
414
|
-
* @throws {@link Apollo.UnprocessableEntityError}
|
|
415
|
-
*
|
|
416
|
-
* @example
|
|
417
|
-
* await client.controllerApi.getProductMetadata({
|
|
418
|
-
* link: "link"
|
|
419
|
-
* })
|
|
420
|
-
*/
|
|
421
|
-
getProductMetadata(request, requestOptions) {
|
|
422
|
-
return core.HttpResponsePromise.fromPromise(this.__getProductMetadata(request, requestOptions));
|
|
423
|
-
}
|
|
424
|
-
__getProductMetadata(request, requestOptions) {
|
|
425
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
426
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
427
|
-
const { link } = request;
|
|
428
|
-
const _queryParams = {};
|
|
429
|
-
_queryParams.link = link;
|
|
430
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
431
|
-
"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,
|
|
432
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
433
|
-
const _response = yield core.fetcher({
|
|
434
|
-
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/product-metadata"),
|
|
435
|
-
method: "GET",
|
|
436
|
-
headers: _headers,
|
|
437
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
438
|
-
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,
|
|
439
|
-
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,
|
|
440
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
441
|
-
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
442
|
-
logging: this._options.logging,
|
|
443
|
-
});
|
|
444
|
-
if (_response.ok) {
|
|
445
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
446
|
-
}
|
|
447
|
-
if (_response.error.reason === "status-code") {
|
|
448
|
-
switch (_response.error.statusCode) {
|
|
449
|
-
case 422:
|
|
450
|
-
throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
451
|
-
default:
|
|
452
|
-
throw new errors.ApolloError({
|
|
453
|
-
statusCode: _response.error.statusCode,
|
|
454
|
-
body: _response.error.body,
|
|
455
|
-
rawResponse: _response.rawResponse,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
switch (_response.error.reason) {
|
|
460
|
-
case "non-json":
|
|
461
|
-
throw new errors.ApolloError({
|
|
462
|
-
statusCode: _response.error.statusCode,
|
|
463
|
-
body: _response.error.rawBody,
|
|
464
|
-
rawResponse: _response.rawResponse,
|
|
465
|
-
});
|
|
466
|
-
case "timeout":
|
|
467
|
-
throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/product-metadata.");
|
|
468
|
-
case "unknown":
|
|
469
|
-
throw new errors.ApolloError({
|
|
470
|
-
message: _response.error.errorMessage,
|
|
471
|
-
rawResponse: _response.rawResponse,
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
410
|
/**
|
|
477
411
|
* @param {Record<string, unknown>} request
|
|
478
412
|
* @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export type { CreateTaskRequest } from "./CreateTaskRequest.js";
|
|
2
2
|
export type { DirectFollowupSuggestionsRequest } from "./DirectFollowupSuggestionsRequest.js";
|
|
3
3
|
export type { ExternalWidgetRenderRequest } from "./ExternalWidgetRenderRequest.js";
|
|
4
|
-
export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.js";
|
|
5
4
|
export type { GetTraceInfoRequest } from "./GetTraceInfoRequest.js";
|
|
6
5
|
export type { ListUserTasksRequest } from "./ListUserTasksRequest.js";
|
|
7
6
|
export type { SubmitMessageRequest } from "./SubmitMessageRequest.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConstraintTriggerType = void 0;
|
|
5
|
+
exports.ConstraintTriggerType = {
|
|
6
|
+
Init: "init",
|
|
7
|
+
PreIntegration: "pre-integration",
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.LatencyUnit = void 0;
|
|
5
|
+
exports.LatencyUnit = {
|
|
6
|
+
Microsecond: "microsecond",
|
|
7
|
+
Millisecond: "millisecond",
|
|
8
|
+
Second: "second",
|
|
9
|
+
Minute: "minute",
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OffsetType = void 0;
|
|
5
|
+
/** How ``offset`` is combined with the target for ``gt_offset`` / ``lte_offset`` / etc. */
|
|
6
|
+
exports.OffsetType = {
|
|
7
|
+
Add: "add",
|
|
8
|
+
Subtract: "subtract",
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Time/calendar units for ``offset`` with ``after_date_offset`` (and similar). */
|
|
2
|
+
export declare const OffsetUnit: {
|
|
3
|
+
readonly Minutes: "minutes";
|
|
4
|
+
readonly Hours: "hours";
|
|
5
|
+
readonly Days: "days";
|
|
6
|
+
readonly Weeks: "weeks";
|
|
7
|
+
readonly Months: "months";
|
|
8
|
+
readonly Years: "years";
|
|
9
|
+
};
|
|
10
|
+
export type OffsetUnit = (typeof OffsetUnit)[keyof typeof OffsetUnit];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OffsetUnit = void 0;
|
|
5
|
+
/** Time/calendar units for ``offset`` with ``after_date_offset`` (and similar). */
|
|
6
|
+
exports.OffsetUnit = {
|
|
7
|
+
Minutes: "minutes",
|
|
8
|
+
Hours: "hours",
|
|
9
|
+
Days: "days",
|
|
10
|
+
Weeks: "weeks",
|
|
11
|
+
Months: "months",
|
|
12
|
+
Years: "years",
|
|
13
|
+
};
|
|
@@ -2,6 +2,8 @@ export declare const OptionsSearchSelfReviewMethod: {
|
|
|
2
2
|
readonly InventoryClassification: "INVENTORY_CLASSIFICATION";
|
|
3
3
|
readonly Llm: "LLM";
|
|
4
4
|
readonly LlmPerOption: "LLM_PER_OPTION";
|
|
5
|
+
readonly CrossEncoderRanker: "CROSS_ENCODER_RANKER";
|
|
6
|
+
readonly CohereRanker: "COHERE_RANKER";
|
|
5
7
|
readonly ConstantScore: "CONSTANT_SCORE";
|
|
6
8
|
readonly ParamMatching: "PARAM_MATCHING";
|
|
7
9
|
};
|
|
@@ -6,6 +6,8 @@ exports.OptionsSearchSelfReviewMethod = {
|
|
|
6
6
|
InventoryClassification: "INVENTORY_CLASSIFICATION",
|
|
7
7
|
Llm: "LLM",
|
|
8
8
|
LlmPerOption: "LLM_PER_OPTION",
|
|
9
|
+
CrossEncoderRanker: "CROSS_ENCODER_RANKER",
|
|
10
|
+
CohereRanker: "COHERE_RANKER",
|
|
9
11
|
ConstantScore: "CONSTANT_SCORE",
|
|
10
12
|
ParamMatching: "PARAM_MATCHING",
|
|
11
13
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type * as Apollo from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A leaf condition in a when clause. Combines a method (what to check),
|
|
4
|
+
* params/entities (what to check on), an operation (how to compare),
|
|
5
|
+
* and a value (what to compare against).
|
|
6
|
+
*/
|
|
7
|
+
export interface SimpleViewCondition {
|
|
8
|
+
method: SimpleViewCondition.Method;
|
|
9
|
+
/** List of param codes (can be empty) */
|
|
10
|
+
params?: string[];
|
|
11
|
+
/** Optional entity context */
|
|
12
|
+
entities?: string[];
|
|
13
|
+
/** Optional sub-entity context in case of checking sub-entity param value as source and not entity, entities and params should be filled when filling sub_entities */
|
|
14
|
+
sub_entities?: string[];
|
|
15
|
+
/** Optional operation, in case of having more than one param under params, then the only allowed operations are all_has_value and any_has_value */
|
|
16
|
+
operation?: Apollo.SimpleViewOperation;
|
|
17
|
+
/** Value to compare against. Can be a literal (string, number, boolean). */
|
|
18
|
+
value?: SimpleViewCondition.Value;
|
|
19
|
+
/** Target param code to compare against instead of static value as value will be null when this is filled. */
|
|
20
|
+
target_param?: string;
|
|
21
|
+
/** Target entity name to fetch target value to compare with by target_param instead of static value as value will be null when this is filled. */
|
|
22
|
+
target_entity?: string;
|
|
23
|
+
/** When target_entity is used, fetch the target value from desired entities only. Set false to include saved task entities too. Defaults to true when not set. */
|
|
24
|
+
target_from_desired_only?: boolean;
|
|
25
|
+
/** Multiple target param codes (e.g. gt_sum, gte_sum, lt_sum, lte_sum). Stored as target_param_ids in predicate kwargs. */
|
|
26
|
+
target_params?: string[];
|
|
27
|
+
/** Numeric offset: gt_offset/lte_offset margins, after_date_offset magnitude (with offset_unit), *_entity_sum / *_sum margins, etc. */
|
|
28
|
+
offset?: SimpleViewCondition.Offset;
|
|
29
|
+
/** For gt_offset / lte_offset: add or subtract (with offset) relative to the target value. */
|
|
30
|
+
offset_type?: Apollo.OffsetType;
|
|
31
|
+
/** For gt_percentage / lt_percentage / lte_percentage / gte_percentage: percentage of target value to compare against. */
|
|
32
|
+
percentage?: SimpleViewCondition.Percentage;
|
|
33
|
+
/** Calendar/time unit for offset fields: use with any offset-related operation (gt_offset, lte_offset, between_offset, after_date_offset, gt/gte/lt/lte_entity_sum, gt/gte/lt/lte_sum, etc.). */
|
|
34
|
+
offset_unit?: Apollo.OffsetUnit;
|
|
35
|
+
/** For between_offset: lower bound relative to target. */
|
|
36
|
+
offset_min?: SimpleViewCondition.OffsetMin;
|
|
37
|
+
/** For between_offset: upper bound relative to target. */
|
|
38
|
+
offset_max?: SimpleViewCondition.OffsetMax;
|
|
39
|
+
/** For gt/gte/lt/lte_entity_sum: aggregate function name (e.g. sum). */
|
|
40
|
+
aggregate?: string;
|
|
41
|
+
/** For gt/gte/lt/lte_entity_sum: filter on related entity records. */
|
|
42
|
+
filter?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace SimpleViewCondition {
|
|
45
|
+
type Method = Apollo.SimpleViewMethod | string;
|
|
46
|
+
/**
|
|
47
|
+
* Value to compare against. Can be a literal (string, number, boolean).
|
|
48
|
+
*/
|
|
49
|
+
type Value = string | number | number | boolean | unknown[] | Record<string, unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* Numeric offset: gt_offset/lte_offset margins, after_date_offset magnitude (with offset_unit), *_entity_sum / *_sum margins, etc.
|
|
52
|
+
*/
|
|
53
|
+
type Offset = number | number;
|
|
54
|
+
/**
|
|
55
|
+
* For gt_percentage / lt_percentage / lte_percentage / gte_percentage: percentage of target value to compare against.
|
|
56
|
+
*/
|
|
57
|
+
type Percentage = number | number;
|
|
58
|
+
/**
|
|
59
|
+
* For between_offset: lower bound relative to target.
|
|
60
|
+
*/
|
|
61
|
+
type OffsetMin = number | number;
|
|
62
|
+
/**
|
|
63
|
+
* For between_offset: upper bound relative to target.
|
|
64
|
+
*/
|
|
65
|
+
type OffsetMax = number | number;
|
|
66
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Full set of condition methods supported by the SimpleView when-tree. Subsets are exposed per rule kind (`ConstraintMethod`, `SummaryMethod`, `ToolTriggerMethod`). */
|
|
2
|
+
export declare const SimpleViewMethod: {
|
|
3
|
+
readonly EntityParamReferenced: "entity_param_referenced";
|
|
4
|
+
readonly EntityParam: "entity_param";
|
|
5
|
+
readonly ParamValue: "param_value";
|
|
6
|
+
readonly ParamExtractedCurrent: "param_extracted_current";
|
|
7
|
+
readonly UserQuestion: "user_question";
|
|
8
|
+
readonly ConversationStarted: "conversation_started";
|
|
9
|
+
readonly ParamMissing: "param_missing";
|
|
10
|
+
readonly UserProfileParam: "user_profile_param";
|
|
11
|
+
readonly CurrentUrl: "current_url";
|
|
12
|
+
readonly ApiRequestParamValue: "api_request_param_value";
|
|
13
|
+
readonly ApiResponseParamValue: "api_response_param_value";
|
|
14
|
+
readonly EntityMissing: "entity_missing";
|
|
15
|
+
readonly ToolParamsFilled: "tool_params_filled";
|
|
16
|
+
readonly ToolRequiredParamsFilled: "tool_required_params_filled";
|
|
17
|
+
readonly ToolOptionalParamsFilled: "tool_optional_params_filled";
|
|
18
|
+
};
|
|
19
|
+
export type SimpleViewMethod = (typeof SimpleViewMethod)[keyof typeof SimpleViewMethod];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SimpleViewMethod = void 0;
|
|
5
|
+
/** Full set of condition methods supported by the SimpleView when-tree. Subsets are exposed per rule kind (`ConstraintMethod`, `SummaryMethod`, `ToolTriggerMethod`). */
|
|
6
|
+
exports.SimpleViewMethod = {
|
|
7
|
+
EntityParamReferenced: "entity_param_referenced",
|
|
8
|
+
EntityParam: "entity_param",
|
|
9
|
+
ParamValue: "param_value",
|
|
10
|
+
ParamExtractedCurrent: "param_extracted_current",
|
|
11
|
+
UserQuestion: "user_question",
|
|
12
|
+
ConversationStarted: "conversation_started",
|
|
13
|
+
ParamMissing: "param_missing",
|
|
14
|
+
UserProfileParam: "user_profile_param",
|
|
15
|
+
CurrentUrl: "current_url",
|
|
16
|
+
ApiRequestParamValue: "api_request_param_value",
|
|
17
|
+
ApiResponseParamValue: "api_response_param_value",
|
|
18
|
+
EntityMissing: "entity_missing",
|
|
19
|
+
ToolParamsFilled: "tool_params_filled",
|
|
20
|
+
ToolRequiredParamsFilled: "tool_required_params_filled",
|
|
21
|
+
ToolOptionalParamsFilled: "tool_optional_params_filled",
|
|
22
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Comparison operators a condition may apply to its parameter value (eq, gt, contains, regex, offset/sum variants, etc.). Operator validity per parameter type and per kwarg shape is declared in the OPERATION_* tables below. */
|
|
2
|
+
export declare const SimpleViewOperation: {
|
|
3
|
+
readonly Eq: "eq";
|
|
4
|
+
readonly Neq: "neq";
|
|
5
|
+
readonly Gt: "gt";
|
|
6
|
+
readonly Lt: "lt";
|
|
7
|
+
readonly Gte: "gte";
|
|
8
|
+
readonly Lte: "lte";
|
|
9
|
+
readonly Contains: "contains";
|
|
10
|
+
readonly Exist: "exist";
|
|
11
|
+
readonly AnyHasValue: "any_has_value";
|
|
12
|
+
readonly AllHasValue: "all_has_value";
|
|
13
|
+
readonly About: "about";
|
|
14
|
+
readonly Between: "between";
|
|
15
|
+
readonly WithinLastXDay: "within_last_x_day";
|
|
16
|
+
readonly WithinNextXDay: "within_next_x_day";
|
|
17
|
+
readonly WithinNextXHours: "within_next_x_hours";
|
|
18
|
+
readonly WithinLastXHours: "within_last_x_hours";
|
|
19
|
+
readonly AfterToday: "after_today";
|
|
20
|
+
readonly BeforeToday: "before_today";
|
|
21
|
+
readonly EqualToday: "equal_today";
|
|
22
|
+
readonly NotEqualToday: "not_equal_today";
|
|
23
|
+
readonly NotExist: "not_exist";
|
|
24
|
+
readonly MoreThanNextXDay: "more_than_next_x_day";
|
|
25
|
+
readonly MoreThanLastXDay: "more_than_last_x_day";
|
|
26
|
+
readonly EqRegex: "eq_regex";
|
|
27
|
+
readonly NeqRegex: "neq_regex";
|
|
28
|
+
readonly GtOffset: "gt_offset";
|
|
29
|
+
readonly LteOffset: "lte_offset";
|
|
30
|
+
readonly GteOffset: "gte_offset";
|
|
31
|
+
readonly LtOffset: "lt_offset";
|
|
32
|
+
readonly GtPercentage: "gt_percentage";
|
|
33
|
+
readonly LtPercentage: "lt_percentage";
|
|
34
|
+
readonly LtePercentage: "lte_percentage";
|
|
35
|
+
readonly GtePercentage: "gte_percentage";
|
|
36
|
+
readonly AfterDateOffset: "after_date_offset";
|
|
37
|
+
readonly BeforeDateOffset: "before_date_offset";
|
|
38
|
+
readonly BetweenOffset: "between_offset";
|
|
39
|
+
readonly GtEntitySum: "gt_entity_sum";
|
|
40
|
+
readonly LtEntitySum: "lt_entity_sum";
|
|
41
|
+
readonly GteEntitySum: "gte_entity_sum";
|
|
42
|
+
readonly LteEntitySum: "lte_entity_sum";
|
|
43
|
+
readonly GtSum: "gt_sum";
|
|
44
|
+
readonly LtSum: "lt_sum";
|
|
45
|
+
readonly GteSum: "gte_sum";
|
|
46
|
+
readonly LteSum: "lte_sum";
|
|
47
|
+
};
|
|
48
|
+
export type SimpleViewOperation = (typeof SimpleViewOperation)[keyof typeof SimpleViewOperation];
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SimpleViewOperation = void 0;
|
|
5
|
+
/** Comparison operators a condition may apply to its parameter value (eq, gt, contains, regex, offset/sum variants, etc.). Operator validity per parameter type and per kwarg shape is declared in the OPERATION_* tables below. */
|
|
6
|
+
exports.SimpleViewOperation = {
|
|
7
|
+
Eq: "eq",
|
|
8
|
+
Neq: "neq",
|
|
9
|
+
Gt: "gt",
|
|
10
|
+
Lt: "lt",
|
|
11
|
+
Gte: "gte",
|
|
12
|
+
Lte: "lte",
|
|
13
|
+
Contains: "contains",
|
|
14
|
+
Exist: "exist",
|
|
15
|
+
AnyHasValue: "any_has_value",
|
|
16
|
+
AllHasValue: "all_has_value",
|
|
17
|
+
About: "about",
|
|
18
|
+
Between: "between",
|
|
19
|
+
WithinLastXDay: "within_last_x_day",
|
|
20
|
+
WithinNextXDay: "within_next_x_day",
|
|
21
|
+
WithinNextXHours: "within_next_x_hours",
|
|
22
|
+
WithinLastXHours: "within_last_x_hours",
|
|
23
|
+
AfterToday: "after_today",
|
|
24
|
+
BeforeToday: "before_today",
|
|
25
|
+
EqualToday: "equal_today",
|
|
26
|
+
NotEqualToday: "not_equal_today",
|
|
27
|
+
NotExist: "not_exist",
|
|
28
|
+
MoreThanNextXDay: "more_than_next_x_day",
|
|
29
|
+
MoreThanLastXDay: "more_than_last_x_day",
|
|
30
|
+
EqRegex: "eq_regex",
|
|
31
|
+
NeqRegex: "neq_regex",
|
|
32
|
+
GtOffset: "gt_offset",
|
|
33
|
+
LteOffset: "lte_offset",
|
|
34
|
+
GteOffset: "gte_offset",
|
|
35
|
+
LtOffset: "lt_offset",
|
|
36
|
+
GtPercentage: "gt_percentage",
|
|
37
|
+
LtPercentage: "lt_percentage",
|
|
38
|
+
LtePercentage: "lte_percentage",
|
|
39
|
+
GtePercentage: "gte_percentage",
|
|
40
|
+
AfterDateOffset: "after_date_offset",
|
|
41
|
+
BeforeDateOffset: "before_date_offset",
|
|
42
|
+
BetweenOffset: "between_offset",
|
|
43
|
+
GtEntitySum: "gt_entity_sum",
|
|
44
|
+
LtEntitySum: "lt_entity_sum",
|
|
45
|
+
GteEntitySum: "gte_entity_sum",
|
|
46
|
+
LteEntitySum: "lte_entity_sum",
|
|
47
|
+
GtSum: "gt_sum",
|
|
48
|
+
LtSum: "lt_sum",
|
|
49
|
+
GteSum: "gte_sum",
|
|
50
|
+
LteSum: "lte_sum",
|
|
51
|
+
};
|
|
@@ -15,7 +15,10 @@ export interface TaskParameter {
|
|
|
15
15
|
code?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare namespace TaskParameter {
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Value to compare against. Can be a literal (string, number, boolean).
|
|
20
|
+
*/
|
|
21
|
+
type Value = string | number | number | boolean | unknown[] | Record<string, unknown>;
|
|
19
22
|
type ValueHistory = ValueHistory.Item[];
|
|
20
23
|
namespace ValueHistory {
|
|
21
24
|
type Item = Apollo.TaskParameterValue | Apollo.TaskParameterRangeValue;
|
|
@@ -4,7 +4,8 @@ export interface TraceDecisionRuleTriggered {
|
|
|
4
4
|
tool: string;
|
|
5
5
|
rule: TraceDecisionRuleTriggered.Rule;
|
|
6
6
|
track_id?: string;
|
|
7
|
+
trigger_type?: Apollo.ConstraintTriggerType;
|
|
7
8
|
}
|
|
8
9
|
export declare namespace TraceDecisionRuleTriggered {
|
|
9
|
-
type Rule = Apollo.
|
|
10
|
+
type Rule = Apollo.TraceRuleAskForConfirmation | Apollo.TraceRuleParamsMissing | Apollo.TraceRuleMissingInfo | Apollo.TraceRuleBase;
|
|
10
11
|
}
|
|
@@ -8,6 +8,8 @@ export interface TraceInfo {
|
|
|
8
8
|
understanding?: Apollo.TraceUnderstanding;
|
|
9
9
|
decisions?: TraceInfo.Decisions.Item[];
|
|
10
10
|
response: Apollo.TraceResponse;
|
|
11
|
+
rules_evaluations?: Apollo.TraceRuleTriggerEvaluation[];
|
|
12
|
+
latency?: Apollo.LatencyMetadata;
|
|
11
13
|
}
|
|
12
14
|
export declare namespace TraceInfo {
|
|
13
15
|
type Decisions = Decisions.Item[];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const TraceRuleAction: {
|
|
3
3
|
readonly AddRequiredParam: "ADD_REQUIRED_PARAM";
|
|
4
4
|
readonly AskAQuestion: "ASK_A_QUESTION";
|
|
5
|
+
readonly AskForConfirmation: "ASK_FOR_CONFIRMATION";
|
|
5
6
|
readonly Block: "BLOCK";
|
|
6
7
|
readonly PartialBlock: "PARTIAL_BLOCK";
|
|
7
8
|
readonly Text: "TEXT";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Apollo from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Constraint rule with QUERY-derived preview; only this rule subtype carries confirmation_preview.
|
|
4
|
+
*/
|
|
5
|
+
export interface TraceRuleAskForConfirmation {
|
|
6
|
+
type: Apollo.TraceRuleType;
|
|
7
|
+
action?: "ASK_FOR_CONFIRMATION";
|
|
8
|
+
reason?: string;
|
|
9
|
+
params_added?: Record<string, unknown>;
|
|
10
|
+
excluded_entities?: string[];
|
|
11
|
+
code?: string;
|
|
12
|
+
confirmation_preview?: Record<string, unknown>[];
|
|
13
|
+
}
|