@1interface/chat-core 0.20.0 → 0.20.2
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 +23 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -174,6 +174,7 @@ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, Fetch
|
|
|
174
174
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
175
175
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
176
176
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
177
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
177
178
|
}, string, "profileApi">, ThunkDispatch<any, any, UnknownAction>>)[];
|
|
178
179
|
|
|
179
180
|
export declare const apiReducers: {
|
|
@@ -249,6 +250,7 @@ export declare const apiReducers: {
|
|
|
249
250
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
250
251
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
251
252
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
253
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
252
254
|
}, "profile", "profileApi">, UnknownAction>;
|
|
253
255
|
};
|
|
254
256
|
|
|
@@ -541,6 +543,7 @@ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, Fetch
|
|
|
541
543
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
542
544
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
543
545
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
546
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
544
547
|
}, "profile", "profileApi">;
|
|
545
548
|
}, UnknownAction, Partial<{
|
|
546
549
|
auth: AuthState;
|
|
@@ -645,6 +648,7 @@ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, Fetch
|
|
|
645
648
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
646
649
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
647
650
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
651
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
648
652
|
}, "profile", "profileApi">;
|
|
649
653
|
}>>;
|
|
650
654
|
|
|
@@ -811,7 +815,7 @@ export declare function createDefaultAdapterConfig(opts?: {
|
|
|
811
815
|
onAuthExpired?: () => void;
|
|
812
816
|
}): AdapterConfig;
|
|
813
817
|
|
|
814
|
-
export declare function createInheritedSessionRefresher(store: SessionStoreLike, adapter:
|
|
818
|
+
export declare function createInheritedSessionRefresher(store: SessionStoreLike, adapter: InheritedSessionAdapter): InheritedSessionRefresher;
|
|
815
819
|
|
|
816
820
|
export declare function createSessionRefresher(store: SessionStoreLike): () => Promise<TokenRefreshResult | null>;
|
|
817
821
|
|
|
@@ -901,12 +905,24 @@ export declare function guestLoginApi(): Promise<AuthApiResult>;
|
|
|
901
905
|
|
|
902
906
|
export declare const hasAnyExtraData: (msg: any) => boolean;
|
|
903
907
|
|
|
908
|
+
export declare interface InheritedSessionAdapter extends InheritedAuthAdapter {
|
|
909
|
+
onUserChanged?(): void;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export declare type InheritedSessionRefresher = (() => Promise<TokenRefreshResult | null>) & {
|
|
913
|
+
captureBaseline: () => void;
|
|
914
|
+
};
|
|
915
|
+
|
|
904
916
|
export declare function isApiServerError(err: unknown): boolean;
|
|
905
917
|
|
|
906
918
|
export declare const isEmptyMessage: (v: any) => boolean;
|
|
907
919
|
|
|
908
920
|
export declare function isHttpsUrl(value: unknown): value is string;
|
|
909
921
|
|
|
922
|
+
declare interface LoadConversationOptions {
|
|
923
|
+
quiet?: boolean;
|
|
924
|
+
}
|
|
925
|
+
|
|
910
926
|
export declare function loginApi(email: string, password: string): Promise<AuthApiResult>;
|
|
911
927
|
|
|
912
928
|
export declare function logoutApi(payload: LogoutRequest, options?: {
|
|
@@ -1059,6 +1075,7 @@ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, Fetch
|
|
|
1059
1075
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
1060
1076
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
1061
1077
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
1078
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
1062
1079
|
}, "profileApi", "profile", coreModuleName | reactHooksModuleName>;
|
|
1063
1080
|
|
|
1064
1081
|
export declare class ProprietaryAdapter implements ProtocolAdapter {
|
|
@@ -1290,6 +1307,7 @@ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, Fetch
|
|
|
1290
1307
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
1291
1308
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
1292
1309
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
1310
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
1293
1311
|
}, "profile", "profileApi">;
|
|
1294
1312
|
}, UnknownAction, Tuple<[StoreEnhancer< {
|
|
1295
1313
|
dispatch: ((action: Action<"listenerMiddleware/add">) => UnsubscribeListener) & ThunkDispatch< {
|
|
@@ -1395,6 +1413,7 @@ getProfile: QueryDefinition<void, BaseQueryFn<string | FetchArgs, unknown, Fetch
|
|
|
1395
1413
|
updateProfile: MutationDefinition<UpdateProfilePayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
1396
1414
|
deleteAccount: MutationDefinition<void, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", void, "profileApi", unknown>;
|
|
1397
1415
|
updatePassword: MutationDefinition<UpdatePasswordPayload, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
1416
|
+
resolveIdentity: MutationDefinition<string, BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, "profile", string, "profileApi", unknown>;
|
|
1398
1417
|
}, "profile", "profileApi">;
|
|
1399
1418
|
}, undefined, UnknownAction>;
|
|
1400
1419
|
}>, StoreEnhancer]>>;
|
|
@@ -1590,7 +1609,7 @@ declare interface UseConversationReturn {
|
|
|
1590
1609
|
hasMoreMessages: boolean;
|
|
1591
1610
|
isLoadingMoreMessages: boolean;
|
|
1592
1611
|
startSession: () => Promise<string | null>;
|
|
1593
|
-
loadConversation: (conversationId: string, titleHint?: string | null) => Promise<boolean>;
|
|
1612
|
+
loadConversation: (conversationId: string, titleHint?: string | null, options?: LoadConversationOptions) => Promise<boolean>;
|
|
1594
1613
|
loadConversationTitle: (conversationId?: string | null) => Promise<string | null>;
|
|
1595
1614
|
loadMoreMessages: () => Promise<void>;
|
|
1596
1615
|
resetConversation: () => void;
|
|
@@ -3785,7 +3804,7 @@ export declare function useInfiniteScroll({ hasMore, isLoadingRef, scrollAreaRef
|
|
|
3785
3804
|
export declare function useInheritedAuthBoot({ adapter, enabled, }: UseInheritedAuthBootOptions): UseInheritedAuthBootResult;
|
|
3786
3805
|
|
|
3787
3806
|
export declare interface UseInheritedAuthBootOptions {
|
|
3788
|
-
adapter:
|
|
3807
|
+
adapter: InheritedSessionAdapter | null;
|
|
3789
3808
|
enabled: boolean;
|
|
3790
3809
|
}
|
|
3791
3810
|
|
|
@@ -3793,6 +3812,7 @@ export declare interface UseInheritedAuthBootResult {
|
|
|
3793
3812
|
isInheritedBootPending: boolean;
|
|
3794
3813
|
inheritedAuthFailed: boolean;
|
|
3795
3814
|
retryInheritedAuth: () => void;
|
|
3815
|
+
recheckInheritedAuth: () => void;
|
|
3796
3816
|
}
|
|
3797
3817
|
|
|
3798
3818
|
export declare const useIsDesktop: () => boolean;
|