@pushwoosh/rpc-gateway-ai-assistant 0.1.619 → 0.1.620
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/data.js +112 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +6 -0
- package/pushwoosh_uds_onyx_v1.d.ts +54 -1
package/data.js
CHANGED
|
@@ -4056,6 +4056,15 @@ export const data = {
|
|
|
4056
4056
|
},
|
|
4057
4057
|
"isAdvisor": {
|
|
4058
4058
|
"type": "boolean"
|
|
4059
|
+
},
|
|
4060
|
+
"kind": {
|
|
4061
|
+
"type": "string"
|
|
4062
|
+
},
|
|
4063
|
+
"cardId": {
|
|
4064
|
+
"type": "number"
|
|
4065
|
+
},
|
|
4066
|
+
"needsDecision": {
|
|
4067
|
+
"type": "boolean"
|
|
4059
4068
|
}
|
|
4060
4069
|
}
|
|
4061
4070
|
},
|
|
@@ -5490,6 +5499,12 @@ export const data = {
|
|
|
5490
5499
|
"method": "post",
|
|
5491
5500
|
"path": "/api/v1/applications/{application}/board/cards/{card_id}/chat"
|
|
5492
5501
|
},
|
|
5502
|
+
"GetCardTimeline": {
|
|
5503
|
+
"request": "pushwoosh.uds.onyx.v1.GetCardTimelineRequest",
|
|
5504
|
+
"response": "pushwoosh.uds.onyx.v1.GetCardTimelineResponse",
|
|
5505
|
+
"method": "get",
|
|
5506
|
+
"path": "/api/v1/applications/{application}/board/cards/{card_id}/timeline"
|
|
5507
|
+
},
|
|
5493
5508
|
"GetAgentAccess": {
|
|
5494
5509
|
"request": "pushwoosh.uds.onyx.v1.GetAgentAccessRequest",
|
|
5495
5510
|
"response": "pushwoosh.uds.onyx.v1.GetAgentAccessResponse",
|
|
@@ -5895,6 +5910,97 @@ export const data = {
|
|
|
5895
5910
|
}
|
|
5896
5911
|
}
|
|
5897
5912
|
},
|
|
5913
|
+
"pushwoosh.uds.onyx.v1.GetCardTimelineRequest": {
|
|
5914
|
+
"type": "I",
|
|
5915
|
+
"fields": {
|
|
5916
|
+
"application": {
|
|
5917
|
+
"type": "string"
|
|
5918
|
+
},
|
|
5919
|
+
"cardId": {
|
|
5920
|
+
"type": "number"
|
|
5921
|
+
},
|
|
5922
|
+
"cursor": {
|
|
5923
|
+
"type": "string"
|
|
5924
|
+
},
|
|
5925
|
+
"limit": {
|
|
5926
|
+
"type": "number"
|
|
5927
|
+
}
|
|
5928
|
+
}
|
|
5929
|
+
},
|
|
5930
|
+
"pushwoosh.uds.onyx.v1.GetCardTimelineResponse": {
|
|
5931
|
+
"type": "I",
|
|
5932
|
+
"fields": {
|
|
5933
|
+
"chatId": {
|
|
5934
|
+
"type": "number"
|
|
5935
|
+
},
|
|
5936
|
+
"items": {
|
|
5937
|
+
"type": "pushwoosh.uds.onyx.v1.TimelineItem",
|
|
5938
|
+
"array": true
|
|
5939
|
+
},
|
|
5940
|
+
"nextCursor": {
|
|
5941
|
+
"type": "string"
|
|
5942
|
+
}
|
|
5943
|
+
}
|
|
5944
|
+
},
|
|
5945
|
+
"pushwoosh.uds.onyx.v1.TimelineItem": {
|
|
5946
|
+
"type": "I",
|
|
5947
|
+
"fields": {
|
|
5948
|
+
"at": {
|
|
5949
|
+
"type": "Date"
|
|
5950
|
+
},
|
|
5951
|
+
"event": {
|
|
5952
|
+
"type": "pushwoosh.uds.onyx.v1.CardEvent"
|
|
5953
|
+
},
|
|
5954
|
+
"message": {
|
|
5955
|
+
"type": "pushwoosh.accounts.assistant.v1.Message"
|
|
5956
|
+
}
|
|
5957
|
+
},
|
|
5958
|
+
"oneofs": {
|
|
5959
|
+
"item": {
|
|
5960
|
+
"oneof": [
|
|
5961
|
+
"event",
|
|
5962
|
+
"message"
|
|
5963
|
+
]
|
|
5964
|
+
}
|
|
5965
|
+
}
|
|
5966
|
+
},
|
|
5967
|
+
"pushwoosh.uds.onyx.v1.CardEvent": {
|
|
5968
|
+
"type": "I",
|
|
5969
|
+
"fields": {
|
|
5970
|
+
"id": {
|
|
5971
|
+
"type": "number"
|
|
5972
|
+
},
|
|
5973
|
+
"fromState": {
|
|
5974
|
+
"type": "string"
|
|
5975
|
+
},
|
|
5976
|
+
"toState": {
|
|
5977
|
+
"type": "string"
|
|
5978
|
+
},
|
|
5979
|
+
"actor": {
|
|
5980
|
+
"type": "string"
|
|
5981
|
+
},
|
|
5982
|
+
"reason": {
|
|
5983
|
+
"type": "string"
|
|
5984
|
+
},
|
|
5985
|
+
"chatId": {
|
|
5986
|
+
"type": "number"
|
|
5987
|
+
},
|
|
5988
|
+
"sourceChat": {
|
|
5989
|
+
"type": "pushwoosh.uds.onyx.v1.SourceChat"
|
|
5990
|
+
}
|
|
5991
|
+
}
|
|
5992
|
+
},
|
|
5993
|
+
"pushwoosh.uds.onyx.v1.SourceChat": {
|
|
5994
|
+
"type": "I",
|
|
5995
|
+
"fields": {
|
|
5996
|
+
"id": {
|
|
5997
|
+
"type": "number"
|
|
5998
|
+
},
|
|
5999
|
+
"title": {
|
|
6000
|
+
"type": "string"
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
},
|
|
5898
6004
|
"pushwoosh.uds.onyx.v1.GetAgentAccessRequest": {
|
|
5899
6005
|
"type": "I",
|
|
5900
6006
|
"fields": {
|
|
@@ -5911,6 +6017,12 @@ export const data = {
|
|
|
5911
6017
|
},
|
|
5912
6018
|
"hasGoal": {
|
|
5913
6019
|
"type": "boolean"
|
|
6020
|
+
},
|
|
6021
|
+
"stage": {
|
|
6022
|
+
"type": "string"
|
|
6023
|
+
},
|
|
6024
|
+
"agencyChatId": {
|
|
6025
|
+
"type": "number"
|
|
5914
6026
|
}
|
|
5915
6027
|
}
|
|
5916
6028
|
}
|
package/package.json
CHANGED
|
@@ -100,6 +100,12 @@ export type Chat = {
|
|
|
100
100
|
* holding the marketing agent's cards and reports. It cannot be deleted, cleared or renamed.
|
|
101
101
|
*/
|
|
102
102
|
isAdvisor: boolean;
|
|
103
|
+
/** kind is regular, onboarding, agency (the advisor chat) or card; a card chat is the card's own, 1:1. */
|
|
104
|
+
kind: string;
|
|
105
|
+
/** card_id is the card a card chat belongs to. */
|
|
106
|
+
cardId: number;
|
|
107
|
+
/** needs_decision marks a card chat whose card waits for the user (GetAllChats only). */
|
|
108
|
+
needsDecision: boolean;
|
|
103
109
|
};
|
|
104
110
|
/** CreateChatRequest for creating a new chat */
|
|
105
111
|
export type CreateChatRequest = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RpcMethod, JsonObject } from './commonTypes';
|
|
2
|
+
import { Message as pushwoosh_accounts_assistant_v1_Message } from './pushwoosh_accounts_assistant_v1';
|
|
2
3
|
/**
|
|
3
4
|
* AgentProfileService turns the marketing agent on per application (ai_agent_profiles).
|
|
4
5
|
* Private port :9191 only: identity comes from account-id / user-id metadata.
|
|
@@ -8,6 +9,7 @@ export interface AgentProfileService {
|
|
|
8
9
|
export type BoardService_GetBoard = RpcMethod<GetBoardRequest, GetBoardResponse>;
|
|
9
10
|
export type BoardService_MoveCard = RpcMethod<MoveCardRequest, MoveCardResponse>;
|
|
10
11
|
export type BoardService_OpenCardChat = RpcMethod<OpenCardChatRequest, OpenCardChatResponse>;
|
|
12
|
+
export type BoardService_GetCardTimeline = RpcMethod<GetCardTimelineRequest, GetCardTimelineResponse>;
|
|
11
13
|
export type BoardService_GetAgentAccess = RpcMethod<GetAgentAccessRequest, GetAgentAccessResponse>;
|
|
12
14
|
/**
|
|
13
15
|
* BoardService is the marketing agent's board: cards laid out in columns, each rendered by its kind.
|
|
@@ -17,8 +19,10 @@ export interface BoardService {
|
|
|
17
19
|
GetBoard: BoardService_GetBoard;
|
|
18
20
|
/** Applies one of the card's view.actions; any other transition is FailedPrecondition. */
|
|
19
21
|
MoveCard: BoardService_MoveCard;
|
|
20
|
-
/** The chat
|
|
22
|
+
/** The card's own chat, created with the card; a card without one (wake) is NotFound. */
|
|
21
23
|
OpenCardChat: BoardService_OpenCardChat;
|
|
24
|
+
/** The card's history newest first: its events and its chat's messages merged by time. */
|
|
25
|
+
GetCardTimeline: BoardService_GetCardTimeline;
|
|
22
26
|
GetAgentAccess: BoardService_GetAgentAccess;
|
|
23
27
|
}
|
|
24
28
|
export type Card = {
|
|
@@ -181,6 +185,51 @@ export type OpenCardChatRequest = {
|
|
|
181
185
|
export type OpenCardChatResponse = {
|
|
182
186
|
chatId: number;
|
|
183
187
|
};
|
|
188
|
+
export type GetCardTimelineRequest = {
|
|
189
|
+
application: string;
|
|
190
|
+
cardId: number;
|
|
191
|
+
/** next_cursor of the previous page; empty for the newest page. */
|
|
192
|
+
cursor: string;
|
|
193
|
+
/** Items per page; 0 is 50, capped at 200. */
|
|
194
|
+
limit: number;
|
|
195
|
+
};
|
|
196
|
+
export type GetCardTimelineResponse = {
|
|
197
|
+
chatId: number;
|
|
198
|
+
/** Newest first. */
|
|
199
|
+
items: TimelineItem[];
|
|
200
|
+
/** Empty on the last page. */
|
|
201
|
+
nextCursor: string;
|
|
202
|
+
};
|
|
203
|
+
export type TimelineItem_item_event = {
|
|
204
|
+
type: 'event';
|
|
205
|
+
data: CardEvent;
|
|
206
|
+
};
|
|
207
|
+
export type TimelineItem_item_message = {
|
|
208
|
+
type: 'message';
|
|
209
|
+
data: pushwoosh_accounts_assistant_v1_Message;
|
|
210
|
+
};
|
|
211
|
+
export type TimelineItem_item = TimelineItem_item_event | TimelineItem_item_message;
|
|
212
|
+
export type TimelineItem = {
|
|
213
|
+
at: Date;
|
|
214
|
+
item: TimelineItem_item;
|
|
215
|
+
};
|
|
216
|
+
/** CardEvent is one row of the card's history, the only record of its moves. */
|
|
217
|
+
export type CardEvent = {
|
|
218
|
+
id: number;
|
|
219
|
+
fromState: string;
|
|
220
|
+
toState: string;
|
|
221
|
+
/** agent, user or system. */
|
|
222
|
+
actor: string;
|
|
223
|
+
reason: string;
|
|
224
|
+
/** The chat the move was made from, 0 when none. */
|
|
225
|
+
chatId: number;
|
|
226
|
+
/** Set when chat_id is another chat than the card's: "decided in chat <title>". */
|
|
227
|
+
sourceChat: SourceChat;
|
|
228
|
+
};
|
|
229
|
+
export type SourceChat = {
|
|
230
|
+
id: number;
|
|
231
|
+
title: string;
|
|
232
|
+
};
|
|
184
233
|
export type GetAgentAccessRequest = {
|
|
185
234
|
application: string;
|
|
186
235
|
};
|
|
@@ -189,4 +238,8 @@ export type GetAgentAccessResponse = {
|
|
|
189
238
|
enabled: boolean;
|
|
190
239
|
/** A goal is active, or reached and still on the board. */
|
|
191
240
|
hasGoal: boolean;
|
|
241
|
+
/** no_goal | goal_proposed | goal_active: goal_active as has_goal, goal_proposed when only a goal card waits for the client. */
|
|
242
|
+
stage: string;
|
|
243
|
+
/** The application's agency (advisor) chat, created on first read; 0 when the agent is off. */
|
|
244
|
+
agencyChatId: number;
|
|
192
245
|
};
|