@pushwoosh/rpc-gateway-ai-assistant 0.1.100
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/commonTypes.d.ts +10 -0
- package/commonTypes.js +3 -0
- package/data.d.ts +2 -0
- package/data.js +1081 -0
- package/index.d.ts +7 -0
- package/index.js +3 -0
- package/package.json +19 -0
- package/pushwoosh_accounts_assistant_v1.d.ts +149 -0
- package/pushwoosh_accounts_assistant_v1.js +3 -0
- package/pushwoosh_aibuilder_v1.d.ts +262 -0
- package/pushwoosh_aibuilder_v1.js +3 -0
- package/types.d.ts +53 -0
- package/types.js +1 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BuilderService as pushwoosh_aibuilder_v1_BuilderService } from './pushwoosh_aibuilder_v1';
|
|
2
|
+
import { AssistantService as pushwoosh_accounts_assistant_v1_AssistantService } from './pushwoosh_accounts_assistant_v1';
|
|
3
|
+
export type API = {
|
|
4
|
+
builder: pushwoosh_aibuilder_v1_BuilderService;
|
|
5
|
+
assistant: pushwoosh_accounts_assistant_v1_AssistantService;
|
|
6
|
+
};
|
|
7
|
+
export { data } from './data';
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pushwoosh/rpc-gateway-ai-assistant",
|
|
3
|
+
"version": "0.1.100",
|
|
4
|
+
"description": "AI Assistant api gateway HTTP API Types and Data",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "index.js",
|
|
7
|
+
"types": "index.d.js",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://gitlab.corp.pushwoosh.com/uds/onyx-mcp"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"RPC",
|
|
15
|
+
"Pushwoosh",
|
|
16
|
+
"API"
|
|
17
|
+
],
|
|
18
|
+
"author": "Pushwoosh"
|
|
19
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
export type Role = 'ROLE_UNSPECIFIED' | 'ROLE_USER' | 'ROLE_ASSISTANT' | 'ROLE_TOOL_REQUEST' | 'ROLE_TOOL_USE_RESPONSE' | 'ROLE_CONTEXT_COMPACTIFIED';
|
|
3
|
+
export type Message = {
|
|
4
|
+
id: number;
|
|
5
|
+
content: string;
|
|
6
|
+
role: Role;
|
|
7
|
+
timestamp: Date;
|
|
8
|
+
usage: UsageInfo;
|
|
9
|
+
};
|
|
10
|
+
export type Chat = {
|
|
11
|
+
id: number;
|
|
12
|
+
title: string;
|
|
13
|
+
messages: Message[];
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
};
|
|
17
|
+
export type CreateChatRequest = {
|
|
18
|
+
application: string;
|
|
19
|
+
title: string;
|
|
20
|
+
};
|
|
21
|
+
export type CreateChatResponse = {
|
|
22
|
+
chat: Chat;
|
|
23
|
+
};
|
|
24
|
+
export type GetChatRequest = {
|
|
25
|
+
application: string;
|
|
26
|
+
chatId: number;
|
|
27
|
+
};
|
|
28
|
+
export type GetChatResponse = {
|
|
29
|
+
chat: Chat;
|
|
30
|
+
};
|
|
31
|
+
export type GetAllChatsRequest = {
|
|
32
|
+
application: string;
|
|
33
|
+
};
|
|
34
|
+
export type GetAllChatsResponse = {
|
|
35
|
+
chats: Chat[];
|
|
36
|
+
};
|
|
37
|
+
export type UpdateChatTitleRequest = {
|
|
38
|
+
chatId: number;
|
|
39
|
+
title: string;
|
|
40
|
+
};
|
|
41
|
+
export type UpdateChatTitleResponse = {};
|
|
42
|
+
export type DeleteChatRequest = {
|
|
43
|
+
application: string;
|
|
44
|
+
id: number;
|
|
45
|
+
};
|
|
46
|
+
export type DeleteChatResponse = {
|
|
47
|
+
success: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type ClearChatRequest = {
|
|
50
|
+
application: string;
|
|
51
|
+
id: number;
|
|
52
|
+
};
|
|
53
|
+
export type ClearChatResponse = {
|
|
54
|
+
success: boolean;
|
|
55
|
+
};
|
|
56
|
+
export type FileAttachment = {
|
|
57
|
+
filename: string;
|
|
58
|
+
type: string;
|
|
59
|
+
base64: string;
|
|
60
|
+
};
|
|
61
|
+
export type InferenceRequest = {
|
|
62
|
+
chatId: number;
|
|
63
|
+
message: string;
|
|
64
|
+
url: string;
|
|
65
|
+
attachments: FileAttachment[];
|
|
66
|
+
customSystemPrompt: string;
|
|
67
|
+
};
|
|
68
|
+
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' | 'STREAM_EVENT_THINKING_DELTA';
|
|
69
|
+
export type ToolInfo = {
|
|
70
|
+
name: string;
|
|
71
|
+
args: string;
|
|
72
|
+
};
|
|
73
|
+
export type UsageInfo = {
|
|
74
|
+
inputTokens: number;
|
|
75
|
+
outputTokens: number;
|
|
76
|
+
cacheCreationInputTokens: number;
|
|
77
|
+
cacheReadInputTokens: number;
|
|
78
|
+
totalTokens: number;
|
|
79
|
+
percentage: number;
|
|
80
|
+
};
|
|
81
|
+
export type InferenceResponse = {
|
|
82
|
+
type: StreamEventType;
|
|
83
|
+
content: string;
|
|
84
|
+
tool: ToolInfo;
|
|
85
|
+
stopReason: string;
|
|
86
|
+
stopSequence: string;
|
|
87
|
+
error: string;
|
|
88
|
+
usage: UsageInfo;
|
|
89
|
+
};
|
|
90
|
+
export type GetConsentRequest = {
|
|
91
|
+
application: string;
|
|
92
|
+
};
|
|
93
|
+
export type GetConsentResponse = {
|
|
94
|
+
consentGiven: boolean;
|
|
95
|
+
};
|
|
96
|
+
export type GiveConsentRequest = {
|
|
97
|
+
application: string;
|
|
98
|
+
consentGiven: boolean;
|
|
99
|
+
};
|
|
100
|
+
export type GiveConsentResponse = {};
|
|
101
|
+
export type CompactifyContextRequest = {
|
|
102
|
+
application: string;
|
|
103
|
+
chatId: number;
|
|
104
|
+
};
|
|
105
|
+
export type CompactifyContextResponse = {
|
|
106
|
+
success: boolean;
|
|
107
|
+
compactifiedContent: string;
|
|
108
|
+
};
|
|
109
|
+
export type CheckUsageAllowedRequest = {
|
|
110
|
+
application: string;
|
|
111
|
+
};
|
|
112
|
+
export type CheckUsageAllowedResponse = {
|
|
113
|
+
allowed: boolean;
|
|
114
|
+
reason: string;
|
|
115
|
+
};
|
|
116
|
+
export type AssistantService_CreateChat = RpcMethod<CreateChatRequest, CreateChatResponse>;
|
|
117
|
+
export type AssistantService_GetChat = RpcMethod<GetChatRequest, GetChatResponse>;
|
|
118
|
+
export type AssistantService_GetAllChats = RpcMethod<GetAllChatsRequest, GetAllChatsResponse>;
|
|
119
|
+
export type AssistantService_UpdateChatTitle = RpcMethod<UpdateChatTitleRequest, UpdateChatTitleResponse>;
|
|
120
|
+
export type AssistantService_DeleteChat = RpcMethod<DeleteChatRequest, DeleteChatResponse>;
|
|
121
|
+
export type AssistantService_ClearChat = RpcMethod<ClearChatRequest, ClearChatResponse>;
|
|
122
|
+
export type AssistantService_GetConsent = RpcMethod<GetConsentRequest, GetConsentResponse>;
|
|
123
|
+
export type AssistantService_GiveConsent = RpcMethod<GiveConsentRequest, GiveConsentResponse>;
|
|
124
|
+
export type AssistantService_CompactifyContext = RpcMethod<CompactifyContextRequest, CompactifyContextResponse>;
|
|
125
|
+
export type AssistantService_CheckUsageAllowed = RpcMethod<CheckUsageAllowedRequest, CheckUsageAllowedResponse>;
|
|
126
|
+
export interface AssistantService {
|
|
127
|
+
CreateChat: AssistantService_CreateChat;
|
|
128
|
+
GetChat: AssistantService_GetChat;
|
|
129
|
+
GetAllChats: AssistantService_GetAllChats;
|
|
130
|
+
UpdateChatTitle: AssistantService_UpdateChatTitle;
|
|
131
|
+
DeleteChat: AssistantService_DeleteChat;
|
|
132
|
+
ClearChat: AssistantService_ClearChat;
|
|
133
|
+
StreamInference(request: InferenceRequest, options?: {
|
|
134
|
+
signal?: AbortSignal;
|
|
135
|
+
}): AsyncIterable<InferenceResponse>;
|
|
136
|
+
StreamInferenceGemini(request: InferenceRequest, options?: {
|
|
137
|
+
signal?: AbortSignal;
|
|
138
|
+
}): AsyncIterable<InferenceResponse>;
|
|
139
|
+
StreamInferenceChatGPT(request: InferenceRequest, options?: {
|
|
140
|
+
signal?: AbortSignal;
|
|
141
|
+
}): AsyncIterable<InferenceResponse>;
|
|
142
|
+
StreamInferenceLLM(request: InferenceRequest, options?: {
|
|
143
|
+
signal?: AbortSignal;
|
|
144
|
+
}): AsyncIterable<InferenceResponse>;
|
|
145
|
+
GetConsent: AssistantService_GetConsent;
|
|
146
|
+
GiveConsent: AssistantService_GiveConsent;
|
|
147
|
+
CompactifyContext: AssistantService_CompactifyContext;
|
|
148
|
+
CheckUsageAllowed: AssistantService_CheckUsageAllowed;
|
|
149
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
export interface BuilderService {
|
|
2
|
+
Create(request: BuilderCreateRequest, options?: {
|
|
3
|
+
signal?: AbortSignal;
|
|
4
|
+
}): AsyncIterable<BuilderCreateStreamEvent>;
|
|
5
|
+
Update(request: BuilderUpdateRequest, options?: {
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
}): AsyncIterable<BuilderUpdateEvent>;
|
|
8
|
+
}
|
|
9
|
+
export type LLMProvider = 'LLM_PROVIDER_UNSPECIFIED' | 'LLM_PROVIDER_QWEN' | 'LLM_PROVIDER_GEMINI';
|
|
10
|
+
export type BuilderCreateRequest = {
|
|
11
|
+
prompt: string;
|
|
12
|
+
application: string;
|
|
13
|
+
structureModel: LLMProvider;
|
|
14
|
+
textModel: LLMProvider;
|
|
15
|
+
generateImages: boolean;
|
|
16
|
+
settings: DocumentSettings;
|
|
17
|
+
textVariants: Record<string, TextVariantStyle>;
|
|
18
|
+
colorScheme: Record<string, ColorSchemeItem>;
|
|
19
|
+
};
|
|
20
|
+
export type BuilderUpdateRequest = {
|
|
21
|
+
document: AiBuilderDocument;
|
|
22
|
+
prompt: string;
|
|
23
|
+
blockId?: string;
|
|
24
|
+
application: string;
|
|
25
|
+
textVariants: Record<string, TextVariantStyle>;
|
|
26
|
+
colorScheme: Record<string, ColorSchemeItem>;
|
|
27
|
+
model: LLMProvider;
|
|
28
|
+
};
|
|
29
|
+
export type BuilderDoneEvent = {
|
|
30
|
+
summary: string;
|
|
31
|
+
};
|
|
32
|
+
export type BuilderUpdateEvent_event_updateBlock = {
|
|
33
|
+
type: 'updateBlock';
|
|
34
|
+
data: AiBuilderBlock;
|
|
35
|
+
};
|
|
36
|
+
export type BuilderUpdateEvent_event_deleteBlock = {
|
|
37
|
+
type: 'deleteBlock';
|
|
38
|
+
data: string;
|
|
39
|
+
};
|
|
40
|
+
export type BuilderUpdateEvent_event_done = {
|
|
41
|
+
type: 'done';
|
|
42
|
+
data: BuilderDoneEvent;
|
|
43
|
+
};
|
|
44
|
+
export type BuilderUpdateEvent_event_error = {
|
|
45
|
+
type: 'error';
|
|
46
|
+
data: string;
|
|
47
|
+
};
|
|
48
|
+
export type BuilderUpdateEvent_event_updateSettings = {
|
|
49
|
+
type: 'updateSettings';
|
|
50
|
+
data: DocumentSettings;
|
|
51
|
+
};
|
|
52
|
+
export type BuilderUpdateEvent_event = BuilderUpdateEvent_event_updateBlock | BuilderUpdateEvent_event_deleteBlock | BuilderUpdateEvent_event_done | BuilderUpdateEvent_event_error | BuilderUpdateEvent_event_updateSettings;
|
|
53
|
+
export type BuilderUpdateEvent = {
|
|
54
|
+
event: BuilderUpdateEvent_event;
|
|
55
|
+
};
|
|
56
|
+
export type BuilderCreateDocument = {
|
|
57
|
+
blocks: BuilderCreateDocumentBlock[];
|
|
58
|
+
settings: DocumentSettings;
|
|
59
|
+
textVariants: Record<string, TextVariantStyle>;
|
|
60
|
+
colorScheme: Record<string, ColorSchemeItem>;
|
|
61
|
+
};
|
|
62
|
+
export type BuilderCreateDocumentBlock_block_card = {
|
|
63
|
+
type: 'card';
|
|
64
|
+
data: BuilderCreateCard;
|
|
65
|
+
};
|
|
66
|
+
export type BuilderCreateDocumentBlock_block_columns = {
|
|
67
|
+
type: 'columns';
|
|
68
|
+
data: BuilderCreateColumns;
|
|
69
|
+
};
|
|
70
|
+
export type BuilderCreateDocumentBlock_block = BuilderCreateDocumentBlock_block_card | BuilderCreateDocumentBlock_block_columns;
|
|
71
|
+
export type BuilderCreateDocumentBlock = {
|
|
72
|
+
id: string;
|
|
73
|
+
styles?: BlockStyles;
|
|
74
|
+
block: BuilderCreateDocumentBlock_block;
|
|
75
|
+
};
|
|
76
|
+
export type BuilderCreateCard = {
|
|
77
|
+
layout: DocumentBlockLayout;
|
|
78
|
+
image?: Image;
|
|
79
|
+
textPrompt: string;
|
|
80
|
+
textCount: number;
|
|
81
|
+
};
|
|
82
|
+
export type BuilderCreateColumns = {
|
|
83
|
+
withImages: boolean;
|
|
84
|
+
columns: BuilderCreateColumn[];
|
|
85
|
+
};
|
|
86
|
+
export type BuilderCreateColumn = {
|
|
87
|
+
image?: Image;
|
|
88
|
+
textPrompt: string;
|
|
89
|
+
textCount: number;
|
|
90
|
+
};
|
|
91
|
+
export type BuilderCreateStreamEvent_event_structure = {
|
|
92
|
+
type: 'structure';
|
|
93
|
+
data: BuilderCreateDocument;
|
|
94
|
+
};
|
|
95
|
+
export type BuilderCreateStreamEvent_event_textDelta = {
|
|
96
|
+
type: 'textDelta';
|
|
97
|
+
data: BuilderCreateTextDelta;
|
|
98
|
+
};
|
|
99
|
+
export type BuilderCreateStreamEvent_event_imageDelta = {
|
|
100
|
+
type: 'imageDelta';
|
|
101
|
+
data: BuilderCreateImageDelta;
|
|
102
|
+
};
|
|
103
|
+
export type BuilderCreateStreamEvent_event_done = {
|
|
104
|
+
type: 'done';
|
|
105
|
+
data: BuilderDoneEvent;
|
|
106
|
+
};
|
|
107
|
+
export type BuilderCreateStreamEvent_event_error = {
|
|
108
|
+
type: 'error';
|
|
109
|
+
data: string;
|
|
110
|
+
};
|
|
111
|
+
export type BuilderCreateStreamEvent_event_progress = {
|
|
112
|
+
type: 'progress';
|
|
113
|
+
data: string;
|
|
114
|
+
};
|
|
115
|
+
export type BuilderCreateStreamEvent_event_buttonGroupDelta = {
|
|
116
|
+
type: 'buttonGroupDelta';
|
|
117
|
+
data: BuilderCreateButtonGroupDelta;
|
|
118
|
+
};
|
|
119
|
+
export type BuilderCreateStreamEvent_event_contentError = {
|
|
120
|
+
type: 'contentError';
|
|
121
|
+
data: BuilderContentError;
|
|
122
|
+
};
|
|
123
|
+
export type BuilderCreateStreamEvent_event = BuilderCreateStreamEvent_event_structure | BuilderCreateStreamEvent_event_textDelta | BuilderCreateStreamEvent_event_imageDelta | BuilderCreateStreamEvent_event_done | BuilderCreateStreamEvent_event_error | BuilderCreateStreamEvent_event_progress | BuilderCreateStreamEvent_event_buttonGroupDelta | BuilderCreateStreamEvent_event_contentError;
|
|
124
|
+
export type BuilderCreateStreamEvent = {
|
|
125
|
+
event: BuilderCreateStreamEvent_event;
|
|
126
|
+
};
|
|
127
|
+
export type BuilderContentError = {
|
|
128
|
+
blockId: string;
|
|
129
|
+
field: string;
|
|
130
|
+
error: string;
|
|
131
|
+
};
|
|
132
|
+
export type BuilderCreateTextDelta = {
|
|
133
|
+
blockId: string;
|
|
134
|
+
field: string;
|
|
135
|
+
textBlock: TextBlock;
|
|
136
|
+
};
|
|
137
|
+
export type BuilderCreateImageDelta = {
|
|
138
|
+
blockId: string;
|
|
139
|
+
field: string;
|
|
140
|
+
src: string;
|
|
141
|
+
alt: string;
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
};
|
|
145
|
+
export type BuilderCreateButtonGroupDelta = {
|
|
146
|
+
blockId: string;
|
|
147
|
+
field: string;
|
|
148
|
+
buttonGroup: ButtonGroup;
|
|
149
|
+
};
|
|
150
|
+
export type DocumentBlockLayout = 'DOCUMENT_BLOCK_LAYOUT_UNSPECIFIED' | 'DOCUMENT_BLOCK_LAYOUT_RIGHT' | 'DOCUMENT_BLOCK_LAYOUT_LEFT' | 'DOCUMENT_BLOCK_LAYOUT_TOP' | 'DOCUMENT_BLOCK_LAYOUT_NO' | 'DOCUMENT_BLOCK_LAYOUT_BACKGROUND';
|
|
151
|
+
export type TextVariantStyle = {
|
|
152
|
+
fontSize: number;
|
|
153
|
+
fontWeight: number;
|
|
154
|
+
lineHeight: number;
|
|
155
|
+
};
|
|
156
|
+
export type ColorSchemeItem = {
|
|
157
|
+
color: string;
|
|
158
|
+
description: string;
|
|
159
|
+
};
|
|
160
|
+
export type EdgeInsets = {
|
|
161
|
+
top: number;
|
|
162
|
+
right: number;
|
|
163
|
+
bottom: number;
|
|
164
|
+
left: number;
|
|
165
|
+
};
|
|
166
|
+
export type BlockStyles = {
|
|
167
|
+
padding: EdgeInsets;
|
|
168
|
+
backgroundColor: string;
|
|
169
|
+
borderColor: string;
|
|
170
|
+
borderWidth: number;
|
|
171
|
+
borderRadius: number;
|
|
172
|
+
};
|
|
173
|
+
export type ColumnsDefaultStyles = {
|
|
174
|
+
padding: EdgeInsets;
|
|
175
|
+
};
|
|
176
|
+
export type CardDefaultStyles = {};
|
|
177
|
+
export type DefaultStyles = {
|
|
178
|
+
common: BlockStyles;
|
|
179
|
+
columns: ColumnsDefaultStyles;
|
|
180
|
+
card: CardDefaultStyles;
|
|
181
|
+
};
|
|
182
|
+
export type DocumentSettings = {
|
|
183
|
+
width: number;
|
|
184
|
+
blockGap: number;
|
|
185
|
+
padding: EdgeInsets;
|
|
186
|
+
backgroundColor: string;
|
|
187
|
+
textColor: string;
|
|
188
|
+
defaultStyles: DefaultStyles;
|
|
189
|
+
};
|
|
190
|
+
export type TextBlock = {
|
|
191
|
+
variant: string;
|
|
192
|
+
text: string;
|
|
193
|
+
};
|
|
194
|
+
export type Button = {
|
|
195
|
+
text: string;
|
|
196
|
+
url: string;
|
|
197
|
+
backgroundColor: string;
|
|
198
|
+
textColor: string;
|
|
199
|
+
borderRadius: number;
|
|
200
|
+
borderColor: string;
|
|
201
|
+
borderWidth: number;
|
|
202
|
+
fontSize: number;
|
|
203
|
+
};
|
|
204
|
+
export type ButtonGroup = {
|
|
205
|
+
buttons: Button[];
|
|
206
|
+
padding: EdgeInsets;
|
|
207
|
+
backgroundColor: string;
|
|
208
|
+
};
|
|
209
|
+
export type ContentItem_item_text = {
|
|
210
|
+
type: 'text';
|
|
211
|
+
data: TextBlock;
|
|
212
|
+
};
|
|
213
|
+
export type ContentItem_item_buttonGroup = {
|
|
214
|
+
type: 'buttonGroup';
|
|
215
|
+
data: ButtonGroup;
|
|
216
|
+
};
|
|
217
|
+
export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup;
|
|
218
|
+
export type ContentItem = {
|
|
219
|
+
item: ContentItem_item;
|
|
220
|
+
};
|
|
221
|
+
export type Content = {
|
|
222
|
+
items: ContentItem[];
|
|
223
|
+
};
|
|
224
|
+
export type Image = {
|
|
225
|
+
prompt: string;
|
|
226
|
+
width: number;
|
|
227
|
+
height: number;
|
|
228
|
+
src: string;
|
|
229
|
+
alt: string;
|
|
230
|
+
};
|
|
231
|
+
export type AiBuilderCard = {
|
|
232
|
+
layout: DocumentBlockLayout;
|
|
233
|
+
image?: Image;
|
|
234
|
+
content: Content;
|
|
235
|
+
};
|
|
236
|
+
export type AiBuilderColumns = {
|
|
237
|
+
columns: AiBuilderColumn[];
|
|
238
|
+
};
|
|
239
|
+
export type AiBuilderColumn = {
|
|
240
|
+
image?: Image;
|
|
241
|
+
content: Content;
|
|
242
|
+
};
|
|
243
|
+
export type AiBuilderBlock_block_card = {
|
|
244
|
+
type: 'card';
|
|
245
|
+
data: AiBuilderCard;
|
|
246
|
+
};
|
|
247
|
+
export type AiBuilderBlock_block_columns = {
|
|
248
|
+
type: 'columns';
|
|
249
|
+
data: AiBuilderColumns;
|
|
250
|
+
};
|
|
251
|
+
export type AiBuilderBlock_block = AiBuilderBlock_block_card | AiBuilderBlock_block_columns;
|
|
252
|
+
export type AiBuilderBlock = {
|
|
253
|
+
id: string;
|
|
254
|
+
styles?: BlockStyles;
|
|
255
|
+
block: AiBuilderBlock_block;
|
|
256
|
+
};
|
|
257
|
+
export type AiBuilderDocument = {
|
|
258
|
+
blocks: AiBuilderBlock[];
|
|
259
|
+
settings: DocumentSettings;
|
|
260
|
+
textVariants: Record<string, TextVariantStyle>;
|
|
261
|
+
colorScheme: Record<string, ColorSchemeItem>;
|
|
262
|
+
};
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type TypeDefinition = InterfaceDefinition | EnumDefinition | ServiceDefinition;
|
|
2
|
+
export type InterfaceDefinition = {
|
|
3
|
+
type: 'I';
|
|
4
|
+
fields: {
|
|
5
|
+
[fieldName: string]: FieldDefinition;
|
|
6
|
+
};
|
|
7
|
+
oneofs?: {
|
|
8
|
+
[oneofName: string]: OneofGroup;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type FieldDefinition = {
|
|
12
|
+
type: string;
|
|
13
|
+
mapKeyType?: string;
|
|
14
|
+
array?: boolean;
|
|
15
|
+
optional?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type OneofGroup = {
|
|
18
|
+
oneof: string[];
|
|
19
|
+
};
|
|
20
|
+
export type EnumDefinition = {
|
|
21
|
+
type: 'E';
|
|
22
|
+
values: string[];
|
|
23
|
+
valuesArgs?: Record<string, string[]>;
|
|
24
|
+
};
|
|
25
|
+
export type ServiceDefinition = {
|
|
26
|
+
type: 'S';
|
|
27
|
+
key: string;
|
|
28
|
+
methods: {
|
|
29
|
+
[methodName: string]: ServiceMethod;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type ServiceMethod = {
|
|
33
|
+
request: string;
|
|
34
|
+
response: string;
|
|
35
|
+
method: string;
|
|
36
|
+
path: string;
|
|
37
|
+
serverStreaming?: boolean;
|
|
38
|
+
errors?: {
|
|
39
|
+
fieldViolations?: string;
|
|
40
|
+
failedPreconditions?: string;
|
|
41
|
+
commonFailedPreconditions?: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type InterfaceDefinitionRaw = InterfaceDefinition & {
|
|
45
|
+
package: string;
|
|
46
|
+
};
|
|
47
|
+
export type EnumDefinitionRaw = EnumDefinition & {
|
|
48
|
+
package: string;
|
|
49
|
+
};
|
|
50
|
+
export type ServiceDefinitionRaw = ServiceDefinition & {
|
|
51
|
+
package: string;
|
|
52
|
+
};
|
|
53
|
+
export type TypeDefinitionRaw = InterfaceDefinitionRaw | EnumDefinitionRaw | ServiceDefinitionRaw;
|
package/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|