@stream-io/node-sdk 0.8.6 → 0.8.8

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.
@@ -1024,6 +1024,7 @@ export class CommonApi {
1024
1024
  id: request?.id,
1025
1025
  is_closed: request?.is_closed,
1026
1026
  max_votes_allowed: request?.max_votes_allowed,
1027
+ team: request?.team,
1027
1028
  user_id: request?.user_id,
1028
1029
  voting_visibility: request?.voting_visibility,
1029
1030
  options: request?.options,
@@ -1257,7 +1258,11 @@ export class CommonApi {
1257
1258
  async getPollOption(request: {
1258
1259
  poll_id: string;
1259
1260
  option_id: string;
1261
+ user_id?: string;
1260
1262
  }): Promise<StreamResponse<PollOptionResponse>> {
1263
+ const queryParams = {
1264
+ user_id: request?.user_id,
1265
+ };
1261
1266
  const pathParams = {
1262
1267
  poll_id: request?.poll_id,
1263
1268
  option_id: request?.option_id,
@@ -1269,7 +1274,7 @@ export class CommonApi {
1269
1274
  'GET',
1270
1275
  '/api/v2/polls/{poll_id}/options/{option_id}',
1271
1276
  pathParams,
1272
- undefined,
1277
+ queryParams,
1273
1278
  );
1274
1279
 
1275
1280
  decoders['PollOptionResponse']?.(response.body);
@@ -1440,6 +1445,8 @@ export class CommonApi {
1440
1445
  ios?: boolean;
1441
1446
  web?: boolean;
1442
1447
  unity?: boolean;
1448
+ unity_desktop?: boolean;
1449
+ unity_console?: boolean;
1443
1450
  endpoints?: string;
1444
1451
  }): Promise<StreamResponse<GetRateLimitsResponse>> {
1445
1452
  const queryParams = {
@@ -1448,6 +1455,8 @@ export class CommonApi {
1448
1455
  ios: request?.ios,
1449
1456
  web: request?.web,
1450
1457
  unity: request?.unity,
1458
+ unity_desktop: request?.unity_desktop,
1459
+ unity_console: request?.unity_console,
1451
1460
  endpoints: request?.endpoints,
1452
1461
  };
1453
1462
 
@@ -54,6 +54,7 @@ import {
54
54
  DeleteFeedViewResponse,
55
55
  DeleteFeedsBatchRequest,
56
56
  DeleteFeedsBatchResponse,
57
+ DeleteUserInterestsResponse,
57
58
  ExportFeedUserDataResponse,
58
59
  FollowBatchRequest,
59
60
  FollowBatchResponse,
@@ -174,6 +175,8 @@ import {
174
175
  UpsertActivitiesResponse,
175
176
  UpsertCollectionsRequest,
176
177
  UpsertCollectionsResponse,
178
+ UpsertUserInterestsRequest,
179
+ UpsertUserInterestsResponse,
177
180
  } from '../models';
178
181
  import { decoders } from '../model-decoders/decoders';
179
182
 
@@ -726,6 +729,7 @@ export class FeedsApi {
726
729
  id: string;
727
730
  comment_sort?: string;
728
731
  comment_limit?: number;
732
+ skip_own_followings?: boolean;
729
733
  user_id?: string;
730
734
  language?: string;
731
735
  translate_text?: boolean;
@@ -733,6 +737,7 @@ export class FeedsApi {
733
737
  const queryParams = {
734
738
  comment_sort: request?.comment_sort,
735
739
  comment_limit: request?.comment_limit,
740
+ skip_own_followings: request?.skip_own_followings,
736
741
  user_id: request?.user_id,
737
742
  language: request?.language,
738
743
  translate_text: request?.translate_text,
@@ -1252,6 +1257,7 @@ export class FeedsApi {
1252
1257
  const body = {
1253
1258
  filter: request?.filter,
1254
1259
  id_around: request?.id_around,
1260
+ include_soft_deleted_comments: request?.include_soft_deleted_comments,
1255
1261
  limit: request?.limit,
1256
1262
  next: request?.next,
1257
1263
  prev: request?.prev,
@@ -1720,6 +1726,7 @@ export class FeedsApi {
1720
1726
  activity_processors: request?.activity_processors,
1721
1727
  activity_selectors: request?.activity_selectors,
1722
1728
  activity_filter: request?.activity_filter,
1729
+ activity_marks: request?.activity_marks,
1723
1730
  activity_processing: request?.activity_processing,
1724
1731
  aggregation: request?.aggregation,
1725
1732
  custom: request?.custom,
@@ -2282,6 +2289,7 @@ export class FeedsApi {
2282
2289
  activity_processors: request?.activity_processors,
2283
2290
  activity_selectors: request?.activity_selectors,
2284
2291
  activity_filter: request?.activity_filter,
2292
+ activity_marks: request?.activity_marks,
2285
2293
  activity_processing: request?.activity_processing,
2286
2294
  aggregation: request?.aggregation,
2287
2295
  custom: request?.custom,
@@ -2319,6 +2327,7 @@ export class FeedsApi {
2319
2327
  activity_processors: request?.activity_processors,
2320
2328
  activity_selectors: request?.activity_selectors,
2321
2329
  activity_filter: request?.activity_filter,
2330
+ activity_marks: request?.activity_marks,
2322
2331
  activity_processing: request?.activity_processing,
2323
2332
  aggregation: request?.aggregation,
2324
2333
  custom: request?.custom,
@@ -2633,6 +2642,8 @@ export class FeedsApi {
2633
2642
  ios?: boolean;
2634
2643
  web?: boolean;
2635
2644
  unity?: boolean;
2645
+ unity_desktop?: boolean;
2646
+ unity_console?: boolean;
2636
2647
  server_side?: boolean;
2637
2648
  }): Promise<StreamResponse<GetFeedsRateLimitsResponse>> {
2638
2649
  const queryParams = {
@@ -2641,6 +2652,8 @@ export class FeedsApi {
2641
2652
  ios: request?.ios,
2642
2653
  web: request?.web,
2643
2654
  unity: request?.unity,
2655
+ unity_desktop: request?.unity_desktop,
2656
+ unity_console: request?.unity_console,
2644
2657
  server_side: request?.server_side,
2645
2658
  };
2646
2659
 
@@ -3184,6 +3197,31 @@ export class FeedsApi {
3184
3197
  return { ...response.body, metadata: response.metadata };
3185
3198
  }
3186
3199
 
3200
+ async deleteUserInterests(request: {
3201
+ user_id: string;
3202
+ tags: Array<string>;
3203
+ }): Promise<StreamResponse<DeleteUserInterestsResponse>> {
3204
+ const queryParams = {
3205
+ tags: request?.tags,
3206
+ };
3207
+ const pathParams = {
3208
+ user_id: request?.user_id,
3209
+ };
3210
+
3211
+ const response = await this.apiClient.sendRequest<
3212
+ StreamResponse<DeleteUserInterestsResponse>
3213
+ >(
3214
+ 'DELETE',
3215
+ '/api/v2/feeds/users/{user_id}/interests',
3216
+ pathParams,
3217
+ queryParams,
3218
+ );
3219
+
3220
+ decoders['DeleteUserInterestsResponse']?.(response.body);
3221
+
3222
+ return { ...response.body, metadata: response.metadata };
3223
+ }
3224
+
3187
3225
  async getUserInterests(request: {
3188
3226
  user_id: string;
3189
3227
  limit?: number;
@@ -3208,4 +3246,30 @@ export class FeedsApi {
3208
3246
 
3209
3247
  return { ...response.body, metadata: response.metadata };
3210
3248
  }
3249
+
3250
+ async upsertUserInterests(
3251
+ request: UpsertUserInterestsRequest & { user_id: string },
3252
+ ): Promise<StreamResponse<UpsertUserInterestsResponse>> {
3253
+ const pathParams = {
3254
+ user_id: request?.user_id,
3255
+ };
3256
+ const body = {
3257
+ interests: request?.interests,
3258
+ };
3259
+
3260
+ const response = await this.apiClient.sendRequest<
3261
+ StreamResponse<UpsertUserInterestsResponse>
3262
+ >(
3263
+ 'PUT',
3264
+ '/api/v2/feeds/users/{user_id}/interests',
3265
+ pathParams,
3266
+ undefined,
3267
+ body,
3268
+ 'application/json',
3269
+ );
3270
+
3271
+ decoders['UpsertUserInterestsResponse']?.(response.body);
3272
+
3273
+ return { ...response.body, metadata: response.metadata };
3274
+ }
3211
3275
  }
@@ -1868,15 +1868,6 @@ decoders['CheckResponse'] = (input?: { [key: string]: any }) => {
1868
1868
  return decode(typeMappings, input);
1869
1869
  };
1870
1870
 
1871
- decoders['ClientEvent'] = (input?: { [key: string]: any }) => {
1872
- const typeMappings: TypeMapping = {
1873
- previously_connected_timestamp: { type: 'DatetimeType', isSingle: true },
1874
-
1875
- timestamp: { type: 'DatetimeType', isSingle: true },
1876
- };
1877
- return decode(typeMappings, input);
1878
- };
1879
-
1880
1871
  decoders['ClosedCaptionEvent'] = (input?: { [key: string]: any }) => {
1881
1872
  const typeMappings: TypeMapping = {
1882
1873
  created_at: { type: 'DatetimeType', isSingle: true },