@pushwoosh/rpc-gateway-ai-assistant 0.1.599 → 0.1.601

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 CHANGED
@@ -5156,5 +5156,436 @@ export const data = {
5156
5156
  "type": "S",
5157
5157
  "key": "agentProfile",
5158
5158
  "methods": {}
5159
+ },
5160
+ "pushwoosh.uds.onyx.v1.BoardService": {
5161
+ "type": "S",
5162
+ "key": "board",
5163
+ "methods": {
5164
+ "GetBoard": {
5165
+ "request": "pushwoosh.uds.onyx.v1.GetBoardRequest",
5166
+ "response": "pushwoosh.uds.onyx.v1.GetBoardResponse",
5167
+ "method": "get",
5168
+ "path": "/api/v1/applications/{application}/board"
5169
+ },
5170
+ "MoveCard": {
5171
+ "request": "pushwoosh.uds.onyx.v1.MoveCardRequest",
5172
+ "response": "pushwoosh.uds.onyx.v1.MoveCardResponse",
5173
+ "method": "post",
5174
+ "path": "/api/v1/applications/{application}/board/cards/{card_id}/move"
5175
+ },
5176
+ "OpenCardChat": {
5177
+ "request": "pushwoosh.uds.onyx.v1.OpenCardChatRequest",
5178
+ "response": "pushwoosh.uds.onyx.v1.OpenCardChatResponse",
5179
+ "method": "post",
5180
+ "path": "/api/v1/applications/{application}/board/cards/{card_id}/chat"
5181
+ },
5182
+ "GetAgentAccess": {
5183
+ "request": "pushwoosh.uds.onyx.v1.GetAgentAccessRequest",
5184
+ "response": "pushwoosh.uds.onyx.v1.GetAgentAccessResponse",
5185
+ "method": "get",
5186
+ "path": "/api/v1/applications/{application}/board/access"
5187
+ }
5188
+ }
5189
+ },
5190
+ "pushwoosh.uds.onyx.v1.Card": {
5191
+ "type": "I",
5192
+ "fields": {
5193
+ "id": {
5194
+ "type": "number"
5195
+ },
5196
+ "kind": {
5197
+ "type": "string"
5198
+ },
5199
+ "state": {
5200
+ "type": "string"
5201
+ },
5202
+ "owner": {
5203
+ "type": "string"
5204
+ },
5205
+ "column": {
5206
+ "type": "string"
5207
+ },
5208
+ "goalId": {
5209
+ "type": "number"
5210
+ },
5211
+ "parentId": {
5212
+ "type": "number"
5213
+ },
5214
+ "chatId": {
5215
+ "type": "number"
5216
+ },
5217
+ "skill": {
5218
+ "type": "string"
5219
+ },
5220
+ "createdAt": {
5221
+ "type": "Date"
5222
+ },
5223
+ "updatedAt": {
5224
+ "type": "Date"
5225
+ },
5226
+ "view": {
5227
+ "type": "pushwoosh.uds.onyx.v1.CardView"
5228
+ }
5229
+ }
5230
+ },
5231
+ "pushwoosh.uds.onyx.v1.CardView": {
5232
+ "type": "I",
5233
+ "fields": {
5234
+ "label": {
5235
+ "type": "string"
5236
+ },
5237
+ "title": {
5238
+ "type": "string"
5239
+ },
5240
+ "description": {
5241
+ "type": "string"
5242
+ },
5243
+ "parent": {
5244
+ "type": "pushwoosh.uds.onyx.v1.CardParent"
5245
+ },
5246
+ "chips": {
5247
+ "type": "string",
5248
+ "array": true
5249
+ },
5250
+ "dates": {
5251
+ "type": "pushwoosh.uds.onyx.v1.CardDates"
5252
+ },
5253
+ "progress": {
5254
+ "type": "pushwoosh.uds.onyx.v1.CardProgress"
5255
+ },
5256
+ "status": {
5257
+ "type": "pushwoosh.uds.onyx.v1.CardStatus"
5258
+ },
5259
+ "note": {
5260
+ "type": "string"
5261
+ },
5262
+ "error": {
5263
+ "type": "string"
5264
+ },
5265
+ "result": {
5266
+ "type": "pushwoosh.uds.onyx.v1.CardResult"
5267
+ },
5268
+ "actions": {
5269
+ "type": "pushwoosh.uds.onyx.v1.CardAction",
5270
+ "array": true
5271
+ }
5272
+ }
5273
+ },
5274
+ "pushwoosh.uds.onyx.v1.CardParent": {
5275
+ "type": "I",
5276
+ "fields": {
5277
+ "id": {
5278
+ "type": "number"
5279
+ },
5280
+ "title": {
5281
+ "type": "string"
5282
+ }
5283
+ }
5284
+ },
5285
+ "pushwoosh.uds.onyx.v1.CardDates": {
5286
+ "type": "I",
5287
+ "fields": {
5288
+ "left": {
5289
+ "type": "string"
5290
+ },
5291
+ "right": {
5292
+ "type": "string"
5293
+ },
5294
+ "warn": {
5295
+ "type": "boolean"
5296
+ }
5297
+ }
5298
+ },
5299
+ "pushwoosh.uds.onyx.v1.CardProgress": {
5300
+ "type": "I",
5301
+ "fields": {
5302
+ "segments": {
5303
+ "type": "pushwoosh.uds.onyx.v1.CardProgressSegments"
5304
+ },
5305
+ "bar": {
5306
+ "type": "pushwoosh.uds.onyx.v1.CardProgressBar"
5307
+ }
5308
+ },
5309
+ "oneofs": {
5310
+ "kind": {
5311
+ "oneof": [
5312
+ "segments",
5313
+ "bar"
5314
+ ]
5315
+ }
5316
+ }
5317
+ },
5318
+ "pushwoosh.uds.onyx.v1.CardProgressSegments": {
5319
+ "type": "I",
5320
+ "fields": {
5321
+ "done": {
5322
+ "type": "number"
5323
+ },
5324
+ "active": {
5325
+ "type": "number"
5326
+ },
5327
+ "of": {
5328
+ "type": "number"
5329
+ }
5330
+ }
5331
+ },
5332
+ "pushwoosh.uds.onyx.v1.CardProgressBar": {
5333
+ "type": "I",
5334
+ "fields": {
5335
+ "pct": {
5336
+ "type": "number"
5337
+ }
5338
+ }
5339
+ },
5340
+ "pushwoosh.uds.onyx.v1.CardStatus": {
5341
+ "type": "I",
5342
+ "fields": {
5343
+ "text": {
5344
+ "type": "string"
5345
+ },
5346
+ "busy": {
5347
+ "type": "boolean"
5348
+ },
5349
+ "failed": {
5350
+ "type": "boolean"
5351
+ },
5352
+ "counter": {
5353
+ "type": "string"
5354
+ }
5355
+ }
5356
+ },
5357
+ "pushwoosh.uds.onyx.v1.ResultTone": {
5358
+ "type": "E",
5359
+ "values": [
5360
+ "RESULT_TONE_UNSPECIFIED",
5361
+ "RESULT_TONE_UP",
5362
+ "RESULT_TONE_DOWN",
5363
+ "RESULT_TONE_NEUTRAL"
5364
+ ]
5365
+ },
5366
+ "pushwoosh.uds.onyx.v1.CardResult": {
5367
+ "type": "I",
5368
+ "fields": {
5369
+ "num": {
5370
+ "type": "string"
5371
+ },
5372
+ "label": {
5373
+ "type": "string"
5374
+ },
5375
+ "uplift": {
5376
+ "type": "string"
5377
+ },
5378
+ "tone": {
5379
+ "type": "pushwoosh.uds.onyx.v1.ResultTone"
5380
+ },
5381
+ "stats": {
5382
+ "type": "pushwoosh.uds.onyx.v1.CardStat",
5383
+ "array": true
5384
+ },
5385
+ "pending": {
5386
+ "type": "boolean"
5387
+ },
5388
+ "summary": {
5389
+ "type": "string"
5390
+ }
5391
+ }
5392
+ },
5393
+ "pushwoosh.uds.onyx.v1.CardStat": {
5394
+ "type": "I",
5395
+ "fields": {
5396
+ "k": {
5397
+ "type": "string"
5398
+ },
5399
+ "v": {
5400
+ "type": "string"
5401
+ }
5402
+ }
5403
+ },
5404
+ "pushwoosh.uds.onyx.v1.ActionColor": {
5405
+ "type": "E",
5406
+ "values": [
5407
+ "ACTION_COLOR_UNSPECIFIED",
5408
+ "ACTION_COLOR_PRIMARY",
5409
+ "ACTION_COLOR_SECONDARY"
5410
+ ]
5411
+ },
5412
+ "pushwoosh.uds.onyx.v1.CardAction": {
5413
+ "type": "I",
5414
+ "fields": {
5415
+ "label": {
5416
+ "type": "string"
5417
+ },
5418
+ "transition": {
5419
+ "type": "string"
5420
+ },
5421
+ "color": {
5422
+ "type": "pushwoosh.uds.onyx.v1.ActionColor"
5423
+ }
5424
+ }
5425
+ },
5426
+ "pushwoosh.uds.onyx.v1.BoardColumn": {
5427
+ "type": "I",
5428
+ "fields": {
5429
+ "id": {
5430
+ "type": "string"
5431
+ },
5432
+ "title": {
5433
+ "type": "string"
5434
+ },
5435
+ "sum": {
5436
+ "type": "number",
5437
+ "optional": true
5438
+ },
5439
+ "cards": {
5440
+ "type": "pushwoosh.uds.onyx.v1.Card",
5441
+ "array": true
5442
+ }
5443
+ }
5444
+ },
5445
+ "pushwoosh.uds.onyx.v1.BoardGoal": {
5446
+ "type": "I",
5447
+ "fields": {
5448
+ "id": {
5449
+ "type": "number"
5450
+ },
5451
+ "metric": {
5452
+ "type": "string"
5453
+ },
5454
+ "unit": {
5455
+ "type": "string"
5456
+ },
5457
+ "currency": {
5458
+ "type": "string"
5459
+ },
5460
+ "target": {
5461
+ "type": "number"
5462
+ },
5463
+ "periodStart": {
5464
+ "type": "Date"
5465
+ },
5466
+ "periodEnd": {
5467
+ "type": "Date"
5468
+ },
5469
+ "summary": {
5470
+ "type": "string"
5471
+ },
5472
+ "value": {
5473
+ "type": "number"
5474
+ },
5475
+ "proven": {
5476
+ "type": "number"
5477
+ }
5478
+ }
5479
+ },
5480
+ "pushwoosh.uds.onyx.v1.BoardPulse": {
5481
+ "type": "I",
5482
+ "fields": {
5483
+ "nextWakeAt": {
5484
+ "type": "Date"
5485
+ },
5486
+ "plannedCount": {
5487
+ "type": "number"
5488
+ }
5489
+ }
5490
+ },
5491
+ "pushwoosh.uds.onyx.v1.GetBoardRequest": {
5492
+ "type": "I",
5493
+ "fields": {
5494
+ "application": {
5495
+ "type": "string"
5496
+ },
5497
+ "includeHidden": {
5498
+ "type": "boolean"
5499
+ }
5500
+ }
5501
+ },
5502
+ "pushwoosh.uds.onyx.v1.GetBoardResponse": {
5503
+ "type": "I",
5504
+ "fields": {
5505
+ "goal": {
5506
+ "type": "pushwoosh.uds.onyx.v1.BoardGoal"
5507
+ },
5508
+ "columns": {
5509
+ "type": "pushwoosh.uds.onyx.v1.BoardColumn",
5510
+ "array": true
5511
+ },
5512
+ "planned": {
5513
+ "type": "pushwoosh.uds.onyx.v1.Card",
5514
+ "array": true
5515
+ },
5516
+ "pulse": {
5517
+ "type": "pushwoosh.uds.onyx.v1.BoardPulse"
5518
+ },
5519
+ "pendingForUser": {
5520
+ "type": "number"
5521
+ },
5522
+ "hidden": {
5523
+ "type": "pushwoosh.uds.onyx.v1.Card",
5524
+ "array": true
5525
+ }
5526
+ }
5527
+ },
5528
+ "pushwoosh.uds.onyx.v1.MoveCardRequest": {
5529
+ "type": "I",
5530
+ "fields": {
5531
+ "application": {
5532
+ "type": "string"
5533
+ },
5534
+ "cardId": {
5535
+ "type": "number"
5536
+ },
5537
+ "transition": {
5538
+ "type": "string"
5539
+ },
5540
+ "patch": {
5541
+ "type": "JsonObject"
5542
+ }
5543
+ }
5544
+ },
5545
+ "pushwoosh.uds.onyx.v1.MoveCardResponse": {
5546
+ "type": "I",
5547
+ "fields": {
5548
+ "card": {
5549
+ "type": "pushwoosh.uds.onyx.v1.Card"
5550
+ }
5551
+ }
5552
+ },
5553
+ "pushwoosh.uds.onyx.v1.OpenCardChatRequest": {
5554
+ "type": "I",
5555
+ "fields": {
5556
+ "application": {
5557
+ "type": "string"
5558
+ },
5559
+ "cardId": {
5560
+ "type": "number"
5561
+ }
5562
+ }
5563
+ },
5564
+ "pushwoosh.uds.onyx.v1.OpenCardChatResponse": {
5565
+ "type": "I",
5566
+ "fields": {
5567
+ "chatId": {
5568
+ "type": "number"
5569
+ }
5570
+ }
5571
+ },
5572
+ "pushwoosh.uds.onyx.v1.GetAgentAccessRequest": {
5573
+ "type": "I",
5574
+ "fields": {
5575
+ "application": {
5576
+ "type": "string"
5577
+ }
5578
+ }
5579
+ },
5580
+ "pushwoosh.uds.onyx.v1.GetAgentAccessResponse": {
5581
+ "type": "I",
5582
+ "fields": {
5583
+ "enabled": {
5584
+ "type": "boolean"
5585
+ },
5586
+ "hasGoal": {
5587
+ "type": "boolean"
5588
+ }
5589
+ }
5159
5590
  }
