@1interface/chat-core 0.5.0 → 0.6.1

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 CHANGED
@@ -222,6 +222,20 @@ export declare class AudioRecorder {
222
222
  cleanup(): void;
223
223
  }
224
224
 
225
+ export declare const AUTH_CLIENT_TYPES: {
226
+ readonly ALL: "all";
227
+ };
228
+
229
+ export declare const AUTH_MODES: {
230
+ readonly GUEST_ONLY: "guest_only";
231
+ readonly SIGN_IN_ONLY: "sign_in_only";
232
+ readonly GUEST_AND_SIGN_IN: "guest_and_sign_in";
233
+ };
234
+
235
+ export declare type AuthClientType = (typeof AUTH_CLIENT_TYPES)[keyof typeof AUTH_CLIENT_TYPES];
236
+
237
+ export declare type AuthMode = (typeof AUTH_MODES)[keyof typeof AUTH_MODES];
238
+
225
239
  export declare function bindChatLogger(getState: () => RootState): void;
226
240
 
227
241
  export declare const brandingApi: Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError>, {
@@ -593,6 +607,7 @@ export declare interface ClientConfig {
593
607
  features?: string[];
594
608
  backend_version?: string;
595
609
  panel_switcher_enabled?: boolean;
610
+ auth_mode_config?: Partial<Record<string, AuthMode>>;
596
611
  }
597
612
 
598
613
  export declare interface ClientConfigResponse {
@@ -713,6 +728,8 @@ export declare function getCachedLocation(storage: Storage_2): Promise<UserLocat
713
728
 
714
729
  export declare const getLatestRequestId: () => string;
715
730
 
731
+ export declare function guestLoginApi(): Promise<AuthApiResult>;
732
+
716
733
  export declare const hasAnyExtraData: (msg: any) => boolean;
717
734
 
718
735
  export declare function isApiServerError(err: unknown): boolean;
@@ -3282,6 +3299,19 @@ isError: false;
3282
3299
  }, "chatApi", unknown>>;
3283
3300
  };
3284
3301
 
3302
+ export declare function useGuestLogin(): {
3303
+ guestLogin: () => Promise<{
3304
+ success: true;
3305
+ data: AppResponse<SessionResponse>;
3306
+ error?: undefined;
3307
+ } | {
3308
+ success: false;
3309
+ error: any;
3310
+ data?: undefined;
3311
+ }>;
3312
+ isLoading: boolean;
3313
+ };
3314
+
3285
3315
  export declare function useInfiniteScroll({ hasMore, isLoadingRef, scrollAreaRef, onLoadMore, itemCount, }: {
3286
3316
  hasMore: boolean;
3287
3317
  isLoadingRef: MutableRefObject<boolean>;