@pushwoosh/rpc-gateway-ai-assistant 0.1.619 → 0.1.621
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 +173 -0
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +6 -0
- package/pushwoosh_uds_onyx_v1.d.ts +91 -4
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,18 @@ 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
|
+
},
|
|
5508
|
+
"ListGoals": {
|
|
5509
|
+
"request": "pushwoosh.uds.onyx.v1.ListGoalsRequest",
|
|
5510
|
+
"response": "pushwoosh.uds.onyx.v1.ListGoalsResponse",
|
|
5511
|
+
"method": "get",
|
|
5512
|
+
"path": "/api/v1/applications/{application}/board/goals"
|
|
5513
|
+
},
|
|
5493
5514
|
"GetAgentAccess": {
|
|
5494
5515
|
"request": "pushwoosh.uds.onyx.v1.GetAgentAccessRequest",
|
|
5495
5516
|
"response": "pushwoosh.uds.onyx.v1.GetAgentAccessResponse",
|
|
@@ -5797,6 +5818,38 @@ export const data = {
|
|
|
5797
5818
|
},
|
|
5798
5819
|
"days": {
|
|
5799
5820
|
"type": "number"
|
|
5821
|
+
},
|
|
5822
|
+
"pace": {
|
|
5823
|
+
"type": "string"
|
|
5824
|
+
},
|
|
5825
|
+
"outcome": {
|
|
5826
|
+
"type": "string"
|
|
5827
|
+
},
|
|
5828
|
+
"endedAt": {
|
|
5829
|
+
"type": "Date"
|
|
5830
|
+
},
|
|
5831
|
+
"carriedValue": {
|
|
5832
|
+
"type": "number"
|
|
5833
|
+
},
|
|
5834
|
+
"carriedProven": {
|
|
5835
|
+
"type": "number"
|
|
5836
|
+
},
|
|
5837
|
+
"revises": {
|
|
5838
|
+
"type": "pushwoosh.uds.onyx.v1.GoalRevision"
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
},
|
|
5842
|
+
"pushwoosh.uds.onyx.v1.GoalRevision": {
|
|
5843
|
+
"type": "I",
|
|
5844
|
+
"fields": {
|
|
5845
|
+
"goalId": {
|
|
5846
|
+
"type": "number"
|
|
5847
|
+
},
|
|
5848
|
+
"target": {
|
|
5849
|
+
"type": "number"
|
|
5850
|
+
},
|
|
5851
|
+
"revisedAt": {
|
|
5852
|
+
"type": "Date"
|
|
5800
5853
|
}
|
|
5801
5854
|
}
|
|
5802
5855
|
},
|
|
@@ -5819,6 +5872,9 @@ export const data = {
|
|
|
5819
5872
|
},
|
|
5820
5873
|
"includeHidden": {
|
|
5821
5874
|
"type": "boolean"
|
|
5875
|
+
},
|
|
5876
|
+
"goalId": {
|
|
5877
|
+
"type": "number"
|
|
5822
5878
|
}
|
|
5823
5879
|
}
|
|
5824
5880
|
},
|
|
@@ -5848,6 +5904,26 @@ export const data = {
|
|
|
5848
5904
|
},
|
|
5849
5905
|
"hiddenCount": {
|
|
5850
5906
|
"type": "number"
|
|
5907
|
+
},
|
|
5908
|
+
"readOnly": {
|
|
5909
|
+
"type": "boolean"
|
|
5910
|
+
}
|
|
5911
|
+
}
|
|
5912
|
+
},
|
|
5913
|
+
"pushwoosh.uds.onyx.v1.ListGoalsRequest": {
|
|
5914
|
+
"type": "I",
|
|
5915
|
+
"fields": {
|
|
5916
|
+
"application": {
|
|
5917
|
+
"type": "string"
|
|
5918
|
+
}
|
|
5919
|
+
}
|
|
5920
|
+
},
|
|
5921
|
+
"pushwoosh.uds.onyx.v1.ListGoalsResponse": {
|
|
5922
|
+
"type": "I",
|
|
5923
|
+
"fields": {
|
|
5924
|
+
"goals": {
|
|
5925
|
+
"type": "pushwoosh.uds.onyx.v1.BoardGoal",
|
|
5926
|
+
"array": true
|
|
5851
5927
|
}
|
|
5852
5928
|
}
|
|
5853
5929
|
},
|
|
@@ -5895,6 +5971,97 @@ export const data = {
|
|
|
5895
5971
|
}
|
|
5896
5972
|
}
|
|
5897
5973
|
},
|
|
5974
|
+
"pushwoosh.uds.onyx.v1.GetCardTimelineRequest": {
|
|
5975
|
+
"type": "I",
|
|
5976
|
+
"fields": {
|
|
5977
|
+
"application": {
|
|
5978
|
+
"type": "string"
|
|
5979
|
+
},
|
|
5980
|
+
"cardId": {
|
|
5981
|
+
"type": "number"
|
|
5982
|
+
},
|
|
5983
|
+
"cursor": {
|
|
5984
|
+
"type": "string"
|
|
5985
|
+
},
|
|
5986
|
+
"limit": {
|
|
5987
|
+
"type": "number"
|
|
5988
|
+
}
|
|
5989
|
+
}
|
|
5990
|
+
},
|
|
5991
|
+
"pushwoosh.uds.onyx.v1.GetCardTimelineResponse": {
|
|
5992
|
+
"type": "I",
|
|
5993
|
+
"fields": {
|
|
5994
|
+
"chatId": {
|
|
5995
|
+
"type": "number"
|
|
5996
|
+
},
|
|
5997
|
+
"items": {
|
|
5998
|
+
"type": "pushwoosh.uds.onyx.v1.TimelineItem",
|
|
5999
|
+
"array": true
|
|
6000
|
+
},
|
|
6001
|
+
"nextCursor": {
|
|
6002
|
+
"type": "string"
|
|
6003
|
+
}
|
|
6004
|
+
}
|
|
6005
|
+
},
|
|
6006
|
+
"pushwoosh.uds.onyx.v1.TimelineItem": {
|
|
6007
|
+
"type": "I",
|
|
6008
|
+
"fields": {
|
|
6009
|
+
"at": {
|
|
6010
|
+
"type": "Date"
|
|
6011
|
+
},
|
|
6012
|
+
"event": {
|
|
6013
|
+
"type": "pushwoosh.uds.onyx.v1.CardEvent"
|
|
6014
|
+
},
|
|
6015
|
+
"message": {
|
|
6016
|
+
"type": "pushwoosh.accounts.assistant.v1.Message"
|
|
6017
|
+
}
|
|
6018
|
+
},
|
|
6019
|
+
"oneofs": {
|
|
6020
|
+
"item": {
|
|
6021
|
+
"oneof": [
|
|
6022
|
+
"event",
|
|
6023
|
+
"message"
|
|
6024
|
+
]
|
|
6025
|
+
}
|
|
6026
|
+
}
|
|
6027
|
+
},
|
|
6028
|
+
"pushwoosh.uds.onyx.v1.CardEvent": {
|
|
6029
|
+
"type": "I",
|
|
6030
|
+
"fields": {
|
|
6031
|
+
"id": {
|
|
6032
|
+
"type": "number"
|
|
6033
|
+
},
|
|
6034
|
+
"fromState": {
|
|
6035
|
+
"type": "string"
|
|
6036
|
+
},
|
|
6037
|
+
"toState": {
|
|
6038
|
+
"type": "string"
|
|
6039
|
+
},
|
|
6040
|
+
"actor": {
|
|
6041
|
+
"type": "string"
|
|
6042
|
+
},
|
|
6043
|
+
"reason": {
|
|
6044
|
+
"type": "string"
|
|
6045
|
+
},
|
|
6046
|
+
"chatId": {
|
|
6047
|
+
"type": "number"
|
|
6048
|
+
},
|
|
6049
|
+
"sourceChat": {
|
|
6050
|
+
"type": "pushwoosh.uds.onyx.v1.SourceChat"
|
|
6051
|
+
}
|
|
6052
|
+
}
|
|
6053
|
+
},
|
|
6054
|
+
"pushwoosh.uds.onyx.v1.SourceChat": {
|
|
6055
|
+
"type": "I",
|
|
6056
|
+
"fields": {
|
|
6057
|
+
"id": {
|
|
6058
|
+
"type": "number"
|
|
6059
|
+
},
|
|
6060
|
+
"title": {
|
|
6061
|
+
"type": "string"
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
},
|
|
5898
6065
|
"pushwoosh.uds.onyx.v1.GetAgentAccessRequest": {
|
|
5899
6066
|
"type": "I",
|
|
5900
6067
|
"fields": {
|
|
@@ -5911,6 +6078,12 @@ export const data = {
|
|
|
5911
6078
|
},
|
|
5912
6079
|
"hasGoal": {
|
|
5913
6080
|
"type": "boolean"
|
|
6081
|
+
},
|
|
6082
|
+
"stage": {
|
|
6083
|
+
"type": "string"
|
|
6084
|
+
},
|
|
6085
|
+
"agencyChatId": {
|
|
6086
|
+
"type": "number"
|
|
5914
6087
|
}
|
|
5915
6088
|
}
|
|
5916
6089
|
}
|
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,8 @@ 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>;
|
|
13
|
+
export type BoardService_ListGoals = RpcMethod<ListGoalsRequest, ListGoalsResponse>;
|
|
11
14
|
export type BoardService_GetAgentAccess = RpcMethod<GetAgentAccessRequest, GetAgentAccessResponse>;
|
|
12
15
|
/**
|
|
13
16
|
* BoardService is the marketing agent's board: cards laid out in columns, each rendered by its kind.
|
|
@@ -17,8 +20,12 @@ export interface BoardService {
|
|
|
17
20
|
GetBoard: BoardService_GetBoard;
|
|
18
21
|
/** Applies one of the card's view.actions; any other transition is FailedPrecondition. */
|
|
19
22
|
MoveCard: BoardService_MoveCard;
|
|
20
|
-
/** The chat
|
|
23
|
+
/** The card's own chat, created with the card; a card without one (wake) is NotFound. */
|
|
21
24
|
OpenCardChat: BoardService_OpenCardChat;
|
|
25
|
+
/** The card's history newest first: its events and its chat's messages merged by time. */
|
|
26
|
+
GetCardTimeline: BoardService_GetCardTimeline;
|
|
27
|
+
/** The application's last 5 goals, newest first, each with its result: the board's versions. */
|
|
28
|
+
ListGoals: BoardService_ListGoals;
|
|
22
29
|
GetAgentAccess: BoardService_GetAgentAccess;
|
|
23
30
|
}
|
|
24
31
|
export type Card = {
|
|
@@ -132,14 +139,29 @@ export type BoardGoal = {
|
|
|
132
139
|
periodStart: Date;
|
|
133
140
|
periodEnd: Date;
|
|
134
141
|
summary: string;
|
|
135
|
-
/**
|
|
142
|
+
/** The goal's slices of its closed cards (payload.result_by_goal) plus what a revision carried over. */
|
|
136
143
|
value: number;
|
|
137
144
|
proven: number;
|
|
138
|
-
/** active
|
|
145
|
+
/** active; reached until its period ends; closed once it ended or was replaced. */
|
|
139
146
|
status: string;
|
|
140
147
|
/** The period's current day (1-based) and its length in days. */
|
|
141
148
|
dayOf: number;
|
|
142
149
|
days: number;
|
|
150
|
+
/** on_track | behind | reached against a linear plan to date; empty once closed. */
|
|
151
|
+
pace: string;
|
|
152
|
+
/** reached | missed | revised, set once the goal closed. */
|
|
153
|
+
outcome: string;
|
|
154
|
+
endedAt: Date;
|
|
155
|
+
/** Taken over from the goal this version revises, already inside value / proven. */
|
|
156
|
+
carriedValue: number;
|
|
157
|
+
carriedProven: number;
|
|
158
|
+
/** The goal this version replaced: "revised <revised_at>, was <target>". */
|
|
159
|
+
revises: GoalRevision;
|
|
160
|
+
};
|
|
161
|
+
export type GoalRevision = {
|
|
162
|
+
goalId: number;
|
|
163
|
+
target: number;
|
|
164
|
+
revisedAt: Date;
|
|
143
165
|
};
|
|
144
166
|
export type BoardPulse = {
|
|
145
167
|
/** The earliest wake-up of an agent card; unset when none is scheduled. */
|
|
@@ -149,9 +171,14 @@ export type BoardPulse = {
|
|
|
149
171
|
export type GetBoardRequest = {
|
|
150
172
|
application: string;
|
|
151
173
|
includeHidden: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* A past version of the board (a ListGoals id): its cards with a share in that goal, read-only.
|
|
176
|
+
* 0 or the goal on the board is the live board.
|
|
177
|
+
*/
|
|
178
|
+
goalId: number;
|
|
152
179
|
};
|
|
153
180
|
export type GetBoardResponse = {
|
|
154
|
-
/**
|
|
181
|
+
/** The goal in play, else the last closed one for 14 days after it ended; unset otherwise. */
|
|
155
182
|
goal: BoardGoal;
|
|
156
183
|
columns: BoardColumn[];
|
|
157
184
|
/** Agent cards outside every column, newest first. */
|
|
@@ -163,6 +190,14 @@ export type GetBoardResponse = {
|
|
|
163
190
|
hidden: Card[];
|
|
164
191
|
/** How many cards are hidden, counted with or without include_hidden. */
|
|
165
192
|
hiddenCount: number;
|
|
193
|
+
/** A past version (goal_id): no card offers actions. */
|
|
194
|
+
readOnly: boolean;
|
|
195
|
+
};
|
|
196
|
+
export type ListGoalsRequest = {
|
|
197
|
+
application: string;
|
|
198
|
+
};
|
|
199
|
+
export type ListGoalsResponse = {
|
|
200
|
+
goals: BoardGoal[];
|
|
166
201
|
};
|
|
167
202
|
export type MoveCardRequest = {
|
|
168
203
|
application: string;
|
|
@@ -181,6 +216,51 @@ export type OpenCardChatRequest = {
|
|
|
181
216
|
export type OpenCardChatResponse = {
|
|
182
217
|
chatId: number;
|
|
183
218
|
};
|
|
219
|
+
export type GetCardTimelineRequest = {
|
|
220
|
+
application: string;
|
|
221
|
+
cardId: number;
|
|
222
|
+
/** next_cursor of the previous page; empty for the newest page. */
|
|
223
|
+
cursor: string;
|
|
224
|
+
/** Items per page; 0 is 50, capped at 200. */
|
|
225
|
+
limit: number;
|
|
226
|
+
};
|
|
227
|
+
export type GetCardTimelineResponse = {
|
|
228
|
+
chatId: number;
|
|
229
|
+
/** Newest first. */
|
|
230
|
+
items: TimelineItem[];
|
|
231
|
+
/** Empty on the last page. */
|
|
232
|
+
nextCursor: string;
|
|
233
|
+
};
|
|
234
|
+
export type TimelineItem_item_event = {
|
|
235
|
+
type: 'event';
|
|
236
|
+
data: CardEvent;
|
|
237
|
+
};
|
|
238
|
+
export type TimelineItem_item_message = {
|
|
239
|
+
type: 'message';
|
|
240
|
+
data: pushwoosh_accounts_assistant_v1_Message;
|
|
241
|
+
};
|
|
242
|
+
export type TimelineItem_item = TimelineItem_item_event | TimelineItem_item_message;
|
|
243
|
+
export type TimelineItem = {
|
|
244
|
+
at: Date;
|
|
245
|
+
item: TimelineItem_item;
|
|
246
|
+
};
|
|
247
|
+
/** CardEvent is one row of the card's history, the only record of its moves. */
|
|
248
|
+
export type CardEvent = {
|
|
249
|
+
id: number;
|
|
250
|
+
fromState: string;
|
|
251
|
+
toState: string;
|
|
252
|
+
/** agent, user or system. */
|
|
253
|
+
actor: string;
|
|
254
|
+
reason: string;
|
|
255
|
+
/** The chat the move was made from, 0 when none. */
|
|
256
|
+
chatId: number;
|
|
257
|
+
/** Set when chat_id is another chat than the card's: "decided in chat <title>". */
|
|
258
|
+
sourceChat: SourceChat;
|
|
259
|
+
};
|
|
260
|
+
export type SourceChat = {
|
|
261
|
+
id: number;
|
|
262
|
+
title: string;
|
|
263
|
+
};
|
|
184
264
|
export type GetAgentAccessRequest = {
|
|
185
265
|
application: string;
|
|
186
266
|
};
|
|
@@ -189,4 +269,11 @@ export type GetAgentAccessResponse = {
|
|
|
189
269
|
enabled: boolean;
|
|
190
270
|
/** A goal is active, or reached and still on the board. */
|
|
191
271
|
hasGoal: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* no_goal | goal_proposed | goal_active | goal_ended: goal_active as has_goal, goal_proposed when only a first goal
|
|
274
|
+
* card waits for the client, goal_ended when a goal ended and the next one is not accepted.
|
|
275
|
+
*/
|
|
276
|
+
stage: string;
|
|
277
|
+
/** The application's agency (advisor) chat, created on first read; 0 when the agent is off. */
|
|
278
|
+
agencyChatId: number;
|
|
192
279
|
};
|