5160
5591
  };
package/index.d.ts CHANGED
@@ -3,11 +3,13 @@ import { AiGenService as pushwoosh_aigen_v1_AiGenService } from './pushwoosh_aig
3
3
  import { AssistantService as pushwoosh_accounts_assistant_v1_AssistantService } from './pushwoosh_accounts_assistant_v1';
4
4
  import { TemplatesService as pushwoosh_templates_v1_TemplatesService } from './pushwoosh_templates_v1';
5
5
  import { AgentProfileService as pushwoosh_uds_onyx_v1_AgentProfileService } from './pushwoosh_uds_onyx_v1';
6
+ import { BoardService as pushwoosh_uds_onyx_v1_BoardService } from './pushwoosh_uds_onyx_v1';
6
7
  export type API = {
7
8
  agentRunner: pushwoosh_agentrunner_v1_AgentRunner;
8
9
  aiGen: pushwoosh_aigen_v1_AiGenService;
9
10
  assistant: pushwoosh_accounts_assistant_v1_AssistantService;
10
11
  templates: pushwoosh_templates_v1_TemplatesService;
11
12
  agentProfile: pushwoosh_uds_onyx_v1_AgentProfileService;
13
+ board: pushwoosh_uds_onyx_v1_BoardService;
12
14
  };
