mavenagi 1.2.70 → 1.2.71
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.js +2 -2
- package/api/resources/commons/types/AbsoluteTimeWindow.d.ts +5 -2
- package/api/resources/commons/types/ActionEffects.d.ts +18 -0
- package/api/resources/commons/types/ActionEffects.js +3 -0
- package/api/resources/commons/types/AllUsersConversationAudience.d.ts +1 -0
- package/api/resources/commons/types/AllUsersConversationAudience.js +3 -0
- package/api/resources/commons/types/ChangeAuthor.d.ts +18 -0
- package/api/resources/commons/types/ChangeAuthor.js +3 -0
- package/api/resources/commons/types/ConversationAudience.d.ts +19 -0
- package/api/resources/commons/types/ConversationAudience.js +3 -0
- package/api/resources/commons/types/ConversationAudienceResponse.d.ts +16 -0
- package/api/resources/commons/types/ConversationAudienceResponse.js +3 -0
- package/api/resources/commons/types/ConversationResponse.d.ts +8 -0
- package/api/resources/commons/types/ConversationSetupFields.d.ts +21 -0
- package/api/resources/commons/types/ConversationSetupFields.js +3 -0
- package/api/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +7 -0
- package/api/resources/commons/types/CrossOrganizationLevelEntityId.js +3 -0
- package/api/resources/commons/types/InitializeConversationResponse.d.ts +3 -0
- package/api/resources/commons/types/LeveledEntityId.d.ts +28 -0
- package/api/resources/commons/types/LeveledEntityId.js +3 -0
- package/api/resources/commons/types/OrganizationLevelEntityId.d.ts +9 -0
- package/api/resources/commons/types/OrganizationLevelEntityId.js +3 -0
- package/api/resources/commons/types/SimulationActionBehavior.d.ts +1 -1
- package/api/resources/commons/types/SimulationContext.d.ts +1 -24
- package/api/resources/commons/types/SimulationFixedResponse.d.ts +14 -0
- package/api/resources/commons/types/SimulationFixedResponse.js +3 -0
- package/api/resources/commons/types/SimulationSetupFields.d.ts +29 -0
- package/api/resources/commons/types/SimulationSetupFields.js +3 -0
- package/api/resources/commons/types/TimePrecondition.d.ts +1 -0
- package/api/resources/commons/types/UserDataEffect.d.ts +10 -0
- package/api/resources/commons/types/UserDataEffect.js +3 -0
- package/api/resources/commons/types/UserDataPatch.d.ts +10 -0
- package/api/resources/commons/types/UserDataPatch.js +3 -0
- package/api/resources/commons/types/UsersConversationAudience.d.ts +8 -0
- package/api/resources/commons/types/UsersConversationAudience.js +3 -0
- package/api/resources/commons/types/UsersConversationAudienceResponse.d.ts +9 -0
- package/api/resources/commons/types/UsersConversationAudienceResponse.js +3 -0
- package/api/resources/commons/types/index.d.ts +15 -0
- package/api/resources/commons/types/index.js +15 -0
- package/api/resources/conversation/client/Client.d.ts +34 -1
- package/api/resources/conversation/client/Client.js +34 -1
- package/api/resources/conversation/types/AskRequest.d.ts +4 -1
- package/api/resources/conversation/types/ConversationRequest.d.ts +26 -16
- package/api/resources/conversation/types/DeliverMessageResponse.d.ts +5 -0
- package/api/resources/conversation/types/DeliverUserMessageRequest.d.ts +20 -0
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.js +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
- package/package.json +1 -1
- package/reference.md +12 -1
- package/serialization/resources/commons/types/AbsoluteTimeWindow.d.ts +1 -0
- package/serialization/resources/commons/types/AbsoluteTimeWindow.js +1 -0
- package/serialization/resources/commons/types/ActionEffects.d.ts +11 -0
- package/serialization/resources/commons/types/ActionEffects.js +45 -0
- package/serialization/resources/commons/types/AllUsersConversationAudience.d.ts +7 -0
- package/serialization/resources/commons/types/AllUsersConversationAudience.js +39 -0
- package/serialization/resources/commons/types/ChangeAuthor.d.ts +12 -0
- package/serialization/resources/commons/types/ChangeAuthor.js +44 -0
- package/serialization/resources/commons/types/ConversationAudience.d.ts +15 -0
- package/serialization/resources/commons/types/ConversationAudience.js +49 -0
- package/serialization/resources/commons/types/ConversationAudienceResponse.d.ts +15 -0
- package/serialization/resources/commons/types/ConversationAudienceResponse.js +49 -0
- package/serialization/resources/commons/types/ConversationResponse.d.ts +2 -0
- package/serialization/resources/commons/types/ConversationResponse.js +2 -0
- package/serialization/resources/commons/types/ConversationSetupFields.d.ts +12 -0
- package/serialization/resources/commons/types/ConversationSetupFields.js +44 -0
- package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.d.ts +9 -0
- package/serialization/resources/commons/types/CrossOrganizationLevelEntityId.js +40 -0
- package/serialization/resources/commons/types/LeveledEntityId.d.ts +19 -0
- package/serialization/resources/commons/types/LeveledEntityId.js +51 -0
- package/serialization/resources/commons/types/OrganizationLevelEntityId.d.ts +10 -0
- package/serialization/resources/commons/types/OrganizationLevelEntityId.js +44 -0
- package/serialization/resources/commons/types/SimulationActionBehavior.d.ts +2 -2
- package/serialization/resources/commons/types/SimulationActionBehavior.js +2 -2
- package/serialization/resources/commons/types/SimulationContext.d.ts +2 -6
- package/serialization/resources/commons/types/SimulationContext.js +5 -7
- package/serialization/resources/commons/types/SimulationFixedResponse.d.ts +11 -0
- package/serialization/resources/commons/types/SimulationFixedResponse.js +45 -0
- package/serialization/resources/commons/types/SimulationSetupFields.d.ts +13 -0
- package/serialization/resources/commons/types/SimulationSetupFields.js +45 -0
- package/serialization/resources/commons/types/UserDataEffect.d.ts +11 -0
- package/serialization/resources/commons/types/UserDataEffect.js +43 -0
- package/serialization/resources/commons/types/UserDataPatch.d.ts +11 -0
- package/serialization/resources/commons/types/UserDataPatch.js +43 -0
- package/serialization/resources/commons/types/UsersConversationAudience.d.ts +10 -0
- package/serialization/resources/commons/types/UsersConversationAudience.js +42 -0
- package/serialization/resources/commons/types/UsersConversationAudienceResponse.d.ts +10 -0
- package/serialization/resources/commons/types/UsersConversationAudienceResponse.js +42 -0
- package/serialization/resources/commons/types/index.d.ts +15 -0
- package/serialization/resources/commons/types/index.js +15 -0
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +4 -5
- package/serialization/resources/conversation/types/ConversationRequest.js +7 -6
- package/serialization/resources/conversation/types/DeliverMessageResponse.d.ts +2 -0
- package/serialization/resources/conversation/types/DeliverMessageResponse.js +2 -0
- package/serialization/resources/conversation/types/DeliverUserMessageRequest.d.ts +1 -0
- package/serialization/resources/conversation/types/DeliverUserMessageRequest.js +1 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +3 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionRequest.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -565,9 +565,20 @@ export declare class ConversationClient {
|
|
|
565
565
|
*
|
|
566
566
|
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
567
567
|
*
|
|
568
|
+
* To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
|
|
569
|
+
* user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
|
|
570
|
+
* conversation it went to.
|
|
571
|
+
*
|
|
568
572
|
* <Warning>
|
|
569
573
|
* Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
|
|
570
|
-
*
|
|
574
|
+
* Delivering to a user only reaches a conversation that already exists; it never starts a new one.
|
|
575
|
+
* </Warning>
|
|
576
|
+
*
|
|
577
|
+
* <Warning>
|
|
578
|
+
* Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
|
|
579
|
+
* `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
|
|
580
|
+
* `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
|
|
581
|
+
* so the message is saved and delivered twice.
|
|
571
582
|
* </Warning>
|
|
572
583
|
*
|
|
573
584
|
* <Note>**Required permission:** `ask:agent`</Note>
|
|
@@ -624,6 +635,28 @@ export declare class ConversationClient {
|
|
|
624
635
|
* text: "Tell the user their refund was approved."
|
|
625
636
|
* }
|
|
626
637
|
* })
|
|
638
|
+
*
|
|
639
|
+
* @example
|
|
640
|
+
* await client.conversation.deliverMessage({
|
|
641
|
+
* type: "user",
|
|
642
|
+
* userId: {
|
|
643
|
+
* type: "USER",
|
|
644
|
+
* appId: "shop-app",
|
|
645
|
+
* referenceId: "customer-42"
|
|
646
|
+
* },
|
|
647
|
+
* appIds: ["chat-app", "email-app"],
|
|
648
|
+
* content: {
|
|
649
|
+
* contentType: "ask",
|
|
650
|
+
* conversationMessageId: {
|
|
651
|
+
* referenceId: "message-2"
|
|
652
|
+
* },
|
|
653
|
+
* userId: {
|
|
654
|
+
* referenceId: "system-orders"
|
|
655
|
+
* },
|
|
656
|
+
* type: "PROACTIVE",
|
|
657
|
+
* text: "Tell the user their order has shipped."
|
|
658
|
+
* }
|
|
659
|
+
* })
|
|
627
660
|
*/
|
|
628
661
|
deliverMessage(request: MavenAGI.DeliverMessageRequest, requestOptions?: ConversationClient.RequestOptions): core.HttpResponsePromise<MavenAGI.DeliverMessageResponse>;
|
|
629
662
|
private __deliverMessage;
|
|
@@ -1929,9 +1929,20 @@ class ConversationClient {
|
|
|
1929
1929
|
*
|
|
1930
1930
|
* A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
1931
1931
|
*
|
|
1932
|
+
* To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
|
|
1933
|
+
* user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
|
|
1934
|
+
* conversation it went to.
|
|
1935
|
+
*
|
|
1932
1936
|
* <Warning>
|
|
1933
1937
|
* Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
|
|
1934
|
-
*
|
|
1938
|
+
* Delivering to a user only reaches a conversation that already exists; it never starts a new one.
|
|
1939
|
+
* </Warning>
|
|
1940
|
+
*
|
|
1941
|
+
* <Warning>
|
|
1942
|
+
* Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
|
|
1943
|
+
* `ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
|
|
1944
|
+
* `type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
|
|
1945
|
+
* so the message is saved and delivered twice.
|
|
1935
1946
|
* </Warning>
|
|
1936
1947
|
*
|
|
1937
1948
|
* <Note>**Required permission:** `ask:agent`</Note>
|
|
@@ -1988,6 +1999,28 @@ class ConversationClient {
|
|
|
1988
1999
|
* text: "Tell the user their refund was approved."
|
|
1989
2000
|
* }
|
|
1990
2001
|
* })
|
|
2002
|
+
*
|
|
2003
|
+
* @example
|
|
2004
|
+
* await client.conversation.deliverMessage({
|
|
2005
|
+
* type: "user",
|
|
2006
|
+
* userId: {
|
|
2007
|
+
* type: "USER",
|
|
2008
|
+
* appId: "shop-app",
|
|
2009
|
+
* referenceId: "customer-42"
|
|
2010
|
+
* },
|
|
2011
|
+
* appIds: ["chat-app", "email-app"],
|
|
2012
|
+
* content: {
|
|
2013
|
+
* contentType: "ask",
|
|
2014
|
+
* conversationMessageId: {
|
|
2015
|
+
* referenceId: "message-2"
|
|
2016
|
+
* },
|
|
2017
|
+
* userId: {
|
|
2018
|
+
* referenceId: "system-orders"
|
|
2019
|
+
* },
|
|
2020
|
+
* type: "PROACTIVE",
|
|
2021
|
+
* text: "Tell the user their order has shipped."
|
|
2022
|
+
* }
|
|
2023
|
+
* })
|
|
1991
2024
|
*/
|
|
1992
2025
|
deliverMessage(request, requestOptions) {
|
|
1993
2026
|
return core.HttpResponsePromise.fromPromise(this.__deliverMessage(request, requestOptions));
|
|
@@ -76,6 +76,9 @@ import type * as MavenAGI from "../../../index";
|
|
|
76
76
|
* }
|
|
77
77
|
*/
|
|
78
78
|
export interface AskRequest extends MavenAGI.AskRequestBase {
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Externally supplied ID to uniquely identify the user that created this message. On a conversation
|
|
81
|
+
* with a `users` audience, a `USER_MESSAGE` ask from a user outside it is rejected with a 400.
|
|
82
|
+
*/
|
|
80
83
|
userId: MavenAGI.EntityIdBase;
|
|
81
84
|
}
|
|
@@ -11,6 +11,20 @@ import type * as MavenAGI from "../../../index";
|
|
|
11
11
|
* @example
|
|
12
12
|
* {
|
|
13
13
|
* conversationId: {
|
|
14
|
+
* referenceId: "conversation-1"
|
|
15
|
+
* },
|
|
16
|
+
* audience: {
|
|
17
|
+
* type: "users",
|
|
18
|
+
* userIds: [{
|
|
19
|
+
* referenceId: "user-0"
|
|
20
|
+
* }]
|
|
21
|
+
* },
|
|
22
|
+
* messages: []
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* {
|
|
27
|
+
* conversationId: {
|
|
14
28
|
* referenceId: "simulation-0"
|
|
15
29
|
* },
|
|
16
30
|
* simulationContext: {
|
|
@@ -44,7 +58,7 @@ import type * as MavenAGI from "../../../index";
|
|
|
44
58
|
* messages: []
|
|
45
59
|
* }
|
|
46
60
|
*/
|
|
47
|
-
export interface ConversationRequest {
|
|
61
|
+
export interface ConversationRequest extends MavenAGI.ConversationSetupFields {
|
|
48
62
|
/** An externally supplied ID to uniquely identify this conversation */
|
|
49
63
|
conversationId: MavenAGI.EntityIdBase;
|
|
50
64
|
/**
|
|
@@ -53,8 +67,6 @@ export interface ConversationRequest {
|
|
|
53
67
|
* search results unless explicitly included via the `simulationFilter` field.
|
|
54
68
|
*/
|
|
55
69
|
simulationContext?: MavenAGI.SimulationContext;
|
|
56
|
-
/** Optional configurations for responses to this conversation */
|
|
57
|
-
responseConfig?: MavenAGI.ResponseConfig;
|
|
58
70
|
/** The subject of the conversation */
|
|
59
71
|
subject?: string;
|
|
60
72
|
/** The url of the conversation */
|
|
@@ -63,19 +75,6 @@ export interface ConversationRequest {
|
|
|
63
75
|
createdAt?: Date;
|
|
64
76
|
/** The date and time the conversation was last updated */
|
|
65
77
|
updatedAt?: Date;
|
|
66
|
-
/** The tags of the conversation. Used for filtering in Agent Designer. */
|
|
67
|
-
tags?: Set<string>;
|
|
68
|
-
/**
|
|
69
|
-
* Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
|
|
70
|
-
* additional information about the object in a structured format, and querying for objects
|
|
71
|
-
* via API or the dashboard.
|
|
72
|
-
*
|
|
73
|
-
* Keys are strings with a maximum length of 500 characters. Values are strings with a maximum
|
|
74
|
-
* length of 512 characters.
|
|
75
|
-
*
|
|
76
|
-
* The metadata of the conversation supplied by the app which created the conversation.
|
|
77
|
-
*/
|
|
78
|
-
metadata?: Record<string, string>;
|
|
79
78
|
/** The messages in the conversation */
|
|
80
79
|
messages: MavenAGI.ConversationMessageRequest[];
|
|
81
80
|
/**
|
|
@@ -91,4 +90,15 @@ export interface ConversationRequest {
|
|
|
91
90
|
* back to the end user, only set this to a conversation the current user is entitled to see.
|
|
92
91
|
*/
|
|
93
92
|
spawnedFromConversationId?: MavenAGI.EntityId;
|
|
93
|
+
/**
|
|
94
|
+
* Who the conversation is for. Omit this field or send `allUsers` for a conversation that any of
|
|
95
|
+
* the agent's users may take part in. Send `users` to restrict the conversation to the listed users.
|
|
96
|
+
* A `USER` message from any other user, sent through `ask`, `askStream`, `appendNewMessages` or
|
|
97
|
+
* this request's `messages` when this request creates the conversation, is rejected with a 400.
|
|
98
|
+
* Initializing an existing conversation saves none of its `messages`.
|
|
99
|
+
*
|
|
100
|
+
* The audience is set when the conversation is created and cannot be changed. Initializing an
|
|
101
|
+
* existing conversation leaves its audience unchanged.
|
|
102
|
+
*/
|
|
103
|
+
audience?: MavenAGI.ConversationAudience;
|
|
94
104
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type * as MavenAGI from "../../../index";
|
|
2
2
|
export interface DeliverMessageResponse {
|
|
3
3
|
status: MavenAGI.DeliveryStatus;
|
|
4
|
+
/**
|
|
5
|
+
* The conversation the message was delivered to, or attempted on when `status` is `FAILED`. Absent when
|
|
6
|
+
* no conversation qualified for a delivery to a user.
|
|
7
|
+
*/
|
|
8
|
+
conversationId?: MavenAGI.EntityId;
|
|
4
9
|
}
|
|
@@ -2,4 +2,24 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface DeliverUserMessageRequest extends MavenAGI.DeliverMessageBase {
|
|
3
3
|
/** The ID of the user to deliver the message to. */
|
|
4
4
|
userId: MavenAGI.EntityIdWithoutAgent;
|
|
5
|
+
/**
|
|
6
|
+
* The apps whose conversations may receive the message, in order of preference. Omit it to allow any app; an empty list is rejected with a 400.
|
|
7
|
+
*
|
|
8
|
+
* The message goes to a conversation that already exists, is open, has the `ASYNC` capability, is owned
|
|
9
|
+
* by an allowed app, and lists this user in a `users` audience (set by `initialize`'s `audience`). A
|
|
10
|
+
* conversation with an `allUsers` audience, or with none, is never chosen. Apps are tried in the order
|
|
11
|
+
* given, and within an app the most recently updated conversation wins; with `appIds` omitted, the most
|
|
12
|
+
* recently updated conversation of any app wins. An `ask` also skips conversations with `llmEnabled`
|
|
13
|
+
* set to false.
|
|
14
|
+
*
|
|
15
|
+
* The message goes to one conversation only. To reach the user in several apps, send one request per app.
|
|
16
|
+
* Whether an app is installed is not checked when choosing: the message is handed to the chosen
|
|
17
|
+
* conversation's app, and if that app fails to take it, `status` is `FAILED` and no other app is tried.
|
|
18
|
+
*
|
|
19
|
+
* When no conversation qualifies, nothing is delivered and `status` is `FAILED`.
|
|
20
|
+
*
|
|
21
|
+
* Only 20 of a user's open `ASYNC` conversations are considered. If a user has more, an arbitrary 20
|
|
22
|
+
* are, so the most recent one may be missed. Close conversations that no longer take messages.
|
|
23
|
+
*/
|
|
24
|
+
appIds?: string[];
|
|
5
25
|
}
|
|
@@ -32,4 +32,8 @@ import type * as MavenAGI from "../../../index";
|
|
|
32
32
|
export interface IntelligentFieldResponse extends MavenAGI.IntelligentFieldBase, MavenAGI.CapabilityBase {
|
|
33
33
|
/** ID that uniquely identifies this intelligent field */
|
|
34
34
|
fieldId: MavenAGI.EntityId;
|
|
35
|
+
/** Who wrote this version of the field. Absent when no one was recorded. Shown in Agent Designer as "Created by" on a field a variant adds. */
|
|
36
|
+
createdBy?: MavenAGI.ChangeAuthor;
|
|
37
|
+
/** Who last changed this version of the field. Absent when no one was recorded. Shown in Agent Designer as "Modified by" on a field a variant changes. */
|
|
38
|
+
updatedBy?: MavenAGI.ChangeAuthor;
|
|
35
39
|
}
|
|
@@ -8,6 +8,8 @@ export declare const KnowledgeBaseType: {
|
|
|
8
8
|
readonly Api: "API";
|
|
9
9
|
readonly Url: "URL";
|
|
10
10
|
readonly Manual: "MANUAL";
|
|
11
|
+
/**
|
|
12
|
+
* No longer returned. RSS knowledge bases are `LEGACY`; filtering on `RSS` still matches them. */
|
|
11
13
|
readonly Rss: "RSS";
|
|
12
14
|
readonly Legacy: "LEGACY";
|
|
13
15
|
};
|
|
@@ -8,4 +8,6 @@ import type * as MavenAGI from "../../../index";
|
|
|
8
8
|
export interface KnowledgeBaseVersionRequest {
|
|
9
9
|
/** Indicates whether the completed version constitutes a full or partial refresh of the knowledge base. Deleting and updating documents is only supported for partial refreshes. */
|
|
10
10
|
type: MavenAGI.KnowledgeBaseVersionType;
|
|
11
|
+
/** The Function versions that build this version. On a version, absent for historical versions and for versions created without them. */
|
|
12
|
+
functionVersions?: MavenAGI.KnowledgeBaseFunctionBindings;
|
|
11
13
|
}
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -4523,9 +4523,20 @@ that owns the conversation receives the message through its `handleMessage` hook
|
|
|
4523
4523
|
|
|
4524
4524
|
A closed conversation (`open` set to false) takes no new messages and returns a 400.
|
|
4525
4525
|
|
|
4526
|
+
To reach a user rather than a known conversation, send `type: user`. The message goes to one of that
|
|
4527
|
+
user's open conversations, chosen as described on `appIds`. The response's `conversationId` names the
|
|
4528
|
+
conversation it went to.
|
|
4529
|
+
|
|
4526
4530
|
<Warning>
|
|
4527
4531
|
Currently, messages can only be successfully delivered to conversations with the `ASYNC` capability.
|
|
4528
|
-
|
|
4532
|
+
Delivering to a user only reaches a conversation that already exists; it never starts a new one.
|
|
4533
|
+
</Warning>
|
|
4534
|
+
|
|
4535
|
+
<Warning>
|
|
4536
|
+
Retrying a delivery is not supported. Sending the same `conversationMessageId` again saves the message, or an
|
|
4537
|
+
`ask`'s reply, only once in a conversation, but calls the app's `handleMessage` hook again each time. With
|
|
4538
|
+
`type: user`, a repeat can also go to a different conversation if the user's conversations changed in between,
|
|
4539
|
+
so the message is saved and delivered twice.
|
|
4529
4540
|
</Warning>
|
|
4530
4541
|
|
|
4531
4542
|
<Note>**Required permission:** `ask:agent`</Note>
|
|
@@ -4,6 +4,7 @@ import type * as serializers from "../../../index";
|
|
|
4
4
|
export declare const AbsoluteTimeWindow: core.serialization.ObjectSchema<serializers.AbsoluteTimeWindow.Raw, MavenAGI.AbsoluteTimeWindow>;
|
|
5
5
|
export declare namespace AbsoluteTimeWindow {
|
|
6
6
|
interface Raw {
|
|
7
|
+
timezone?: string | null;
|
|
7
8
|
start?: string | null;
|
|
8
9
|
end?: string | null;
|
|
9
10
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.AbsoluteTimeWindow = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
39
|
exports.AbsoluteTimeWindow = core.serialization.object({
|
|
40
|
+
timezone: core.serialization.string().optional(),
|
|
40
41
|
start: core.serialization.date().optional(),
|
|
41
42
|
end: core.serialization.date().optional(),
|
|
42
43
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
import { UserDataEffect } from "./UserDataEffect";
|
|
5
|
+
export declare const ActionEffects: core.serialization.ObjectSchema<serializers.ActionEffects.Raw, MavenAGI.ActionEffects>;
|
|
6
|
+
export declare namespace ActionEffects {
|
|
7
|
+
interface Raw {
|
|
8
|
+
conversationMetadata?: Record<string, string> | null;
|
|
9
|
+
userData?: UserDataEffect.Raw | null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ActionEffects = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const UserDataEffect_1 = require("./UserDataEffect");
|
|
40
|
+
exports.ActionEffects = core.serialization.object({
|
|
41
|
+
conversationMetadata: core.serialization
|
|
42
|
+
.record(core.serialization.string(), core.serialization.string())
|
|
43
|
+
.optional(),
|
|
44
|
+
userData: UserDataEffect_1.UserDataEffect.optional(),
|
|
45
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
export declare const AllUsersConversationAudience: core.serialization.ObjectSchema<serializers.AllUsersConversationAudience.Raw, MavenAGI.AllUsersConversationAudience>;
|
|
5
|
+
export declare namespace AllUsersConversationAudience {
|
|
6
|
+
type Raw = {};
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.AllUsersConversationAudience = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
exports.AllUsersConversationAudience = core.serialization.object({});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
import { LeveledEntityId } from "./LeveledEntityId";
|
|
5
|
+
export declare const ChangeAuthor: core.serialization.ObjectSchema<serializers.ChangeAuthor.Raw, MavenAGI.ChangeAuthor>;
|
|
6
|
+
export declare namespace ChangeAuthor {
|
|
7
|
+
interface Raw {
|
|
8
|
+
mavenUserId?: LeveledEntityId.Raw | null;
|
|
9
|
+
name?: string | null;
|
|
10
|
+
actingAppId?: string | null;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ChangeAuthor = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const LeveledEntityId_1 = require("./LeveledEntityId");
|
|
40
|
+
exports.ChangeAuthor = core.serialization.object({
|
|
41
|
+
mavenUserId: LeveledEntityId_1.LeveledEntityId.optional(),
|
|
42
|
+
name: core.serialization.string().optional(),
|
|
43
|
+
actingAppId: core.serialization.string().optional(),
|
|
44
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
import { AllUsersConversationAudience } from "./AllUsersConversationAudience";
|
|
5
|
+
import { UsersConversationAudience } from "./UsersConversationAudience";
|
|
6
|
+
export declare const ConversationAudience: core.serialization.Schema<serializers.ConversationAudience.Raw, MavenAGI.ConversationAudience>;
|
|
7
|
+
export declare namespace ConversationAudience {
|
|
8
|
+
type Raw = ConversationAudience.AllUsers | ConversationAudience.Users;
|
|
9
|
+
interface AllUsers extends AllUsersConversationAudience.Raw {
|
|
10
|
+
type: "allUsers";
|
|
11
|
+
}
|
|
12
|
+
interface Users extends UsersConversationAudience.Raw {
|
|
13
|
+
type: "users";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ConversationAudience = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const AllUsersConversationAudience_1 = require("./AllUsersConversationAudience");
|
|
40
|
+
const UsersConversationAudience_1 = require("./UsersConversationAudience");
|
|
41
|
+
exports.ConversationAudience = core.serialization
|
|
42
|
+
.union("type", {
|
|
43
|
+
allUsers: AllUsersConversationAudience_1.AllUsersConversationAudience,
|
|
44
|
+
users: UsersConversationAudience_1.UsersConversationAudience,
|
|
45
|
+
})
|
|
46
|
+
.transform({
|
|
47
|
+
transform: (value) => value,
|
|
48
|
+
untransform: (value) => value,
|
|
49
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../api/index";
|
|
2
|
+
import * as core from "../../../../core";
|
|
3
|
+
import type * as serializers from "../../../index";
|
|
4
|
+
import { AllUsersConversationAudience } from "./AllUsersConversationAudience";
|
|
5
|
+
import { UsersConversationAudienceResponse } from "./UsersConversationAudienceResponse";
|
|
6
|
+
export declare const ConversationAudienceResponse: core.serialization.Schema<serializers.ConversationAudienceResponse.Raw, MavenAGI.ConversationAudienceResponse>;
|
|
7
|
+
export declare namespace ConversationAudienceResponse {
|
|
8
|
+
type Raw = ConversationAudienceResponse.AllUsers | ConversationAudienceResponse.Users;
|
|
9
|
+
interface AllUsers extends AllUsersConversationAudience.Raw {
|
|
10
|
+
type: "allUsers";
|
|
11
|
+
}
|
|
12
|
+
interface Users extends UsersConversationAudienceResponse.Raw {
|
|
13
|
+
type: "users";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ConversationAudienceResponse = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core"));
|
|
39
|
+
const AllUsersConversationAudience_1 = require("./AllUsersConversationAudience");
|
|
40
|
+
const UsersConversationAudienceResponse_1 = require("./UsersConversationAudienceResponse");
|
|
41
|
+
exports.ConversationAudienceResponse = core.serialization
|
|
42
|
+
.union("type", {
|
|
43
|
+
allUsers: AllUsersConversationAudience_1.AllUsersConversationAudience,
|
|
44
|
+
users: UsersConversationAudienceResponse_1.UsersConversationAudienceResponse,
|
|
45
|
+
})
|
|
46
|
+
.transform({
|
|
47
|
+
transform: (value) => value,
|
|
48
|
+
untransform: (value) => value,
|
|
49
|
+
});
|
|
@@ -3,11 +3,13 @@ import * as core from "../../../../core";
|
|
|
3
3
|
import type * as serializers from "../../../index";
|
|
4
4
|
import { AttachmentResponse } from "./AttachmentResponse";
|
|
5
5
|
import { BaseConversationResponse } from "./BaseConversationResponse";
|
|
6
|
+
import { ConversationAudienceResponse } from "./ConversationAudienceResponse";
|
|
6
7
|
import { ConversationMessageResponse } from "./ConversationMessageResponse";
|
|
7
8
|
export declare const ConversationResponse: core.serialization.ObjectSchema<serializers.ConversationResponse.Raw, MavenAGI.ConversationResponse>;
|
|
8
9
|
export declare namespace ConversationResponse {
|
|
9
10
|
interface Raw extends BaseConversationResponse.Raw {
|
|
10
11
|
messages: ConversationMessageResponse.Raw[];
|
|
11
12
|
attachments: AttachmentResponse.Raw[];
|
|
13
|
+
audience: ConversationAudienceResponse.Raw;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
@@ -38,10 +38,12 @@ exports.ConversationResponse = void 0;
|
|
|
38
38
|
const core = __importStar(require("../../../../core"));
|
|
39
39
|
const AttachmentResponse_1 = require("./AttachmentResponse");
|
|
40
40
|
const BaseConversationResponse_1 = require("./BaseConversationResponse");
|
|
41
|
+
const ConversationAudienceResponse_1 = require("./ConversationAudienceResponse");
|
|
41
42
|
const ConversationMessageResponse_1 = require("./ConversationMessageResponse");
|
|
42
43
|
exports.ConversationResponse = core.serialization
|
|
43
44
|
.object({
|
|
44
45
|
messages: core.serialization.list(ConversationMessageResponse_1.ConversationMessageResponse),
|
|
45
46
|
attachments: core.serialization.list(AttachmentResponse_1.AttachmentResponse),
|
|
47
|
+
audience: ConversationAudienceResponse_1.ConversationAudienceResponse,
|
|
46
48
|
})
|
|
47
49
|
.extend(BaseConversationResponse_1.BaseConversationResponse);
|