@1interface/chat-core 0.2.5 → 0.4.0
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/dist/index.d.ts +44 -20
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -111,12 +111,13 @@ protocol: ProtocolType;
|
|
|
111
111
|
body?: any;
|
|
112
112
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
113
113
|
transcribeAudio: MutationDefinition< {
|
|
114
|
+
conversationId: string;
|
|
114
115
|
audioFile: File;
|
|
115
116
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
116
117
|
success: boolean;
|
|
117
118
|
data: {
|
|
118
119
|
text: string;
|
|
119
|
-
|
|
120
|
+
transcription_id: string;
|
|
120
121
|
};
|
|
121
122
|
}, "chatApi", unknown>;
|
|
122
123
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -161,12 +162,13 @@ export declare const apiReducers: {
|
|
|
161
162
|
body?: any;
|
|
162
163
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
163
164
|
transcribeAudio: MutationDefinition< {
|
|
165
|
+
conversationId: string;
|
|
164
166
|
audioFile: File;
|
|
165
167
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
166
168
|
success: boolean;
|
|
167
169
|
data: {
|
|
168
170
|
text: string;
|
|
169
|
-
|
|
171
|
+
transcription_id: string;
|
|
170
172
|
};
|
|
171
173
|
}, "chatApi", unknown>;
|
|
172
174
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -313,12 +315,13 @@ protocol: ProtocolType;
|
|
|
313
315
|
body?: any;
|
|
314
316
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
315
317
|
transcribeAudio: MutationDefinition< {
|
|
318
|
+
conversationId: string;
|
|
316
319
|
audioFile: File;
|
|
317
320
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
318
321
|
success: boolean;
|
|
319
322
|
data: {
|
|
320
323
|
text: string;
|
|
321
|
-
|
|
324
|
+
transcription_id: string;
|
|
322
325
|
};
|
|
323
326
|
}, "chatApi", unknown>;
|
|
324
327
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -356,7 +359,9 @@ messageQueue: {
|
|
|
356
359
|
id: string;
|
|
357
360
|
text: string;
|
|
358
361
|
queuedAt: string;
|
|
362
|
+
transcriptionIds?: string[];
|
|
359
363
|
}[];
|
|
364
|
+
pendingTranscriptionIds: string[];
|
|
360
365
|
};
|
|
361
366
|
conversations: {
|
|
362
367
|
activeConversationId: string | null;
|
|
@@ -384,12 +389,13 @@ protocol: ProtocolType;
|
|
|
384
389
|
body?: any;
|
|
385
390
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
386
391
|
transcribeAudio: MutationDefinition< {
|
|
392
|
+
conversationId: string;
|
|
387
393
|
audioFile: File;
|
|
388
394
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
389
395
|
success: boolean;
|
|
390
396
|
data: {
|
|
391
397
|
text: string;
|
|
392
|
-
|
|
398
|
+
transcription_id: string;
|
|
393
399
|
};
|
|
394
400
|
}, "chatApi", unknown>;
|
|
395
401
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -428,7 +434,9 @@ messageQueue: {
|
|
|
428
434
|
id: string;
|
|
429
435
|
text: string;
|
|
430
436
|
queuedAt: string;
|
|
437
|
+
transcriptionIds?: string[];
|
|
431
438
|
}[];
|
|
439
|
+
pendingTranscriptionIds: string[];
|
|
432
440
|
};
|
|
433
441
|
conversations: {
|
|
434
442
|
activeConversationId: string | null;
|
|
@@ -456,12 +464,13 @@ protocol: ProtocolType;
|
|
|
456
464
|
body?: any;
|
|
457
465
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
458
466
|
transcribeAudio: MutationDefinition< {
|
|
467
|
+
conversationId: string;
|
|
459
468
|
audioFile: File;
|
|
460
469
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
461
470
|
success: boolean;
|
|
462
471
|
data: {
|
|
463
472
|
text: string;
|
|
464
|
-
|
|
473
|
+
transcription_id: string;
|
|
465
474
|
};
|
|
466
475
|
}, "chatApi", unknown>;
|
|
467
476
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -535,7 +544,9 @@ messageQueue: {
|
|
|
535
544
|
id: string;
|
|
536
545
|
text: string;
|
|
537
546
|
queuedAt: string;
|
|
547
|
+
transcriptionIds?: string[];
|
|
538
548
|
}[];
|
|
549
|
+
pendingTranscriptionIds: string[];
|
|
539
550
|
}>;
|
|
540
551
|
|
|
541
552
|
export declare interface ChatSettings {
|
|
@@ -560,6 +571,7 @@ export declare interface ChatState {
|
|
|
560
571
|
statusText: string | null;
|
|
561
572
|
responseStartTime: number | null;
|
|
562
573
|
messageQueue: QueuedMessage[];
|
|
574
|
+
pendingTranscriptionIds: string[];
|
|
563
575
|
}
|
|
564
576
|
|
|
565
577
|
export declare function checkOrganizationExistsApi(): Promise<OrgCheckResult>;
|
|
@@ -869,6 +881,7 @@ export declare interface QueuedMessage {
|
|
|
869
881
|
id: string;
|
|
870
882
|
text: string;
|
|
871
883
|
queuedAt: string;
|
|
884
|
+
transcriptionIds?: string[];
|
|
872
885
|
}
|
|
873
886
|
|
|
874
887
|
export declare function refreshTokenApi(payload: RefreshRequest): Promise<RefreshApiResult>;
|
|
@@ -960,7 +973,9 @@ messageQueue: {
|
|
|
960
973
|
id: string;
|
|
961
974
|
text: string;
|
|
962
975
|
queuedAt: string;
|
|
976
|
+
transcriptionIds?: string[];
|
|
963
977
|
}[];
|
|
978
|
+
pendingTranscriptionIds: string[];
|
|
964
979
|
};
|
|
965
980
|
conversations: {
|
|
966
981
|
activeConversationId: string | null;
|
|
@@ -988,12 +1003,13 @@ protocol: ProtocolType;
|
|
|
988
1003
|
body?: any;
|
|
989
1004
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
990
1005
|
transcribeAudio: MutationDefinition< {
|
|
1006
|
+
conversationId: string;
|
|
991
1007
|
audioFile: File;
|
|
992
1008
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
993
1009
|
success: boolean;
|
|
994
1010
|
data: {
|
|
995
1011
|
text: string;
|
|
996
|
-
|
|
1012
|
+
transcription_id: string;
|
|
997
1013
|
};
|
|
998
1014
|
}, "chatApi", unknown>;
|
|
999
1015
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -1033,7 +1049,9 @@ messageQueue: {
|
|
|
1033
1049
|
id: string;
|
|
1034
1050
|
text: string;
|
|
1035
1051
|
queuedAt: string;
|
|
1052
|
+
transcriptionIds?: string[];
|
|
1036
1053
|
}[];
|
|
1054
|
+
pendingTranscriptionIds: string[];
|
|
1037
1055
|
};
|
|
1038
1056
|
conversations: {
|
|
1039
1057
|
activeConversationId: string | null;
|
|
@@ -1061,12 +1079,13 @@ protocol: ProtocolType;
|
|
|
1061
1079
|
body?: any;
|
|
1062
1080
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", any, "chatApi", unknown>;
|
|
1063
1081
|
transcribeAudio: MutationDefinition< {
|
|
1082
|
+
conversationId: string;
|
|
1064
1083
|
audioFile: File;
|
|
1065
1084
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
1066
1085
|
success: boolean;
|
|
1067
1086
|
data: {
|
|
1068
1087
|
text: string;
|
|
1069
|
-
|
|
1088
|
+
transcription_id: string;
|
|
1070
1089
|
};
|
|
1071
1090
|
}, "chatApi", unknown>;
|
|
1072
1091
|
getToolServers: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
@@ -1120,6 +1139,7 @@ export declare interface StreamMessageParams {
|
|
|
1120
1139
|
message: string;
|
|
1121
1140
|
enableTts?: boolean;
|
|
1122
1141
|
debugMode?: boolean;
|
|
1142
|
+
transcriptionIds?: string[];
|
|
1123
1143
|
body?: Record<string, unknown>;
|
|
1124
1144
|
}
|
|
1125
1145
|
|
|
@@ -1186,7 +1206,7 @@ declare interface UseChatConnectionParams {
|
|
|
1186
1206
|
}
|
|
1187
1207
|
|
|
1188
1208
|
declare interface UseChatConnectionReturn {
|
|
1189
|
-
sendMessage: (inputMsg?: string) => Promise<void>;
|
|
1209
|
+
sendMessage: (inputMsg?: string, transcriptionIds?: string[]) => Promise<void>;
|
|
1190
1210
|
startInitialStream: (conversationId: string, location?: UserLocation | null) => Promise<void>;
|
|
1191
1211
|
setThinkingState: (thinking: boolean) => void;
|
|
1192
1212
|
abortStream: () => void;
|
|
@@ -3809,11 +3829,12 @@ authorize_url: string;
|
|
|
3809
3829
|
reset: () => void;
|
|
3810
3830
|
}];
|
|
3811
3831
|
|
|
3812
|
-
export declare const useSTTRecording: ({ onTranscriptionComplete, onTranscriptionPopulate, autoSendVoice, }?: UseSTTRecordingParams) => UseSTTRecordingReturn;
|
|
3832
|
+
export declare const useSTTRecording: ({ onTranscriptionComplete, onTranscriptionPopulate, ensureConversation, autoSendVoice, }?: UseSTTRecordingParams) => UseSTTRecordingReturn;
|
|
3813
3833
|
|
|
3814
3834
|
declare interface UseSTTRecordingParams {
|
|
3815
3835
|
onTranscriptionComplete?: (text: string) => Promise<void>;
|
|
3816
3836
|
onTranscriptionPopulate?: (text: string) => void;
|
|
3837
|
+
ensureConversation?: () => Promise<string | null>;
|
|
3817
3838
|
autoSendVoice?: boolean;
|
|
3818
3839
|
}
|
|
3819
3840
|
|
|
@@ -3869,7 +3890,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3869
3890
|
success: boolean;
|
|
3870
3891
|
data: {
|
|
3871
3892
|
text: string;
|
|
3872
|
-
|
|
3893
|
+
transcription_id: string;
|
|
3873
3894
|
};
|
|
3874
3895
|
};
|
|
3875
3896
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3882,7 +3903,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3882
3903
|
success: boolean;
|
|
3883
3904
|
data: {
|
|
3884
3905
|
text: string;
|
|
3885
|
-
|
|
3906
|
+
transcription_id: string;
|
|
3886
3907
|
};
|
|
3887
3908
|
};
|
|
3888
3909
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3905,7 +3926,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3905
3926
|
success: boolean;
|
|
3906
3927
|
data: {
|
|
3907
3928
|
text: string;
|
|
3908
|
-
|
|
3929
|
+
transcription_id: string;
|
|
3909
3930
|
};
|
|
3910
3931
|
};
|
|
3911
3932
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3928,7 +3949,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3928
3949
|
success: boolean;
|
|
3929
3950
|
data: {
|
|
3930
3951
|
text: string;
|
|
3931
|
-
|
|
3952
|
+
transcription_id: string;
|
|
3932
3953
|
};
|
|
3933
3954
|
};
|
|
3934
3955
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3941,7 +3962,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3941
3962
|
success: boolean;
|
|
3942
3963
|
data: {
|
|
3943
3964
|
text: string;
|
|
3944
|
-
|
|
3965
|
+
transcription_id: string;
|
|
3945
3966
|
};
|
|
3946
3967
|
};
|
|
3947
3968
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3977,7 +3998,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3977
3998
|
success: boolean;
|
|
3978
3999
|
data: {
|
|
3979
4000
|
text: string;
|
|
3980
|
-
|
|
4001
|
+
transcription_id: string;
|
|
3981
4002
|
};
|
|
3982
4003
|
};
|
|
3983
4004
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -3990,7 +4011,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
3990
4011
|
success: boolean;
|
|
3991
4012
|
data: {
|
|
3992
4013
|
text: string;
|
|
3993
|
-
|
|
4014
|
+
transcription_id: string;
|
|
3994
4015
|
};
|
|
3995
4016
|
};
|
|
3996
4017
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4013,7 +4034,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4013
4034
|
success: boolean;
|
|
4014
4035
|
data: {
|
|
4015
4036
|
text: string;
|
|
4016
|
-
|
|
4037
|
+
transcription_id: string;
|
|
4017
4038
|
};
|
|
4018
4039
|
};
|
|
4019
4040
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4036,7 +4057,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4036
4057
|
success: boolean;
|
|
4037
4058
|
data: {
|
|
4038
4059
|
text: string;
|
|
4039
|
-
|
|
4060
|
+
transcription_id: string;
|
|
4040
4061
|
};
|
|
4041
4062
|
};
|
|
4042
4063
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4049,7 +4070,7 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4049
4070
|
success: boolean;
|
|
4050
4071
|
data: {
|
|
4051
4072
|
text: string;
|
|
4052
|
-
|
|
4073
|
+
transcription_id: string;
|
|
4053
4074
|
};
|
|
4054
4075
|
};
|
|
4055
4076
|
error?: FetchBaseQueryError | SerializedError;
|
|
@@ -4065,17 +4086,20 @@ export declare const useTranscribeAudioMutation: <R extends Record<string, any>
|
|
|
4065
4086
|
})) => R;
|
|
4066
4087
|
fixedCacheKey?: string;
|
|
4067
4088
|
}) => readonly [(arg: {
|
|
4089
|
+
conversationId: string;
|
|
4068
4090
|
audioFile: File;
|
|
4069
4091
|
}) => MutationActionCreatorResult<MutationDefinition< {
|
|
4092
|
+
conversationId: string;
|
|
4070
4093
|
audioFile: File;
|
|
4071
4094
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
4072
4095
|
success: boolean;
|
|
4073
4096
|
data: {
|
|
4074
4097
|
text: string;
|
|
4075
|
-
|
|
4098
|
+
transcription_id: string;
|
|
4076
4099
|
};
|
|
4077
4100
|
}, "chatApi", unknown>>, TSHelpersNoInfer<R> & {
|
|
4078
4101
|
originalArgs?: {
|
|
4102
|
+
conversationId: string;
|
|
4079
4103
|
audioFile: File;
|
|
4080
4104
|
};
|
|
4081
4105
|
reset: () => void;
|