@1interface/chat-core 0.10.0 → 0.12.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 +55 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import { Reducer } from '@reduxjs/toolkit';
|
|
|
37
37
|
import { RefObject } from 'react';
|
|
38
38
|
import { RefreshApiResult } from '@1interface/shared-core';
|
|
39
39
|
import { RefreshRequest } from '@1interface/shared-core';
|
|
40
|
+
import { ResendVerificationRequest } from '@1interface/shared-core';
|
|
40
41
|
import { ResetPasswordRequest } from '@1interface/shared-core';
|
|
41
42
|
import { RootState as RootState_2 } from '@reduxjs/toolkit/query';
|
|
42
43
|
import { SerializedError } from '@reduxjs/toolkit';
|
|
@@ -45,6 +46,7 @@ import { SessionRefreshResponse } from '@1interface/shared-core';
|
|
|
45
46
|
import { SessionResponse } from '@1interface/shared-core';
|
|
46
47
|
import { SetStateAction } from 'react';
|
|
47
48
|
import { SignInInitPayload } from '@1interface/shared-core';
|
|
49
|
+
import { SignupApiResult } from '@1interface/shared-core';
|
|
48
50
|
import { SignupRequest } from '@1interface/shared-core';
|
|
49
51
|
import { skipToken } from '@reduxjs/toolkit/query';
|
|
50
52
|
import { SsoStartResponse } from '@1interface/shared-core';
|
|
@@ -62,6 +64,8 @@ import { Tuple } from '@reduxjs/toolkit';
|
|
|
62
64
|
import { UnknownAction } from '@reduxjs/toolkit';
|
|
63
65
|
import { UnsubscribeListener } from '@reduxjs/toolkit';
|
|
64
66
|
import { UserResponse } from '@1interface/shared-core';
|
|
67
|
+
import { VerificationRequiredResult } from '@1interface/shared-core';
|
|
68
|
+
import { VerifyEmailRequest } from '@1interface/shared-core';
|
|
65
69
|
|
|
66
70
|
export declare interface AdapterConfig {
|
|
67
71
|
getAuthToken: () => string | null;
|
|
@@ -128,6 +132,8 @@ file: DocumentUploadFile;
|
|
|
128
132
|
filename?: string;
|
|
129
133
|
documentType?: string;
|
|
130
134
|
conversationId?: string;
|
|
135
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
136
|
+
onUploadComplete?: () => void;
|
|
131
137
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
132
138
|
success: boolean;
|
|
133
139
|
data: {
|
|
@@ -198,6 +204,8 @@ export declare const apiReducers: {
|
|
|
198
204
|
filename?: string;
|
|
199
205
|
documentType?: string;
|
|
200
206
|
conversationId?: string;
|
|
207
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
208
|
+
onUploadComplete?: () => void;
|
|
201
209
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
202
210
|
success: boolean;
|
|
203
211
|
data: {
|
|
@@ -385,6 +393,8 @@ file: DocumentUploadFile;
|
|
|
385
393
|
filename?: string;
|
|
386
394
|
documentType?: string;
|
|
387
395
|
conversationId?: string;
|
|
396
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
397
|
+
onUploadComplete?: () => void;
|
|
388
398
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
389
399
|
success: boolean;
|
|
390
400
|
data: {
|
|
@@ -477,6 +487,8 @@ file: DocumentUploadFile;
|
|
|
477
487
|
filename?: string;
|
|
478
488
|
documentType?: string;
|
|
479
489
|
conversationId?: string;
|
|
490
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
491
|
+
onUploadComplete?: () => void;
|
|
480
492
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
481
493
|
success: boolean;
|
|
482
494
|
data: {
|
|
@@ -571,6 +583,8 @@ file: DocumentUploadFile;
|
|
|
571
583
|
filename?: string;
|
|
572
584
|
documentType?: string;
|
|
573
585
|
conversationId?: string;
|
|
586
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
587
|
+
onUploadComplete?: () => void;
|
|
574
588
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
575
589
|
success: boolean;
|
|
576
590
|
data: {
|
|
@@ -706,6 +720,12 @@ export declare interface ClientConfigResponse {
|
|
|
706
720
|
data: ClientConfig | null;
|
|
707
721
|
}
|
|
708
722
|
|
|
723
|
+
export declare interface CodeEntryErrorCopy {
|
|
724
|
+
generic: string;
|
|
725
|
+
validation: string;
|
|
726
|
+
invalidCode: string;
|
|
727
|
+
}
|
|
728
|
+
|
|
709
729
|
export declare const configApi: Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, {
|
|
710
730
|
getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, ClientConfigResponse, "configApi", unknown>;
|
|
711
731
|
}, "configApi", never, coreModuleName | reactHooksModuleName>;
|
|
@@ -825,6 +845,10 @@ export declare function getAuthToken(): string | null;
|
|
|
825
845
|
|
|
826
846
|
export declare function getCachedLocation(storage: Storage_2): Promise<UserLocation | null>;
|
|
827
847
|
|
|
848
|
+
export declare function getCodeEntryErrorMessage(error: unknown, copy: CodeEntryErrorCopy): string;
|
|
849
|
+
|
|
850
|
+
export declare function getErrorGroup(error: unknown): string | null;
|
|
851
|
+
|
|
828
852
|
export declare const getLatestRequestId: () => string;
|
|
829
853
|
|
|
830
854
|
export declare function guestLoginApi(): Promise<AuthApiResult>;
|
|
@@ -1012,6 +1036,8 @@ export declare interface QueuedMessage {
|
|
|
1012
1036
|
|
|
1013
1037
|
export declare function refreshTokenApi(payload: RefreshRequest): Promise<RefreshApiResult>;
|
|
1014
1038
|
|
|
1039
|
+
export declare function resendVerificationApi(payload: ResendVerificationRequest): Promise<string | undefined>;
|
|
1040
|
+
|
|
1015
1041
|
export declare const resetAllApiState: () => ThunkAction<void, unknown, unknown, UnknownAction>;
|
|
1016
1042
|
|
|
1017
1043
|
export declare function resetChatLoggerForTests(): void;
|
|
@@ -1049,7 +1075,7 @@ export declare const setStatusText: ActionCreatorWithOptionalPayload<string, "ch
|
|
|
1049
1075
|
|
|
1050
1076
|
export declare function shouldDisableMessage(message: Message, allMessages: Message[], disableOldWidgets: boolean): boolean;
|
|
1051
1077
|
|
|
1052
|
-
export declare function signupApi(payload: SignupRequest): Promise<
|
|
1078
|
+
export declare function signupApi(payload: SignupRequest): Promise<SignupApiResult>;
|
|
1053
1079
|
|
|
1054
1080
|
export declare enum SSEEventType {
|
|
1055
1081
|
START = "start",
|
|
@@ -1145,6 +1171,8 @@ file: DocumentUploadFile;
|
|
|
1145
1171
|
filename?: string;
|
|
1146
1172
|
documentType?: string;
|
|
1147
1173
|
conversationId?: string;
|
|
1174
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
1175
|
+
onUploadComplete?: () => void;
|
|
1148
1176
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
1149
1177
|
success: boolean;
|
|
1150
1178
|
data: {
|
|
@@ -1240,6 +1268,8 @@ file: DocumentUploadFile;
|
|
|
1240
1268
|
filename?: string;
|
|
1241
1269
|
documentType?: string;
|
|
1242
1270
|
conversationId?: string;
|
|
1271
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
1272
|
+
onUploadComplete?: () => void;
|
|
1243
1273
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
1244
1274
|
success: boolean;
|
|
1245
1275
|
data: {
|
|
@@ -3634,7 +3664,7 @@ export declare interface UseGuestBootResult {
|
|
|
3634
3664
|
export declare function useGuestLogin(): {
|
|
3635
3665
|
guestLogin: () => Promise<{
|
|
3636
3666
|
success: true;
|
|
3637
|
-
data: AppResponse<SessionResponse>;
|
|
3667
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
3638
3668
|
error?: undefined;
|
|
3639
3669
|
} | {
|
|
3640
3670
|
success: false;
|
|
@@ -3912,7 +3942,7 @@ export declare const useLocationInit: () => boolean;
|
|
|
3912
3942
|
export declare function useLogin(): {
|
|
3913
3943
|
login: (credentials: SessionCreateRequest) => Promise<{
|
|
3914
3944
|
success: true;
|
|
3915
|
-
data: AppResponse<SessionResponse>;
|
|
3945
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
3916
3946
|
error?: undefined;
|
|
3917
3947
|
} | {
|
|
3918
3948
|
success: false;
|
|
@@ -4020,7 +4050,7 @@ export declare interface UserLocation {
|
|
|
4020
4050
|
export declare function useSignup(): {
|
|
4021
4051
|
signup: (payload: SignupRequest) => Promise<{
|
|
4022
4052
|
success: true;
|
|
4023
|
-
data: AppResponse<SessionResponse>;
|
|
4053
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
4024
4054
|
error?: undefined;
|
|
4025
4055
|
} | {
|
|
4026
4056
|
success: false;
|
|
@@ -5070,11 +5100,15 @@ export declare const useUploadDocumentMutation: <R extends Record<string, any> =
|
|
|
5070
5100
|
filename?: string;
|
|
5071
5101
|
documentType?: string;
|
|
5072
5102
|
conversationId?: string;
|
|
5103
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
5104
|
+
onUploadComplete?: () => void;
|
|
5073
5105
|
}) => MutationActionCreatorResult<MutationDefinition< {
|
|
5074
5106
|
file: DocumentUploadFile;
|
|
5075
5107
|
filename?: string;
|
|
5076
5108
|
documentType?: string;
|
|
5077
5109
|
conversationId?: string;
|
|
5110
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
5111
|
+
onUploadComplete?: () => void;
|
|
5078
5112
|
}, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "chat" | "toolServers", {
|
|
5079
5113
|
success: boolean;
|
|
5080
5114
|
data: {
|
|
@@ -5090,6 +5124,8 @@ size_bytes: number;
|
|
|
5090
5124
|
filename?: string;
|
|
5091
5125
|
documentType?: string;
|
|
5092
5126
|
conversationId?: string;
|
|
5127
|
+
onUploadProgress?: (loaded: number, total: number) => void;
|
|
5128
|
+
onUploadComplete?: () => void;
|
|
5093
5129
|
};
|
|
5094
5130
|
reset: () => void;
|
|
5095
5131
|
}];
|
|
@@ -5102,6 +5138,21 @@ declare interface UseUserLocationResult {
|
|
|
5102
5138
|
error: string | null;
|
|
5103
5139
|
}
|
|
5104
5140
|
|
|
5141
|
+
export declare function useVerifyEmail(): {
|
|
5142
|
+
verify: (payload: VerifyEmailRequest) => Promise<{
|
|
5143
|
+
success: true;
|
|
5144
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
5145
|
+
error?: undefined;
|
|
5146
|
+
} | {
|
|
5147
|
+
success: false;
|
|
5148
|
+
error: any;
|
|
5149
|
+
data?: undefined;
|
|
5150
|
+
}>;
|
|
5151
|
+
isLoading: boolean;
|
|
5152
|
+
};
|
|
5153
|
+
|
|
5154
|
+
export declare function verifyEmailApi(payload: VerifyEmailRequest): Promise<SignupApiResult>;
|
|
5155
|
+
|
|
5105
5156
|
export declare interface VoiceAgentConfig {
|
|
5106
5157
|
enabled: boolean;
|
|
5107
5158
|
show_customization_modal: boolean;
|