@stream-io/node-sdk 0.4.9 → 0.4.11
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.
- package/dist/index.cjs.js +174 -139
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +174 -139
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +2 -1
- package/dist/src/gen/models/index.d.ts +127 -52
- package/dist/src/gen/video/VideoApi.d.ts +4 -1
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +18 -0
- package/src/gen/model-decoders/index.ts +48 -32
- package/src/gen/models/index.ts +220 -85
- package/src/gen/video/VideoApi.ts +25 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseApi } from '../../BaseApi';
|
|
2
2
|
import { StreamResponse } from '../../types';
|
|
3
|
-
import { CampaignResponse, CastPollVoteRequest, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreatePollOptionRequest, CreatePollRequest, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, DeleteReactionResponse, DeleteSegmentTargetsRequest, EventResponse, ExportChannelsRequest, ExportChannelsResponse, FileUploadRequest, FileUploadResponse, GetCampaignResponse, GetChannelTypeResponse, GetCommandResponse, GetExportChannelsStatusResponse, GetManyMessagesResponse, GetMessageResponse, GetReactionsResponse, GetRepliesResponse, GetSegmentResponse, GetThreadResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageResponse, MuteChannelRequest, MuteChannelResponse, PollOptionResponse, PollResponse, PollVoteResponse, PollVotesResponse, QueryBannedUsersPayload, QueryBannedUsersResponse, QueryCampaignsRequest, QueryCampaignsResponse, QueryChannelsRequest, QueryChannelsResponse, QueryMembersPayload, QueryMessageFlagsPayload, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryPollVotesRequest, QueryPollsRequest, QueryPollsResponse, QueryReactionsRequest, QueryReactionsResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, QueryThreadsRequest, QueryThreadsResponse, 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, UpdatePollOptionRequest, UpdatePollPartialRequest, UpdatePollRequest, UpdateThreadPartialRequest, UpdateThreadPartialResponse, WrappedUnreadCountsResponse } from '../models';
|
|
3
|
+
import { CampaignResponse, CastPollVoteRequest, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreatePollOptionRequest, CreatePollRequest, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, DeleteReactionResponse, DeleteSegmentTargetsRequest, EventResponse, ExportChannelsRequest, ExportChannelsResponse, FileUploadRequest, FileUploadResponse, GetCampaignResponse, GetChannelTypeResponse, GetCommandResponse, GetExportChannelsStatusResponse, GetManyMessagesResponse, GetMessageResponse, GetReactionsResponse, GetRepliesResponse, GetSegmentResponse, GetThreadResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageResponse, MuteChannelRequest, MuteChannelResponse, PollOptionResponse, PollResponse, PollVoteResponse, PollVotesResponse, QueryBannedUsersPayload, QueryBannedUsersResponse, QueryCampaignsRequest, QueryCampaignsResponse, QueryChannelsRequest, QueryChannelsResponse, QueryMembersPayload, QueryMessageFlagsPayload, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryPollVotesRequest, QueryPollsRequest, QueryPollsResponse, QueryReactionsRequest, QueryReactionsResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, QueryThreadsRequest, QueryThreadsResponse, 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, UpdatePollOptionRequest, UpdatePollPartialRequest, UpdatePollRequest, UpdateThreadPartialRequest, UpdateThreadPartialResponse, UpsertPushPreferencesRequest, UpsertPushPreferencesResponse, WrappedUnreadCountsResponse } from '../models';
|
|
4
4
|
export declare class ChatApi extends BaseApi {
|
|
5
5
|
queryCampaigns: (request?: QueryCampaignsRequest) => Promise<StreamResponse<QueryCampaignsResponse>>;
|
|
6
6
|
getCampaign: (request: {
|
|
@@ -231,6 +231,7 @@ export declare class ChatApi extends BaseApi {
|
|
|
231
231
|
poll_id: string;
|
|
232
232
|
user_id?: string;
|
|
233
233
|
}) => Promise<StreamResponse<PollVotesResponse>>;
|
|
234
|
+
updatePushNotificationPreferences: (request: UpsertPushPreferencesRequest) => Promise<StreamResponse<UpsertPushPreferencesResponse>>;
|
|
234
235
|
queryBannedUsers: (request?: {
|
|
235
236
|
payload?: QueryBannedUsersPayload;
|
|
236
237
|
}) => Promise<StreamResponse<QueryBannedUsersResponse>>;
|
|
@@ -91,7 +91,6 @@ export interface ActionLogResponse {
|
|
|
91
91
|
user?: UserResponse;
|
|
92
92
|
}
|
|
93
93
|
export interface AggregatedStats {
|
|
94
|
-
countrywise_aggregate_stats?: Record<string, CountrywiseAggregateStats>;
|
|
95
94
|
publisher_aggregate_stats?: PublisherAggregateStats;
|
|
96
95
|
turn?: TURNAggregatedStats;
|
|
97
96
|
}
|
|
@@ -367,6 +366,10 @@ export interface BroadcastSettingsResponse {
|
|
|
367
366
|
hls: HLSSettingsResponse;
|
|
368
367
|
rtmp: RTMPSettingsResponse;
|
|
369
368
|
}
|
|
369
|
+
export interface BrowserDataResponse {
|
|
370
|
+
name?: string;
|
|
371
|
+
version?: string;
|
|
372
|
+
}
|
|
370
373
|
export interface CallAcceptedEvent {
|
|
371
374
|
call_cid: string;
|
|
372
375
|
created_at: Date;
|
|
@@ -534,22 +537,26 @@ export interface CallRecording {
|
|
|
534
537
|
export interface CallRecordingFailedEvent {
|
|
535
538
|
call_cid: string;
|
|
536
539
|
created_at: Date;
|
|
540
|
+
egress_id: string;
|
|
537
541
|
type: string;
|
|
538
542
|
}
|
|
539
543
|
export interface CallRecordingReadyEvent {
|
|
540
544
|
call_cid: string;
|
|
541
545
|
created_at: Date;
|
|
546
|
+
egress_id: string;
|
|
542
547
|
call_recording: CallRecording;
|
|
543
548
|
type: string;
|
|
544
549
|
}
|
|
545
550
|
export interface CallRecordingStartedEvent {
|
|
546
551
|
call_cid: string;
|
|
547
552
|
created_at: Date;
|
|
553
|
+
egress_id: string;
|
|
548
554
|
type: string;
|
|
549
555
|
}
|
|
550
556
|
export interface CallRecordingStoppedEvent {
|
|
551
557
|
call_cid: string;
|
|
552
558
|
created_at: Date;
|
|
559
|
+
egress_id: string;
|
|
553
560
|
type: string;
|
|
554
561
|
}
|
|
555
562
|
export interface CallRejectedEvent {
|
|
@@ -739,22 +746,26 @@ export interface CallTranscription {
|
|
|
739
746
|
export interface CallTranscriptionFailedEvent {
|
|
740
747
|
call_cid: string;
|
|
741
748
|
created_at: Date;
|
|
749
|
+
egress_id: string;
|
|
742
750
|
type: string;
|
|
743
751
|
}
|
|
744
752
|
export interface CallTranscriptionReadyEvent {
|
|
745
753
|
call_cid: string;
|
|
746
754
|
created_at: Date;
|
|
755
|
+
egress_id: string;
|
|
747
756
|
call_transcription: CallTranscription;
|
|
748
757
|
type: string;
|
|
749
758
|
}
|
|
750
759
|
export interface CallTranscriptionStartedEvent {
|
|
751
760
|
call_cid: string;
|
|
752
761
|
created_at: Date;
|
|
762
|
+
egress_id: string;
|
|
753
763
|
type: string;
|
|
754
764
|
}
|
|
755
765
|
export interface CallTranscriptionStoppedEvent {
|
|
756
766
|
call_cid: string;
|
|
757
767
|
created_at: Date;
|
|
768
|
+
egress_id: string;
|
|
758
769
|
type: string;
|
|
759
770
|
}
|
|
760
771
|
export interface CallType {
|
|
@@ -805,6 +816,7 @@ export interface CampaignChannelTemplate {
|
|
|
805
816
|
}
|
|
806
817
|
export interface CampaignCompletedEvent {
|
|
807
818
|
created_at: Date;
|
|
819
|
+
custom: Record<string, any>;
|
|
808
820
|
type: string;
|
|
809
821
|
received_at?: Date;
|
|
810
822
|
campaign?: CampaignResponse;
|
|
@@ -840,6 +852,7 @@ export interface CampaignResponse {
|
|
|
840
852
|
}
|
|
841
853
|
export interface CampaignStartedEvent {
|
|
842
854
|
created_at: Date;
|
|
855
|
+
custom: Record<string, any>;
|
|
843
856
|
type: string;
|
|
844
857
|
received_at?: Date;
|
|
845
858
|
campaign?: CampaignResponse;
|
|
@@ -1100,6 +1113,10 @@ export declare const ChannelOwnCapability: {
|
|
|
1100
1113
|
readonly UPLOAD_FILE: "upload-file";
|
|
1101
1114
|
};
|
|
1102
1115
|
export type ChannelOwnCapability = (typeof ChannelOwnCapability)[keyof typeof ChannelOwnCapability];
|
|
1116
|
+
export interface ChannelPushPreferences {
|
|
1117
|
+
chat_level?: string;
|
|
1118
|
+
disabled_until?: Date;
|
|
1119
|
+
}
|
|
1103
1120
|
export interface ChannelResponse {
|
|
1104
1121
|
cid: string;
|
|
1105
1122
|
created_at: Date;
|
|
@@ -1142,6 +1159,7 @@ export interface ChannelStateResponse {
|
|
|
1142
1159
|
watchers?: UserResponse[];
|
|
1143
1160
|
channel?: ChannelResponse;
|
|
1144
1161
|
membership?: ChannelMember;
|
|
1162
|
+
push_preferences?: ChannelPushPreferences;
|
|
1145
1163
|
}
|
|
1146
1164
|
export interface ChannelStateResponseFields {
|
|
1147
1165
|
members: ChannelMember[];
|
|
@@ -1156,6 +1174,7 @@ export interface ChannelStateResponseFields {
|
|
|
1156
1174
|
watchers?: UserResponse[];
|
|
1157
1175
|
channel?: ChannelResponse;
|
|
1158
1176
|
membership?: ChannelMember;
|
|
1177
|
+
push_preferences?: ChannelPushPreferences;
|
|
1159
1178
|
}
|
|
1160
1179
|
export interface ChannelTruncatedEvent {
|
|
1161
1180
|
channel_id: string;
|
|
@@ -1295,6 +1314,11 @@ export interface CheckSQSResponse {
|
|
|
1295
1314
|
error?: string;
|
|
1296
1315
|
data?: Record<string, any>;
|
|
1297
1316
|
}
|
|
1317
|
+
export interface ClientOSDataResponse {
|
|
1318
|
+
architecture?: string;
|
|
1319
|
+
name?: string;
|
|
1320
|
+
version?: string;
|
|
1321
|
+
}
|
|
1298
1322
|
export interface ClosedCaptionEvent {
|
|
1299
1323
|
call_cid: string;
|
|
1300
1324
|
created_at: Date;
|
|
@@ -1358,13 +1382,6 @@ export interface Count {
|
|
|
1358
1382
|
approximate: boolean;
|
|
1359
1383
|
value: number;
|
|
1360
1384
|
}
|
|
1361
|
-
export interface CountrywiseAggregateStats {
|
|
1362
|
-
participant_count?: Count;
|
|
1363
|
-
publisher_jitter?: TimeStats;
|
|
1364
|
-
publisher_latency?: TimeStats;
|
|
1365
|
-
subscriber_jitter?: TimeStats;
|
|
1366
|
-
subscriber_latency?: TimeStats;
|
|
1367
|
-
}
|
|
1368
1385
|
export interface CreateBlockListRequest {
|
|
1369
1386
|
name: string;
|
|
1370
1387
|
words: string[];
|
|
@@ -1710,6 +1727,10 @@ export interface Device {
|
|
|
1710
1727
|
push_provider_name?: string;
|
|
1711
1728
|
voip?: boolean;
|
|
1712
1729
|
}
|
|
1730
|
+
export interface DeviceDataResponse {
|
|
1731
|
+
name?: string;
|
|
1732
|
+
version?: string;
|
|
1733
|
+
}
|
|
1713
1734
|
export interface DeviceErrorInfo {
|
|
1714
1735
|
error_message: string;
|
|
1715
1736
|
provider: string;
|
|
@@ -1739,6 +1760,7 @@ export interface EdgeResponse {
|
|
|
1739
1760
|
}
|
|
1740
1761
|
export interface EgressHLSResponse {
|
|
1741
1762
|
playlist_url: string;
|
|
1763
|
+
status: string;
|
|
1742
1764
|
}
|
|
1743
1765
|
export interface EgressRTMPResponse {
|
|
1744
1766
|
name: string;
|
|
@@ -1805,7 +1827,6 @@ export interface EntityCreator {
|
|
|
1805
1827
|
updated_at?: Date;
|
|
1806
1828
|
teams?: string[];
|
|
1807
1829
|
privacy_settings?: PrivacySettings;
|
|
1808
|
-
push_notifications?: PushNotificationSettings;
|
|
1809
1830
|
}
|
|
1810
1831
|
export interface EntityCreatorResponse {
|
|
1811
1832
|
ban_count: number;
|
|
@@ -1820,7 +1841,6 @@ export interface EntityCreatorResponse {
|
|
|
1820
1841
|
shadow_banned: boolean;
|
|
1821
1842
|
updated_at: Date;
|
|
1822
1843
|
blocked_user_ids: string[];
|
|
1823
|
-
devices: DeviceResponse[];
|
|
1824
1844
|
teams: string[];
|
|
1825
1845
|
custom: Record<string, any>;
|
|
1826
1846
|
ban_expires?: Date;
|
|
@@ -1830,6 +1850,7 @@ export interface EntityCreatorResponse {
|
|
|
1830
1850
|
last_active?: Date;
|
|
1831
1851
|
name?: string;
|
|
1832
1852
|
revoke_tokens_issued_before?: Date;
|
|
1853
|
+
devices?: DeviceResponse[];
|
|
1833
1854
|
privacy_settings?: PrivacySettingsResponse;
|
|
1834
1855
|
push_notifications?: PushNotificationSettingsResponse;
|
|
1835
1856
|
}
|
|
@@ -2010,6 +2031,7 @@ export interface FlagResponse {
|
|
|
2010
2031
|
}
|
|
2011
2032
|
export interface FlagUpdatedEvent {
|
|
2012
2033
|
created_at: Date;
|
|
2034
|
+
custom: Record<string, any>;
|
|
2013
2035
|
type: string;
|
|
2014
2036
|
received_at?: Date;
|
|
2015
2037
|
created_by?: UserResponse;
|
|
@@ -2044,7 +2066,6 @@ export interface FullUserResponse {
|
|
|
2044
2066
|
revoke_tokens_issued_before?: Date;
|
|
2045
2067
|
latest_hidden_channels?: string[];
|
|
2046
2068
|
privacy_settings?: PrivacySettingsResponse;
|
|
2047
|
-
push_notifications?: PushNotificationSettingsResponse;
|
|
2048
2069
|
}
|
|
2049
2070
|
export interface GeofenceResponse {
|
|
2050
2071
|
name: string;
|
|
@@ -2705,10 +2726,11 @@ export interface MessageReadEvent {
|
|
|
2705
2726
|
cid: string;
|
|
2706
2727
|
created_at: Date;
|
|
2707
2728
|
type: string;
|
|
2729
|
+
channel_last_message_at?: Date;
|
|
2708
2730
|
last_read_message_id?: string;
|
|
2709
2731
|
team?: string;
|
|
2710
2732
|
thread?: ThreadResponse;
|
|
2711
|
-
user?:
|
|
2733
|
+
user?: UserResponseCommonFields;
|
|
2712
2734
|
}
|
|
2713
2735
|
export interface MessageRequest {
|
|
2714
2736
|
html?: string;
|
|
@@ -2862,6 +2884,7 @@ export interface ModerationCustomActionEvent {
|
|
|
2862
2884
|
}
|
|
2863
2885
|
export interface ModerationEvent {
|
|
2864
2886
|
created_at: Date;
|
|
2887
|
+
custom: Record<string, any>;
|
|
2865
2888
|
type: string;
|
|
2866
2889
|
received_at?: Date;
|
|
2867
2890
|
flags?: Flag2Response[];
|
|
@@ -2995,13 +3018,7 @@ export interface NotificationSettings {
|
|
|
2995
3018
|
call_ring: EventNotificationSettings;
|
|
2996
3019
|
session_started: EventNotificationSettings;
|
|
2997
3020
|
}
|
|
2998
|
-
export interface NullBool {
|
|
2999
|
-
has_value?: boolean;
|
|
3000
|
-
value?: boolean;
|
|
3001
|
-
}
|
|
3002
3021
|
export interface NullTime {
|
|
3003
|
-
has_value?: boolean;
|
|
3004
|
-
value?: Date;
|
|
3005
3022
|
}
|
|
3006
3023
|
export interface OnlyUserID {
|
|
3007
3024
|
id: string;
|
|
@@ -3062,7 +3079,7 @@ export interface OwnUser {
|
|
|
3062
3079
|
latest_hidden_channels?: string[];
|
|
3063
3080
|
teams?: string[];
|
|
3064
3081
|
privacy_settings?: PrivacySettings;
|
|
3065
|
-
|
|
3082
|
+
push_preferences?: PushPreferences;
|
|
3066
3083
|
}
|
|
3067
3084
|
export interface OwnUserResponse {
|
|
3068
3085
|
banned: boolean;
|
|
@@ -3091,7 +3108,7 @@ export interface OwnUserResponse {
|
|
|
3091
3108
|
blocked_user_ids?: string[];
|
|
3092
3109
|
latest_hidden_channels?: string[];
|
|
3093
3110
|
privacy_settings?: PrivacySettingsResponse;
|
|
3094
|
-
|
|
3111
|
+
push_preferences?: PushPreferences;
|
|
3095
3112
|
}
|
|
3096
3113
|
export interface PaginationParams {
|
|
3097
3114
|
limit?: number;
|
|
@@ -3137,6 +3154,11 @@ export interface PinRequest {
|
|
|
3137
3154
|
export interface PinResponse {
|
|
3138
3155
|
duration: string;
|
|
3139
3156
|
}
|
|
3157
|
+
export interface PlatformDataResponse {
|
|
3158
|
+
browser: BrowserDataResponse;
|
|
3159
|
+
device: DeviceDataResponse;
|
|
3160
|
+
os: ClientOSDataResponse;
|
|
3161
|
+
}
|
|
3140
3162
|
export interface Policy {
|
|
3141
3163
|
action: number;
|
|
3142
3164
|
created_at: Date;
|
|
@@ -3290,16 +3312,20 @@ export interface PushNotificationFields {
|
|
|
3290
3312
|
xiaomi: XiaomiConfigFields;
|
|
3291
3313
|
providers?: PushProvider[];
|
|
3292
3314
|
}
|
|
3293
|
-
export interface
|
|
3315
|
+
export interface PushNotificationSettingsResponse {
|
|
3294
3316
|
disabled?: boolean;
|
|
3295
3317
|
disabled_until?: Date;
|
|
3296
3318
|
}
|
|
3297
|
-
export interface
|
|
3298
|
-
|
|
3299
|
-
|
|
3319
|
+
export interface PushPreferenceInput {
|
|
3320
|
+
channel_cid?: string;
|
|
3321
|
+
chat_level?: 'all' | 'mentions' | 'none' | 'default';
|
|
3322
|
+
disabled_until?: Date;
|
|
3323
|
+
remove_disable?: boolean;
|
|
3324
|
+
user_id?: string;
|
|
3300
3325
|
}
|
|
3301
|
-
export interface
|
|
3302
|
-
|
|
3326
|
+
export interface PushPreferences {
|
|
3327
|
+
call_level?: string;
|
|
3328
|
+
chat_level?: string;
|
|
3303
3329
|
disabled_until?: Date;
|
|
3304
3330
|
}
|
|
3305
3331
|
export interface PushProvider {
|
|
@@ -3592,7 +3618,7 @@ export interface QueryReviewQueueResponse {
|
|
|
3592
3618
|
duration: string;
|
|
3593
3619
|
items: ReviewQueueItemResponse[];
|
|
3594
3620
|
action_config: Record<string, ModerationActionConfig[]>;
|
|
3595
|
-
stats: Record<string,
|
|
3621
|
+
stats: Record<string, any>;
|
|
3596
3622
|
next?: string;
|
|
3597
3623
|
prev?: string;
|
|
3598
3624
|
}
|
|
@@ -3653,6 +3679,19 @@ export interface QueryUsageStatsResponse {
|
|
|
3653
3679
|
next?: string;
|
|
3654
3680
|
prev?: string;
|
|
3655
3681
|
}
|
|
3682
|
+
export interface QueryUserFeedbackRequest {
|
|
3683
|
+
limit?: number;
|
|
3684
|
+
next?: string;
|
|
3685
|
+
prev?: string;
|
|
3686
|
+
sort?: SortParamRequest[];
|
|
3687
|
+
filter_conditions?: Record<string, any>;
|
|
3688
|
+
}
|
|
3689
|
+
export interface QueryUserFeedbackResponse {
|
|
3690
|
+
duration: string;
|
|
3691
|
+
user_feedback: UserFeedbackResponse[];
|
|
3692
|
+
next?: string;
|
|
3693
|
+
prev?: string;
|
|
3694
|
+
}
|
|
3656
3695
|
export interface QueryUsersPayload {
|
|
3657
3696
|
filter_conditions: Record<string, any>;
|
|
3658
3697
|
include_deactivated_users?: boolean;
|
|
@@ -3864,7 +3903,6 @@ export interface ReviewQueueItem {
|
|
|
3864
3903
|
flags: Flag2[];
|
|
3865
3904
|
languages: string[];
|
|
3866
3905
|
teams: string[];
|
|
3867
|
-
completed_at: NullTime;
|
|
3868
3906
|
reviewed_at: NullTime;
|
|
3869
3907
|
assigned_to?: User;
|
|
3870
3908
|
entity_creator?: EntityCreator;
|
|
@@ -4767,6 +4805,14 @@ export interface UpsertModerationTemplateResponse {
|
|
|
4767
4805
|
updated_at: Date;
|
|
4768
4806
|
config?: FeedsModerationTemplateConfig;
|
|
4769
4807
|
}
|
|
4808
|
+
export interface UpsertPushPreferencesRequest {
|
|
4809
|
+
preferences: PushPreferenceInput[];
|
|
4810
|
+
}
|
|
4811
|
+
export interface UpsertPushPreferencesResponse {
|
|
4812
|
+
duration: string;
|
|
4813
|
+
user_channel_preferences: Record<string, Record<string, ChannelPushPreferences>>;
|
|
4814
|
+
user_preferences: Record<string, PushPreferences>;
|
|
4815
|
+
}
|
|
4770
4816
|
export interface UpsertPushProviderRequest {
|
|
4771
4817
|
push_provider?: PushProvider;
|
|
4772
4818
|
}
|
|
@@ -4792,7 +4838,6 @@ export interface User {
|
|
|
4792
4838
|
updated_at?: Date;
|
|
4793
4839
|
teams?: string[];
|
|
4794
4840
|
privacy_settings?: PrivacySettings;
|
|
4795
|
-
push_notifications?: PushNotificationSettings;
|
|
4796
4841
|
}
|
|
4797
4842
|
export interface UserBannedEvent {
|
|
4798
4843
|
channel_id: string;
|
|
@@ -4830,26 +4875,6 @@ export interface UserDeletedEvent {
|
|
|
4830
4875
|
type: string;
|
|
4831
4876
|
user?: User;
|
|
4832
4877
|
}
|
|
4833
|
-
export interface UserEventPayload {
|
|
4834
|
-
banned: boolean;
|
|
4835
|
-
created_at: Date;
|
|
4836
|
-
id: string;
|
|
4837
|
-
language: string;
|
|
4838
|
-
online: boolean;
|
|
4839
|
-
role: string;
|
|
4840
|
-
updated_at: Date;
|
|
4841
|
-
blocked_user_ids: string[];
|
|
4842
|
-
teams: string[];
|
|
4843
|
-
custom: Record<string, any>;
|
|
4844
|
-
deactivated_at?: Date;
|
|
4845
|
-
deleted_at?: Date;
|
|
4846
|
-
image?: string;
|
|
4847
|
-
invisible?: boolean;
|
|
4848
|
-
last_active?: Date;
|
|
4849
|
-
name?: string;
|
|
4850
|
-
revoke_tokens_issued_before?: Date;
|
|
4851
|
-
privacy_settings?: PrivacySettingsResponse;
|
|
4852
|
-
}
|
|
4853
4878
|
export interface UserFeedbackReport {
|
|
4854
4879
|
unreported_count: number;
|
|
4855
4880
|
count_by_rating: Record<string, number>;
|
|
@@ -4857,6 +4882,17 @@ export interface UserFeedbackReport {
|
|
|
4857
4882
|
export interface UserFeedbackReportResponse {
|
|
4858
4883
|
daily: DailyAggregateUserFeedbackReportResponse[];
|
|
4859
4884
|
}
|
|
4885
|
+
export interface UserFeedbackResponse {
|
|
4886
|
+
cid: string;
|
|
4887
|
+
rating: number;
|
|
4888
|
+
reason: string;
|
|
4889
|
+
sdk: string;
|
|
4890
|
+
sdk_version: string;
|
|
4891
|
+
session_id: string;
|
|
4892
|
+
user_id: string;
|
|
4893
|
+
platform: PlatformDataResponse;
|
|
4894
|
+
custom?: Record<string, any>;
|
|
4895
|
+
}
|
|
4860
4896
|
export interface UserFlaggedEvent {
|
|
4861
4897
|
created_at: Date;
|
|
4862
4898
|
type: string;
|
|
@@ -4911,7 +4947,6 @@ export interface UserRequest {
|
|
|
4911
4947
|
teams?: string[];
|
|
4912
4948
|
custom?: Record<string, any>;
|
|
4913
4949
|
privacy_settings?: PrivacySettingsResponse;
|
|
4914
|
-
push_notifications?: PushNotificationSettingsInput;
|
|
4915
4950
|
}
|
|
4916
4951
|
export interface UserResponse {
|
|
4917
4952
|
banned: boolean;
|
|
@@ -4924,7 +4959,6 @@ export interface UserResponse {
|
|
|
4924
4959
|
shadow_banned: boolean;
|
|
4925
4960
|
updated_at: Date;
|
|
4926
4961
|
blocked_user_ids: string[];
|
|
4927
|
-
devices: DeviceResponse[];
|
|
4928
4962
|
teams: string[];
|
|
4929
4963
|
custom: Record<string, any>;
|
|
4930
4964
|
ban_expires?: Date;
|
|
@@ -4934,9 +4968,48 @@ export interface UserResponse {
|
|
|
4934
4968
|
last_active?: Date;
|
|
4935
4969
|
name?: string;
|
|
4936
4970
|
revoke_tokens_issued_before?: Date;
|
|
4971
|
+
devices?: DeviceResponse[];
|
|
4937
4972
|
privacy_settings?: PrivacySettingsResponse;
|
|
4938
4973
|
push_notifications?: PushNotificationSettingsResponse;
|
|
4939
4974
|
}
|
|
4975
|
+
export interface UserResponseCommonFields {
|
|
4976
|
+
banned: boolean;
|
|
4977
|
+
created_at: Date;
|
|
4978
|
+
id: string;
|
|
4979
|
+
language: string;
|
|
4980
|
+
online: boolean;
|
|
4981
|
+
role: string;
|
|
4982
|
+
updated_at: Date;
|
|
4983
|
+
blocked_user_ids: string[];
|
|
4984
|
+
teams: string[];
|
|
4985
|
+
custom: Record<string, any>;
|
|
4986
|
+
deactivated_at?: Date;
|
|
4987
|
+
deleted_at?: Date;
|
|
4988
|
+
image?: string;
|
|
4989
|
+
last_active?: Date;
|
|
4990
|
+
name?: string;
|
|
4991
|
+
revoke_tokens_issued_before?: Date;
|
|
4992
|
+
}
|
|
4993
|
+
export interface UserResponsePrivacyFields {
|
|
4994
|
+
banned: boolean;
|
|
4995
|
+
created_at: Date;
|
|
4996
|
+
id: string;
|
|
4997
|
+
language: string;
|
|
4998
|
+
online: boolean;
|
|
4999
|
+
role: string;
|
|
5000
|
+
updated_at: Date;
|
|
5001
|
+
blocked_user_ids: string[];
|
|
5002
|
+
teams: string[];
|
|
5003
|
+
custom: Record<string, any>;
|
|
5004
|
+
deactivated_at?: Date;
|
|
5005
|
+
deleted_at?: Date;
|
|
5006
|
+
image?: string;
|
|
5007
|
+
invisible?: boolean;
|
|
5008
|
+
last_active?: Date;
|
|
5009
|
+
name?: string;
|
|
5010
|
+
revoke_tokens_issued_before?: Date;
|
|
5011
|
+
privacy_settings?: PrivacySettingsResponse;
|
|
5012
|
+
}
|
|
4940
5013
|
export interface UserSessionStats {
|
|
4941
5014
|
freeze_duration_seconds: number;
|
|
4942
5015
|
group: string;
|
|
@@ -5022,7 +5095,8 @@ export interface UserUnreadReminderEvent {
|
|
|
5022
5095
|
}
|
|
5023
5096
|
export interface UserUpdatedEvent {
|
|
5024
5097
|
created_at: Date;
|
|
5025
|
-
|
|
5098
|
+
custom: Record<string, any>;
|
|
5099
|
+
user: UserResponsePrivacyFields;
|
|
5026
5100
|
type: string;
|
|
5027
5101
|
received_at?: Date;
|
|
5028
5102
|
}
|
|
@@ -5087,6 +5161,7 @@ export interface WSEvent {
|
|
|
5087
5161
|
custom: Record<string, any>;
|
|
5088
5162
|
automoderation?: boolean;
|
|
5089
5163
|
channel_id?: string;
|
|
5164
|
+
channel_last_message_at?: Date;
|
|
5090
5165
|
channel_type?: string;
|
|
5091
5166
|
cid?: string;
|
|
5092
5167
|
connection_id?: string;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BaseApi } from '../../BaseApi';
|
|
2
2
|
import { StreamResponse } from '../../types';
|
|
3
|
-
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallStatsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, ListCallTypeResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, Response, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
3
|
+
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallStatsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, ListCallTypeResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, QueryUserFeedbackRequest, QueryUserFeedbackResponse, Response, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
4
4
|
export declare class VideoApi extends BaseApi {
|
|
5
|
+
queryUserFeedback: (request?: QueryUserFeedbackRequest & {
|
|
6
|
+
full?: boolean;
|
|
7
|
+
}) => Promise<StreamResponse<QueryUserFeedbackResponse>>;
|
|
5
8
|
queryCallMembers: (request: QueryCallMembersRequest) => Promise<StreamResponse<QueryCallMembersResponse>>;
|
|
6
9
|
queryCallStats: (request?: QueryCallStatsRequest) => Promise<StreamResponse<QueryCallStatsResponse>>;
|
|
7
10
|
getCall: (request: {
|
package/package.json
CHANGED
package/src/gen/chat/ChatApi.ts
CHANGED
|
@@ -116,6 +116,8 @@ import {
|
|
|
116
116
|
UpdatePollRequest,
|
|
117
117
|
UpdateThreadPartialRequest,
|
|
118
118
|
UpdateThreadPartialResponse,
|
|
119
|
+
UpsertPushPreferencesRequest,
|
|
120
|
+
UpsertPushPreferencesResponse,
|
|
119
121
|
WrappedUnreadCountsResponse,
|
|
120
122
|
} from '../models';
|
|
121
123
|
import { decoders } from '../model-decoders';
|
|
@@ -1817,6 +1819,22 @@ export class ChatApi extends BaseApi {
|
|
|
1817
1819
|
return { ...response.body, metadata: response.metadata };
|
|
1818
1820
|
};
|
|
1819
1821
|
|
|
1822
|
+
updatePushNotificationPreferences = async (
|
|
1823
|
+
request: UpsertPushPreferencesRequest,
|
|
1824
|
+
): Promise<StreamResponse<UpsertPushPreferencesResponse>> => {
|
|
1825
|
+
const body = {
|
|
1826
|
+
preferences: request?.preferences,
|
|
1827
|
+
};
|
|
1828
|
+
|
|
1829
|
+
const response = await this.sendRequest<
|
|
1830
|
+
StreamResponse<UpsertPushPreferencesResponse>
|
|
1831
|
+
>('POST', '/api/v2/chat/push_preferences', undefined, undefined, body);
|
|
1832
|
+
|
|
1833
|
+
decoders.UpsertPushPreferencesResponse?.(response.body);
|
|
1834
|
+
|
|
1835
|
+
return { ...response.body, metadata: response.metadata };
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1820
1838
|
queryBannedUsers = async (request?: {
|
|
1821
1839
|
payload?: QueryBannedUsersPayload;
|
|
1822
1840
|
}): Promise<StreamResponse<QueryBannedUsersResponse>> => {
|