@stream-io/node-sdk 0.6.6 → 0.7.0

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,5 +1,5 @@
1
1
  import { ApiClient, StreamResponse } from '../../gen-imports';
2
- import { CampaignResponse, CastPollVoteRequest, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreateReminderRequest, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, DeleteReactionResponse, DeleteReminderResponse, DeleteSegmentTargetsRequest, EventResponse, ExportChannelsRequest, ExportChannelsResponse, FileUploadRequest, FileUploadResponse, GetCampaignResponse, GetChannelTypeResponse, GetCommandResponse, GetDraftResponse, GetManyMessagesResponse, GetMessageResponse, GetPushTemplatesResponse, GetReactionsResponse, GetRepliesResponse, GetSegmentResponse, GetThreadResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageResponse, MuteChannelRequest, MuteChannelResponse, PollVoteResponse, QueryBannedUsersPayload, QueryBannedUsersResponse, QueryCampaignsRequest, QueryCampaignsResponse, QueryChannelsRequest, QueryChannelsResponse, QueryDraftsRequest, QueryDraftsResponse, QueryMembersPayload, QueryMessageFlagsPayload, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryReactionsRequest, QueryReactionsResponse, QueryRemindersRequest, QueryRemindersResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, QueryThreadsRequest, QueryThreadsResponse, ReminderResponseData, Response, SearchPayload, SearchResponse, SendEventRequest, SendMessageRequest, SendMessageResponse, SendReactionRequest, SendReactionResponse, SendUserCustomEventRequest, ShowChannelRequest, ShowChannelResponse, SortParamRequest, StartCampaignRequest, StartCampaignResponse, StopCampaignRequest, TranslateMessageRequest, TruncateChannelRequest, TruncateChannelResponse, UnmuteChannelRequest, UnmuteResponse, UnreadCountsBatchRequest, UnreadCountsBatchResponse, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateChannelTypeRequest, UpdateChannelTypeResponse, UpdateCommandRequest, UpdateCommandResponse, UpdateMemberPartialRequest, UpdateMemberPartialResponse, UpdateMessagePartialRequest, UpdateMessagePartialResponse, UpdateMessageRequest, UpdateMessageResponse, UpdateReminderRequest, UpdateReminderResponse, UpdateThreadPartialRequest, UpdateThreadPartialResponse, UpsertPushPreferencesRequest, UpsertPushPreferencesResponse, UpsertPushTemplateRequest, UpsertPushTemplateResponse, WrappedUnreadCountsResponse } from '../models';
2
+ import { CampaignResponse, CastPollVoteRequest, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreateReminderRequest, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, DeleteReactionResponse, DeleteReminderResponse, DeleteSegmentTargetsRequest, EventResponse, ExportChannelsRequest, ExportChannelsResponse, FileUploadRequest, FileUploadResponse, GetCampaignResponse, GetChannelTypeResponse, GetCommandResponse, GetDraftResponse, GetManyMessagesResponse, GetMessageResponse, GetReactionsResponse, GetRepliesResponse, GetSegmentResponse, GetThreadResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageResponse, MuteChannelRequest, MuteChannelResponse, PollVoteResponse, QueryBannedUsersPayload, QueryBannedUsersResponse, QueryCampaignsRequest, QueryCampaignsResponse, QueryChannelsRequest, QueryChannelsResponse, QueryDraftsRequest, QueryDraftsResponse, QueryMembersPayload, QueryMessageFlagsPayload, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryReactionsRequest, QueryReactionsResponse, QueryRemindersRequest, QueryRemindersResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, QueryThreadsRequest, QueryThreadsResponse, ReminderResponseData, Response, SearchPayload, SearchResponse, SendEventRequest, SendMessageRequest, SendMessageResponse, SendReactionRequest, SendReactionResponse, SendUserCustomEventRequest, ShowChannelRequest, ShowChannelResponse, SortParamRequest, StartCampaignRequest, StartCampaignResponse, StopCampaignRequest, TranslateMessageRequest, TruncateChannelRequest, TruncateChannelResponse, UnmuteChannelRequest, UnmuteResponse, UnreadCountsBatchRequest, UnreadCountsBatchResponse, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateChannelTypeRequest, UpdateChannelTypeResponse, UpdateCommandRequest, UpdateCommandResponse, UpdateMemberPartialRequest, UpdateMemberPartialResponse, UpdateMessagePartialRequest, UpdateMessagePartialResponse, UpdateMessageRequest, UpdateMessageResponse, UpdateReminderRequest, UpdateReminderResponse, UpdateThreadPartialRequest, UpdateThreadPartialResponse, WrappedUnreadCountsResponse } from '../models';
3
3
  export declare class ChatApi {
4
4
  readonly apiClient: ApiClient;
5
5
  constructor(apiClient: ApiClient);
@@ -157,6 +157,9 @@ export declare class ChatApi {
157
157
  commitMessage(request: CommitMessageRequest & {
158
158
  id: string;
159
159
  }): Promise<StreamResponse<MessageResponse>>;
160
+ ephemeralMessageUpdate(request: UpdateMessagePartialRequest & {
161
+ id: string;
162
+ }): Promise<StreamResponse<UpdateMessagePartialResponse>>;
160
163
  sendReaction(request: SendReactionRequest & {
161
164
  id: string;
162
165
  }): Promise<StreamResponse<SendReactionResponse>>;
@@ -220,12 +223,6 @@ export declare class ChatApi {
220
223
  }): Promise<StreamResponse<QueryMessageFlagsResponse>>;
221
224
  muteChannel(request?: MuteChannelRequest): Promise<StreamResponse<MuteChannelResponse>>;
222
225
  unmuteChannel(request?: UnmuteChannelRequest): Promise<StreamResponse<UnmuteResponse>>;
223
- updatePushNotificationPreferences(request: UpsertPushPreferencesRequest): Promise<StreamResponse<UpsertPushPreferencesResponse>>;
224
- getPushTemplates(request: {
225
- push_provider_type: string;
226
- push_provider_name?: string;
227
- }): Promise<StreamResponse<GetPushTemplatesResponse>>;
228
- upsertPushTemplate(request: UpsertPushTemplateRequest): Promise<StreamResponse<UpsertPushTemplateResponse>>;
229
226
  queryBannedUsers(request?: {
230
227
  payload?: QueryBannedUsersPayload;
231
228
  }): Promise<StreamResponse<QueryBannedUsersResponse>>;
@@ -1,5 +1,5 @@
1
1
  import { ApiClient, StreamResponse } from '../../gen-imports';
2
- import { BlockUsersRequest, BlockUsersResponse, CheckExternalStorageResponse, CheckPushRequest, CheckPushResponse, CheckSNSRequest, CheckSNSResponse, CheckSQSRequest, CheckSQSResponse, CreateBlockListRequest, CreateBlockListResponse, CreateDeviceRequest, CreateExternalStorageRequest, CreateExternalStorageResponse, CreateGuestRequest, CreateGuestResponse, CreateImportRequest, CreateImportResponse, CreateImportURLRequest, CreateImportURLResponse, CreatePollOptionRequest, CreatePollRequest, CreateRoleRequest, CreateRoleResponse, DeactivateUserRequest, DeactivateUserResponse, DeactivateUsersRequest, DeactivateUsersResponse, DeleteExternalStorageResponse, DeleteUsersRequest, DeleteUsersResponse, ExportUserResponse, ExportUsersRequest, ExportUsersResponse, FileUploadRequest, FileUploadResponse, GetApplicationResponse, GetBlockListResponse, GetBlockedUsersResponse, GetCustomPermissionResponse, GetImportResponse, GetOGResponse, GetRateLimitsResponse, GetTaskResponse, ImageUploadRequest, ImageUploadResponse, ListBlockListResponse, ListDevicesResponse, ListExternalStorageResponse, ListImportsResponse, ListPermissionsResponse, ListPushProvidersResponse, ListRolesResponse, PollOptionResponse, PollResponse, PollVotesResponse, QueryPollVotesRequest, QueryPollsRequest, QueryPollsResponse, QueryUsersPayload, QueryUsersResponse, ReactivateUserRequest, ReactivateUserResponse, ReactivateUsersRequest, ReactivateUsersResponse, Response, RestoreUsersRequest, SharedLocationResponse, SharedLocationsResponse, UnblockUsersRequest, UnblockUsersResponse, UpdateAppRequest, UpdateBlockListRequest, UpdateBlockListResponse, UpdateExternalStorageRequest, UpdateExternalStorageResponse, UpdateLiveLocationRequest, UpdatePollOptionRequest, UpdatePollPartialRequest, UpdatePollRequest, UpdateUsersPartialRequest, UpdateUsersRequest, UpdateUsersResponse, UpsertPushProviderRequest, UpsertPushProviderResponse } from '../models';
2
+ import { BlockUsersRequest, BlockUsersResponse, CheckExternalStorageResponse, CheckPushRequest, CheckPushResponse, CheckSNSRequest, CheckSNSResponse, CheckSQSRequest, CheckSQSResponse, CreateBlockListRequest, CreateBlockListResponse, CreateDeviceRequest, CreateExternalStorageRequest, CreateExternalStorageResponse, CreateGuestRequest, CreateGuestResponse, CreateImportRequest, CreateImportResponse, CreateImportURLRequest, CreateImportURLResponse, CreatePollOptionRequest, CreatePollRequest, CreateRoleRequest, CreateRoleResponse, DeactivateUserRequest, DeactivateUserResponse, DeactivateUsersRequest, DeactivateUsersResponse, DeleteExternalStorageResponse, DeleteUsersRequest, DeleteUsersResponse, ExportUserResponse, ExportUsersRequest, ExportUsersResponse, FileUploadRequest, FileUploadResponse, GetApplicationResponse, GetBlockListResponse, GetBlockedUsersResponse, GetCustomPermissionResponse, GetImportResponse, GetOGResponse, GetPushTemplatesResponse, GetRateLimitsResponse, GetTaskResponse, ImageUploadRequest, ImageUploadResponse, ListBlockListResponse, ListDevicesResponse, ListExternalStorageResponse, ListImportsResponse, ListPermissionsResponse, ListPushProvidersResponse, ListRolesResponse, PollOptionResponse, PollResponse, PollVotesResponse, QueryPollVotesRequest, QueryPollsRequest, QueryPollsResponse, QueryUsersPayload, QueryUsersResponse, ReactivateUserRequest, ReactivateUserResponse, ReactivateUsersRequest, ReactivateUsersResponse, Response, RestoreUsersRequest, SharedLocationResponse, SharedLocationsResponse, UnblockUsersRequest, UnblockUsersResponse, UpdateAppRequest, UpdateBlockListRequest, UpdateBlockListResponse, UpdateExternalStorageRequest, UpdateExternalStorageResponse, UpdateLiveLocationRequest, UpdatePollOptionRequest, UpdatePollPartialRequest, UpdatePollRequest, UpdateUsersPartialRequest, UpdateUsersRequest, UpdateUsersResponse, UpsertPushPreferencesRequest, UpsertPushPreferencesResponse, UpsertPushProviderRequest, UpsertPushProviderResponse, UpsertPushTemplateRequest, UpsertPushTemplateResponse } from '../models';
3
3
  export declare class CommonApi {
4
4
  readonly apiClient: ApiClient;
5
5
  constructor(apiClient: ApiClient);
@@ -93,12 +93,18 @@ export declare class CommonApi {
93
93
  poll_id: string;
94
94
  user_id?: string;
95
95
  }): Promise<StreamResponse<PollVotesResponse>>;
96
+ updatePushNotificationPreferences(request: UpsertPushPreferencesRequest): Promise<StreamResponse<UpsertPushPreferencesResponse>>;
96
97
  listPushProviders(): Promise<StreamResponse<ListPushProvidersResponse>>;
97
98
  upsertPushProvider(request?: UpsertPushProviderRequest): Promise<StreamResponse<UpsertPushProviderResponse>>;
98
99
  deletePushProvider(request: {
99
100
  type: string;
100
101
  name: string;
101
102
  }): Promise<StreamResponse<Response>>;
103
+ getPushTemplates(request: {
104
+ push_provider_type: string;
105
+ push_provider_name?: string;
106
+ }): Promise<StreamResponse<GetPushTemplatesResponse>>;
107
+ upsertPushTemplate(request: UpsertPushTemplateRequest): Promise<StreamResponse<UpsertPushTemplateResponse>>;
102
108
  getRateLimits(request?: {
103
109
  server_side?: boolean;
104
110
  android?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ApiClient, StreamResponse } from '../../gen-imports';
2
- import { AcceptFeedMemberInviteRequest, AcceptFeedMemberInviteResponse, AcceptFollowRequest, AcceptFollowResponse, ActivityFeedbackRequest, ActivityFeedbackResponse, AddActivityRequest, AddActivityResponse, AddBookmarkRequest, AddBookmarkResponse, AddCommentReactionRequest, AddCommentReactionResponse, AddCommentRequest, AddCommentResponse, AddCommentsBatchRequest, AddCommentsBatchResponse, AddReactionRequest, AddReactionResponse, CastPollVoteRequest, CreateFeedGroupRequest, CreateFeedGroupResponse, CreateFeedViewRequest, CreateFeedViewResponse, CreateFeedsBatchRequest, CreateFeedsBatchResponse, CreateMembershipLevelRequest, CreateMembershipLevelResponse, DeleteActivitiesRequest, DeleteActivitiesResponse, DeleteActivityReactionResponse, DeleteActivityResponse, DeleteBookmarkFolderResponse, DeleteBookmarkResponse, DeleteCommentReactionResponse, DeleteCommentResponse, DeleteFeedGroupResponse, DeleteFeedResponse, DeleteFeedUserDataResponse, DeleteFeedViewResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, FollowRequest, GetActivityResponse, GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFollowSuggestionsResponse, GetOrCreateFeedGroupRequest, GetOrCreateFeedGroupResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, GetOrCreateFeedViewRequest, GetOrCreateFeedViewResponse, ListFeedGroupsResponse, ListFeedViewsResponse, MarkActivityRequest, PinActivityRequest, PinActivityResponse, PollVoteResponse, QueryActivitiesRequest, QueryActivitiesResponse, QueryActivityReactionsRequest, QueryActivityReactionsResponse, QueryBookmarkFoldersRequest, QueryBookmarkFoldersResponse, QueryBookmarksRequest, QueryBookmarksResponse, QueryCommentReactionsRequest, QueryCommentReactionsResponse, QueryCommentsRequest, QueryCommentsResponse, QueryFeedMembersRequest, QueryFeedMembersResponse, QueryFeedsRequest, QueryFeedsResponse, QueryFollowsRequest, QueryFollowsResponse, QueryMembershipLevelsRequest, QueryMembershipLevelsResponse, RejectFeedMemberInviteRequest, RejectFeedMemberInviteResponse, RejectFollowRequest, RejectFollowResponse, Response, SingleFollowResponse, UnfollowBatchRequest, UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, UpdateActivityResponse, UpdateBookmarkFolderRequest, UpdateBookmarkFolderResponse, UpdateBookmarkRequest, UpdateBookmarkResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateFeedGroupRequest, UpdateFeedGroupResponse, UpdateFeedMembersRequest, UpdateFeedMembersResponse, UpdateFeedRequest, UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, UpdateMembershipLevelResponse, UpsertActivitiesRequest, UpsertActivitiesResponse } from '../models';
2
+ import { AcceptFeedMemberInviteRequest, AcceptFeedMemberInviteResponse, AcceptFollowRequest, AcceptFollowResponse, ActivityFeedbackRequest, ActivityFeedbackResponse, AddActivityRequest, AddActivityResponse, AddBookmarkRequest, AddBookmarkResponse, AddCommentReactionRequest, AddCommentReactionResponse, AddCommentRequest, AddCommentResponse, AddCommentsBatchRequest, AddCommentsBatchResponse, AddReactionRequest, AddReactionResponse, CastPollVoteRequest, CreateFeedGroupRequest, CreateFeedGroupResponse, CreateFeedViewRequest, CreateFeedViewResponse, CreateFeedsBatchRequest, CreateFeedsBatchResponse, CreateMembershipLevelRequest, CreateMembershipLevelResponse, DeleteActivitiesRequest, DeleteActivitiesResponse, DeleteActivityReactionResponse, DeleteActivityResponse, DeleteBookmarkFolderResponse, DeleteBookmarkResponse, DeleteCommentReactionResponse, DeleteCommentResponse, DeleteFeedGroupResponse, DeleteFeedResponse, DeleteFeedUserDataResponse, DeleteFeedViewResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, FollowRequest, GetActivityResponse, GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFeedVisibilityResponse, GetFollowSuggestionsResponse, GetOrCreateFeedGroupRequest, GetOrCreateFeedGroupResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, GetOrCreateFeedViewRequest, GetOrCreateFeedViewResponse, ListFeedGroupsResponse, ListFeedViewsResponse, ListFeedVisibilitiesResponse, MarkActivityRequest, PinActivityRequest, PinActivityResponse, PollVoteResponse, QueryActivitiesRequest, QueryActivitiesResponse, QueryActivityReactionsRequest, QueryActivityReactionsResponse, QueryBookmarkFoldersRequest, QueryBookmarkFoldersResponse, QueryBookmarksRequest, QueryBookmarksResponse, QueryCommentReactionsRequest, QueryCommentReactionsResponse, QueryCommentsRequest, QueryCommentsResponse, QueryFeedMembersRequest, QueryFeedMembersResponse, QueryFeedsRequest, QueryFeedsResponse, QueryFollowsRequest, QueryFollowsResponse, QueryMembershipLevelsRequest, QueryMembershipLevelsResponse, RejectFeedMemberInviteRequest, RejectFeedMemberInviteResponse, RejectFollowRequest, RejectFollowResponse, Response, SingleFollowResponse, UnfollowBatchRequest, UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, UpdateActivityResponse, UpdateBookmarkFolderRequest, UpdateBookmarkFolderResponse, UpdateBookmarkRequest, UpdateBookmarkResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateFeedGroupRequest, UpdateFeedGroupResponse, UpdateFeedMembersRequest, UpdateFeedMembersResponse, UpdateFeedRequest, UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, UpdateMembershipLevelResponse, UpsertActivitiesRequest, UpsertActivitiesResponse } from '../models';
3
3
  export declare class FeedsApi {
4
4
  readonly apiClient: ApiClient;
5
5
  constructor(apiClient: ApiClient);
@@ -184,6 +184,10 @@ export declare class FeedsApi {
184
184
  updateFeedView(request: UpdateFeedViewRequest & {
185
185
  id: string;
186
186
  }): Promise<StreamResponse<UpdateFeedViewResponse>>;
187
+ listFeedVisibilities(): Promise<StreamResponse<ListFeedVisibilitiesResponse>>;
188
+ getFeedVisibility(request: {
189
+ name: string;
190
+ }): Promise<StreamResponse<GetFeedVisibilityResponse>>;
187
191
  createFeedsBatch(request: CreateFeedsBatchRequest): Promise<StreamResponse<CreateFeedsBatchResponse>>;
188
192
  protected _queryFeeds(request?: QueryFeedsRequest): Promise<StreamResponse<QueryFeedsResponse>>;
189
193
  updateFollow(request: UpdateFollowRequest): Promise<StreamResponse<UpdateFollowResponse>>;
@@ -327,7 +327,7 @@ export interface ActivityResponse {
327
327
  current_feed?: FeedResponse;
328
328
  location?: ActivityLocation;
329
329
  moderation?: ModerationV2Response;
330
- notification_context?: Record<string, any>;
330
+ notification_context?: NotificationContext;
331
331
  parent?: ActivityResponse;
332
332
  poll?: PollResponseData;
333
333
  }
@@ -395,6 +395,7 @@ export interface AddBookmarkResponse {
395
395
  export interface AddCommentReactionRequest {
396
396
  type: string;
397
397
  create_notification_activity?: boolean;
398
+ enforce_unique?: boolean;
398
399
  skip_push?: boolean;
399
400
  user_id?: string;
400
401
  custom?: Record<string, any>;
@@ -436,6 +437,7 @@ export interface AddFolderRequest {
436
437
  export interface AddReactionRequest {
437
438
  type: string;
438
439
  create_notification_activity?: boolean;
440
+ enforce_unique?: boolean;
439
441
  skip_push?: boolean;
440
442
  user_id?: string;
441
443
  custom?: Record<string, any>;
@@ -690,6 +692,7 @@ export interface BanActionRequest {
690
692
  timeout?: number;
691
693
  }
692
694
  export interface BanOptions {
695
+ delete_messages?: 'soft' | 'pruning' | 'hard';
693
696
  duration?: number;
694
697
  ip_ban?: boolean;
695
698
  reason?: string;
@@ -715,9 +718,6 @@ export interface BanResponse {
715
718
  channel?: ChannelResponse;
716
719
  user?: UserResponse;
717
720
  }
718
- export interface BlockContentOptions {
719
- reason?: string;
720
- }
721
721
  export interface BlockListConfig {
722
722
  async?: boolean;
723
723
  enabled?: boolean;
@@ -1026,6 +1026,8 @@ export interface CallHLSBroadcastingStoppedEvent {
1026
1026
  }
1027
1027
  export interface CallIngressResponse {
1028
1028
  rtmp: RTMPIngress;
1029
+ srt: SRTIngress;
1030
+ whip: WHIPIngress;
1029
1031
  }
1030
1032
  export interface CallLiveStartedEvent {
1031
1033
  call_cid: string;
@@ -1211,6 +1213,7 @@ export interface CallResponse {
1211
1213
  id: string;
1212
1214
  recording: boolean;
1213
1215
  transcribing: boolean;
1216
+ translating: boolean;
1214
1217
  type: string;
1215
1218
  updated_at: Date;
1216
1219
  blocked_user_ids: string[];
@@ -1307,6 +1310,7 @@ export interface CallSessionParticipantLeftEvent {
1307
1310
  session_id: string;
1308
1311
  participant: CallParticipantResponse;
1309
1312
  type: string;
1313
+ reason?: string;
1310
1314
  }
1311
1315
  export interface CallSessionResponse {
1312
1316
  anonymous_participant_count: number;
@@ -1473,6 +1477,7 @@ export interface CallUserMutedEvent {
1473
1477
  call_cid: string;
1474
1478
  created_at: Date;
1475
1479
  from_user_id: string;
1480
+ reason: string;
1476
1481
  muted_user_ids: string[];
1477
1482
  type: string;
1478
1483
  }
@@ -1510,6 +1515,7 @@ export interface CampaignResponse {
1510
1515
  name: string;
1511
1516
  sender_id: string;
1512
1517
  sender_mode: string;
1518
+ sender_visibility: string;
1513
1519
  show_channels: boolean;
1514
1520
  skip_push: boolean;
1515
1521
  skip_webhook: boolean;
@@ -1572,6 +1578,7 @@ export interface Channel {
1572
1578
  config?: ChannelConfig;
1573
1579
  config_overrides?: ConfigOverrides;
1574
1580
  created_by?: User;
1581
+ members_lookup?: Record<string, ChannelMemberLookup>;
1575
1582
  truncated_by?: User;
1576
1583
  }
1577
1584
  export interface ChannelConfig {
@@ -1729,6 +1736,15 @@ export interface ChannelMember {
1729
1736
  deleted_messages?: string[];
1730
1737
  user?: UserResponse;
1731
1738
  }
1739
+ export interface ChannelMemberLookup {
1740
+ archived: boolean;
1741
+ banned: boolean;
1742
+ hidden: boolean;
1743
+ pinned: boolean;
1744
+ archived_at?: Date;
1745
+ ban_expires?: Date;
1746
+ pinned_at?: Date;
1747
+ }
1732
1748
  export interface ChannelMemberResponse {
1733
1749
  channel_role: string;
1734
1750
  }
@@ -2153,6 +2169,7 @@ export interface ConfigResponse {
2153
2169
  key: string;
2154
2170
  team: string;
2155
2171
  updated_at: Date;
2172
+ supported_video_call_harm_types: string[];
2156
2173
  ai_image_config?: AIImageConfig;
2157
2174
  ai_text_config?: AITextConfig;
2158
2175
  ai_video_config?: AIVideoConfig;
@@ -2554,6 +2571,8 @@ export interface DeleteCommentReactionResponse {
2554
2571
  }
2555
2572
  export interface DeleteCommentResponse {
2556
2573
  duration: string;
2574
+ activity: ActivityResponse;
2575
+ comment: CommentResponse;
2557
2576
  }
2558
2577
  export interface DeleteExternalStorageResponse {
2559
2578
  duration: string;
@@ -2562,7 +2581,6 @@ export interface DeleteFeedGroupResponse {
2562
2581
  duration: string;
2563
2582
  }
2564
2583
  export interface DeleteFeedResponse {
2565
- delete_feed_task_id: string;
2566
2584
  duration: string;
2567
2585
  task_id: string;
2568
2586
  }
@@ -3039,35 +3057,34 @@ export interface FeedMemberUpdatedEvent {
3039
3057
  }
3040
3058
  export declare const FeedOwnCapability: {
3041
3059
  readonly ADD_ACTIVITY: "add-activity";
3060
+ readonly ADD_ACTIVITY_BOOKMARK: "add-activity-bookmark";
3042
3061
  readonly ADD_ACTIVITY_REACTION: "add-activity-reaction";
3043
3062
  readonly ADD_COMMENT: "add-comment";
3044
3063
  readonly ADD_COMMENT_REACTION: "add-comment-reaction";
3045
- readonly BOOKMARK_ACTIVITY: "bookmark-activity";
3046
3064
  readonly CREATE_FEED: "create-feed";
3047
- readonly DELETE_BOOKMARK: "delete-bookmark";
3048
- readonly DELETE_COMMENT: "delete-comment";
3065
+ readonly DELETE_ANY_ACTIVITY: "delete-any-activity";
3066
+ readonly DELETE_ANY_COMMENT: "delete-any-comment";
3049
3067
  readonly DELETE_FEED: "delete-feed";
3050
- readonly EDIT_BOOKMARK: "edit-bookmark";
3068
+ readonly DELETE_OWN_ACTIVITY: "delete-own-activity";
3069
+ readonly DELETE_OWN_ACTIVITY_BOOKMARK: "delete-own-activity-bookmark";
3070
+ readonly DELETE_OWN_ACTIVITY_REACTION: "delete-own-activity-reaction";
3071
+ readonly DELETE_OWN_COMMENT: "delete-own-comment";
3072
+ readonly DELETE_OWN_COMMENT_REACTION: "delete-own-comment-reaction";
3051
3073
  readonly FOLLOW: "follow";
3052
- readonly INVITE_FEED: "invite-feed";
3053
- readonly JOIN_FEED: "join-feed";
3054
- readonly LEAVE_FEED: "leave-feed";
3055
- readonly MANAGE_FEED_GROUP: "manage-feed-group";
3056
- readonly MARK_ACTIVITY: "mark-activity";
3057
3074
  readonly PIN_ACTIVITY: "pin-activity";
3058
3075
  readonly QUERY_FEED_MEMBERS: "query-feed-members";
3059
3076
  readonly QUERY_FOLLOWS: "query-follows";
3060
3077
  readonly READ_ACTIVITIES: "read-activities";
3061
3078
  readonly READ_FEED: "read-feed";
3062
- readonly REMOVE_ACTIVITY: "remove-activity";
3063
- readonly REMOVE_ACTIVITY_REACTION: "remove-activity-reaction";
3064
- readonly REMOVE_COMMENT_REACTION: "remove-comment-reaction";
3065
3079
  readonly UNFOLLOW: "unfollow";
3066
- readonly UPDATE_ACTIVITY: "update-activity";
3067
- readonly UPDATE_COMMENT: "update-comment";
3080
+ readonly UPDATE_ANY_ACTIVITY: "update-any-activity";
3081
+ readonly UPDATE_ANY_COMMENT: "update-any-comment";
3068
3082
  readonly UPDATE_FEED: "update-feed";
3069
3083
  readonly UPDATE_FEED_FOLLOWERS: "update-feed-followers";
3070
3084
  readonly UPDATE_FEED_MEMBERS: "update-feed-members";
3085
+ readonly UPDATE_OWN_ACTIVITY: "update-own-activity";
3086
+ readonly UPDATE_OWN_ACTIVITY_BOOKMARK: "update-own-activity-bookmark";
3087
+ readonly UPDATE_OWN_COMMENT: "update-own-comment";
3071
3088
  };
3072
3089
  export type FeedOwnCapability = (typeof FeedOwnCapability)[keyof typeof FeedOwnCapability];
3073
3090
  export interface FeedRequest {
@@ -3097,8 +3114,10 @@ export interface FeedResponse {
3097
3114
  deleted_at?: Date;
3098
3115
  visibility?: string;
3099
3116
  filter_tags?: string[];
3117
+ own_capabilities?: FeedOwnCapability[];
3100
3118
  own_follows?: FollowResponse[];
3101
3119
  custom?: Record<string, any>;
3120
+ own_membership?: FeedMemberResponse;
3102
3121
  }
3103
3122
  export interface FeedUpdatedEvent {
3104
3123
  created_at: Date;
@@ -3118,16 +3137,21 @@ export interface FeedViewResponse {
3118
3137
  aggregation?: AggregationConfig;
3119
3138
  ranking?: RankingConfig;
3120
3139
  }
3140
+ export interface FeedVisibilityResponse {
3141
+ description: string;
3142
+ name: string;
3143
+ grants: Record<string, string[]>;
3144
+ }
3121
3145
  export interface FeedsModerationTemplateConfig {
3122
3146
  config_key: string;
3123
3147
  data_types: Record<string, string>;
3124
3148
  }
3125
3149
  export interface FeedsPreferences {
3126
- comment?: string;
3127
- comment_reaction?: string;
3128
- follow?: string;
3129
- mention?: string;
3130
- reaction?: string;
3150
+ comment?: 'all' | 'none';
3151
+ comment_reaction?: 'all' | 'none';
3152
+ follow?: 'all' | 'none';
3153
+ mention?: 'all' | 'none';
3154
+ reaction?: 'all' | 'none';
3131
3155
  custom_activity_types?: Record<string, string>;
3132
3156
  }
3133
3157
  export interface FeedsReactionResponse {
@@ -3194,9 +3218,6 @@ export interface Flag {
3194
3218
  review_queue_item?: ReviewQueueItem;
3195
3219
  user?: User;
3196
3220
  }
3197
- export interface FlagContentOptions {
3198
- reason?: string;
3199
- }
3200
3221
  export interface FlagDetails {
3201
3222
  original_text: string;
3202
3223
  extra: Record<string, any>;
@@ -3397,6 +3418,7 @@ export interface GetCallReportResponse {
3397
3418
  report: ReportResponse;
3398
3419
  video_reactions?: VideoReactionsResponse[];
3399
3420
  chat_activity?: ChatActivityStatsResponse;
3421
+ session?: CallSessionResponse;
3400
3422
  }
3401
3423
  export interface GetCallResponse {
3402
3424
  duration: string;
@@ -3506,6 +3528,10 @@ export interface GetFeedViewResponse {
3506
3528
  duration: string;
3507
3529
  feed_view: FeedViewResponse;
3508
3530
  }
3531
+ export interface GetFeedVisibilityResponse {
3532
+ duration: string;
3533
+ feed_visibility: FeedVisibilityResponse;
3534
+ }
3509
3535
  export interface GetFollowSuggestionsResponse {
3510
3536
  duration: string;
3511
3537
  suggestions: FeedResponse[];
@@ -3606,17 +3632,14 @@ export interface GetOrCreateFeedResponse {
3606
3632
  followers: FollowResponse[];
3607
3633
  following: FollowResponse[];
3608
3634
  members: FeedMemberResponse[];
3609
- own_capabilities: FeedOwnCapability[];
3610
3635
  pinned_activities: ActivityPinResponse[];
3611
3636
  feed: FeedResponse;
3612
3637
  next?: string;
3613
3638
  prev?: string;
3614
- own_follows?: FollowResponse[];
3615
3639
  followers_pagination?: PagerResponse;
3616
3640
  following_pagination?: PagerResponse;
3617
3641
  member_pagination?: PagerResponse;
3618
3642
  notification_status?: NotificationStatusResponse;
3619
- own_membership?: FeedMemberResponse;
3620
3643
  }
3621
3644
  export interface GetOrCreateFeedViewRequest {
3622
3645
  activity_processors?: ActivityProcessorConfig[];
@@ -3713,8 +3736,11 @@ export interface HLSSettingsResponse {
3713
3736
  layout: LayoutSettingsResponse;
3714
3737
  }
3715
3738
  export interface HarmConfig {
3739
+ cooldown_period?: number;
3716
3740
  severity?: number;
3741
+ threshold?: number;
3717
3742
  action_sequences?: ActionSequence[];
3743
+ harm_types?: string[];
3718
3744
  }
3719
3745
  export interface HideChannelRequest {
3720
3746
  clear_history?: boolean;
@@ -3969,6 +3995,10 @@ export interface ListFeedViewsResponse {
3969
3995
  duration: string;
3970
3996
  views: Record<string, FeedViewResponse>;
3971
3997
  }
3998
+ export interface ListFeedVisibilitiesResponse {
3999
+ duration: string;
4000
+ feed_visibilities: Record<string, FeedVisibilityResponse>;
4001
+ }
3972
4002
  export interface ListImportsResponse {
3973
4003
  duration: string;
3974
4004
  import_tasks: ImportTask[];
@@ -4235,6 +4265,7 @@ export interface MessageReadEvent {
4235
4265
  channel_last_message_at?: Date;
4236
4266
  last_read_message_id?: string;
4237
4267
  team?: string;
4268
+ channel?: ChannelResponse;
4238
4269
  thread?: ThreadResponse;
4239
4270
  user?: UserResponseCommonFields;
4240
4271
  }
@@ -4426,6 +4457,7 @@ export interface ModerationConfig {
4426
4457
  key?: string;
4427
4458
  team?: string;
4428
4459
  updated_at?: Date;
4460
+ supported_video_call_harm_types?: string[];
4429
4461
  ai_image_config?: AIImageConfig;
4430
4462
  ai_image_lite_config?: BodyguardImageAnalysisConfig;
4431
4463
  ai_text_config?: AITextConfig;
@@ -4447,6 +4479,7 @@ export interface ModerationCustomActionEvent {
4447
4479
  user?: User;
4448
4480
  }
4449
4481
  export interface ModerationDashboardPreferences {
4482
+ disable_flagging_reviewed_entity?: boolean;
4450
4483
  flag_user_on_flagged_content?: boolean;
4451
4484
  media_queue_blur_enabled?: boolean;
4452
4485
  }
@@ -4568,6 +4601,10 @@ export interface NotificationConfig {
4568
4601
  track_read?: boolean;
4569
4602
  track_seen?: boolean;
4570
4603
  }
4604
+ export interface NotificationContext {
4605
+ target?: NotificationTarget;
4606
+ trigger?: NotificationTrigger;
4607
+ }
4571
4608
  export interface NotificationFeedUpdatedEvent {
4572
4609
  created_at: Date;
4573
4610
  fid: string;
@@ -4615,6 +4652,18 @@ export interface NotificationStatusResponse {
4615
4652
  read_activities?: string[];
4616
4653
  seen_activities?: string[];
4617
4654
  }
4655
+ export interface NotificationTarget {
4656
+ id: string;
4657
+ name?: string;
4658
+ text?: string;
4659
+ type?: string;
4660
+ user_id?: string;
4661
+ attachments?: Attachment[];
4662
+ }
4663
+ export interface NotificationTrigger {
4664
+ text: string;
4665
+ type: string;
4666
+ }
4618
4667
  export interface NullTime {
4619
4668
  }
4620
4669
  export interface OCRRule {
@@ -5974,9 +6023,7 @@ export interface Role {
5974
6023
  export interface RuleBuilderAction {
5975
6024
  type?: string;
5976
6025
  ban_options?: BanOptions;
5977
- flag_content_options?: FlagContentOptions;
5978
6026
  flag_user_options?: FlagUserOptions;
5979
- remove_content_options?: BlockContentOptions;
5980
6027
  }
5981
6028
  export interface RuleBuilderCondition {
5982
6029
  confidence?: number;
@@ -6026,6 +6073,9 @@ export interface SFUIDLastSeen {
6026
6073
  last_seen: Date;
6027
6074
  process_start_time: number;
6028
6075
  }
6076
+ export interface SRTIngress {
6077
+ address: string;
6078
+ }
6029
6079
  export interface STTEgressConfig {
6030
6080
  closed_captions_enabled?: boolean;
6031
6081
  language?: string;
@@ -6570,22 +6620,29 @@ export interface TranscriptionSettings {
6570
6620
  language: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'it' | 'nl' | 'pt' | 'pl' | 'ca' | 'cs' | 'da' | 'el' | 'fi' | 'id' | 'ja' | 'ru' | 'sv' | 'ta' | 'th' | 'tr' | 'hu' | 'ro' | 'zh' | 'ar' | 'tl' | 'he' | 'hi' | 'hr' | 'ko' | 'ms' | 'no' | 'uk' | 'bg' | 'et' | 'sl' | 'sk';
6571
6621
  mode: 'available' | 'disabled' | 'auto-on';
6572
6622
  speech_segment_config?: SpeechSegmentConfig;
6623
+ translation?: TranslationSettings;
6573
6624
  }
6574
6625
  export interface TranscriptionSettingsRequest {
6575
6626
  closed_caption_mode?: 'available' | 'disabled' | 'auto-on';
6576
6627
  language?: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'it' | 'nl' | 'pt' | 'pl' | 'ca' | 'cs' | 'da' | 'el' | 'fi' | 'id' | 'ja' | 'ru' | 'sv' | 'ta' | 'th' | 'tr' | 'hu' | 'ro' | 'zh' | 'ar' | 'tl' | 'he' | 'hi' | 'hr' | 'ko' | 'ms' | 'no' | 'uk' | 'bg' | 'et' | 'sl' | 'sk';
6577
6628
  mode?: 'available' | 'disabled' | 'auto-on';
6578
6629
  speech_segment_config?: SpeechSegmentConfig;
6630
+ translation?: TranslationSettings;
6579
6631
  }
6580
6632
  export interface TranscriptionSettingsResponse {
6581
6633
  closed_caption_mode: 'available' | 'disabled' | 'auto-on';
6582
6634
  language: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'it' | 'nl' | 'pt' | 'pl' | 'ca' | 'cs' | 'da' | 'el' | 'fi' | 'id' | 'ja' | 'ru' | 'sv' | 'ta' | 'th' | 'tr' | 'hu' | 'ro' | 'zh' | 'ar' | 'tl' | 'he' | 'hi' | 'hr' | 'ko' | 'ms' | 'no' | 'uk' | 'bg' | 'et' | 'sl' | 'sk';
6583
6635
  mode: 'available' | 'disabled' | 'auto-on';
6584
6636
  speech_segment_config?: SpeechSegmentConfig;
6637
+ translation?: TranslationSettings;
6585
6638
  }
6586
6639
  export interface TranslateMessageRequest {
6587
6640
  language: 'af' | 'sq' | 'am' | 'ar' | 'az' | 'bn' | 'bs' | 'bg' | 'zh' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'fa-AF' | 'nl' | 'en' | 'et' | 'fi' | 'fr' | 'fr-CA' | 'ka' | 'de' | 'el' | 'ha' | 'he' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lv' | 'ms' | 'no' | 'fa' | 'ps' | 'pl' | 'pt' | 'ro' | 'ru' | 'sr' | 'sk' | 'sl' | 'so' | 'es' | 'es-MX' | 'sw' | 'sv' | 'tl' | 'ta' | 'th' | 'tr' | 'uk' | 'ur' | 'vi' | 'lt' | 'ht';
6588
6641
  }
6642
+ export interface TranslationSettings {
6643
+ enabled: boolean;
6644
+ languages: string[];
6645
+ }
6589
6646
  export interface TruncateChannelRequest {
6590
6647
  hard_delete?: boolean;
6591
6648
  skip_push?: boolean;
@@ -6724,6 +6781,7 @@ export interface UpdateActivityRequest {
6724
6781
  user_id?: string;
6725
6782
  visibility?: string;
6726
6783
  attachments?: Attachment[];
6784
+ feeds?: string[];
6727
6785
  filter_tags?: string[];
6728
6786
  interest_tags?: string[];
6729
6787
  custom?: Record<string, any>;
@@ -7234,7 +7292,7 @@ export interface UpsertPushPreferencesRequest {
7234
7292
  }
7235
7293
  export interface UpsertPushPreferencesResponse {
7236
7294
  duration: string;
7237
- user_channel_preferences: Record<string, Record<string, ChannelPushPreferences>>;
7295
+ user_channel_preferences: Record<string, Record<string, ChannelPushPreferences | null>>;
7238
7296
  user_preferences: Record<string, PushPreferences>;
7239
7297
  }
7240
7298
  export interface UpsertPushProviderRequest {
@@ -7523,7 +7581,9 @@ export interface VelocityFilterConfigRule {
7523
7581
  url_only?: boolean;
7524
7582
  }
7525
7583
  export interface VideoCallRuleConfig {
7526
- rules?: Record<string, HarmConfig>;
7584
+ flag_all_labels?: boolean;
7585
+ flagged_labels?: string[];
7586
+ rules?: HarmConfig[];
7527
7587
  }
7528
7588
  export interface VideoContentParameters {
7529
7589
  harm_labels?: string[];
@@ -7572,6 +7632,9 @@ export interface VoteData {
7572
7632
  answer_text?: string;
7573
7633
  option_id?: string;
7574
7634
  }
7635
+ export interface WHIPIngress {
7636
+ address: string;
7637
+ }
7575
7638
  export interface WSEvent {
7576
7639
  created_at: Date;
7577
7640
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -29,7 +29,6 @@ import {
29
29
  GetDraftResponse,
30
30
  GetManyMessagesResponse,
31
31
  GetMessageResponse,
32
- GetPushTemplatesResponse,
33
32
  GetReactionsResponse,
34
33
  GetRepliesResponse,
35
34
  GetSegmentResponse,
@@ -114,10 +113,6 @@ import {
114
113
  UpdateReminderResponse,
115
114
  UpdateThreadPartialRequest,
116
115
  UpdateThreadPartialResponse,
117
- UpsertPushPreferencesRequest,
118
- UpsertPushPreferencesResponse,
119
- UpsertPushTemplateRequest,
120
- UpsertPushTemplateResponse,
121
116
  WrappedUnreadCountsResponse,
122
117
  } from '../models';
123
118
  import { decoders } from '../model-decoders/decoders';
@@ -1404,6 +1399,36 @@ export class ChatApi {
1404
1399
  return { ...response.body, metadata: response.metadata };
1405
1400
  }
1406
1401
 
1402
+ async ephemeralMessageUpdate(
1403
+ request: UpdateMessagePartialRequest & { id: string },
1404
+ ): Promise<StreamResponse<UpdateMessagePartialResponse>> {
1405
+ const pathParams = {
1406
+ id: request?.id,
1407
+ };
1408
+ const body = {
1409
+ skip_enrich_url: request?.skip_enrich_url,
1410
+ user_id: request?.user_id,
1411
+ unset: request?.unset,
1412
+ set: request?.set,
1413
+ user: request?.user,
1414
+ };
1415
+
1416
+ const response = await this.apiClient.sendRequest<
1417
+ StreamResponse<UpdateMessagePartialResponse>
1418
+ >(
1419
+ 'PATCH',
1420
+ '/api/v2/chat/messages/{id}/ephemeral',
1421
+ pathParams,
1422
+ undefined,
1423
+ body,
1424
+ 'application/json',
1425
+ );
1426
+
1427
+ decoders.UpdateMessagePartialResponse?.(response.body);
1428
+
1429
+ return { ...response.body, metadata: response.metadata };
1430
+ }
1431
+
1407
1432
  async sendReaction(
1408
1433
  request: SendReactionRequest & { id: string },
1409
1434
  ): Promise<StreamResponse<SendReactionResponse>> {
@@ -1823,74 +1848,6 @@ export class ChatApi {
1823
1848
  return { ...response.body, metadata: response.metadata };
1824
1849
  }
1825
1850
 
1826
- async updatePushNotificationPreferences(
1827
- request: UpsertPushPreferencesRequest,
1828
- ): Promise<StreamResponse<UpsertPushPreferencesResponse>> {
1829
- const body = {
1830
- preferences: request?.preferences,
1831
- };
1832
-
1833
- const response = await this.apiClient.sendRequest<
1834
- StreamResponse<UpsertPushPreferencesResponse>
1835
- >(
1836
- 'POST',
1837
- '/api/v2/chat/push_preferences',
1838
- undefined,
1839
- undefined,
1840
- body,
1841
- 'application/json',
1842
- );
1843
-
1844
- decoders.UpsertPushPreferencesResponse?.(response.body);
1845
-
1846
- return { ...response.body, metadata: response.metadata };
1847
- }
1848
-
1849
- async getPushTemplates(request: {
1850
- push_provider_type: string;
1851
- push_provider_name?: string;
1852
- }): Promise<StreamResponse<GetPushTemplatesResponse>> {
1853
- const queryParams = {
1854
- push_provider_type: request?.push_provider_type,
1855
- push_provider_name: request?.push_provider_name,
1856
- };
1857
-
1858
- const response = await this.apiClient.sendRequest<
1859
- StreamResponse<GetPushTemplatesResponse>
1860
- >('GET', '/api/v2/chat/push_templates', undefined, queryParams);
1861
-
1862
- decoders.GetPushTemplatesResponse?.(response.body);
1863
-
1864
- return { ...response.body, metadata: response.metadata };
1865
- }
1866
-
1867
- async upsertPushTemplate(
1868
- request: UpsertPushTemplateRequest,
1869
- ): Promise<StreamResponse<UpsertPushTemplateResponse>> {
1870
- const body = {
1871
- event_type: request?.event_type,
1872
- push_provider_type: request?.push_provider_type,
1873
- enable_push: request?.enable_push,
1874
- push_provider_name: request?.push_provider_name,
1875
- template: request?.template,
1876
- };
1877
-
1878
- const response = await this.apiClient.sendRequest<
1879
- StreamResponse<UpsertPushTemplateResponse>
1880
- >(
1881
- 'POST',
1882
- '/api/v2/chat/push_templates',
1883
- undefined,
1884
- undefined,
1885
- body,
1886
- 'application/json',
1887
- );
1888
-
1889
- decoders.UpsertPushTemplateResponse?.(response.body);
1890
-
1891
- return { ...response.body, metadata: response.metadata };
1892
- }
1893
-
1894
1851
  async queryBannedUsers(request?: {
1895
1852
  payload?: QueryBannedUsersPayload;
1896
1853
  }): Promise<StreamResponse<QueryBannedUsersResponse>> {