@1interface/chat-shell 0.3.1 → 0.3.3

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +321 -3
  2. package/package.json +6 -5
package/dist/index.d.ts CHANGED
@@ -1,20 +1,38 @@
1
+ import { Action } from '@reduxjs/toolkit';
2
+ import { AppBrandingResponse } from '@1interface/shared-core';
1
3
  import { AppearanceMode } from '@1interface/shared-core';
2
4
  import { AudioPlatform } from '@1interface/voice-core';
5
+ import { AuthState } from '@1interface/shared-core';
6
+ import { BaseQueryFn } from '@reduxjs/toolkit/query';
3
7
  import { ChatProps } from '@1interface/chat-core';
4
8
  import { ChatSettings } from '@1interface/chat-core';
5
9
  import { ChatThemeStyles } from '@1interface/shared-core';
10
+ import { ClientConfigResponse } from '@1interface/chat-core';
11
+ import { CombinedState } from '@reduxjs/toolkit/query';
6
12
  import { default as default_2 } from 'react';
7
13
  import { EnhancedStore } from '@reduxjs/toolkit';
8
14
  import { ExtraHydration } from '@1interface/shared-core';
15
+ import { FetchArgs } from '@reduxjs/toolkit/query';
16
+ import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
17
+ import { MutationDefinition } from '@reduxjs/toolkit/query';
9
18
  import { NetworkMonitor } from '@1interface/shared-core';
10
19
  import { PaymentInitPayload } from '@1interface/shared-core';
11
20
  import { PaymentResult } from '@1interface/chat-core';
21
+ import { Profile } from '@1interface/chat-core';
22
+ import { ProtocolType } from '@1interface/chat-core';
23
+ import { QueryDefinition } from '@reduxjs/toolkit/query';
12
24
  import { ReactNode } from 'react';
25
+ import { Reducer } from '@reduxjs/toolkit';
13
26
  import { Storage as Storage_2 } from '@1interface/shared-core';
14
27
  import { StoreEnhancer } from '@reduxjs/toolkit';
15
28
  import { SttImplementation } from '@1interface/shared-core';
29
+ import { ThunkDispatch } from '@reduxjs/toolkit';
30
+ import { ToolServer } from '@1interface/chat-core';
16
31
  import { Tuple } from '@reduxjs/toolkit';
17
32
  import { UnknownAction } from '@reduxjs/toolkit';
33
+ import { UnsubscribeListener } from '@reduxjs/toolkit';
34
+ import { UpdateProfilePayload } from '@1interface/chat-core';
35
+ import { VoiceState } from '@1interface/voice-core';
18
36
 
19
37
  export declare type AppDispatch = typeof store.dispatch;
20
38
 
