mavenagi 1.2.65 → 1.2.67
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/BaseClient.d.ts +4 -2
- package/BaseClient.js +8 -3
- package/README.md +2 -2
- package/api/resources/analytics/client/Client.d.ts +0 -38
- package/api/resources/analytics/client/Client.js +0 -120
- package/api/resources/analytics/types/AgentUserGroupBy.d.ts +15 -0
- package/api/resources/analytics/types/AgentUserRowIdentifier.d.ts +2 -0
- package/api/resources/analytics/types/AgentUserTableRequest.d.ts +7 -0
- package/api/resources/analytics/types/AgentUserTableResponse.d.ts +4 -1
- package/api/resources/analytics/types/index.d.ts +1 -10
- package/api/resources/analytics/types/index.js +1 -10
- package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +0 -4
- package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +5 -0
- package/api/resources/capabilities/types/CapabilityExecutionBase.d.ts +5 -0
- package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +3 -1
- package/api/resources/commons/types/AdditionalDataKey.d.ts +81 -3
- package/api/resources/commons/types/AdditionalDataKey.js +81 -3
- package/api/resources/commons/types/BaseConversationResponse.d.ts +6 -0
- package/api/resources/commons/types/BotMessage.d.ts +1 -1
- package/api/resources/commons/types/ConversationResponse.d.ts +1 -0
- package/api/resources/commons/types/ConversationValueSource.d.ts +4 -1
- package/api/resources/commons/types/ErrorReason.d.ts +2 -2
- package/api/resources/commons/types/ErrorReason.js +2 -2
- package/api/resources/commons/types/EventBaseNoId.d.ts +6 -0
- package/api/resources/commons/types/EventFilter.d.ts +2 -0
- package/api/resources/commons/types/EventTriggerType.d.ts +7 -0
- package/api/resources/commons/types/EventTriggerType.js +7 -0
- package/api/resources/commons/types/InitializeConversationResponse.d.ts +40 -0
- package/api/resources/commons/types/MetadataConversationValueFilter.d.ts +3 -3
- package/api/resources/commons/types/SimulationActionBehavior.d.ts +3 -2
- package/api/resources/commons/types/SimulationActionMock.d.ts +2 -1
- package/api/resources/commons/types/UserDataValueSource.d.ts +8 -0
- package/api/resources/commons/types/UserEventName.d.ts +79 -4
- package/api/resources/commons/types/UserEventName.js +79 -4
- package/api/resources/commons/types/index.d.ts +2 -0
- package/api/resources/commons/types/index.js +2 -0
- package/api/resources/conversation/client/Client.d.ts +42 -22
- package/api/resources/conversation/client/Client.js +44 -23
- package/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +2 -0
- package/api/resources/conversation/types/ConversationRequest.d.ts +45 -0
- package/api/resources/conversation/types/DeliverConversationMessageRequest.d.ts +1 -1
- package/api/resources/conversation/types/index.d.ts +0 -3
- package/api/resources/conversation/types/index.js +0 -3
- package/api/resources/developersCommons/types/BaseDetailApp.d.ts +13 -4
- package/api/resources/developersCommons/types/Link.d.ts +1 -1
- package/api/resources/developersCommons/types/MarketplaceAppDetail.d.ts +2 -1
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +0 -2
- package/api/resources/knowledge/types/KnowledgeBaseFunctionBindings.d.ts +12 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +1 -1
- package/api/resources/knowledge/types/index.d.ts +1 -0
- package/api/resources/knowledge/types/index.js +1 -0
- package/api/resources/organizations/client/Client.d.ts +13 -15
- package/api/resources/organizations/client/Client.js +13 -15
- package/api/resources/users/types/AgentUserField.d.ts +8 -0
- package/api/resources/users/types/AgentUserField.js +8 -0
- package/api/resources/users/types/AgentUserSearchRequest.d.ts +4 -0
- package/auth/AnyAuthProvider.d.ts +23 -0
- package/auth/AnyAuthProvider.js +46 -0
- package/auth/BearerAuthProvider.d.ts +20 -0
- package/auth/BearerAuthProvider.js +82 -0
- package/auth/index.d.ts +2 -0
- package/auth/index.js +5 -1
- package/package.json +1 -1
- package/reference.md +19 -117
- package/serialization/resources/analytics/types/AgentUserGroupBy.d.ts +15 -0
- package/serialization/resources/analytics/types/{FeedbackGroupBy.js → AgentUserGroupBy.js} +8 -4
- package/serialization/resources/analytics/types/AgentUserRowIdentifier.d.ts +2 -0
- package/serialization/resources/analytics/types/AgentUserRowIdentifier.js +2 -0
- package/serialization/resources/analytics/types/AgentUserTableRequest.d.ts +2 -0
- package/serialization/resources/analytics/types/AgentUserTableRequest.js +2 -0
- package/serialization/resources/analytics/types/index.d.ts +1 -10
- package/serialization/resources/analytics/types/index.js +1 -10
- package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +0 -2
- package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +0 -2
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +2 -0
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +2 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.d.ts +2 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.js +2 -0
- package/serialization/resources/commons/types/AdditionalDataKey.d.ts +1 -1
- package/serialization/resources/commons/types/AdditionalDataKey.js +26 -0
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +2 -0
- package/serialization/resources/commons/types/ConversationValueSource.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationValueSource.js +2 -0
- package/serialization/resources/commons/types/EventBaseNoId.d.ts +2 -0
- package/serialization/resources/commons/types/EventBaseNoId.js +2 -0
- package/serialization/resources/commons/types/EventFilter.d.ts +2 -0
- package/serialization/resources/commons/types/EventFilter.js +2 -0
- package/serialization/resources/commons/types/UserDataValueSource.d.ts +9 -0
- package/serialization/resources/{analytics/types/FeedbackCount.js → commons/types/UserDataValueSource.js} +4 -2
- package/serialization/resources/commons/types/UserEventName.d.ts +1 -1
- package/serialization/resources/commons/types/UserEventName.js +25 -0
- package/serialization/resources/commons/types/index.d.ts +2 -0
- package/serialization/resources/commons/types/index.js +2 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationFilter.js +1 -1
- package/serialization/resources/conversation/types/index.d.ts +0 -3
- package/serialization/resources/conversation/types/index.js +0 -3
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +0 -1
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +0 -1
- package/serialization/resources/knowledge/types/KnowledgeBaseFunctionBindings.d.ts +12 -0
- package/serialization/resources/{analytics/types/FeedbackAnalyticsRequest.js → knowledge/types/KnowledgeBaseFunctionBindings.js} +6 -5
- package/serialization/resources/knowledge/types/index.d.ts +1 -0
- package/serialization/resources/knowledge/types/index.js +1 -0
- package/serialization/resources/users/types/AgentUserField.d.ts +1 -1
- package/serialization/resources/users/types/AgentUserField.js +1 -1
- package/serialization/resources/users/types/AgentUserFilter.d.ts +1 -1
- package/serialization/resources/users/types/AgentUserFilter.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/analytics/types/FeedbackAnalyticsRequest.d.ts +0 -11
- package/api/resources/analytics/types/FeedbackColumnDefinition.d.ts +0 -5
- package/api/resources/analytics/types/FeedbackCount.d.ts +0 -4
- package/api/resources/analytics/types/FeedbackDistinctCount.d.ts +0 -9
- package/api/resources/analytics/types/FeedbackDistinctCount.js +0 -3
- package/api/resources/analytics/types/FeedbackGroupBy.d.ts +0 -5
- package/api/resources/analytics/types/FeedbackGroupBy.js +0 -3
- package/api/resources/analytics/types/FeedbackMetric.d.ts +0 -13
- package/api/resources/analytics/types/FeedbackMetric.js +0 -3
- package/api/resources/analytics/types/FeedbackRow.d.ts +0 -11
- package/api/resources/analytics/types/FeedbackRow.js +0 -3
- package/api/resources/analytics/types/FeedbackRowIdentifier.d.ts +0 -5
- package/api/resources/analytics/types/FeedbackRowIdentifier.js +0 -3
- package/api/resources/analytics/types/FeedbackTableRequest.d.ts +0 -38
- package/api/resources/analytics/types/FeedbackTableRequest.js +0 -3
- package/api/resources/analytics/types/FeedbackTableResponse.d.ts +0 -56
- package/api/resources/analytics/types/FeedbackTableResponse.js +0 -3
- package/api/resources/conversation/types/FeedbackField.d.ts +0 -7
- package/api/resources/conversation/types/FeedbackField.js +0 -10
- package/api/resources/conversation/types/FeedbackFilter.d.ts +0 -9
- package/api/resources/conversation/types/FeedbackFilter.js +0 -3
- package/serialization/resources/analytics/types/FeedbackAnalyticsRequest.d.ts +0 -11
- package/serialization/resources/analytics/types/FeedbackColumnDefinition.d.ts +0 -11
- package/serialization/resources/analytics/types/FeedbackColumnDefinition.js +0 -45
- package/serialization/resources/analytics/types/FeedbackCount.d.ts +0 -7
- package/serialization/resources/analytics/types/FeedbackDistinctCount.d.ts +0 -10
- package/serialization/resources/analytics/types/FeedbackDistinctCount.js +0 -42
- package/serialization/resources/analytics/types/FeedbackGroupBy.d.ts +0 -11
- package/serialization/resources/analytics/types/FeedbackMetric.d.ts +0 -15
- package/serialization/resources/analytics/types/FeedbackMetric.js +0 -49
- package/serialization/resources/analytics/types/FeedbackRow.d.ts +0 -14
- package/serialization/resources/analytics/types/FeedbackRow.js +0 -48
- package/serialization/resources/analytics/types/FeedbackRowIdentifier.d.ts +0 -11
- package/serialization/resources/analytics/types/FeedbackRowIdentifier.js +0 -45
- package/serialization/resources/analytics/types/FeedbackTableRequest.d.ts +0 -15
- package/serialization/resources/analytics/types/FeedbackTableRequest.js +0 -49
- package/serialization/resources/analytics/types/FeedbackTableResponse.d.ts +0 -11
- package/serialization/resources/analytics/types/FeedbackTableResponse.js +0 -45
- package/serialization/resources/conversation/types/FeedbackField.d.ts +0 -7
- package/serialization/resources/conversation/types/FeedbackField.js +0 -39
- package/serialization/resources/conversation/types/FeedbackFilter.d.ts +0 -15
- package/serialization/resources/conversation/types/FeedbackFilter.js +0 -47
- /package/api/resources/analytics/types/{FeedbackAnalyticsRequest.js → AgentUserGroupBy.js} +0 -0
- /package/api/resources/{conversation → commons}/types/SimulationFilter.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/SimulationFilter.js +0 -0
- /package/api/resources/{analytics/types/FeedbackColumnDefinition.js → commons/types/UserDataValueSource.js} +0 -0
- /package/api/resources/{analytics/types/FeedbackCount.js → knowledge/types/KnowledgeBaseFunctionBindings.js} +0 -0
- /package/serialization/resources/{conversation → commons}/types/SimulationFilter.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/SimulationFilter.js +0 -0
package/BaseClient.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AnyAuthProvider } from "./auth/AnyAuthProvider";
|
|
1
2
|
import { BasicAuthProvider } from "./auth/BasicAuthProvider";
|
|
3
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider";
|
|
2
4
|
import * as core from "./core";
|
|
3
5
|
import type * as environments from "./environments";
|
|
4
|
-
export type AuthOption = false | core.AuthProvider["getAuthRequest"] | core.AuthProvider | BasicAuthProvider.AuthOptions
|
|
6
|
+
export type AuthOption = false | core.AuthProvider["getAuthRequest"] | core.AuthProvider | AnyAuthProvider.AuthOptions<[BearerAuthProvider.AuthOptions, BasicAuthProvider.AuthOptions]>;
|
|
5
7
|
export type BaseClientOptions = {
|
|
6
8
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
7
9
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -28,7 +30,7 @@ export type BaseClientOptions = {
|
|
|
28
30
|
};
|
|
29
31
|
/** Override auth. Pass false to disable, a function returning auth headers, an AuthProvider, or auth options. */
|
|
30
32
|
auth?: AuthOption;
|
|
31
|
-
} & BasicAuthProvider.AuthOptions
|
|
33
|
+
} & AnyAuthProvider.AuthOptions<[BearerAuthProvider.AuthOptions, BasicAuthProvider.AuthOptions]>;
|
|
32
34
|
export interface BaseRequestOptions {
|
|
33
35
|
/** The maximum time to wait for a response in seconds. */
|
|
34
36
|
timeoutInSeconds?: number;
|
package/BaseClient.js
CHANGED
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.normalizeClientOptions = normalizeClientOptions;
|
|
38
38
|
exports.normalizeClientOptionsWithAuth = normalizeClientOptionsWithAuth;
|
|
39
|
+
const AnyAuthProvider_1 = require("./auth/AnyAuthProvider");
|
|
39
40
|
const BasicAuthProvider_1 = require("./auth/BasicAuthProvider");
|
|
41
|
+
const BearerAuthProvider_1 = require("./auth/BearerAuthProvider");
|
|
40
42
|
const core = __importStar(require("./core"));
|
|
41
43
|
const headers_1 = require("./core/headers");
|
|
42
44
|
function normalizeClientOptions(options) {
|
|
@@ -44,8 +46,8 @@ function normalizeClientOptions(options) {
|
|
|
44
46
|
const headers = (0, headers_1.mergeHeaders)({
|
|
45
47
|
"X-Fern-Language": "JavaScript",
|
|
46
48
|
"X-Fern-SDK-Name": "mavenagi",
|
|
47
|
-
"X-Fern-SDK-Version": "1.2.
|
|
48
|
-
"User-Agent": "mavenagi/1.2.
|
|
49
|
+
"X-Fern-SDK-Version": "1.2.67",
|
|
50
|
+
"User-Agent": "mavenagi/1.2.67",
|
|
49
51
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
52
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
53
|
"X-Organization-Id": options === null || options === void 0 ? void 0 : options.organizationId,
|
|
@@ -73,7 +75,10 @@ function normalizeClientOptionsWithAuth(options) {
|
|
|
73
75
|
Object.assign(normalized, options.auth);
|
|
74
76
|
}
|
|
75
77
|
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
76
|
-
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider =
|
|
78
|
+
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = AnyAuthProvider_1.AnyAuthProvider.createInstance(normalizedWithNoOpAuthProvider, [
|
|
79
|
+
BearerAuthProvider_1.BearerAuthProvider,
|
|
80
|
+
BasicAuthProvider_1.BasicAuthProvider,
|
|
81
|
+
]));
|
|
77
82
|
return normalized;
|
|
78
83
|
}
|
|
79
84
|
function withNoOpAuthProvider(options) {
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ Instantiate and use the client with the following:
|
|
|
48
48
|
```typescript
|
|
49
49
|
import { MavenAGI, MavenAGIClient } from "mavenagi";
|
|
50
50
|
|
|
51
|
-
const client = new MavenAGIClient({ appId: "YOUR_APP_ID", appSecret: "YOUR_APP_SECRET", organizationId: "YOUR_ORGANIZATION_ID", agentId: "YOUR_AGENT_ID" });
|
|
51
|
+
const client = new MavenAGIClient({ token: "YOUR_TOKEN", appId: "YOUR_APP_ID", appSecret: "YOUR_APP_SECRET", organizationId: "YOUR_ORGANIZATION_ID", agentId: "YOUR_AGENT_ID" });
|
|
52
52
|
await client.actions.search({});
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -143,7 +143,7 @@ The SDK uses async iterators, so you can consume the responses using a `for awai
|
|
|
143
143
|
```typescript
|
|
144
144
|
import { MavenAGIClient } from "mavenagi";
|
|
145
145
|
|
|
146
|
-
const client = new MavenAGIClient({ appId: "YOUR_APP_ID", appSecret: "YOUR_APP_SECRET", organizationId: "YOUR_ORGANIZATION_ID", agentId: "YOUR_AGENT_ID" });
|
|
146
|
+
const client = new MavenAGIClient({ token: "YOUR_TOKEN", appId: "YOUR_APP_ID", appSecret: "YOUR_APP_SECRET", organizationId: "YOUR_ORGANIZATION_ID", agentId: "YOUR_AGENT_ID" });
|
|
147
147
|
const response = await client.conversation.askStream("conversation-0", {
|
|
148
148
|
conversationMessageId: {
|
|
149
149
|
referenceId: "message-0"
|
|
@@ -133,44 +133,6 @@ export declare class AnalyticsClient {
|
|
|
133
133
|
*/
|
|
134
134
|
exportConversationTable(request: MavenAGI.ConversationTableRequest, requestOptions?: AnalyticsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
135
135
|
private __exportConversationTable;
|
|
136
|
-
/**
|
|
137
|
-
* @deprecated
|
|
138
|
-
*
|
|
139
|
-
* Deprecated. Use `getEventTable` instead, which reports the same thumbs up/down and insert
|
|
140
|
-
* activity as user events.
|
|
141
|
-
*
|
|
142
|
-
* Retrieves structured feedback data formatted as a table, allowing users to group, filter,
|
|
143
|
-
* and define specific metrics to display as columns.
|
|
144
|
-
*
|
|
145
|
-
* @param {MavenAGI.FeedbackTableRequest} request
|
|
146
|
-
* @param {AnalyticsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
147
|
-
*
|
|
148
|
-
* @throws {@link MavenAGI.NotFoundError}
|
|
149
|
-
* @throws {@link MavenAGI.BadRequestError}
|
|
150
|
-
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
151
|
-
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
152
|
-
* @throws {@link MavenAGI.ServerError}
|
|
153
|
-
* @throws {@link errors.MavenAGIError}
|
|
154
|
-
* @throws {@link errors.MavenAGITimeoutError}
|
|
155
|
-
*
|
|
156
|
-
* @example
|
|
157
|
-
* await client.analytics.getFeedbackTable({
|
|
158
|
-
* feedbackFilter: {
|
|
159
|
-
* types: ["THUMBS_UP", "INSERT"]
|
|
160
|
-
* },
|
|
161
|
-
* fieldGroupings: [{
|
|
162
|
-
* field: "CreatedBy"
|
|
163
|
-
* }],
|
|
164
|
-
* columnDefinitions: [{
|
|
165
|
-
* header: "feedback_count",
|
|
166
|
-
* metric: {
|
|
167
|
-
* type: "count"
|
|
168
|
-
* }
|
|
169
|
-
* }]
|
|
170
|
-
* })
|
|
171
|
-
*/
|
|
172
|
-
getFeedbackTable(request: MavenAGI.FeedbackTableRequest, requestOptions?: AnalyticsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.FeedbackTableResponse>;
|
|
173
|
-
private __getFeedbackTable;
|
|
174
136
|
/**
|
|
175
137
|
* Retrieves structured agent user data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
176
138
|
*
|
|
@@ -419,126 +419,6 @@ class AnalyticsClient {
|
|
|
419
419
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/tables/conversations/export");
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
|
-
/**
|
|
423
|
-
* @deprecated
|
|
424
|
-
*
|
|
425
|
-
* Deprecated. Use `getEventTable` instead, which reports the same thumbs up/down and insert
|
|
426
|
-
* activity as user events.
|
|
427
|
-
*
|
|
428
|
-
* Retrieves structured feedback data formatted as a table, allowing users to group, filter,
|
|
429
|
-
* and define specific metrics to display as columns.
|
|
430
|
-
*
|
|
431
|
-
* @param {MavenAGI.FeedbackTableRequest} request
|
|
432
|
-
* @param {AnalyticsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
433
|
-
*
|
|
434
|
-
* @throws {@link MavenAGI.NotFoundError}
|
|
435
|
-
* @throws {@link MavenAGI.BadRequestError}
|
|
436
|
-
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
437
|
-
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
438
|
-
* @throws {@link MavenAGI.ServerError}
|
|
439
|
-
* @throws {@link errors.MavenAGIError}
|
|
440
|
-
* @throws {@link errors.MavenAGITimeoutError}
|
|
441
|
-
*
|
|
442
|
-
* @example
|
|
443
|
-
* await client.analytics.getFeedbackTable({
|
|
444
|
-
* feedbackFilter: {
|
|
445
|
-
* types: ["THUMBS_UP", "INSERT"]
|
|
446
|
-
* },
|
|
447
|
-
* fieldGroupings: [{
|
|
448
|
-
* field: "CreatedBy"
|
|
449
|
-
* }],
|
|
450
|
-
* columnDefinitions: [{
|
|
451
|
-
* header: "feedback_count",
|
|
452
|
-
* metric: {
|
|
453
|
-
* type: "count"
|
|
454
|
-
* }
|
|
455
|
-
* }]
|
|
456
|
-
* })
|
|
457
|
-
*/
|
|
458
|
-
getFeedbackTable(request, requestOptions) {
|
|
459
|
-
return core.HttpResponsePromise.fromPromise(this.__getFeedbackTable(request, requestOptions));
|
|
460
|
-
}
|
|
461
|
-
__getFeedbackTable(request, requestOptions) {
|
|
462
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
463
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
464
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
465
|
-
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
466
|
-
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
467
|
-
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
468
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
469
|
-
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
470
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/tables/feedback"),
|
|
471
|
-
method: "POST",
|
|
472
|
-
headers: _headers,
|
|
473
|
-
contentType: "application/json",
|
|
474
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
475
|
-
requestType: "json",
|
|
476
|
-
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.FeedbackTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
477
|
-
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
478
|
-
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
479
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
480
|
-
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
481
|
-
logging: this._options.logging,
|
|
482
|
-
});
|
|
483
|
-
if (_response.ok) {
|
|
484
|
-
return {
|
|
485
|
-
data: serializers.FeedbackTableResponse.parseOrThrow(_response.body, {
|
|
486
|
-
unrecognizedObjectKeys: "passthrough",
|
|
487
|
-
allowUnrecognizedUnionMembers: true,
|
|
488
|
-
allowUnrecognizedEnumValues: true,
|
|
489
|
-
breadcrumbsPrefix: ["response"],
|
|
490
|
-
}),
|
|
491
|
-
rawResponse: _response.rawResponse,
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
if (_response.error.reason === "status-code") {
|
|
495
|
-
switch (_response.error.statusCode) {
|
|
496
|
-
case 404:
|
|
497
|
-
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
498
|
-
unrecognizedObjectKeys: "passthrough",
|
|
499
|
-
allowUnrecognizedUnionMembers: true,
|
|
500
|
-
allowUnrecognizedEnumValues: true,
|
|
501
|
-
breadcrumbsPrefix: ["response"],
|
|
502
|
-
}), _response.rawResponse);
|
|
503
|
-
case 400:
|
|
504
|
-
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
505
|
-
unrecognizedObjectKeys: "passthrough",
|
|
506
|
-
allowUnrecognizedUnionMembers: true,
|
|
507
|
-
allowUnrecognizedEnumValues: true,
|
|
508
|
-
breadcrumbsPrefix: ["response"],
|
|
509
|
-
}), _response.rawResponse);
|
|
510
|
-
case 413:
|
|
511
|
-
throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
512
|
-
unrecognizedObjectKeys: "passthrough",
|
|
513
|
-
allowUnrecognizedUnionMembers: true,
|
|
514
|
-
allowUnrecognizedEnumValues: true,
|
|
515
|
-
breadcrumbsPrefix: ["response"],
|
|
516
|
-
}), _response.rawResponse);
|
|
517
|
-
case 429:
|
|
518
|
-
throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
519
|
-
unrecognizedObjectKeys: "passthrough",
|
|
520
|
-
allowUnrecognizedUnionMembers: true,
|
|
521
|
-
allowUnrecognizedEnumValues: true,
|
|
522
|
-
breadcrumbsPrefix: ["response"],
|
|
523
|
-
}), _response.rawResponse);
|
|
524
|
-
case 500:
|
|
525
|
-
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
526
|
-
unrecognizedObjectKeys: "passthrough",
|
|
527
|
-
allowUnrecognizedUnionMembers: true,
|
|
528
|
-
allowUnrecognizedEnumValues: true,
|
|
529
|
-
breadcrumbsPrefix: ["response"],
|
|
530
|
-
}), _response.rawResponse);
|
|
531
|
-
default:
|
|
532
|
-
throw new errors.MavenAGIError({
|
|
533
|
-
statusCode: _response.error.statusCode,
|
|
534
|
-
body: _response.error.body,
|
|
535
|
-
rawResponse: _response.rawResponse,
|
|
536
|
-
});
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/tables/feedback");
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
422
|
/**
|
|
543
423
|
* Retrieves structured agent user data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
544
424
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../index";
|
|
2
|
+
export interface AgentUserGroupBy extends MavenAGI.GroupByBase {
|
|
3
|
+
/** Field used for data grouping. */
|
|
4
|
+
field: MavenAGI.AgentUserField;
|
|
5
|
+
/**
|
|
6
|
+
* Fully specified ID of a user-level intelligent field. Required when `field` is
|
|
7
|
+
* `IntelligentField`, and ignored otherwise.
|
|
8
|
+
*/
|
|
9
|
+
intelligentFieldId?: MavenAGI.EntityId;
|
|
10
|
+
/**
|
|
11
|
+
* Numeric ranges for grouping data into predefined buckets.
|
|
12
|
+
* Applies only to NUMBER-validated intelligent fields.
|
|
13
|
+
*/
|
|
14
|
+
ranges?: MavenAGI.Range[];
|
|
15
|
+
}
|
|
@@ -2,4 +2,6 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface AgentUserRowIdentifier extends MavenAGI.RowIdentifierBase {
|
|
3
3
|
/** Field this grouping was on. */
|
|
4
4
|
field: MavenAGI.AgentUserField;
|
|
5
|
+
/** Which intelligent field this grouping was on, set when `field` is `IntelligentField`. */
|
|
6
|
+
intelligentFieldId?: MavenAGI.EntityId;
|
|
5
7
|
}
|
|
@@ -19,6 +19,13 @@ export interface AgentUserTableRequest extends MavenAGI.AgentUserAnalyticsReques
|
|
|
19
19
|
* Example: If set to "DAY," data will be aggregated by day.
|
|
20
20
|
*/
|
|
21
21
|
timeGrouping?: MavenAGI.TimeInterval;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the fields by which data should be grouped. Each unique combination forms a row.
|
|
24
|
+
* If multiple fields are provided, the result is grouped by their unique value combinations.
|
|
25
|
+
* If omitted or empty, all data is aggregated into a single row.
|
|
26
|
+
* `CreatedAt` and `UpdatedAt` are rejected here; group by time with `timeGrouping`.
|
|
27
|
+
*/
|
|
28
|
+
fieldGroupings?: MavenAGI.AgentUserGroupBy[];
|
|
22
29
|
/**
|
|
23
30
|
* Specifies the metrics to be displayed as columns.
|
|
24
31
|
* Only the `count` metric is supported for agent user tables, so each table will have a single column definition using `count`.
|
|
@@ -27,6 +27,9 @@ import type * as MavenAGI from "../../../index";
|
|
|
27
27
|
* }
|
|
28
28
|
*/
|
|
29
29
|
export interface AgentUserTableResponse extends MavenAGI.TableResponseBase {
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* One row per combination of time bucket and field grouping values, each holding the user
|
|
32
|
+
* count for the given filter.
|
|
33
|
+
*/
|
|
31
34
|
rows: MavenAGI.AgentUserRow[];
|
|
32
35
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./AgentUserAnalyticsRequest";
|
|
2
2
|
export * from "./AgentUserColumnDefinition";
|
|
3
3
|
export * from "./AgentUserCount";
|
|
4
|
+
export * from "./AgentUserGroupBy";
|
|
4
5
|
export * from "./AgentUserMetric";
|
|
5
6
|
export * from "./AgentUserRow";
|
|
6
7
|
export * from "./AgentUserRowIdentifier";
|
|
@@ -47,16 +48,6 @@ export * from "./EventRow";
|
|
|
47
48
|
export * from "./EventRowIdentifier";
|
|
48
49
|
export * from "./EventTableRequest";
|
|
49
50
|
export * from "./EventTableResponse";
|
|
50
|
-
export * from "./FeedbackAnalyticsRequest";
|
|
51
|
-
export * from "./FeedbackColumnDefinition";
|
|
52
|
-
export * from "./FeedbackCount";
|
|
53
|
-
export * from "./FeedbackDistinctCount";
|
|
54
|
-
export * from "./FeedbackGroupBy";
|
|
55
|
-
export * from "./FeedbackMetric";
|
|
56
|
-
export * from "./FeedbackRow";
|
|
57
|
-
export * from "./FeedbackRowIdentifier";
|
|
58
|
-
export * from "./FeedbackTableRequest";
|
|
59
|
-
export * from "./FeedbackTableResponse";
|
|
60
51
|
export * from "./FieldValue";
|
|
61
52
|
export * from "./GroupByBase";
|
|
62
53
|
export * from "./LabeledPoint";
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./AgentUserAnalyticsRequest"), exports);
|
|
18
18
|
__exportStar(require("./AgentUserColumnDefinition"), exports);
|
|
19
19
|
__exportStar(require("./AgentUserCount"), exports);
|
|
20
|
+
__exportStar(require("./AgentUserGroupBy"), exports);
|
|
20
21
|
__exportStar(require("./AgentUserMetric"), exports);
|
|
21
22
|
__exportStar(require("./AgentUserRow"), exports);
|
|
22
23
|
__exportStar(require("./AgentUserRowIdentifier"), exports);
|
|
@@ -63,16 +64,6 @@ __exportStar(require("./EventRow"), exports);
|
|
|
63
64
|
__exportStar(require("./EventRowIdentifier"), exports);
|
|
64
65
|
__exportStar(require("./EventTableRequest"), exports);
|
|
65
66
|
__exportStar(require("./EventTableResponse"), exports);
|
|
66
|
-
__exportStar(require("./FeedbackAnalyticsRequest"), exports);
|
|
67
|
-
__exportStar(require("./FeedbackColumnDefinition"), exports);
|
|
68
|
-
__exportStar(require("./FeedbackCount"), exports);
|
|
69
|
-
__exportStar(require("./FeedbackDistinctCount"), exports);
|
|
70
|
-
__exportStar(require("./FeedbackGroupBy"), exports);
|
|
71
|
-
__exportStar(require("./FeedbackMetric"), exports);
|
|
72
|
-
__exportStar(require("./FeedbackRow"), exports);
|
|
73
|
-
__exportStar(require("./FeedbackRowIdentifier"), exports);
|
|
74
|
-
__exportStar(require("./FeedbackTableRequest"), exports);
|
|
75
|
-
__exportStar(require("./FeedbackTableResponse"), exports);
|
|
76
67
|
__exportStar(require("./FieldValue"), exports);
|
|
77
68
|
__exportStar(require("./GroupByBase"), exports);
|
|
78
69
|
__exportStar(require("./LabeledPoint"), exports);
|
|
@@ -34,8 +34,4 @@ export interface CapabilitiesSearchRequest extends MavenAGI.BaseCappedPaginatedR
|
|
|
34
34
|
* staged or already in its snapshot, is left out.
|
|
35
35
|
*/
|
|
36
36
|
variantId?: MavenAGI.EntityIdWithoutAgent;
|
|
37
|
-
/** Deprecated, use `variantId`, which wins when both are set. */
|
|
38
|
-
variantReferenceId?: string;
|
|
39
|
-
/** Deprecated, use `variantId`, which wins when both are set. */
|
|
40
|
-
variantAppId?: string;
|
|
41
37
|
}
|
|
@@ -33,4 +33,9 @@ export interface CapabilityExecutionsSearchRequest extends MavenAGI.BaseCappedPa
|
|
|
33
33
|
capabilityIds?: MavenAGI.EntityId[];
|
|
34
34
|
/** Only return executions in these states. */
|
|
35
35
|
statuses?: MavenAGI.CapabilityExecutionStatus[];
|
|
36
|
+
/**
|
|
37
|
+
* Whether to include executions from simulations. Defaults to `ALL`, so a
|
|
38
|
+
* simulation conversation's executions are found by its ID like any other.
|
|
39
|
+
*/
|
|
40
|
+
simulationFilter?: MavenAGI.SimulationFilter;
|
|
36
41
|
}
|
|
@@ -29,4 +29,9 @@ export interface CapabilityExecutionBase {
|
|
|
29
29
|
durationMs?: number;
|
|
30
30
|
/** When the execution was recorded. Results are ordered by this field. */
|
|
31
31
|
createdAt: Date;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the execution ran on live data or in a simulation. A Conversation Kickoff takes
|
|
34
|
+
* its conversation's mode, and an Event Trigger its event's.
|
|
35
|
+
*/
|
|
36
|
+
executionMode: MavenAGI.ExecutionMode;
|
|
32
37
|
}
|
|
@@ -28,6 +28,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
28
28
|
* completedAt: new Date("2026-08-31T10:30:06.000Z"),
|
|
29
29
|
* durationMs: 1120,
|
|
30
30
|
* createdAt: new Date("2026-08-31T10:30:05.000Z"),
|
|
31
|
+
* executionMode: MavenAGI.ExecutionMode.Live,
|
|
31
32
|
* eventType: MavenAGI.EventTriggerType.ConversationCreated,
|
|
32
33
|
* attempt: 1
|
|
33
34
|
* }, {
|
|
@@ -52,7 +53,8 @@ import type * as MavenAGI from "../../../index";
|
|
|
52
53
|
* startedAt: new Date("2026-08-31T10:30:00.000Z"),
|
|
53
54
|
* completedAt: new Date("2026-08-31T10:30:04.000Z"),
|
|
54
55
|
* durationMs: 4000,
|
|
55
|
-
* createdAt: new Date("2026-08-31T10:30:00.000Z")
|
|
56
|
+
* createdAt: new Date("2026-08-31T10:30:00.000Z"),
|
|
57
|
+
* executionMode: MavenAGI.ExecutionMode.Live
|
|
56
58
|
* }]
|
|
57
59
|
* }
|
|
58
60
|
*/
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const AdditionalDataKey: {
|
|
11
11
|
/**
|
|
12
|
-
* The new value of whatever changed. Absent when undetermined. Maven sets it on `INTELLIGENT_FIELD_VALUE_CHANGED`. */
|
|
12
|
+
* The new value of whatever changed, never a sum of money (that is `amount`). Absent when undetermined. Maven sets it on `INTELLIGENT_FIELD_VALUE_CHANGED`. */
|
|
13
13
|
readonly Value: "value";
|
|
14
14
|
/**
|
|
15
15
|
* The value before the change. Absent when it was undetermined or there was none. Maven sets it on `INTELLIGENT_FIELD_VALUE_CHANGED`. */
|
|
16
16
|
readonly PreviousValue: "previousValue";
|
|
17
17
|
/**
|
|
18
|
-
* The name of the thing acted on, such as a form, flow, file or
|
|
18
|
+
* The name of the thing acted on, such as a form, flow, file, plan or item bought. */
|
|
19
19
|
readonly Name: "name";
|
|
20
20
|
/**
|
|
21
21
|
* The step reached within a flow or form, as its name or number. */
|
|
@@ -42,7 +42,7 @@ export declare const AdditionalDataKey: {
|
|
|
42
42
|
* The `botMessageType` of the bot message. Maven sets it on `BOT_REPLY_CREATED`. */
|
|
43
43
|
readonly BotMessageType: "botMessageType";
|
|
44
44
|
/**
|
|
45
|
-
* A monetary amount, as a decimal number in `currency`. */
|
|
45
|
+
* A monetary amount, as a decimal number in `currency`. A Google Analytics 4 `value` goes here. */
|
|
46
46
|
readonly Amount: "amount";
|
|
47
47
|
/**
|
|
48
48
|
* The ISO 4217 code of `amount`'s currency, such as `USD`. */
|
|
@@ -62,5 +62,83 @@ export declare const AdditionalDataKey: {
|
|
|
62
62
|
/**
|
|
63
63
|
* The size of the file involved, in bytes. */
|
|
64
64
|
readonly SizeBytes: "sizeBytes";
|
|
65
|
+
/**
|
|
66
|
+
* How it was done, such as the sign-in method (`google`) or the way content was shared (`copy link`). */
|
|
67
|
+
readonly Method: "method";
|
|
68
|
+
/**
|
|
69
|
+
* The products involved, as a JSON array in a string. Each object uses the Google Analytics 4 item parameter names (`item_id`, `item_name`, `price`, `quantity`, …), so a GA4 `items` array can be sent as is. */
|
|
70
|
+
readonly Items: "items";
|
|
71
|
+
/**
|
|
72
|
+
* The ID of the order or transaction. */
|
|
73
|
+
readonly TransactionId: "transactionId";
|
|
74
|
+
/**
|
|
75
|
+
* The coupon code applied. */
|
|
76
|
+
readonly Coupon: "coupon";
|
|
77
|
+
/**
|
|
78
|
+
* The shipping cost, as a decimal number in `currency`. */
|
|
79
|
+
readonly Shipping: "shipping";
|
|
80
|
+
/**
|
|
81
|
+
* The tax, as a decimal number in `currency`. */
|
|
82
|
+
readonly Tax: "tax";
|
|
83
|
+
/**
|
|
84
|
+
* Whether the customer is `new` or `returning`. */
|
|
85
|
+
readonly CustomerType: "customerType";
|
|
86
|
+
/**
|
|
87
|
+
* The payment method chosen, such as `credit card`. */
|
|
88
|
+
readonly PaymentType: "paymentType";
|
|
89
|
+
/**
|
|
90
|
+
* The shipping option chosen, such as `ground` or `next day`. */
|
|
91
|
+
readonly ShippingTier: "shippingTier";
|
|
92
|
+
/**
|
|
93
|
+
* The ID of the list the products were shown in. */
|
|
94
|
+
readonly ItemListId: "itemListId";
|
|
95
|
+
/**
|
|
96
|
+
* The name of the list the products were shown in, such as `related products`. */
|
|
97
|
+
readonly ItemListName: "itemListName";
|
|
98
|
+
/**
|
|
99
|
+
* The ID of the promotion. */
|
|
100
|
+
readonly PromotionId: "promotionId";
|
|
101
|
+
/**
|
|
102
|
+
* The name of the promotion. */
|
|
103
|
+
readonly PromotionName: "promotionName";
|
|
104
|
+
/**
|
|
105
|
+
* The name of the promotion's creative, such as a banner. */
|
|
106
|
+
readonly CreativeName: "creativeName";
|
|
107
|
+
/**
|
|
108
|
+
* Where the promotion's creative was shown. */
|
|
109
|
+
readonly CreativeSlot: "creativeSlot";
|
|
110
|
+
/**
|
|
111
|
+
* Where the lead came from, such as `trade show`. */
|
|
112
|
+
readonly LeadSource: "leadSource";
|
|
113
|
+
/**
|
|
114
|
+
* The lead's status in the sales process, such as `contacted`. */
|
|
115
|
+
readonly LeadStatus: "leadStatus";
|
|
116
|
+
/**
|
|
117
|
+
* The type of the content involved, such as `video` or `article`. */
|
|
118
|
+
readonly ContentType: "contentType";
|
|
119
|
+
/**
|
|
120
|
+
* The ID of the content involved. */
|
|
121
|
+
readonly ContentId: "contentId";
|
|
122
|
+
/**
|
|
123
|
+
* The ID of the group, team or community involved. */
|
|
124
|
+
readonly GroupId: "groupId";
|
|
125
|
+
/**
|
|
126
|
+
* The name of an in-app currency, such as `gems`. */
|
|
127
|
+
readonly VirtualCurrencyName: "virtualCurrencyName";
|
|
128
|
+
/**
|
|
129
|
+
* A number of `virtualCurrencyName` units, as a decimal number. */
|
|
130
|
+
readonly VirtualCurrencyAmount: "virtualCurrencyAmount";
|
|
131
|
+
/**
|
|
132
|
+
* The platform that served the ad, such as `AdMob`. */
|
|
133
|
+
readonly AdPlatform: "adPlatform";
|
|
134
|
+
/**
|
|
135
|
+
* The ad network the ad came from, such as `AdColony`. */
|
|
136
|
+
readonly AdSource: "adSource";
|
|
137
|
+
/**
|
|
138
|
+
* The ad's format, such as `banner` or `interstitial`. */
|
|
139
|
+
readonly AdFormat: "adFormat";
|
|
140
|
+
/**
|
|
141
|
+
* The name of the ad unit. */
|
|
142
|
+
readonly AdUnitName: "adUnitName";
|
|
65
143
|
};
|
|
66
144
|
export type AdditionalDataKey = (typeof AdditionalDataKey)[keyof typeof AdditionalDataKey] | string;
|
|
@@ -13,13 +13,13 @@ exports.AdditionalDataKey = void 0;
|
|
|
13
13
|
*/
|
|
14
14
|
exports.AdditionalDataKey = {
|
|
15
15
|
/**
|
|
16
|
-
* The new value of whatever changed. Absent when undetermined. Maven sets it on `INTELLIGENT_FIELD_VALUE_CHANGED`. */
|
|
16
|
+
* The new value of whatever changed, never a sum of money (that is `amount`). Absent when undetermined. Maven sets it on `INTELLIGENT_FIELD_VALUE_CHANGED`. */
|
|
17
17
|
Value: "value",
|
|
18
18
|
/**
|
|
19
19
|
* The value before the change. Absent when it was undetermined or there was none. Maven sets it on `INTELLIGENT_FIELD_VALUE_CHANGED`. */
|
|
20
20
|
PreviousValue: "previousValue",
|
|
21
21
|
/**
|
|
22
|
-
* The name of the thing acted on, such as a form, flow, file or
|
|
22
|
+
* The name of the thing acted on, such as a form, flow, file, plan or item bought. */
|
|
23
23
|
Name: "name",
|
|
24
24
|
/**
|
|
25
25
|
* The step reached within a flow or form, as its name or number. */
|
|
@@ -46,7 +46,7 @@ exports.AdditionalDataKey = {
|
|
|
46
46
|
* The `botMessageType` of the bot message. Maven sets it on `BOT_REPLY_CREATED`. */
|
|
47
47
|
BotMessageType: "botMessageType",
|
|
48
48
|
/**
|
|
49
|
-
* A monetary amount, as a decimal number in `currency`. */
|
|
49
|
+
* A monetary amount, as a decimal number in `currency`. A Google Analytics 4 `value` goes here. */
|
|
50
50
|
Amount: "amount",
|
|
51
51
|
/**
|
|
52
52
|
* The ISO 4217 code of `amount`'s currency, such as `USD`. */
|
|
@@ -66,4 +66,82 @@ exports.AdditionalDataKey = {
|
|
|
66
66
|
/**
|
|
67
67
|
* The size of the file involved, in bytes. */
|
|
68
68
|
SizeBytes: "sizeBytes",
|
|
69
|
+
/**
|
|
70
|
+
* How it was done, such as the sign-in method (`google`) or the way content was shared (`copy link`). */
|
|
71
|
+
Method: "method",
|
|
72
|
+
/**
|
|
73
|
+
* The products involved, as a JSON array in a string. Each object uses the Google Analytics 4 item parameter names (`item_id`, `item_name`, `price`, `quantity`, …), so a GA4 `items` array can be sent as is. */
|
|
74
|
+
Items: "items",
|
|
75
|
+
/**
|
|
76
|
+
* The ID of the order or transaction. */
|
|
77
|
+
TransactionId: "transactionId",
|
|
78
|
+
/**
|
|
79
|
+
* The coupon code applied. */
|
|
80
|
+
Coupon: "coupon",
|
|
81
|
+
/**
|
|
82
|
+
* The shipping cost, as a decimal number in `currency`. */
|
|
83
|
+
Shipping: "shipping",
|
|
84
|
+
/**
|
|
85
|
+
* The tax, as a decimal number in `currency`. */
|
|
86
|
+
Tax: "tax",
|
|
87
|
+
/**
|
|
88
|
+
* Whether the customer is `new` or `returning`. */
|
|
89
|
+
CustomerType: "customerType",
|
|
90
|
+
/**
|
|
91
|
+
* The payment method chosen, such as `credit card`. */
|
|
92
|
+
PaymentType: "paymentType",
|
|
93
|
+
/**
|
|
94
|
+
* The shipping option chosen, such as `ground` or `next day`. */
|
|
95
|
+
ShippingTier: "shippingTier",
|
|
96
|
+
/**
|
|
97
|
+
* The ID of the list the products were shown in. */
|
|
98
|
+
ItemListId: "itemListId",
|
|
99
|
+
/**
|
|
100
|
+
* The name of the list the products were shown in, such as `related products`. */
|
|
101
|
+
ItemListName: "itemListName",
|
|
102
|
+
/**
|
|
103
|
+
* The ID of the promotion. */
|
|
104
|
+
PromotionId: "promotionId",
|
|
105
|
+
/**
|
|
106
|
+
* The name of the promotion. */
|
|
107
|
+
PromotionName: "promotionName",
|
|
108
|
+
/**
|
|
109
|
+
* The name of the promotion's creative, such as a banner. */
|
|
110
|
+
CreativeName: "creativeName",
|
|
111
|
+
/**
|
|
112
|
+
* Where the promotion's creative was shown. */
|
|
113
|
+
CreativeSlot: "creativeSlot",
|
|
114
|
+
/**
|
|
115
|
+
* Where the lead came from, such as `trade show`. */
|
|
116
|
+
LeadSource: "leadSource",
|
|
117
|
+
/**
|
|
118
|
+
* The lead's status in the sales process, such as `contacted`. */
|
|
119
|
+
LeadStatus: "leadStatus",
|
|
120
|
+
/**
|
|
121
|
+
* The type of the content involved, such as `video` or `article`. */
|
|
122
|
+
ContentType: "contentType",
|
|
123
|
+
/**
|
|
124
|
+
* The ID of the content involved. */
|
|
125
|
+
ContentId: "contentId",
|
|
126
|
+
/**
|
|
127
|
+
* The ID of the group, team or community involved. */
|
|
128
|
+
GroupId: "groupId",
|
|
129
|
+
/**
|
|
130
|
+
* The name of an in-app currency, such as `gems`. */
|
|
131
|
+
VirtualCurrencyName: "virtualCurrencyName",
|
|
132
|
+
/**
|
|
133
|
+
* A number of `virtualCurrencyName` units, as a decimal number. */
|
|
134
|
+
VirtualCurrencyAmount: "virtualCurrencyAmount",
|
|
135
|
+
/**
|
|
136
|
+
* The platform that served the ad, such as `AdMob`. */
|
|
137
|
+
AdPlatform: "adPlatform",
|
|
138
|
+
/**
|
|
139
|
+
* The ad network the ad came from, such as `AdColony`. */
|
|
140
|
+
AdSource: "adSource",
|
|
141
|
+
/**
|
|
142
|
+
* The ad's format, such as `banner` or `interstitial`. */
|
|
143
|
+
AdFormat: "adFormat",
|
|
144
|
+
/**
|
|
145
|
+
* The name of the ad unit. */
|
|
146
|
+
AdUnitName: "adUnitName",
|
|
69
147
|
};
|
|
@@ -40,6 +40,12 @@ export interface BaseConversationResponse {
|
|
|
40
40
|
* Simulation conversations are excluded from normal search results unless explicitly included via the `simulationFilter` field.
|
|
41
41
|
*/
|
|
42
42
|
simulationContext?: MavenAGI.SimulationContext;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the conversation runs on live data or is a simulation. A conversation created
|
|
45
|
+
* with a `simulationContext` is a `SIMULATION`, and so are the conversations Maven runs
|
|
46
|
+
* itself, such as evaluations, which have no `simulationContext`.
|
|
47
|
+
*/
|
|
48
|
+
executionMode: MavenAGI.ExecutionMode;
|
|
43
49
|
/**
|
|
44
50
|
* Related entity ids grouped by relationship type.
|
|
45
51
|
*
|
|
@@ -6,7 +6,7 @@ export interface BotMessage extends MavenAGI.ConversationMessageBase {
|
|
|
6
6
|
responses: MavenAGI.BotResponse[];
|
|
7
7
|
metadata: MavenAGI.BotResponseMetadata;
|
|
8
8
|
status: MavenAGI.MessageStatus;
|
|
9
|
-
/** The logic that was used to generate the response. Response size may be large; only present on the getConversation request
|
|
9
|
+
/** The logic that was used to generate the response. Response size may be large; only present on the getConversation request, unless it passes `includeLogic=false`. */
|
|
10
10
|
logic?: MavenAGI.BotLogic;
|
|
11
11
|
/**
|
|
12
12
|
* Why the agent could not answer. Present only when `status` is `REJECTED` or `FAILED`, and absent for every other status.
|
|
@@ -12,6 +12,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
12
12
|
* deleted: false,
|
|
13
13
|
* open: false,
|
|
14
14
|
* llmEnabled: true,
|
|
15
|
+
* executionMode: MavenAGI.ExecutionMode.Live,
|
|
15
16
|
* conversationMode: MavenAGI.ConversationMode.Text,
|
|
16
17
|
* analysis: {
|
|
17
18
|
* resolutionStatus: MavenAGI.ResolutionStatus.Resolved,
|