stream-chat
Advanced tools
Comparing version 4.5.0-beta.0 to 5.0.0
import { AxiosRequestConfig, CancelTokenSource } from 'axios'; | ||
import { StreamChat } from './client'; | ||
import { ConnectionOpen, UnknownType, UR, LiteralStringForUnion, LogLevel } from './types'; | ||
declare enum ConnectionState { | ||
export declare enum ConnectionState { | ||
Closed = "CLOSED", | ||
@@ -41,3 +41,2 @@ Connected = "CONNECTED", | ||
} | ||
export {}; | ||
//# sourceMappingURL=connection_fallback.d.ts.map |
@@ -6,3 +6,3 @@ export declare const APIErrorCodes: Record<string, { | ||
declare type APIError = Error & { | ||
code?: number; | ||
code: number; | ||
isWSFailure?: boolean; | ||
@@ -9,0 +9,0 @@ }; |
@@ -468,10 +468,2 @@ import { AxiosRequestConfig } from 'axios'; | ||
timeout?: number; | ||
/** | ||
* @deprecated please use banned_by | ||
*/ | ||
user?: UserResponse<UserType>; | ||
/** | ||
* @deprecated please use banned_by_id | ||
*/ | ||
user_id?: string; | ||
}; | ||
@@ -478,0 +470,0 @@ export declare type ChannelOptions = { |
@@ -36,3 +36,3 @@ /// <reference types="node" /> | ||
/** | ||
* isOnline safely return the navigator.online value | ||
* isOnline safely return the navigator.online value for browser env | ||
* if navigator is not in global object, it always return true | ||
@@ -39,0 +39,0 @@ */ |
{ | ||
"name": "stream-chat", | ||
"version": "4.5.0-beta.0", | ||
"version": "5.0.0", | ||
"description": "JS SDK for the Stream Chat API", | ||
@@ -5,0 +5,0 @@ "author": "GetStream", |
@@ -7,3 +7,3 @@ import axios, { AxiosRequestConfig, CancelTokenSource } from 'axios'; | ||
enum ConnectionState { | ||
export enum ConnectionState { | ||
Closed = 'CLOSED', | ||
@@ -203,5 +203,5 @@ Connected = 'CONNECTED', | ||
} catch (err) { | ||
this._log(`disconnect() - Failed`, { err }); | ||
this._log(`disconnect() - Failed`, { err }, 'error'); | ||
} | ||
}; | ||
} |
@@ -31,3 +31,3 @@ export const APIErrorCodes: Record<string, { name: string; retryable: boolean }> = { | ||
type APIError = Error & { code?: number; isWSFailure?: boolean }; | ||
type APIError = Error & { code: number; isWSFailure?: boolean }; | ||
@@ -34,0 +34,0 @@ export function isAPIError(error: Error): error is APIError { |
@@ -690,10 +690,2 @@ import { AxiosRequestConfig } from 'axios'; | ||
timeout?: number; | ||
/** | ||
* @deprecated please use banned_by | ||
*/ | ||
user?: UserResponse<UserType>; | ||
/** | ||
* @deprecated please use banned_by_id | ||
*/ | ||
user_id?: string; | ||
}; | ||
@@ -700,0 +692,0 @@ |
@@ -208,3 +208,3 @@ import FormData from 'form-data'; | ||
/** | ||
* isOnline safely return the navigator.online value | ||
* isOnline safely return the navigator.online value for browser env | ||
* if navigator is not in global object, it always return true | ||
@@ -220,3 +220,12 @@ */ | ||
if (!nav) return true; | ||
if (!nav) { | ||
console.warn('isOnline failed to access window.navigator and assume browser is online'); | ||
return true; | ||
} | ||
// RN navigator has undefined for onLine | ||
if (typeof nav.onLine !== 'boolean') { | ||
return true; | ||
} | ||
return nav.onLine; | ||
@@ -223,0 +232,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
4096030
45513