@@ -67,7 +85,157 @@ export declare interface PaymentProviderHostProps {
67
85
 
68
86
  export declare const preloadPaymentModal: () => Promise<unknown>;
69
87
 
70
- export declare const rootReducer: any;
88
+ export declare const rootReducer: Reducer< {
89
+ auth: AuthState;
90
+ chat: {
91
+ isAgentWorking: boolean;
92
+ statusText: string | null;
93
+ responseStartTime: number | null;
94
+ messageQueue: {
95
+ id: string;
96
+ text: string;
97
+ queuedAt: string;
98
+ transcriptionIds?: string[];
99
+ }[];
100
+ };
101
+ conversations: {
102
+ activeConversationId: string | null;
103
+ titles: {
104
+ [x: string]: string;
105
+ };
106
+ };
107
+ voice: VoiceState;
108
+ indicator: {
109
+ lastResponseTime: number | null;
110
+ };
111
+ chatApi: CombinedState< {
112
+ getConversationHistory: QueryDefinition< {
113
+ skip?: number;
114
+ limit?: number;
115
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
116
+ conversations: any[];
117
+ }, "chatApi", unknown>;
118
+ getConversationById: QueryDefinition< {
119
+ conversationId: string;
120
+ skip?: number;
121
+ limit?: number;
122
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
123
+ createConversatons: MutationDefinition< {
124
+ protocol: ProtocolType;
125
+ body?: any;
126
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
127
+ transcribeAudio: MutationDefinition< {
128
+ conversationId: string;
129
+ audioFile: File;
130
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
131
+ success: boolean;
132
+ data: {
133
+ text: string;
134
+ transcription_id: string;
135
+ };
136
+ }, "chatApi", unknown>;
137
+ getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
138
+ tool_servers: ToolServer[];
139
+ }, "chatApi", unknown>;
140
+ startToolServerOAuth: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
141
+ authorize_url: string;
142
+ }, "chatApi", unknown>;
143
+ deleteToolServerConnection: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
144
+ exchangeOAuthCode: MutationDefinition< {
145
+ code: string;
146
+ state: string;
147
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
148
+ deleteConversation: MutationDefinition< {
149
+ conversationId: string;
150
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
151
+ }, "chat" | "toolServers", "chatApi">;
152
+ brandingApi: CombinedState< {
153
+ getBranding: QueryDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, AppBrandingResponse, "brandingApi", unknown>;
154
+ }, never, "brandingApi">;
155
+ configApi: CombinedState< {
156
+ getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, ClientConfigResponse, "configApi", unknown>;
157
+ }, never, "configApi">;
158
+ profileApi: CombinedState< {
159
+ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
160
+ updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
161
+ deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
162
+ }, "profile", "profileApi">;
163
+ }, UnknownAction, Partial<{
164
+ auth: AuthState;
165
+ chat: {
166
+ isAgentWorking: boolean;
167
+ statusText: string | null;
168
+ responseStartTime: number | null;
169
+ messageQueue: {
170
+ id: string;
171
+ text: string;
172
+ queuedAt: string;
173
+ transcriptionIds?: string[];
174
+ }[];
175
+ };
176
+ conversations: {
177
+ activeConversationId: string | null;
178
+ titles: {
179
+ [x: string]: string;
180
+ };
181
+ };
182
+ voice: VoiceState;
183
+ indicator: {
184
+ lastResponseTime: number | null;
185
+ };
186
+ chatApi: CombinedState< {
187
+ getConversationHistory: QueryDefinition< {
188
+ skip?: number;
189
+ limit?: number;
190
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
191
+ conversations: any[];
192
+ }, "chatApi", unknown>;
193
+ getConversationById: QueryDefinition< {
194
+ conversationId: string;
195
+ skip?: number;
196
+ limit?: number;
197
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
198
+ createConversatons: MutationDefinition< {
199
+ protocol: ProtocolType;
200
+ body?: any;
201
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
202
+ transcribeAudio: MutationDefinition< {
203
+ conversationId: string;
204
+ audioFile: File;
205
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
206
+ success: boolean;
207
+ data: {
208
+ text: string;
209
+ transcription_id: string;
210
+ };
211
+ }, "chatApi", unknown>;
212
+ getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
213
+ tool_servers: ToolServer[];
214
+ }, "chatApi", unknown>;
215
+ startToolServerOAuth: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
216
+ authorize_url: string;
217
+ }, "chatApi", unknown>;
218
+ deleteToolServerConnection: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
219
+ exchangeOAuthCode: MutationDefinition< {
220
+ code: string;
221
+ state: string;
222
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
223
+ deleteConversation: MutationDefinition< {
224
+ conversationId: string;
225
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
226
+ }, "chat" | "toolServers", "chatApi">;
227
+ brandingApi: CombinedState< {
228
+ getBranding: QueryDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, AppBrandingResponse, "brandingApi", unknown>;
229
+ }, never, "brandingApi">;
230
+ configApi: CombinedState< {
231
+ getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, ClientConfigResponse, "configApi", unknown>;
232
+ }, never, "configApi">;
233
+ profileApi: CombinedState< {
234
+ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
235
+ updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
236
+ deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
237
+ }, "profile", "profileApi">;
238
+ }>>;
71
239
 
72
240
  export declare type RootState = ReturnType<typeof store.getState>;
73
241
 
@@ -85,8 +253,158 @@ declare interface StorageProviderProps {
85
253
  extraHydrations?: Array<ExtraHydration>;
86
254
  }
87
255
 
88
- export declare const store: EnhancedStore<any, UnknownAction, Tuple<[StoreEnhancer< {
89
- dispatch: any;
256
+ export declare const store: EnhancedStore< {
257
+ auth: AuthState;
258
+ chat: {
259
+ isAgentWorking: boolean;
260
+ statusText: string | null;
261
+ responseStartTime: number | null;
262
+ messageQueue: {
263
+ id: string;
264
+ text: string;
265
+ queuedAt: string;
266
+ transcriptionIds?: string[];
267
+ }[];
268
+ };
269
+ conversations: {
270
+ activeConversationId: string | null;
271
+ titles: {
272
+ [x: string]: string;
273
+ };
274
+ };
275
+ voice: VoiceState;
276
+ indicator: {
277
+ lastResponseTime: number | null;
278
+ };
279
+ chatApi: CombinedState< {
280
+ getConversationHistory: QueryDefinition< {
281
+ skip?: number;
282
+ limit?: number;
283
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
284
+ conversations: any[];
285
+ }, "chatApi", unknown>;
286
+ getConversationById: QueryDefinition< {
287
+ conversationId: string;
288
+ skip?: number;
289
+ limit?: number;
290
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
291
+ createConversatons: MutationDefinition< {
292
+ protocol: ProtocolType;
293
+ body?: any;
294
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
295
+ transcribeAudio: MutationDefinition< {
296
+ conversationId: string;
297
+ audioFile: File;
298
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
299
+ success: boolean;
300
+ data: {
301
+ text: string;
302
+ transcription_id: string;
303
+ };
304
+ }, "chatApi", unknown>;
305
+ getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
306
+ tool_servers: ToolServer[];
307
+ }, "chatApi", unknown>;
308
+ startToolServerOAuth: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
309
+ authorize_url: string;
310
+ }, "chatApi", unknown>;
311
+ deleteToolServerConnection: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
312
+ exchangeOAuthCode: MutationDefinition< {
313
+ code: string;
314
+ state: string;
315
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
316
+ deleteConversation: MutationDefinition< {
317
+ conversationId: string;
318
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
319
+ }, "chat" | "toolServers", "chatApi">;
320
+ brandingApi: CombinedState< {
321
+ getBranding: QueryDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, AppBrandingResponse, "brandingApi", unknown>;
322
+ }, never, "brandingApi">;
323
+ configApi: CombinedState< {
324
+ getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, ClientConfigResponse, "configApi", unknown>;
325
+ }, never, "configApi">;
326
+ profileApi: CombinedState< {
327
+ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
328
+ updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
329
+ deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
330
+ }, "profile", "profileApi">;
331
+ }, UnknownAction, Tuple<[StoreEnhancer< {
332
+ dispatch: ((action: Action<"listenerMiddleware/add">) => UnsubscribeListener) & ThunkDispatch< {
333
+ auth: AuthState;
334
+ chat: {
335
+ isAgentWorking: boolean;
336
+ statusText: string | null;
337
+ responseStartTime: number | null;
338
+ messageQueue: {
339
+ id: string;
340
+ text: string;
341
+ queuedAt: string;
342
+ transcriptionIds?: string[];
343
+ }[];
344
+ };
345
+ conversations: {
346
+ activeConversationId: string | null;
347
+ titles: {
348
+ [x: string]: string;
349
+ };
350
+ };
351
+ voice: VoiceState;
352
+ indicator: {
353
+ lastResponseTime: number | null;
354
+ };
355
+ chatApi: CombinedState< {
356
+ getConversationHistory: QueryDefinition< {
357
+ skip?: number;
358
+ limit?: number;
359
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
360
+ conversations: any[];
361
+ }, "chatApi", unknown>;
362
+ getConversationById: QueryDefinition< {
363
+ conversationId: string;
364
+ skip?: number;
365
+ limit?: number;
366
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
367
+ createConversatons: MutationDefinition< {
368
+ protocol: ProtocolType;
369
+ body?: any;
370
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
371
+ transcribeAudio: MutationDefinition< {
372
+ conversationId: string;
373
+ audioFile: File;
374
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
375
+ success: boolean;
376
+ data: {
377
+ text: string;
378
+ transcription_id: string;
379
+ };
380
+ }, "chatApi", unknown>;
381
+ getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
382
+ tool_servers: ToolServer[];
383
+ }, "chatApi", unknown>;
384
+ startToolServerOAuth: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
385
+ authorize_url: string;
386
+ }, "chatApi", unknown>;
387
+ deleteToolServerConnection: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
388
+ exchangeOAuthCode: MutationDefinition< {
389
+ code: string;
390
+ state: string;
391
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", void, "chatApi", unknown>;
392
+ deleteConversation: MutationDefinition< {
393
+ conversationId: string;
394
+ }, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
395
+ }, "chat" | "toolServers", "chatApi">;
396
+ brandingApi: CombinedState< {
397
+ getBranding: QueryDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, AppBrandingResponse, "brandingApi", unknown>;
398
+ }, never, "brandingApi">;
399
+ configApi: CombinedState< {
400
+ getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, ClientConfigResponse, "configApi", unknown>;
401
+ }, never, "configApi">;
402
+ profileApi: CombinedState< {
403
+ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", Profile, "profileApi", unknown>;
404
+ updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
405
+ deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
406
+ }, "profile", "profileApi">;
407
+ }, undefined, UnknownAction>;
90
408
  }>, StoreEnhancer]>>;
91
409
 
92
410
  export declare const useMessageContext: () => MessageContextType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1interface/chat-shell",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -51,10 +51,11 @@
51
51
  "lucide-react": "^0.562.0",
52
52
  "streamdown": "^1.6.11",
53
53
  "tailwind-merge": "^3.6.0",
54
- "@1interface/chat-core": "^0.2.4",
55
- "@1interface/voice-core": "^0.3.1",
56
- "@1interface/voice-shell": "^0.3.1",
57
- "@1interface/widgets": "^0.1.0"
54
+ "@1interface/voice-shell": "^0.3.2",
55
+ "@1interface/chat-core": "^0.3.0",
56
+ "@1interface/widgets": "^0.1.0",
57
+ "@1interface/voice-core": "^0.3.2",
58
+ "@1interface/shared-core": "^0.3.0"
58
59
  },
59
60
  "peerDependencies": {
60
61
  "@reduxjs/toolkit": "^2.0.0",