@1interface/chat-core 0.13.0 → 0.15.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 +31 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { FetchArgs } from '@reduxjs/toolkit/query';
|
|
|
17
17
|
import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
|
|
18
18
|
import { ForgotPasswordRequest } from '@1interface/shared-core';
|
|
19
19
|
import { IdpHint } from '@1interface/shared-core';
|
|
20
|
+
import { InheritedAuthAdapter } from '@1interface/shared-core';
|
|
20
21
|
import { LoggerContextProvider } from '@1interface/shared-core';
|
|
21
22
|
import { LogoutRequest } from '@1interface/shared-core';
|
|
22
23
|
import { Message } from '@1interface/shared-core';
|
|
@@ -80,7 +81,7 @@ export declare interface AdapterConfig {
|
|
|
80
81
|
|
|
81
82
|
export declare interface AdvanceChatMessageRendererProps {
|
|
82
83
|
msg: Message;
|
|
83
|
-
sendMessage?: (
|
|
84
|
+
sendMessage?: (inputMsg?: string, transcriptionIds?: string[], options?: SendMessageOptions) => void | Promise<void>;
|
|
84
85
|
isAgentWorking?: boolean;
|
|
85
86
|
isWidgetDisabled?: boolean;
|
|
86
87
|
direction?: TextDirection;
|
|
@@ -275,6 +276,7 @@ export declare const AUTH_MODES: {
|
|
|
275
276
|
readonly GUEST_ONLY: "guest_only";
|
|
276
277
|
readonly SIGN_IN_ONLY: "sign_in_only";
|
|
277
278
|
readonly GUEST_AND_SIGN_IN: "guest_and_sign_in";
|
|
279
|
+
readonly INHERIT: "inherit";
|
|
278
280
|
};
|
|
279
281
|
|
|
280
282
|
export declare type AuthClientType = (typeof AUTH_CLIENT_TYPES)[keyof typeof AUTH_CLIENT_TYPES];
|
|
@@ -444,6 +446,7 @@ id: string;
|
|
|
444
446
|
text: string;
|
|
445
447
|
queuedAt: string;
|
|
446
448
|
transcriptionIds?: string[];
|
|
449
|
+
messageType?: string[];
|
|
447
450
|
}[];
|
|
448
451
|
pendingTranscriptionIds: string[];
|
|
449
452
|
};
|
|
@@ -540,6 +543,7 @@ id: string;
|
|
|
540
543
|
text: string;
|
|
541
544
|
queuedAt: string;
|
|
542
545
|
transcriptionIds?: string[];
|
|
546
|
+
messageType?: string[];
|
|
543
547
|
}[];
|
|
544
548
|
pendingTranscriptionIds: string[];
|
|
545
549
|
};
|
|
@@ -672,6 +676,7 @@ id: string;
|
|
|
672
676
|
text: string;
|
|
673
677
|
queuedAt: string;
|
|
674
678
|
transcriptionIds?: string[];
|
|
679
|
+
messageType?: string[];
|
|
675
680
|
}[];
|
|
676
681
|
pendingTranscriptionIds: string[];
|
|
677
682
|
}>;
|
|
@@ -780,6 +785,8 @@ export declare function createDefaultAdapterConfig(opts?: {
|
|
|
780
785
|
onAuthExpired?: () => void;
|
|
781
786
|
}): AdapterConfig;
|
|
782
787
|
|
|
788
|
+
export declare function createInheritedSessionRefresher(store: SessionStoreLike, adapter: InheritedAuthAdapter): () => Promise<TokenRefreshResult | null>;
|
|
789
|
+
|
|
783
790
|
export declare function createSessionRefresher(store: SessionStoreLike): () => Promise<TokenRefreshResult | null>;
|
|
784
791
|
|
|
785
792
|
export declare const DEFAULT_CONVERSATION_TITLE = "New Conversation";
|
|
@@ -1032,6 +1039,7 @@ export declare interface QueuedMessage {
|
|
|
1032
1039
|
text: string;
|
|
1033
1040
|
queuedAt: string;
|
|
1034
1041
|
transcriptionIds?: string[];
|
|
1042
|
+
messageType?: string[];
|
|
1035
1043
|
}
|
|
1036
1044
|
|
|
1037
1045
|
export declare function refreshTokenApi(payload: RefreshRequest): Promise<RefreshApiResult>;
|
|
@@ -1054,6 +1062,10 @@ declare type SendMessageFn_2 = (text?: string) => Promise<void>;
|
|
|
1054
1062
|
|
|
1055
1063
|
declare type SendMessageFn_3 = (text?: string) => Promise<void>;
|
|
1056
1064
|
|
|
1065
|
+
export declare interface SendMessageOptions {
|
|
1066
|
+
messageType?: string[];
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1057
1069
|
export declare const serializableCheck: {
|
|
1058
1070
|
ignoredPaths: string[];
|
|
1059
1071
|
ignoredActions: string[];
|
|
@@ -1128,6 +1140,7 @@ id: string;
|
|
|
1128
1140
|
text: string;
|
|
1129
1141
|
queuedAt: string;
|
|
1130
1142
|
transcriptionIds?: string[];
|
|
1143
|
+
messageType?: string[];
|
|
1131
1144
|
}[];
|
|
1132
1145
|
pendingTranscriptionIds: string[];
|
|
1133
1146
|
};
|
|
@@ -1225,6 +1238,7 @@ id: string;
|
|
|
1225
1238
|
text: string;
|
|
1226
1239
|
queuedAt: string;
|
|
1227
1240
|
transcriptionIds?: string[];
|
|
1241
|
+
messageType?: string[];
|
|
1228
1242
|
}[];
|
|
1229
1243
|
pendingTranscriptionIds: string[];
|
|
1230
1244
|
};
|
|
@@ -1418,7 +1432,7 @@ declare interface UseChatConnectionParams {
|
|
|
1418
1432
|
}
|
|
1419
1433
|
|
|
1420
1434
|
declare interface UseChatConnectionReturn {
|
|
1421
|
-
sendMessage: (inputMsg?: string, transcriptionIds?: string[]) => Promise<void>;
|
|
1435
|
+
sendMessage: (inputMsg?: string, transcriptionIds?: string[], options?: SendMessageOptions) => Promise<void>;
|
|
1422
1436
|
startInitialStream: (conversationId: string, location?: UserLocation | null) => Promise<void>;
|
|
1423
1437
|
setThinkingState: (thinking: boolean) => void;
|
|
1424
1438
|
abortStream: () => void;
|
|
@@ -3689,6 +3703,19 @@ export declare function useInfiniteScroll({ hasMore, isLoadingRef, scrollAreaRef
|
|
|
3689
3703
|
itemCount: number;
|
|
3690
3704
|
}): (node: HTMLDivElement | null) => void;
|
|
3691
3705
|
|
|
3706
|
+
export declare function useInheritedAuthBoot({ adapter, enabled, }: UseInheritedAuthBootOptions): UseInheritedAuthBootResult;
|
|
3707
|
+
|
|
3708
|
+
export declare interface UseInheritedAuthBootOptions {
|
|
3709
|
+
adapter: InheritedAuthAdapter | null;
|
|
3710
|
+
enabled: boolean;
|
|
3711
|
+
}
|
|
3712
|
+
|
|
3713
|
+
export declare interface UseInheritedAuthBootResult {
|
|
3714
|
+
isInheritedBootPending: boolean;
|
|
3715
|
+
inheritedAuthFailed: boolean;
|
|
3716
|
+
retryInheritedAuth: () => void;
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3692
3719
|
export declare const useIsDesktop: () => boolean;
|
|
3693
3720
|
|
|
3694
3721
|
export declare const useLazyGetConversationByIdQuery: <R extends Record<string, any> = TSHelpersId<(Omit<{
|
|
@@ -4032,6 +4059,8 @@ declare interface UsePaymentResultDedupReturn {
|
|
|
4032
4059
|
|
|
4033
4060
|
export declare const useProtocol: () => ProtocolContextType;
|
|
4034
4061
|
|
|
4062
|
+
export declare const USER_COLLAPSED_MESSAGE_TYPE = "user-collapsed";
|
|
4063
|
+
|
|
4035
4064
|
export declare function useRefreshToken(): {
|
|
4036
4065
|
refresh: () => Promise<{
|
|
4037
4066
|
success: true;
|