@stream-io/video-client 0.1.5 → 0.1.6

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.cjs.js CHANGED
@@ -10348,7 +10348,7 @@ class Call {
10348
10348
  * @returns
10349
10349
  */
10350
10350
  this.queryMembers = (request) => {
10351
- return this.streamClient.post('/call/members', Object.assign(Object.assign({}, request), { id: this.id, type: this.type }));
10351
+ return this.streamClient.post('/call/members', Object.assign(Object.assign({}, (request || {})), { id: this.id, type: this.type }));
10352
10352
  };
10353
10353
  /**
10354
10354
  * Will update the call members.
@@ -11660,7 +11660,7 @@ class WSConnectionFallback {
11660
11660
  }
11661
11661
  }
11662
11662
 
11663
- const version = '0.1.5';
11663
+ const version = '0.1.6';
11664
11664
 
11665
11665
  const logger = getLogger(['location']);
11666
11666
  const HINT_URL = `https://hint.stream-io-video.com/`;
@@ -11927,9 +11927,6 @@ class StreamClient {
11927
11927
  this.logger('trace', `client:${type} - Response - url: ${url} > status ${response.status}`, {
11928
11928
  response,
11929
11929
  });
11930
- this.logger('trace', `client:${type} - Response payload`, {
11931
- response,
11932
- });
11933
11930
  };
11934
11931
  this._logApiError = (type, url, error) => {
11935
11932
  this.logger('error', `client:${type} - Error - url: ${url}`, {
@@ -11978,9 +11975,9 @@ class StreamClient {
11978
11975
  }
11979
11976
  catch (e /**TODO: generalize error types */) {
11980
11977
  e.client_request_id = (_h = requestConfig.headers) === null || _h === void 0 ? void 0 : _h['x-client-request-id'];
11981
- this._logApiError(type, url, e);
11982
11978
  this.consecutiveFailures += 1;
11983
11979
  if (e.response) {
11980
+ this._logApiError(type, url, e.response);
11984
11981
  /** connection_fallback depends on this token expiration logic */
11985
11982
  if (e.response.data.code === KnownCodes.TOKEN_EXPIRED &&
11986
11983
  !this.tokenManager.isStatic()) {
@@ -11993,6 +11990,7 @@ class StreamClient {
11993
11990
  return this.handleResponse(e.response);
11994
11991
  }
11995
11992
  else {
11993
+ this._logApiError(type, url, e);
11996
11994
  // eslint-disable-next-line no-throw-literal
11997
11995
  throw e;
11998
11996
  }
@@ -12349,7 +12347,7 @@ class StreamVideoClient {
12349
12347
  *
12350
12348
  * @param data the query data.
12351
12349
  */
12352
- this.queryCalls = (data) => __awaiter(this, void 0, void 0, function* () {
12350
+ this.queryCalls = (data = {}) => __awaiter(this, void 0, void 0, function* () {
12353
12351
  const response = yield this.streamClient.post('/calls', data);
12354
12352
  const calls = response.calls.map((c) => {
12355
12353
  const call = new Call({