@1interface/chat-core 0.6.2 → 0.8.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 CHANGED
@@ -608,7 +608,7 @@ export declare interface ClientConfig {
608
608
  features?: string[];
609
609
  backend_version?: string;
610
610
  panel_switcher_enabled?: boolean;
611
- auth_mode_config?: Partial<Record<string, AuthMode>>;
611
+ auth_mode_config?: Partial<Record<AuthClientType | (string & {}), AuthMode>>;
612
612
  }
613
613
 
614
614
  export declare interface ClientConfigResponse {
@@ -723,6 +723,8 @@ export declare const GENERIC_SERVER_ERROR_MESSAGE = "Something went wrong. Pleas
723
723
 
724
724
  export declare function getApiErrorMessage(err: unknown, clientFallback?: string): string;
725
725
 
726
+ export declare function getAuthMode(config: ClientConfigResponse | undefined, clientType: AuthClientType | (string & {})): AuthMode;
727
+
726
728
  export declare function getAuthToken(): string | null;
727
729
 
728
730
  export declare function getCachedLocation(storage: Storage_2): Promise<UserLocation | null>;
@@ -3300,6 +3302,19 @@ isError: false;
3300
3302
  }, "chatApi", unknown>>;
3301
3303
  };
3302
3304
 
3305
+ export declare function useGuestBoot({ clientType, }: UseGuestBootOptions): UseGuestBootResult;
3306
+
3307
+ export declare interface UseGuestBootOptions {
3308
+ clientType: AuthClientType | (string & {});
3309
+ }
3310
+
3311
+ export declare interface UseGuestBootResult {
3312
+ mode: AuthMode;
3313
+ isGuestBootPending: boolean;
3314
+ guestBootFailed: boolean;
3315
+ retryGuestBoot: () => void;
3316
+ }
3317
+
3303
3318
  export declare function useGuestLogin(): {
3304
3319
  guestLogin: () => Promise<{
3305
3320
  success: true;