@stream-io/node-sdk 0.8.0 → 0.8.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.
@@ -221,7 +221,7 @@ export declare class VideoApi {
221
221
  limit?: number;
222
222
  prev?: string;
223
223
  next?: string;
224
- sort?: SortParamRequest[];
224
+ sort?: Array<SortParamRequest>;
225
225
  filter_conditions?: Record<string, any>;
226
226
  }): Promise<StreamResponse<QueryCallSessionParticipantStatsResponse>>;
227
227
  getCallSessionParticipantStatsTimeline(request: {
@@ -232,7 +232,7 @@ export declare class VideoApi {
232
232
  user_session: string;
233
233
  start_time?: string;
234
234
  end_time?: string;
235
- severity?: string[];
235
+ severity?: Array<string>;
236
236
  }): Promise<StreamResponse<QueryCallSessionParticipantStatsTimelineResponse>>;
237
237
  queryCalls(request?: QueryCallsRequest): Promise<StreamResponse<QueryCallsResponse>>;
238
238
  listCallTypes(): Promise<StreamResponse<ListCallTypeResponse>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -6,6 +6,7 @@ import {
6
6
  EventResponse,
7
7
  GetDraftResponse,
8
8
  GetManyMessagesResponse,
9
+ GetPinnedMessagesResponse,
9
10
  HideChannelRequest,
10
11
  HideChannelResponse,
11
12
  MarkReadRequest,
@@ -17,6 +18,7 @@ import {
17
18
  SendMessageResponse,
18
19
  ShowChannelRequest,
19
20
  ShowChannelResponse,
21
+ SortParamRequest,
20
22
  TruncateChannelRequest,
21
23
  TruncateChannelResponse,
22
24
  UpdateChannelPartialRequest,
@@ -64,6 +66,7 @@ export class ChannelApi {
64
66
  messages_id_gt?: string;
65
67
  messages_id_gte?: string;
66
68
  messages_id_around?: string;
69
+ user_id?: string;
67
70
  }): Promise<StreamResponse<ChannelStateResponse>> {
68
71
  if (!this.id) {
69
72
  throw new Error(
@@ -263,8 +266,8 @@ export class ChannelApi {
263
266
  }
264
267
 
265
268
  getManyMessages(request: {
266
- ids: string[];
267
- member_custom_include?: string[];
269
+ ids: Array<string>;
270
+ member_custom_include?: Array<string>;
268
271
  }): Promise<StreamResponse<GetManyMessagesResponse>> {
269
272
  if (!this.id) {
270
273
  throw new Error(
@@ -279,6 +282,36 @@ export class ChannelApi {
279
282
  });
280
283
  }
281
284
 
285
+ getPinnedMessages(request?: {
286
+ limit?: number;
287
+ offset?: number;
288
+ id_gte?: string;
289
+ id_gt?: string;
290
+ id_lte?: string;
291
+ id_lt?: string;
292
+ pinned_at_after_or_equal?: Date;
293
+ pinned_at_after?: Date;
294
+ pinned_at_before_or_equal?: Date;
295
+ pinned_at_before?: Date;
296
+ id_around?: string;
297
+ pinned_at_around?: Date;
298
+ user_id?: string;
299
+ sort?: Array<SortParamRequest>;
300
+ member_custom_include?: Array<string>;
301
+ }): Promise<StreamResponse<GetPinnedMessagesResponse>> {
302
+ if (!this.id) {
303
+ throw new Error(
304
+ `Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
305
+ );
306
+ }
307
+
308
+ return this.chatApi.getPinnedMessages({
309
+ id: this.id,
310
+ type: this.type,
311
+ ...request,
312
+ });
313
+ }
314
+
282
315
  getOrCreate(
283
316
  request?: ChannelGetOrCreateRequest,
284
317
  ): Promise<StreamResponse<ChannelStateResponse>> {