stream-chat 9.44.0 → 9.44.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.
@@ -1,4 +1,4 @@
1
- import type { AppSettingsAPIResponse, ChannelAPIResponse, ChannelFilters, ChannelMemberResponse, ChannelResponse, ChannelSort, DraftResponse, LocalMessage, MessageResponse, PollResponse, ReactionFilters, ReactionResponse, ReactionSort, ReadResponse } from '../types';
1
+ import type { AppSettingsAPIResponse, ChannelAPIResponse, ChannelFilters, ChannelMemberResponse, ChannelOptions, ChannelResponse, ChannelSort, DraftResponse, LocalMessage, MessageResponse, PollResponse, ReactionFilters, ReactionResponse, ReactionSort, ReadResponse } from '../types';
2
2
  import type { Channel } from '../channel';
3
3
  import type { StreamChat } from '../client';
4
4
  export type PrepareBatchDBQueries = [string] | [string, Array<unknown> | Array<Array<unknown>>];
@@ -21,6 +21,8 @@ export type DBUpsertCidsForQueryType = {
21
21
  cids: string[];
22
22
  /** Optional filters for the channels. */
23
23
  filters?: ChannelFilters;
24
+ /** Optional full query options for the channels. */
25
+ options?: ChannelOptions;
24
26
  /** Whether to immediately execute the operation. */
25
27
  execute?: boolean;
26
28
  /** Optional sorting applied to the channels. */
@@ -145,6 +147,8 @@ export type DBGetChannelsForQueryType = {
145
147
  userId: string;
146
148
  /** Optional filters for channels. */
147
149
  filters?: ChannelFilters;
150
+ /** Optional full query options for channels. */
151
+ options?: ChannelOptions;
148
152
  /** Optional sorting for the channels. */
149
153
  sort?: ChannelSort;
150
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat",
3
- "version": "9.44.0",
3
+ "version": "9.44.1",
4
4
  "description": "JS SDK for the Stream Chat API",
5
5
  "homepage": "https://getstream.io/chat/",
6
6
  "author": {
@@ -231,13 +231,14 @@ export class ChannelManager extends WithSubscriptions {
231
231
  });
232
232
  const {
233
233
  channels,
234
- pagination: { filters, sort },
234
+ pagination: { filters, options, sort },
235
235
  } = this.state.getLatestValue();
236
236
  this.client.offlineDb?.executeQuerySafely(
237
237
  (db) =>
238
238
  db.upsertCidsForQuery({
239
239
  cids: channels.map((channel) => channel.cid),
240
240
  filters,
241
+ options,
241
242
  sort,
242
243
  }),
243
244
  { method: 'upsertCidsForQuery' },
@@ -304,6 +305,7 @@ export class ChannelManager extends WithSubscriptions {
304
305
  db.upsertCidsForQuery({
305
306
  cids: channels.map((channel) => channel.cid),
306
307
  filters: pagination.filters,
308
+ options,
307
309
  sort: pagination.sort,
308
310
  }),
309
311
  { method: 'upsertCidsForQuery' },
@@ -381,6 +383,7 @@ export class ChannelManager extends WithSubscriptions {
381
383
  const channelsFromDB = await this.client.offlineDb.getChannelsForQuery({
382
384
  userId: this.client.user.id,
383
385
  filters,
386
+ options,
384
387
  sort,
385
388
  });
386
389
 
@@ -3,6 +3,7 @@ import type {
3
3
  ChannelAPIResponse,
4
4
  ChannelFilters,
5
5
  ChannelMemberResponse,
6
+ ChannelOptions,
6
7
  ChannelResponse,
7
8
  ChannelSort,
8
9
  DraftResponse,
@@ -41,6 +42,8 @@ export type DBUpsertCidsForQueryType = {
41
42
  cids: string[];
42
43
  /** Optional filters for the channels. */
43
44
  filters?: ChannelFilters;
45
+ /** Optional full query options for the channels. */
46
+ options?: ChannelOptions;
44
47
  /** Whether to immediately execute the operation. */
45
48
  execute?: boolean;
46
49
  /** Optional sorting applied to the channels. */
@@ -177,6 +180,8 @@ export type DBGetChannelsForQueryType = {
177
180
  userId: string;
178
181
  /** Optional filters for channels. */
179
182
  filters?: ChannelFilters;
183
+ /** Optional full query options for channels. */
184
+ options?: ChannelOptions;
180
185
  /** Optional sorting for the channels. */
181
186
  sort?: ChannelSort;
182
187
  };