stream-chat 9.1.0 → 9.1.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.
@@ -12876,18 +12876,16 @@ var StreamChat = class _StreamChat {
12876
12876
  );
12877
12877
  }
12878
12878
  /**
12879
- * queryChannels - Query channels
12879
+ * queryChannelsRequest - Queries channels and returns the raw response
12880
12880
  *
12881
12881
  * @param {ChannelFilters} filterConditions object MongoDB style filters
12882
12882
  * @param {ChannelSort} [sort] Sort options, for instance {created_at: -1}.
12883
12883
  * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_updated: -1}, {created_at: 1}]
12884
12884
  * @param {ChannelOptions} [options] Options object
12885
- * @param {ChannelStateOptions} [stateOptions] State options object. These options will only be used for state management and won't be sent in the request.
12886
- * - stateOptions.skipInitialization - Skips the initialization of the state for the channels matching the ids in the list.
12887
12885
  *
12888
- * @return {Promise<{ channels: Array<ChannelAPIResponse>}> } search channels response
12886
+ * @return {Promise<Array<ChannelAPIResponse>>} search channels response
12889
12887
  */
12890
- async queryChannels(filterConditions, sort = [], options = {}, stateOptions = {}) {
12888
+ async queryChannelsRequest(filterConditions, sort = [], options = {}) {
12891
12889
  const defaultOptions = {
12892
12890
  state: true,
12893
12891
  watch: true,
@@ -12907,14 +12905,31 @@ var StreamChat = class _StreamChat {
12907
12905
  this.baseURL + "/channels",
12908
12906
  payload
12909
12907
  );
12908
+ return data.channels;
12909
+ }
12910
+ /**
12911
+ * queryChannels - Query channels
12912
+ *
12913
+ * @param {ChannelFilters} filterConditions object MongoDB style filters
12914
+ * @param {ChannelSort} [sort] Sort options, for instance {created_at: -1}.
12915
+ * When using multiple fields, make sure you use array of objects to guarantee field order, for instance [{last_updated: -1}, {created_at: 1}]
12916
+ * @param {ChannelOptions} [options] Options object
12917
+ * @param {ChannelStateOptions} [stateOptions] State options object. These options will only be used for state management and won't be sent in the request.
12918
+ * - stateOptions.skipInitialization - Skips the initialization of the state for the channels matching the ids in the list.
12919
+ * - stateOptions.skipHydration - Skips returning the channels as instances of the Channel class and rather returns the raw query response.
12920
+ *
12921
+ * @return {Promise<Array<Channel>>} search channels response
12922
+ */
12923
+ async queryChannels(filterConditions, sort = [], options = {}, stateOptions = {}) {
12924
+ const channels = await this.queryChannelsRequest(filterConditions, sort, options);
12910
12925
  this.dispatchEvent({
12911
12926
  type: "channels.queried",
12912
12927
  queriedChannels: {
12913
- channels: data.channels,
12928
+ channels,
12914
12929
  isLatestMessageSet: true
12915
12930
  }
12916
12931
  });
12917
- return this.hydrateActiveChannels(data.channels, stateOptions, options);
12932
+ return this.hydrateActiveChannels(channels, stateOptions, options);
12918
12933
  }
12919
12934
  /**
12920
12935
  * queryReactions - Query reactions
@@ -13861,7 +13876,7 @@ var StreamChat = class _StreamChat {
13861
13876
  if (this.userAgent) {
13862
13877
  return this.userAgent;
13863
13878
  }
13864
- const version = "9.1.0";
13879
+ const version = "9.1.1";
13865
13880
  const clientBundle = "browser-cjs";
13866
13881
  let userAgentString = "";
13867
13882
  if (this.sdkIdentifier) {