13
15
  export { data } from './data';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.599",
3
+ "version": "0.1.601",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -1,6 +1,182 @@
1
+ import { RpcMethod, JsonObject } from './commonTypes';
1
2
  /**
2
3
  * AgentProfileService turns the marketing agent on per application (ai_agent_profiles).
3
4
  * Private port :9191 only: identity comes from account-id / user-id metadata.
4
5
  */
5
6
  export interface AgentProfileService {
6
7
  }
8
+ export type BoardService_GetBoard = RpcMethod<GetBoardRequest, GetBoardResponse>;
9
+ export type BoardService_MoveCard = RpcMethod<MoveCardRequest, MoveCardResponse>;
10
+ export type BoardService_OpenCardChat = RpcMethod<OpenCardChatRequest, OpenCardChatResponse>;
11
+ export type BoardService_GetAgentAccess = RpcMethod<GetAgentAccessRequest, GetAgentAccessResponse>;
12
+ /**
13
+ * BoardService is the marketing agent's board: cards laid out in columns, each rendered by its kind.
14
+ * Public port; the account and application come from the caller's auth.
15
+ */
16
+ export interface BoardService {
17
+ GetBoard: BoardService_GetBoard;
18
+ /** Applies one of the card's view.actions; any other transition is FailedPrecondition. */
19
+ MoveCard: BoardService_MoveCard;
20
+ /** The chat that last touched the card; with none, the application's advisor chat. */
21
+ OpenCardChat: BoardService_OpenCardChat;
22
+ GetAgentAccess: BoardService_GetAgentAccess;
23
+ }
24
+ export type Card = {
25
+ id: number;
26
+ kind: string;
27
+ state: string;
28
+ /** agent | user | system | closed */
29
+ owner: string;
30
+ /** A GetBoardResponse.columns id; empty for planned and hidden cards. */
31
+ column: string;
32
+ goalId: number;
33
+ parentId: number;
34
+ chatId: number;
35
+ skill: string;
36
+ createdAt: Date;
37
+ updatedAt: Date;
38
+ view: CardView;
39
+ };
40
+ /** CardView is the whole card as the board draws it; every layer is optional. */
41
+ export type CardView = {
42
+ label: string;
43
+ title: string;
44
+ description: string;
45
+ parent: CardParent;
46
+ chips: string[];
47
+ dates: CardDates;
48
+ progress: CardProgress;
49
+ status: CardStatus;
50
+ note: string;
51
+ error: string;
52
+ result: CardResult;
53
+ actions: CardAction[];
54
+ };
55
+ /** The card this one is a new version of. */
56
+ export type CardParent = {
57
+ id: number;
58
+ title: string;
59
+ };
60
+ export type CardDates = {
61
+ left: string;
62
+ right: string;
63
+ /** Draws the dates as a warning, e.g. a decision about to expire. */
64
+ warn: boolean;
65
+ };
66
+ export type CardProgress_kind_segments = {
67
+ type: 'segments';
68
+ data: CardProgressSegments;
69
+ };
70
+ export type CardProgress_kind_bar = {
71
+ type: 'bar';
72
+ data: CardProgressBar;
73
+ };
74
+ export type CardProgress_kind = CardProgress_kind_segments | CardProgress_kind_bar;
75
+ export type CardProgress = {
76
+ kind: CardProgress_kind;
77
+ };
78
+ /** "Job 2 of 6": done segments, then active ones, out of `of`. */
79
+ export type CardProgressSegments = {
80
+ done: number;
81
+ active: number;
82
+ of: number;
83
+ };
84
+ export type CardProgressBar = {
85
+ /** 0..100 */
86
+ pct: number;
87
+ };
88
+ export type CardStatus = {
89
+ text: string;
90
+ busy: boolean;
91
+ failed: boolean;
92
+ /** The right-hand side of the status line, e.g. "Day 1 of 12". */
93
+ counter: string;
94
+ };
95
+ export type ResultTone = 'RESULT_TONE_UNSPECIFIED' | 'RESULT_TONE_UP' | 'RESULT_TONE_DOWN' | 'RESULT_TONE_NEUTRAL';
96
+ export type CardResult = {
97
+ num: string;
98
+ label: string;
99
+ uplift: string;
100
+ tone: ResultTone;
101
+ stats: CardStat[];
102
+ /** Measured but not final yet. */
103
+ pending: boolean;
104
+ summary: string;
105
+ };
106
+ export type CardStat = {
107
+ k: string;
108
+ v: string;
109
+ };
110
+ export type ActionColor = 'ACTION_COLOR_UNSPECIFIED' | 'ACTION_COLOR_PRIMARY' | 'ACTION_COLOR_SECONDARY';
111
+ export type CardAction = {
112
+ label: string;
113
+ /** The state MoveCard takes; empty means the button opens the card's chat (OpenCardChat). */
114
+ transition: string;
115
+ color: ActionColor;
116
+ };
117
+ export type BoardColumn = {
118
+ id: string;
119
+ title: string;
120
+ /** Sum of payload.result.value of the column's cards; unset when none carries one. */
121
+ sum?: number;
122
+ cards: Card[];
123
+ };
124
+ export type BoardGoal = {
125
+ id: number;
126
+ metric: string;
127
+ unit: string;
128
+ currency: string;
129
+ target: number;
130
+ periodStart: Date;
131
+ periodEnd: Date;
132
+ summary: string;
133
+ /** Sums of payload.result.value / payload.result.proven over the goal's closed cards. */
134
+ value: number;
135
+ proven: number;
136
+ };
137
+ export type BoardPulse = {
138
+ /** The earliest wake-up of an agent card; unset when none is scheduled. */
139
+ nextWakeAt: Date;
140
+ plannedCount: number;
141
+ };
142
+ export type GetBoardRequest = {
143
+ application: string;
144
+ includeHidden: boolean;
145
+ };
146
+ export type GetBoardResponse = {
147
+ /** Unset when the application has no active goal. */
148
+ goal: BoardGoal;
149
+ columns: BoardColumn[];
150
+ /** Agent cards outside every column, newest first. */
151
+ planned: Card[];
152
+ pulse: BoardPulse;
153
+ /** Cards waiting for the user across all columns. */
154
+ pendingForUser: number;
155
+ /** Filled only with include_hidden. */
156
+ hidden: Card[];
157
+ };
158
+ export type MoveCardRequest = {
159
+ application: string;
160
+ cardId: number;
161
+ transition: string;
162
+ /** Merged into the card's payload (RFC 7386). */
163
+ patch: JsonObject;
164
+ };
165
+ export type MoveCardResponse = {
166
+ card: Card;
167
+ };
168
+ export type OpenCardChatRequest = {
169
+ application: string;
170
+ cardId: number;
171
+ };
172
+ export type OpenCardChatResponse = {
173
+ chatId: number;
174
+ };
175
+ export type GetAgentAccessRequest = {
176
+ application: string;
177
+ };
178
+ export type GetAgentAccessResponse = {
179
+ /** An enabled agent profile and the account's consent. */
180
+ enabled: boolean;
181
+ hasGoal: boolean;
182
+ };