@pushwoosh/rpc-gateway-ai-assistant 0.1.110 → 0.1.112
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 +97 -40
- package/package.json +1 -1
- package/pushwoosh_accounts_assistant_v1.d.ts +49 -2
- package/pushwoosh_aibuilder_v1.d.ts +77 -5
- package/types.d.ts +6 -0
package/data.js
CHANGED
|
@@ -134,8 +134,7 @@ export const data = {
|
|
|
134
134
|
"model": {
|
|
135
135
|
"type": "pushwoosh.aibuilder.v1.LLMProvider"
|
|
136
136
|
}
|
|
137
|
-
}
|
|
138
|
-
"oneofs": {}
|
|
137
|
+
}
|
|
139
138
|
},
|
|
140
139
|
"pushwoosh.aibuilder.v1.BuilderGenerateBlockRequest": {
|
|
141
140
|
"type": "I",
|
|
@@ -283,7 +282,7 @@ export const data = {
|
|
|
283
282
|
"type": "I",
|
|
284
283
|
"fields": {
|
|
285
284
|
"layout": {
|
|
286
|
-
"type": "pushwoosh.aibuilder.v1.
|
|
285
|
+
"type": "pushwoosh.aibuilder.v1.CardLayout"
|
|
287
286
|
},
|
|
288
287
|
"image": {
|
|
289
288
|
"type": "pushwoosh.aibuilder.v1.Image",
|
|
@@ -291,9 +290,14 @@ export const data = {
|
|
|
291
290
|
},
|
|
292
291
|
"content": {
|
|
293
292
|
"type": "pushwoosh.aibuilder.v1.Content"
|
|
293
|
+
},
|
|
294
|
+
"imageFit": {
|
|
295
|
+
"type": "pushwoosh.aibuilder.v1.CardImageFit"
|
|
296
|
+
},
|
|
297
|
+
"accentFit": {
|
|
298
|
+
"type": "boolean"
|
|
294
299
|
}
|
|
295
|
-
}
|
|
296
|
-
"oneofs": {}
|
|
300
|
+
}
|
|
297
301
|
},
|
|
298
302
|
"pushwoosh.aibuilder.v1.BuilderCreateColumns": {
|
|
299
303
|
"type": "I",
|
|
@@ -304,6 +308,14 @@ export const data = {
|
|
|
304
308
|
"columns": {
|
|
305
309
|
"type": "pushwoosh.aibuilder.v1.BuilderCreateColumn",
|
|
306
310
|
"array": true
|
|
311
|
+
},
|
|
312
|
+
"contentBefore": {
|
|
313
|
+
"type": "pushwoosh.aibuilder.v1.Content",
|
|
314
|
+
"optional": true
|
|
315
|
+
},
|
|
316
|
+
"contentAfter": {
|
|
317
|
+
"type": "pushwoosh.aibuilder.v1.Content",
|
|
318
|
+
"optional": true
|
|
307
319
|
}
|
|
308
320
|
}
|
|
309
321
|
},
|
|
@@ -316,9 +328,12 @@ export const data = {
|
|
|
316
328
|
},
|
|
317
329
|
"content": {
|
|
318
330
|
"type": "pushwoosh.aibuilder.v1.Content"
|
|
331
|
+
},
|
|
332
|
+
"width": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"optional": true
|
|
319
335
|
}
|
|
320
|
-
}
|
|
321
|
-
"oneofs": {}
|
|
336
|
+
}
|
|
322
337
|
},
|
|
323
338
|
"pushwoosh.aibuilder.v1.BuilderCreateStreamEvent": {
|
|
324
339
|
"type": "I",
|
|
@@ -439,15 +454,33 @@ export const data = {
|
|
|
439
454
|
"DOCUMENT_BLOCK_TYPE_COLUMNS"
|
|
440
455
|
]
|
|
441
456
|
},
|
|
442
|
-
"pushwoosh.aibuilder.v1.
|
|
457
|
+
"pushwoosh.aibuilder.v1.CardLayout": {
|
|
458
|
+
"type": "E",
|
|
459
|
+
"values": [
|
|
460
|
+
"CARD_LAYOUT_UNSPECIFIED",
|
|
461
|
+
"CARD_LAYOUT_RIGHT",
|
|
462
|
+
"CARD_LAYOUT_LEFT",
|
|
463
|
+
"CARD_LAYOUT_TOP",
|
|
464
|
+
"CARD_LAYOUT_NO",
|
|
465
|
+
"CARD_LAYOUT_BACKGROUND"
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"pushwoosh.aibuilder.v1.ButtonGroupAlign": {
|
|
469
|
+
"type": "E",
|
|
470
|
+
"values": [
|
|
471
|
+
"BUTTON_GROUP_ALIGN_UNSPECIFIED",
|
|
472
|
+
"BUTTON_GROUP_ALIGN_LEFT",
|
|
473
|
+
"BUTTON_GROUP_ALIGN_CENTER",
|
|
474
|
+
"BUTTON_GROUP_ALIGN_RIGHT"
|
|
475
|
+
]
|
|
476
|
+
},
|
|
477
|
+
"pushwoosh.aibuilder.v1.CardImageFit": {
|
|
443
478
|
"type": "E",
|
|
444
479
|
"values": [
|
|
445
|
-
"
|
|
446
|
-
"
|
|
447
|
-
"
|
|
448
|
-
"
|
|
449
|
-
"DOCUMENT_BLOCK_LAYOUT_NO",
|
|
450
|
-
"DOCUMENT_BLOCK_LAYOUT_BACKGROUND"
|
|
480
|
+
"CARD_IMAGE_FIT_UNSPECIFIED",
|
|
481
|
+
"CARD_IMAGE_FIT_COVER",
|
|
482
|
+
"CARD_IMAGE_FIT_CONTAIN",
|
|
483
|
+
"CARD_IMAGE_FIT_FILL"
|
|
451
484
|
]
|
|
452
485
|
},
|
|
453
486
|
"pushwoosh.aibuilder.v1.TextVariantStyle": {
|
|
@@ -495,9 +528,6 @@ export const data = {
|
|
|
495
528
|
"pushwoosh.aibuilder.v1.BlockStyles": {
|
|
496
529
|
"type": "I",
|
|
497
530
|
"fields": {
|
|
498
|
-
"padding": {
|
|
499
|
-
"type": "pushwoosh.aibuilder.v1.EdgeInsets"
|
|
500
|
-
},
|
|
501
531
|
"backgroundColor": {
|
|
502
532
|
"type": "string"
|
|
503
533
|
},
|
|
@@ -522,19 +552,25 @@ export const data = {
|
|
|
522
552
|
"gap": {
|
|
523
553
|
"type": "number",
|
|
524
554
|
"optional": true
|
|
555
|
+
},
|
|
556
|
+
"padding": {
|
|
557
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
558
|
+
"optional": true
|
|
525
559
|
}
|
|
526
|
-
}
|
|
527
|
-
"oneofs": {}
|
|
560
|
+
}
|
|
528
561
|
},
|
|
529
562
|
"pushwoosh.aibuilder.v1.CardStyles": {
|
|
530
563
|
"type": "I",
|
|
531
564
|
"fields": {
|
|
532
|
-
"
|
|
533
|
-
"type": "
|
|
565
|
+
"accentFitPadding": {
|
|
566
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
567
|
+
"optional": true
|
|
568
|
+
},
|
|
569
|
+
"contentPadding": {
|
|
570
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
534
571
|
"optional": true
|
|
535
572
|
}
|
|
536
|
-
}
|
|
537
|
-
"oneofs": {}
|
|
573
|
+
}
|
|
538
574
|
},
|
|
539
575
|
"pushwoosh.aibuilder.v1.DefaultStyles": {
|
|
540
576
|
"type": "I",
|
|
@@ -626,8 +662,7 @@ export const data = {
|
|
|
626
662
|
"type": "pushwoosh.aibuilder.v1.ButtonStyles",
|
|
627
663
|
"optional": true
|
|
628
664
|
}
|
|
629
|
-
}
|
|
630
|
-
"oneofs": {}
|
|
665
|
+
}
|
|
631
666
|
},
|
|
632
667
|
"pushwoosh.aibuilder.v1.ButtonStyles": {
|
|
633
668
|
"type": "I",
|
|
@@ -656,8 +691,7 @@ export const data = {
|
|
|
656
691
|
"type": "number",
|
|
657
692
|
"optional": true
|
|
658
693
|
}
|
|
659
|
-
}
|
|
660
|
-
"oneofs": {}
|
|
694
|
+
}
|
|
661
695
|
},
|
|
662
696
|
"pushwoosh.aibuilder.v1.ButtonGroup": {
|
|
663
697
|
"type": "I",
|
|
@@ -669,9 +703,11 @@ export const data = {
|
|
|
669
703
|
"styles": {
|
|
670
704
|
"type": "pushwoosh.aibuilder.v1.ButtonGroupStyles",
|
|
671
705
|
"optional": true
|
|
706
|
+
},
|
|
707
|
+
"align": {
|
|
708
|
+
"type": "pushwoosh.aibuilder.v1.ButtonGroupAlign"
|
|
672
709
|
}
|
|
673
|
-
}
|
|
674
|
-
"oneofs": {}
|
|
710
|
+
}
|
|
675
711
|
},
|
|
676
712
|
"pushwoosh.aibuilder.v1.ButtonGroupStyles": {
|
|
677
713
|
"type": "I",
|
|
@@ -688,8 +724,7 @@ export const data = {
|
|
|
688
724
|
"type": "number",
|
|
689
725
|
"optional": true
|
|
690
726
|
}
|
|
691
|
-
}
|
|
692
|
-
"oneofs": {}
|
|
727
|
+
}
|
|
693
728
|
},
|
|
694
729
|
"pushwoosh.aibuilder.v1.ContentItem": {
|
|
695
730
|
"type": "I",
|
|
@@ -720,9 +755,16 @@ export const data = {
|
|
|
720
755
|
"textPrompt": {
|
|
721
756
|
"type": "string",
|
|
722
757
|
"optional": true
|
|
758
|
+
},
|
|
759
|
+
"margin": {
|
|
760
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
761
|
+
"optional": true
|
|
762
|
+
},
|
|
763
|
+
"padding": {
|
|
764
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
765
|
+
"optional": true
|
|
723
766
|
}
|
|
724
|
-
}
|
|
725
|
-
"oneofs": {}
|
|
767
|
+
}
|
|
726
768
|
},
|
|
727
769
|
"pushwoosh.aibuilder.v1.Image": {
|
|
728
770
|
"type": "I",
|
|
@@ -757,7 +799,7 @@ export const data = {
|
|
|
757
799
|
"type": "I",
|
|
758
800
|
"fields": {
|
|
759
801
|
"layout": {
|
|
760
|
-
"type": "pushwoosh.aibuilder.v1.
|
|
802
|
+
"type": "pushwoosh.aibuilder.v1.CardLayout"
|
|
761
803
|
},
|
|
762
804
|
"image": {
|
|
763
805
|
"type": "pushwoosh.aibuilder.v1.Image",
|
|
@@ -769,9 +811,14 @@ export const data = {
|
|
|
769
811
|
"styles": {
|
|
770
812
|
"type": "pushwoosh.aibuilder.v1.CardStyles",
|
|
771
813
|
"optional": true
|
|
814
|
+
},
|
|
815
|
+
"imageFit": {
|
|
816
|
+
"type": "pushwoosh.aibuilder.v1.CardImageFit"
|
|
817
|
+
},
|
|
818
|
+
"accentFit": {
|
|
819
|
+
"type": "boolean"
|
|
772
820
|
}
|
|
773
|
-
}
|
|
774
|
-
"oneofs": {}
|
|
821
|
+
}
|
|
775
822
|
},
|
|
776
823
|
"pushwoosh.aibuilder.v1.AiBuilderColumns": {
|
|
777
824
|
"type": "I",
|
|
@@ -786,9 +833,16 @@ export const data = {
|
|
|
786
833
|
},
|
|
787
834
|
"withImages": {
|
|
788
835
|
"type": "boolean"
|
|
836
|
+
},
|
|
837
|
+
"contentBefore": {
|
|
838
|
+
"type": "pushwoosh.aibuilder.v1.Content",
|
|
839
|
+
"optional": true
|
|
840
|
+
},
|
|
841
|
+
"contentAfter": {
|
|
842
|
+
"type": "pushwoosh.aibuilder.v1.Content",
|
|
843
|
+
"optional": true
|
|
789
844
|
}
|
|
790
|
-
}
|
|
791
|
-
"oneofs": {}
|
|
845
|
+
}
|
|
792
846
|
},
|
|
793
847
|
"pushwoosh.aibuilder.v1.AiBuilderColumn": {
|
|
794
848
|
"type": "I",
|
|
@@ -799,9 +853,12 @@ export const data = {
|
|
|
799
853
|
},
|
|
800
854
|
"content": {
|
|
801
855
|
"type": "pushwoosh.aibuilder.v1.Content"
|
|
856
|
+
},
|
|
857
|
+
"width": {
|
|
858
|
+
"type": "string",
|
|
859
|
+
"optional": true
|
|
802
860
|
}
|
|
803
|
-
}
|
|
804
|
-
"oneofs": {}
|
|
861
|
+
}
|
|
805
862
|
},
|
|
806
863
|
"pushwoosh.aibuilder.v1.AiBuilderBlock": {
|
|
807
864
|
"type": "I",
|
package/package.json
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { RpcMethod } from './commonTypes';
|
|
2
|
-
|
|
2
|
+
/** Role represents the sender of a message */
|
|
3
|
+
export type Role = 'ROLE_UNSPECIFIED' | 'ROLE_USER' | 'ROLE_ASSISTANT'
|
|
4
|
+
/** Assistant message with tool calls (renamed for DB limit) */
|
|
5
|
+
| 'ROLE_TOOL_REQUEST'
|
|
6
|
+
/** Function/tool response */
|
|
7
|
+
| 'ROLE_TOOL_USE_RESPONSE'
|
|
8
|
+
/** Compactified context summary */
|
|
9
|
+
| 'ROLE_CONTEXT_COMPACTIFIED';
|
|
10
|
+
/** Message represents a single message in a chat */
|
|
3
11
|
export type Message = {
|
|
4
12
|
id: number;
|
|
5
13
|
content: string;
|
|
@@ -7,6 +15,7 @@ export type Message = {
|
|
|
7
15
|
timestamp: Date;
|
|
8
16
|
usage: UsageInfo;
|
|
9
17
|
};
|
|
18
|
+
/** Chat represents a conversation with its metadata and messages */
|
|
10
19
|
export type Chat = {
|
|
11
20
|
id: number;
|
|
12
21
|
title: string;
|
|
@@ -14,62 +23,87 @@ export type Chat = {
|
|
|
14
23
|
createdAt: Date;
|
|
15
24
|
updatedAt: Date;
|
|
16
25
|
};
|
|
26
|
+
/** CreateChatRequest for creating a new chat */
|
|
17
27
|
export type CreateChatRequest = {
|
|
18
28
|
application: string;
|
|
19
29
|
title: string;
|
|
20
30
|
};
|
|
31
|
+
/** CreateChatResponse returns the created chat */
|
|
21
32
|
export type CreateChatResponse = {
|
|
22
33
|
chat: Chat;
|
|
23
34
|
};
|
|
35
|
+
/** GetChatRequest for retrieving a specific chat */
|
|
24
36
|
export type GetChatRequest = {
|
|
25
37
|
application: string;
|
|
26
38
|
chatId: number;
|
|
27
39
|
};
|
|
40
|
+
/** GetChatResponse returns the requested chat */
|
|
28
41
|
export type GetChatResponse = {
|
|
29
42
|
chat: Chat;
|
|
30
43
|
};
|
|
44
|
+
/** GetAllChatsRequest for retrieving all chats */
|
|
31
45
|
export type GetAllChatsRequest = {
|
|
32
46
|
application: string;
|
|
33
47
|
};
|
|
48
|
+
/** GetAllChatsResponse returns all chats sorted by updated_at */
|
|
34
49
|
export type GetAllChatsResponse = {
|
|
35
50
|
chats: Chat[];
|
|
36
51
|
};
|
|
52
|
+
/** UpdateChatTitleRequest for updating a chat's title */
|
|
37
53
|
export type UpdateChatTitleRequest = {
|
|
38
54
|
chatId: number;
|
|
39
55
|
title: string;
|
|
40
56
|
};
|
|
57
|
+
/** UpdateChatTitleResponse confirms the update */
|
|
41
58
|
export type UpdateChatTitleResponse = {};
|
|
59
|
+
/** DeleteChatRequest for deleting a chat */
|
|
42
60
|
export type DeleteChatRequest = {
|
|
43
61
|
application: string;
|
|
44
62
|
id: number;
|
|
45
63
|
};
|
|
64
|
+
/** DeleteChatResponse confirms the deletion */
|
|
46
65
|
export type DeleteChatResponse = {
|
|
47
66
|
success: boolean;
|
|
48
67
|
};
|
|
68
|
+
/** ClearChatRequest for clearing all messages from a chat */
|
|
49
69
|
export type ClearChatRequest = {
|
|
50
70
|
application: string;
|
|
51
71
|
id: number;
|
|
52
72
|
};
|
|
73
|
+
/** ClearChatResponse confirms the clearing */
|
|
53
74
|
export type ClearChatResponse = {
|
|
54
75
|
success: boolean;
|
|
55
76
|
};
|
|
77
|
+
/** FileAttachment represents a file uploaded by the user */
|
|
56
78
|
export type FileAttachment = {
|
|
57
79
|
filename: string;
|
|
80
|
+
/** MIME type (e.g., "application/pdf") */
|
|
58
81
|
type: string;
|
|
82
|
+
/** Base64-encoded file content */
|
|
59
83
|
base64: string;
|
|
60
84
|
};
|
|
85
|
+
/** InferenceRequest for streaming AI inference */
|
|
61
86
|
export type InferenceRequest = {
|
|
62
87
|
chatId: number;
|
|
88
|
+
/** User message content to be added before inference */
|
|
63
89
|
message: string;
|
|
90
|
+
/** Optional URL for context */
|
|
64
91
|
url: string;
|
|
92
|
+
/** Optional file attachments */
|
|
65
93
|
attachments: FileAttachment[];
|
|
94
|
+
/** Optional custom system prompt to add to the inference */
|
|
66
95
|
customSystemPrompt: string;
|
|
67
96
|
};
|
|
68
|
-
|
|
97
|
+
/** StreamingEvent types */
|
|
98
|
+
export type StreamEventType = 'STREAM_EVENT_UNSPECIFIED' | 'STREAM_EVENT_MESSAGE_START' | 'STREAM_EVENT_CONTENT_BLOCK_START' | 'STREAM_EVENT_TEXT_START' | 'STREAM_EVENT_TEXT_DELTA' | 'STREAM_EVENT_TOOL_USE_START' | 'STREAM_EVENT_CONTENT_BLOCK_STOP' | 'STREAM_EVENT_MESSAGE_DELTA' | 'STREAM_EVENT_MESSAGE_STOP' | 'STREAM_EVENT_ERROR' | 'STREAM_EVENT_TOOL_USE_RESULT' | 'STREAM_EVENT_TOOL_USE_DELTA'
|
|
99
|
+
/** Chain of Thoughts thinking content */
|
|
100
|
+
| 'STREAM_EVENT_THINKING_DELTA';
|
|
101
|
+
/** Tool information for tool use events */
|
|
69
102
|
export type ToolInfo = {
|
|
70
103
|
name: string;
|
|
71
104
|
args: string;
|
|
72
105
|
};
|
|
106
|
+
/** Usage information for token consumption tracking */
|
|
73
107
|
export type UsageInfo = {
|
|
74
108
|
inputTokens: number;
|
|
75
109
|
outputTokens: number;
|
|
@@ -78,6 +112,7 @@ export type UsageInfo = {
|
|
|
78
112
|
totalTokens: number;
|
|
79
113
|
percentage: number;
|
|
80
114
|
};
|
|
115
|
+
/** InferenceResponse for streaming AI responses */
|
|
81
116
|
export type InferenceResponse = {
|
|
82
117
|
type: StreamEventType;
|
|
83
118
|
content: string;
|
|
@@ -98,17 +133,22 @@ export type GiveConsentRequest = {
|
|
|
98
133
|
consentGiven: boolean;
|
|
99
134
|
};
|
|
100
135
|
export type GiveConsentResponse = {};
|
|
136
|
+
/** CompactifyContextRequest for compactifying chat context */
|
|
101
137
|
export type CompactifyContextRequest = {
|
|
102
138
|
application: string;
|
|
103
139
|
chatId: number;
|
|
104
140
|
};
|
|
141
|
+
/** CompactifyContextResponse returns success status */
|
|
105
142
|
export type CompactifyContextResponse = {
|
|
106
143
|
success: boolean;
|
|
144
|
+
/** The compactified summary */
|
|
107
145
|
compactifiedContent: string;
|
|
108
146
|
};
|
|
147
|
+
/** CheckUsageAllowedRequest for checking if AI usage is allowed */
|
|
109
148
|
export type CheckUsageAllowedRequest = {
|
|
110
149
|
application: string;
|
|
111
150
|
};
|
|
151
|
+
/** CheckUsageAllowedResponse returns whether usage is allowed */
|
|
112
152
|
export type CheckUsageAllowedResponse = {
|
|
113
153
|
allowed: boolean;
|
|
114
154
|
reason: string;
|
|
@@ -124,12 +164,19 @@ export type AssistantService_GiveConsent = RpcMethod<GiveConsentRequest, GiveCon
|
|
|
124
164
|
export type AssistantService_CompactifyContext = RpcMethod<CompactifyContextRequest, CompactifyContextResponse>;
|
|
125
165
|
export type AssistantService_CheckUsageAllowed = RpcMethod<CheckUsageAllowedRequest, CheckUsageAllowedResponse>;
|
|
126
166
|
export interface AssistantService {
|
|
167
|
+
/** Create a new chat */
|
|
127
168
|
CreateChat: AssistantService_CreateChat;
|
|
169
|
+
/** Get a specific chat by ID */
|
|
128
170
|
GetChat: AssistantService_GetChat;
|
|
171
|
+
/** Get all chats sorted by updated_at descending */
|
|
129
172
|
GetAllChats: AssistantService_GetAllChats;
|
|
173
|
+
/** Update a chat's title */
|
|
130
174
|
UpdateChatTitle: AssistantService_UpdateChatTitle;
|
|
175
|
+
/** Delete a chat */
|
|
131
176
|
DeleteChat: AssistantService_DeleteChat;
|
|
177
|
+
/** Clear all messages from a chat */
|
|
132
178
|
ClearChat: AssistantService_ClearChat;
|
|
179
|
+
/** Stream AI inference responses */
|
|
133
180
|
StreamInference(request: InferenceRequest, options?: {
|
|
134
181
|
signal?: AbortSignal;
|
|
135
182
|
}): Promise<AsyncIterable<InferenceResponse>>;
|
|
@@ -110,17 +110,26 @@ export type BuilderCreateDocumentBlock = {
|
|
|
110
110
|
block: BuilderCreateDocumentBlock_block;
|
|
111
111
|
};
|
|
112
112
|
export type BuilderCreateCard = {
|
|
113
|
-
layout:
|
|
113
|
+
layout: CardLayout;
|
|
114
114
|
image?: Image;
|
|
115
115
|
content: Content;
|
|
116
|
+
/** Mirrors AiBuilderCard.image_fit for the streamed Create/Update output. */
|
|
117
|
+
imageFit: CardImageFit;
|
|
118
|
+
/** Mirrors AiBuilderCard.accent_fit; only meaningful for LEFT / RIGHT layouts. */
|
|
119
|
+
accentFit: boolean;
|
|
116
120
|
};
|
|
117
121
|
export type BuilderCreateColumns = {
|
|
118
122
|
withImages: boolean;
|
|
119
123
|
columns: BuilderCreateColumn[];
|
|
124
|
+
/** Content rendered above the columns row. */
|
|
125
|
+
contentBefore?: Content;
|
|
126
|
+
/** Content rendered below the columns row. */
|
|
127
|
+
contentAfter?: Content;
|
|
120
128
|
};
|
|
121
129
|
export type BuilderCreateColumn = {
|
|
122
130
|
image?: Image;
|
|
123
131
|
content: Content;
|
|
132
|
+
width?: string;
|
|
124
133
|
};
|
|
125
134
|
export type BuilderCreateStreamEvent_event_structure = {
|
|
126
135
|
type: 'structure';
|
|
@@ -183,7 +192,26 @@ export type BuilderCreateButtonGroupDelta = {
|
|
|
183
192
|
buttonGroup: ButtonGroup;
|
|
184
193
|
};
|
|
185
194
|
export type DocumentBlockType = 'DOCUMENT_BLOCK_TYPE_UNSPECIFIED' | 'DOCUMENT_BLOCK_TYPE_CARD' | 'DOCUMENT_BLOCK_TYPE_COLUMNS';
|
|
186
|
-
export type
|
|
195
|
+
export type CardLayout = 'CARD_LAYOUT_UNSPECIFIED' | 'CARD_LAYOUT_RIGHT' | 'CARD_LAYOUT_LEFT' | 'CARD_LAYOUT_TOP' | 'CARD_LAYOUT_NO' | 'CARD_LAYOUT_BACKGROUND';
|
|
196
|
+
export type ButtonGroupAlign = 'BUTTON_GROUP_ALIGN_UNSPECIFIED' | 'BUTTON_GROUP_ALIGN_LEFT' | 'BUTTON_GROUP_ALIGN_CENTER' | 'BUTTON_GROUP_ALIGN_RIGHT';
|
|
197
|
+
/**
|
|
198
|
+
* CardImageFit controls how the card's image fills its image slot.
|
|
199
|
+
* Why it exists: card slots have fixed proportions while images arrive
|
|
200
|
+
* with arbitrary aspect ratios. Without this knob the client would have
|
|
201
|
+
* to pick a single global default and some cards would always look bad.
|
|
202
|
+
* A product photo is fine with COVER, a company logo must be CONTAIN
|
|
203
|
+
* or it gets cropped.
|
|
204
|
+
*/
|
|
205
|
+
export type CardImageFit = 'CARD_IMAGE_FIT_UNSPECIFIED'
|
|
206
|
+
/** Fill the slot, cropping overflow. Good default for photos. */
|
|
207
|
+
| 'CARD_IMAGE_FIT_COVER'
|
|
208
|
+
/**
|
|
209
|
+
* Fit entirely inside the slot, may leave padding. Required for logos
|
|
210
|
+
* and other assets that must not be cropped.
|
|
211
|
+
*/
|
|
212
|
+
| 'CARD_IMAGE_FIT_CONTAIN'
|
|
213
|
+
/** Stretch to fit, distorting aspect ratio. Rarely useful. */
|
|
214
|
+
| 'CARD_IMAGE_FIT_FILL';
|
|
187
215
|
export type TextVariantStyle = {
|
|
188
216
|
fontSize: number;
|
|
189
217
|
fontWeight: number;
|
|
@@ -200,18 +228,30 @@ export type EdgeInsets = {
|
|
|
200
228
|
left: number;
|
|
201
229
|
};
|
|
202
230
|
export type BlockStyles = {
|
|
203
|
-
padding: EdgeInsets;
|
|
204
231
|
backgroundColor: string;
|
|
205
232
|
borderColor: string;
|
|
206
233
|
borderWidth: number;
|
|
207
234
|
borderRadius: number;
|
|
208
235
|
};
|
|
209
236
|
export type ColumnsStyles = {
|
|
237
|
+
/** Padding applied to each column in the columns block. */
|
|
210
238
|
columnPadding?: EdgeInsets;
|
|
211
239
|
gap?: number;
|
|
240
|
+
/** Padding applied around the columns block (outside the columns row). */
|
|
241
|
+
padding?: EdgeInsets;
|
|
212
242
|
};
|
|
213
243
|
export type CardStyles = {
|
|
214
|
-
|
|
244
|
+
/**
|
|
245
|
+
* Padding applied to the image column when accent_fit is enabled on
|
|
246
|
+
* the card (see AiBuilderCard.accent_fit). Ignored otherwise.
|
|
247
|
+
*/
|
|
248
|
+
accentFitPadding?: EdgeInsets;
|
|
249
|
+
/**
|
|
250
|
+
* Padding applied to the card's content (text) area on top of any
|
|
251
|
+
* document-level default. Applies to all layouts that have a content
|
|
252
|
+
* area (i.e. every layout, including NO).
|
|
253
|
+
*/
|
|
254
|
+
contentPadding?: EdgeInsets;
|
|
215
255
|
};
|
|
216
256
|
export type DefaultStyles = {
|
|
217
257
|
common: BlockStyles;
|
|
@@ -259,6 +299,11 @@ export type ButtonStyles = {
|
|
|
259
299
|
export type ButtonGroup = {
|
|
260
300
|
buttons: Button[];
|
|
261
301
|
styles?: ButtonGroupStyles;
|
|
302
|
+
/**
|
|
303
|
+
* Horizontal alignment of the buttons within the group container.
|
|
304
|
+
* UNSPECIFIED = inherit from CSS / client default.
|
|
305
|
+
*/
|
|
306
|
+
align: ButtonGroupAlign;
|
|
262
307
|
};
|
|
263
308
|
export type ButtonGroupStyles = {
|
|
264
309
|
padding?: EdgeInsets;
|
|
@@ -280,6 +325,16 @@ export type ContentItem = {
|
|
|
280
325
|
export type Content = {
|
|
281
326
|
items: ContentItem[];
|
|
282
327
|
textPrompt?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Client-managed margin around the content block. Preserved by the backend
|
|
330
|
+
* across Update but never exposed to the LLM.
|
|
331
|
+
*/
|
|
332
|
+
margin?: EdgeInsets;
|
|
333
|
+
/**
|
|
334
|
+
* Client-managed padding inside the content block. Preserved by the backend
|
|
335
|
+
* across Update but never exposed to the LLM.
|
|
336
|
+
*/
|
|
337
|
+
padding?: EdgeInsets;
|
|
283
338
|
};
|
|
284
339
|
export type Image = {
|
|
285
340
|
prompt: string;
|
|
@@ -292,19 +347,36 @@ export type Image = {
|
|
|
292
347
|
origHeight: number;
|
|
293
348
|
};
|
|
294
349
|
export type AiBuilderCard = {
|
|
295
|
-
layout:
|
|
350
|
+
layout: CardLayout;
|
|
296
351
|
image?: Image;
|
|
297
352
|
content: Content;
|
|
298
353
|
styles?: CardStyles;
|
|
354
|
+
/**
|
|
355
|
+
* How the image fills its slot. Relevant for layouts that have an
|
|
356
|
+
* image slot: LEFT, RIGHT, TOP, BACKGROUND. Ignored for layout NO.
|
|
357
|
+
* UNSPECIFIED lets the client fall back to its default fit.
|
|
358
|
+
*/
|
|
359
|
+
imageFit: CardImageFit;
|
|
360
|
+
/**
|
|
361
|
+
* Apply only to LEFT / RIGHT layouts: render the image as a side
|
|
362
|
+
* accent that fits the height of the text column. Ignored for other
|
|
363
|
+
* layouts.
|
|
364
|
+
*/
|
|
365
|
+
accentFit: boolean;
|
|
299
366
|
};
|
|
300
367
|
export type AiBuilderColumns = {
|
|
301
368
|
columns: AiBuilderColumn[];
|
|
302
369
|
styles?: ColumnsStyles;
|
|
303
370
|
withImages: boolean;
|
|
371
|
+
/** Content rendered above the columns row. */
|
|
372
|
+
contentBefore?: Content;
|
|
373
|
+
/** Content rendered below the columns row. */
|
|
374
|
+
contentAfter?: Content;
|
|
304
375
|
};
|
|
305
376
|
export type AiBuilderColumn = {
|
|
306
377
|
image?: Image;
|
|
307
378
|
content: Content;
|
|
379
|
+
width?: string;
|
|
308
380
|
};
|
|
309
381
|
export type AiBuilderBlock_block_card = {
|
|
310
382
|
type: 'card';
|
package/types.d.ts
CHANGED
|
@@ -7,12 +7,14 @@ export type InterfaceDefinition = {
|
|
|
7
7
|
oneofs?: {
|
|
8
8
|
[oneofName: string]: OneofGroup;
|
|
9
9
|
};
|
|
10
|
+
comment?: string;
|
|
10
11
|
};
|
|
11
12
|
export type FieldDefinition = {
|
|
12
13
|
type: string;
|
|
13
14
|
mapKeyType?: string;
|
|
14
15
|
array?: boolean;
|
|
15
16
|
optional?: boolean;
|
|
17
|
+
comment?: string;
|
|
16
18
|
};
|
|
17
19
|
export type OneofGroup = {
|
|
18
20
|
oneof: string[];
|
|
@@ -21,6 +23,8 @@ export type EnumDefinition = {
|
|
|
21
23
|
type: 'E';
|
|
22
24
|
values: string[];
|
|
23
25
|
valuesArgs?: Record<string, string[]>;
|
|
26
|
+
comment?: string;
|
|
27
|
+
valueComments?: Record<string, string>;
|
|
24
28
|
};
|
|
25
29
|
export type ServiceDefinition = {
|
|
26
30
|
type: 'S';
|
|
@@ -28,6 +32,7 @@ export type ServiceDefinition = {
|
|
|
28
32
|
methods: {
|
|
29
33
|
[methodName: string]: ServiceMethod;
|
|
30
34
|
};
|
|
35
|
+
comment?: string;
|
|
31
36
|
};
|
|
32
37
|
export type ServiceMethod = {
|
|
33
38
|
request: string;
|
|
@@ -40,6 +45,7 @@ export type ServiceMethod = {
|
|
|
40
45
|
failedPreconditions?: string;
|
|
41
46
|
commonFailedPreconditions?: string;
|
|
42
47
|
};
|
|
48
|
+
comment?: string;
|
|
43
49
|
};
|
|
44
50
|
export type InterfaceDefinitionRaw = InterfaceDefinition & {
|
|
45
51
|
package: string;
|