@1interface/chat-core 0.10.0 → 0.11.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 +35 -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;
|
|
@@ -706,6 +710,12 @@ export declare interface ClientConfigResponse {
|
|
|
706
710
|
data: ClientConfig | null;
|
|
707
711
|
}
|
|
708
712
|
|
|
713
|
+
export declare interface CodeEntryErrorCopy {
|
|
714
|
+
generic: string;
|
|
715
|
+
validation: string;
|
|
716
|
+
invalidCode: string;
|
|
717
|
+
}
|
|
718
|
+
|
|
709
719
|
export declare const configApi: Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, {
|
|
710
720
|
getConfig: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, never, ClientConfigResponse, "configApi", unknown>;
|
|
711
721
|
}, "configApi", never, coreModuleName | reactHooksModuleName>;
|
|
@@ -825,6 +835,10 @@ export declare function getAuthToken(): string | null;
|
|
|
825
835
|
|
|
826
836
|
export declare function getCachedLocation(storage: Storage_2): Promise<UserLocation | null>;
|
|
827
837
|
|
|
838
|
+
export declare function getCodeEntryErrorMessage(error: unknown, copy: CodeEntryErrorCopy): string;
|
|
839
|
+
|
|
840
|
+
export declare function getErrorGroup(error: unknown): string | null;
|
|
841
|
+
|
|
828
842
|
export declare const getLatestRequestId: () => string;
|
|
829
843
|
|
|
830
844
|
export declare function guestLoginApi(): Promise<AuthApiResult>;
|
|
@@ -1012,6 +1026,8 @@ export declare interface QueuedMessage {
|
|
|
1012
1026
|
|
|
1013
1027
|
export declare function refreshTokenApi(payload: RefreshRequest): Promise<RefreshApiResult>;
|
|
1014
1028
|
|
|
1029
|
+
export declare function resendVerificationApi(payload: ResendVerificationRequest): Promise<string | undefined>;
|
|
1030
|
+
|
|
1015
1031
|
export declare const resetAllApiState: () => ThunkAction<void, unknown, unknown, UnknownAction>;
|
|
1016
1032
|
|
|
1017
1033
|
export declare function resetChatLoggerForTests(): void;
|
|
@@ -1049,7 +1065,7 @@ export declare const setStatusText: ActionCreatorWithOptionalPayload<string, "ch
|
|
|
1049
1065
|
|
|
1050
1066
|
export declare function shouldDisableMessage(message: Message, allMessages: Message[], disableOldWidgets: boolean): boolean;
|
|
1051
1067
|
|
|
1052
|
-
export declare function signupApi(payload: SignupRequest): Promise<
|
|
1068
|
+
export declare function signupApi(payload: SignupRequest): Promise<SignupApiResult>;
|
|
1053
1069
|
|
|
1054
1070
|
export declare enum SSEEventType {
|
|
1055
1071
|
START = "start",
|
|
@@ -3634,7 +3650,7 @@ export declare interface UseGuestBootResult {
|
|
|
3634
3650
|
export declare function useGuestLogin(): {
|
|
3635
3651
|
guestLogin: () => Promise<{
|
|
3636
3652
|
success: true;
|
|
3637
|
-
data: AppResponse<SessionResponse>;
|
|
3653
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
3638
3654
|
error?: undefined;
|
|
3639
3655
|
} | {
|
|
3640
3656
|
success: false;
|
|
@@ -3912,7 +3928,7 @@ export declare const useLocationInit: () => boolean;
|
|
|
3912
3928
|
export declare function useLogin(): {
|
|
3913
3929
|
login: (credentials: SessionCreateRequest) => Promise<{
|
|
3914
3930
|
success: true;
|
|
3915
|
-
data: AppResponse<SessionResponse>;
|
|
3931
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
3916
3932
|
error?: undefined;
|
|
3917
3933
|
} | {
|
|
3918
3934
|
success: false;
|
|
@@ -4020,7 +4036,7 @@ export declare interface UserLocation {
|
|
|
4020
4036
|
export declare function useSignup(): {
|
|
4021
4037
|
signup: (payload: SignupRequest) => Promise<{
|
|
4022
4038
|
success: true;
|
|
4023
|
-
data: AppResponse<SessionResponse>;
|
|
4039
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
4024
4040
|
error?: undefined;
|
|
4025
4041
|
} | {
|
|
4026
4042
|
success: false;
|
|
@@ -5102,6 +5118,21 @@ declare interface UseUserLocationResult {
|
|
|
5102
5118
|
error: string | null;
|
|
5103
5119
|
}
|
|
5104
5120
|
|
|
5121
|
+
export declare function useVerifyEmail(): {
|
|
5122
|
+
verify: (payload: VerifyEmailRequest) => Promise<{
|
|
5123
|
+
success: true;
|
|
5124
|
+
data: AppResponse<SessionResponse | VerificationRequiredResult>;
|
|
5125
|
+
error?: undefined;
|
|
5126
|
+
} | {
|
|
5127
|
+
success: false;
|
|
5128
|
+
error: any;
|
|
5129
|
+
data?: undefined;
|
|
5130
|
+
}>;
|
|
5131
|
+
isLoading: boolean;
|
|
5132
|
+
};
|
|
5133
|
+
|
|
5134
|
+
export declare function verifyEmailApi(payload: VerifyEmailRequest): Promise<SignupApiResult>;
|
|
5135
|
+
|
|
5105
5136
|
export declare interface VoiceAgentConfig {
|
|
5106
5137
|
enabled: boolean;
|
|
5107
5138
|
show_customization_modal: boolean;
|