@stream-io/node-sdk 0.4.10 → 0.4.12
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 +102 -59
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +102 -59
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +2 -1
- package/dist/src/gen/common/CommonApi.d.ts +8 -4
- package/dist/src/gen/models/index.d.ts +103 -53
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +18 -0
- package/src/gen/common/CommonApi.ts +32 -22
- package/src/gen/model-decoders/index.ts +62 -32
- package/src/gen/models/index.ts +185 -90
- package/src/gen/moderation/ModerationApi.ts +1 -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>>;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { BaseApi } from '../../BaseApi';
|
|
2
2
|
import { StreamResponse } from '../../types';
|
|
3
|
-
import { BlockUsersRequest, BlockUsersResponse, CheckExternalStorageResponse, CheckPushRequest, CheckPushResponse, CheckSNSRequest, CheckSNSResponse, CheckSQSRequest, CheckSQSResponse, CreateBlockListRequest, CreateDeviceRequest, CreateExternalStorageRequest, CreateExternalStorageResponse, CreateGuestRequest, CreateGuestResponse, CreateImportRequest, CreateImportResponse, CreateImportURLRequest, CreateImportURLResponse, CreateRoleRequest, CreateRoleResponse, DeactivateUserRequest, DeactivateUserResponse, DeactivateUsersRequest, DeactivateUsersResponse, DeleteExternalStorageResponse, DeleteUsersRequest, DeleteUsersResponse, ExportUserResponse, ExportUsersRequest, ExportUsersResponse, GetApplicationResponse, GetBlockListResponse, GetBlockedUsersResponse, GetCustomPermissionResponse, GetImportResponse, GetOGResponse, GetRateLimitsResponse, GetTaskResponse, ListBlockListResponse, ListDevicesResponse, ListExternalStorageResponse, ListImportsResponse, ListPermissionsResponse, ListPushProvidersResponse, ListRolesResponse, QueryUsersPayload, QueryUsersResponse, ReactivateUserRequest, ReactivateUserResponse, ReactivateUsersRequest, ReactivateUsersResponse, Response, RestoreUsersRequest, UnblockUsersRequest, UnblockUsersResponse, UpdateAppRequest, UpdateBlockListRequest, UpdateExternalStorageRequest, UpdateExternalStorageResponse, UpdateUsersPartialRequest, UpdateUsersRequest, UpdateUsersResponse, UpsertPushProviderRequest, UpsertPushProviderResponse } from '../models';
|
|
3
|
+
import { BlockUsersRequest, BlockUsersResponse, CheckExternalStorageResponse, CheckPushRequest, CheckPushResponse, CheckSNSRequest, CheckSNSResponse, CheckSQSRequest, CheckSQSResponse, CreateBlockListRequest, CreateBlockListResponse, CreateDeviceRequest, CreateExternalStorageRequest, CreateExternalStorageResponse, CreateGuestRequest, CreateGuestResponse, CreateImportRequest, CreateImportResponse, CreateImportURLRequest, CreateImportURLResponse, CreateRoleRequest, CreateRoleResponse, DeactivateUserRequest, DeactivateUserResponse, DeactivateUsersRequest, DeactivateUsersResponse, DeleteExternalStorageResponse, DeleteUsersRequest, DeleteUsersResponse, ExportUserResponse, ExportUsersRequest, ExportUsersResponse, GetApplicationResponse, GetBlockListResponse, GetBlockedUsersResponse, GetCustomPermissionResponse, GetImportResponse, GetOGResponse, GetRateLimitsResponse, GetTaskResponse, ListBlockListResponse, ListDevicesResponse, ListExternalStorageResponse, ListImportsResponse, ListPermissionsResponse, ListPushProvidersResponse, ListRolesResponse, QueryUsersPayload, QueryUsersResponse, ReactivateUserRequest, ReactivateUserResponse, ReactivateUsersRequest, ReactivateUsersResponse, Response, RestoreUsersRequest, UnblockUsersRequest, UnblockUsersResponse, UpdateAppRequest, UpdateBlockListRequest, UpdateBlockListResponse, UpdateExternalStorageRequest, UpdateExternalStorageResponse, UpdateUsersPartialRequest, UpdateUsersRequest, UpdateUsersResponse, UpsertPushProviderRequest, UpsertPushProviderResponse } from '../models';
|
|
4
4
|
export declare class CommonApi extends BaseApi {
|
|
5
5
|
getApp: () => Promise<StreamResponse<GetApplicationResponse>>;
|
|
6
6
|
updateApp: (request?: UpdateAppRequest) => Promise<StreamResponse<Response>>;
|
|
7
|
-
listBlockLists: (
|
|
8
|
-
|
|
7
|
+
listBlockLists: (request?: {
|
|
8
|
+
team?: string;
|
|
9
|
+
}) => Promise<StreamResponse<ListBlockListResponse>>;
|
|
10
|
+
createBlockList: (request: CreateBlockListRequest) => Promise<StreamResponse<CreateBlockListResponse>>;
|
|
9
11
|
deleteBlockList: (request: {
|
|
10
12
|
name: string;
|
|
13
|
+
team?: string;
|
|
11
14
|
}) => Promise<StreamResponse<Response>>;
|
|
12
15
|
getBlockList: (request: {
|
|
13
16
|
name: string;
|
|
17
|
+
team?: string;
|
|
14
18
|
}) => Promise<StreamResponse<GetBlockListResponse>>;
|
|
15
19
|
updateBlockList: (request: UpdateBlockListRequest & {
|
|
16
20
|
name: string;
|
|
17
|
-
}) => Promise<StreamResponse<
|
|
21
|
+
}) => Promise<StreamResponse<UpdateBlockListResponse>>;
|
|
18
22
|
checkPush: (request?: CheckPushRequest) => Promise<StreamResponse<CheckPushResponse>>;
|
|
19
23
|
checkSNS: (request?: CheckSNSRequest) => Promise<StreamResponse<CheckSNSResponse>>;
|
|
20
24
|
checkSQS: (request?: CheckSQSRequest) => Promise<StreamResponse<CheckSQSResponse>>;
|
|
@@ -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
|
}
|
|
@@ -110,6 +109,7 @@ export interface AppResponseFields {
|
|
|
110
109
|
enforce_unique_usernames: string;
|
|
111
110
|
image_moderation_enabled: boolean;
|
|
112
111
|
moderation_enabled: boolean;
|
|
112
|
+
moderation_multitenant_blocklist_enabled: boolean;
|
|
113
113
|
moderation_webhook_url: string;
|
|
114
114
|
multi_tenant_enabled: boolean;
|
|
115
115
|
name: string;
|
|
@@ -302,11 +302,14 @@ export interface BlockListResponse {
|
|
|
302
302
|
type: string;
|
|
303
303
|
words: string[];
|
|
304
304
|
created_at?: Date;
|
|
305
|
+
id?: string;
|
|
306
|
+
team?: string;
|
|
305
307
|
updated_at?: Date;
|
|
306
308
|
}
|
|
307
309
|
export interface BlockListRule {
|
|
308
310
|
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
|
|
309
311
|
name: string;
|
|
312
|
+
team: string;
|
|
310
313
|
}
|
|
311
314
|
export interface BlockUserRequest {
|
|
312
315
|
user_id: string;
|
|
@@ -447,6 +450,7 @@ export interface CallHLSBroadcastingStartedEvent {
|
|
|
447
450
|
call_cid: string;
|
|
448
451
|
created_at: Date;
|
|
449
452
|
hls_playlist_url: string;
|
|
453
|
+
call: CallResponse;
|
|
450
454
|
type: string;
|
|
451
455
|
}
|
|
452
456
|
export interface CallHLSBroadcastingStoppedEvent {
|
|
@@ -538,22 +542,26 @@ export interface CallRecording {
|
|
|
538
542
|
export interface CallRecordingFailedEvent {
|
|
539
543
|
call_cid: string;
|
|
540
544
|
created_at: Date;
|
|
545
|
+
egress_id: string;
|
|
541
546
|
type: string;
|
|
542
547
|
}
|
|
543
548
|
export interface CallRecordingReadyEvent {
|
|
544
549
|
call_cid: string;
|
|
545
550
|
created_at: Date;
|
|
551
|
+
egress_id: string;
|
|
546
552
|
call_recording: CallRecording;
|
|
547
553
|
type: string;
|
|
548
554
|
}
|
|
549
555
|
export interface CallRecordingStartedEvent {
|
|
550
556
|
call_cid: string;
|
|
551
557
|
created_at: Date;
|
|
558
|
+
egress_id: string;
|
|
552
559
|
type: string;
|
|
553
560
|
}
|
|
554
561
|
export interface CallRecordingStoppedEvent {
|
|
555
562
|
call_cid: string;
|
|
556
563
|
created_at: Date;
|
|
564
|
+
egress_id: string;
|
|
557
565
|
type: string;
|
|
558
566
|
}
|
|
559
567
|
export interface CallRejectedEvent {
|
|
@@ -743,22 +751,26 @@ export interface CallTranscription {
|
|
|
743
751
|
export interface CallTranscriptionFailedEvent {
|
|
744
752
|
call_cid: string;
|
|
745
753
|
created_at: Date;
|
|
754
|
+
egress_id: string;
|
|
746
755
|
type: string;
|
|
747
756
|
}
|
|
748
757
|
export interface CallTranscriptionReadyEvent {
|
|
749
758
|
call_cid: string;
|
|
750
759
|
created_at: Date;
|
|
760
|
+
egress_id: string;
|
|
751
761
|
call_transcription: CallTranscription;
|
|
752
762
|
type: string;
|
|
753
763
|
}
|
|
754
764
|
export interface CallTranscriptionStartedEvent {
|
|
755
765
|
call_cid: string;
|
|
756
766
|
created_at: Date;
|
|
767
|
+
egress_id: string;
|
|
757
768
|
type: string;
|
|
758
769
|
}
|
|
759
770
|
export interface CallTranscriptionStoppedEvent {
|
|
760
771
|
call_cid: string;
|
|
761
772
|
created_at: Date;
|
|
773
|
+
egress_id: string;
|
|
762
774
|
type: string;
|
|
763
775
|
}
|
|
764
776
|
export interface CallType {
|
|
@@ -809,6 +821,7 @@ export interface CampaignChannelTemplate {
|
|
|
809
821
|
}
|
|
810
822
|
export interface CampaignCompletedEvent {
|
|
811
823
|
created_at: Date;
|
|
824
|
+
custom: Record<string, any>;
|
|
812
825
|
type: string;
|
|
813
826
|
received_at?: Date;
|
|
814
827
|
campaign?: CampaignResponse;
|
|
@@ -844,6 +857,7 @@ export interface CampaignResponse {
|
|
|
844
857
|
}
|
|
845
858
|
export interface CampaignStartedEvent {
|
|
846
859
|
created_at: Date;
|
|
860
|
+
custom: Record<string, any>;
|
|
847
861
|
type: string;
|
|
848
862
|
received_at?: Date;
|
|
849
863
|
campaign?: CampaignResponse;
|
|
@@ -1104,6 +1118,10 @@ export declare const ChannelOwnCapability: {
|
|
|
1104
1118
|
readonly UPLOAD_FILE: "upload-file";
|
|
1105
1119
|
};
|
|
1106
1120
|
export type ChannelOwnCapability = (typeof ChannelOwnCapability)[keyof typeof ChannelOwnCapability];
|
|
1121
|
+
export interface ChannelPushPreferences {
|
|
1122
|
+
chat_level?: string;
|
|
1123
|
+
disabled_until?: Date;
|
|
1124
|
+
}
|
|
1107
1125
|
export interface ChannelResponse {
|
|
1108
1126
|
cid: string;
|
|
1109
1127
|
created_at: Date;
|
|
@@ -1146,6 +1164,7 @@ export interface ChannelStateResponse {
|
|
|
1146
1164
|
watchers?: UserResponse[];
|
|
1147
1165
|
channel?: ChannelResponse;
|
|
1148
1166
|
membership?: ChannelMember;
|
|
1167
|
+
push_preferences?: ChannelPushPreferences;
|
|
1149
1168
|
}
|
|
1150
1169
|
export interface ChannelStateResponseFields {
|
|
1151
1170
|
members: ChannelMember[];
|
|
@@ -1160,6 +1179,7 @@ export interface ChannelStateResponseFields {
|
|
|
1160
1179
|
watchers?: UserResponse[];
|
|
1161
1180
|
channel?: ChannelResponse;
|
|
1162
1181
|
membership?: ChannelMember;
|
|
1182
|
+
push_preferences?: ChannelPushPreferences;
|
|
1163
1183
|
}
|
|
1164
1184
|
export interface ChannelTruncatedEvent {
|
|
1165
1185
|
channel_id: string;
|
|
@@ -1264,6 +1284,7 @@ export interface CheckRequest {
|
|
|
1264
1284
|
entity_creator_id: string;
|
|
1265
1285
|
entity_id: string;
|
|
1266
1286
|
entity_type: string;
|
|
1287
|
+
config_team?: string;
|
|
1267
1288
|
test_mode?: boolean;
|
|
1268
1289
|
user_id?: string;
|
|
1269
1290
|
moderation_payload?: ModerationPayload;
|
|
@@ -1367,18 +1388,16 @@ export interface Count {
|
|
|
1367
1388
|
approximate: boolean;
|
|
1368
1389
|
value: number;
|
|
1369
1390
|
}
|
|
1370
|
-
export interface CountrywiseAggregateStats {
|
|
1371
|
-
participant_count?: Count;
|
|
1372
|
-
publisher_jitter?: TimeStats;
|
|
1373
|
-
publisher_latency?: TimeStats;
|
|
1374
|
-
subscriber_jitter?: TimeStats;
|
|
1375
|
-
subscriber_latency?: TimeStats;
|
|
1376
|
-
}
|
|
1377
1391
|
export interface CreateBlockListRequest {
|
|
1378
1392
|
name: string;
|
|
1379
1393
|
words: string[];
|
|
1394
|
+
team?: string;
|
|
1380
1395
|
type?: 'regex' | 'domain' | 'email' | 'word';
|
|
1381
1396
|
}
|
|
1397
|
+
export interface CreateBlockListResponse {
|
|
1398
|
+
duration: string;
|
|
1399
|
+
blocklist?: BlockListResponse;
|
|
1400
|
+
}
|
|
1382
1401
|
export interface CreateCallTypeRequest {
|
|
1383
1402
|
name: string;
|
|
1384
1403
|
external_storage?: string;
|
|
@@ -1752,6 +1771,7 @@ export interface EdgeResponse {
|
|
|
1752
1771
|
}
|
|
1753
1772
|
export interface EgressHLSResponse {
|
|
1754
1773
|
playlist_url: string;
|
|
1774
|
+
status: string;
|
|
1755
1775
|
}
|
|
1756
1776
|
export interface EgressRTMPResponse {
|
|
1757
1777
|
name: string;
|
|
@@ -1818,7 +1838,6 @@ export interface EntityCreator {
|
|
|
1818
1838
|
updated_at?: Date;
|
|
1819
1839
|
teams?: string[];
|
|
1820
1840
|
privacy_settings?: PrivacySettings;
|
|
1821
|
-
push_notifications?: PushNotificationSettings;
|
|
1822
1841
|
}
|
|
1823
1842
|
export interface EntityCreatorResponse {
|
|
1824
1843
|
ban_count: number;
|
|
@@ -1833,7 +1852,6 @@ export interface EntityCreatorResponse {
|
|
|
1833
1852
|
shadow_banned: boolean;
|
|
1834
1853
|
updated_at: Date;
|
|
1835
1854
|
blocked_user_ids: string[];
|
|
1836
|
-
devices: DeviceResponse[];
|
|
1837
1855
|
teams: string[];
|
|
1838
1856
|
custom: Record<string, any>;
|
|
1839
1857
|
ban_expires?: Date;
|
|
@@ -1843,6 +1861,7 @@ export interface EntityCreatorResponse {
|
|
|
1843
1861
|
last_active?: Date;
|
|
1844
1862
|
name?: string;
|
|
1845
1863
|
revoke_tokens_issued_before?: Date;
|
|
1864
|
+
devices?: DeviceResponse[];
|
|
1846
1865
|
privacy_settings?: PrivacySettingsResponse;
|
|
1847
1866
|
push_notifications?: PushNotificationSettingsResponse;
|
|
1848
1867
|
}
|
|
@@ -2023,6 +2042,7 @@ export interface FlagResponse {
|
|
|
2023
2042
|
}
|
|
2024
2043
|
export interface FlagUpdatedEvent {
|
|
2025
2044
|
created_at: Date;
|
|
2045
|
+
custom: Record<string, any>;
|
|
2026
2046
|
type: string;
|
|
2027
2047
|
received_at?: Date;
|
|
2028
2048
|
created_by?: UserResponse;
|
|
@@ -2057,7 +2077,6 @@ export interface FullUserResponse {
|
|
|
2057
2077
|
revoke_tokens_issued_before?: Date;
|
|
2058
2078
|
latest_hidden_channels?: string[];
|
|
2059
2079
|
privacy_settings?: PrivacySettingsResponse;
|
|
2060
|
-
push_notifications?: PushNotificationSettingsResponse;
|
|
2061
2080
|
}
|
|
2062
2081
|
export interface GeofenceResponse {
|
|
2063
2082
|
name: string;
|
|
@@ -2718,10 +2737,11 @@ export interface MessageReadEvent {
|
|
|
2718
2737
|
cid: string;
|
|
2719
2738
|
created_at: Date;
|
|
2720
2739
|
type: string;
|
|
2740
|
+
channel_last_message_at?: Date;
|
|
2721
2741
|
last_read_message_id?: string;
|
|
2722
2742
|
team?: string;
|
|
2723
2743
|
thread?: ThreadResponse;
|
|
2724
|
-
user?:
|
|
2744
|
+
user?: UserResponseCommonFields;
|
|
2725
2745
|
}
|
|
2726
2746
|
export interface MessageRequest {
|
|
2727
2747
|
html?: string;
|
|
@@ -2875,6 +2895,7 @@ export interface ModerationCustomActionEvent {
|
|
|
2875
2895
|
}
|
|
2876
2896
|
export interface ModerationEvent {
|
|
2877
2897
|
created_at: Date;
|
|
2898
|
+
custom: Record<string, any>;
|
|
2878
2899
|
type: string;
|
|
2879
2900
|
received_at?: Date;
|
|
2880
2901
|
flags?: Flag2Response[];
|
|
@@ -3008,13 +3029,7 @@ export interface NotificationSettings {
|
|
|
3008
3029
|
call_ring: EventNotificationSettings;
|
|
3009
3030
|
session_started: EventNotificationSettings;
|
|
3010
3031
|
}
|
|
3011
|
-
export interface NullBool {
|
|
3012
|
-
has_value?: boolean;
|
|
3013
|
-
value?: boolean;
|
|
3014
|
-
}
|
|
3015
3032
|
export interface NullTime {
|
|
3016
|
-
has_value?: boolean;
|
|
3017
|
-
value?: Date;
|
|
3018
3033
|
}
|
|
3019
3034
|
export interface OnlyUserID {
|
|
3020
3035
|
id: string;
|
|
@@ -3075,7 +3090,7 @@ export interface OwnUser {
|
|
|
3075
3090
|
latest_hidden_channels?: string[];
|
|
3076
3091
|
teams?: string[];
|
|
3077
3092
|
privacy_settings?: PrivacySettings;
|
|
3078
|
-
|
|
3093
|
+
push_preferences?: PushPreferences;
|
|
3079
3094
|
}
|
|
3080
3095
|
export interface OwnUserResponse {
|
|
3081
3096
|
banned: boolean;
|
|
@@ -3104,7 +3119,7 @@ export interface OwnUserResponse {
|
|
|
3104
3119
|
blocked_user_ids?: string[];
|
|
3105
3120
|
latest_hidden_channels?: string[];
|
|
3106
3121
|
privacy_settings?: PrivacySettingsResponse;
|
|
3107
|
-
|
|
3122
|
+
push_preferences?: PushPreferences;
|
|
3108
3123
|
}
|
|
3109
3124
|
export interface PaginationParams {
|
|
3110
3125
|
limit?: number;
|
|
@@ -3308,16 +3323,20 @@ export interface PushNotificationFields {
|
|
|
3308
3323
|
xiaomi: XiaomiConfigFields;
|
|
3309
3324
|
providers?: PushProvider[];
|
|
3310
3325
|
}
|
|
3311
|
-
export interface
|
|
3326
|
+
export interface PushNotificationSettingsResponse {
|
|
3312
3327
|
disabled?: boolean;
|
|
3313
3328
|
disabled_until?: Date;
|
|
3314
3329
|
}
|
|
3315
|
-
export interface
|
|
3316
|
-
|
|
3317
|
-
|
|
3330
|
+
export interface PushPreferenceInput {
|
|
3331
|
+
channel_cid?: string;
|
|
3332
|
+
chat_level?: 'all' | 'mentions' | 'none' | 'default';
|
|
3333
|
+
disabled_until?: Date;
|
|
3334
|
+
remove_disable?: boolean;
|
|
3335
|
+
user_id?: string;
|
|
3318
3336
|
}
|
|
3319
|
-
export interface
|
|
3320
|
-
|
|
3337
|
+
export interface PushPreferences {
|
|
3338
|
+
call_level?: string;
|
|
3339
|
+
chat_level?: string;
|
|
3321
3340
|
disabled_until?: Date;
|
|
3322
3341
|
}
|
|
3323
3342
|
export interface PushProvider {
|
|
@@ -3610,7 +3629,7 @@ export interface QueryReviewQueueResponse {
|
|
|
3610
3629
|
duration: string;
|
|
3611
3630
|
items: ReviewQueueItemResponse[];
|
|
3612
3631
|
action_config: Record<string, ModerationActionConfig[]>;
|
|
3613
|
-
stats: Record<string,
|
|
3632
|
+
stats: Record<string, any>;
|
|
3614
3633
|
next?: string;
|
|
3615
3634
|
prev?: string;
|
|
3616
3635
|
}
|
|
@@ -3856,7 +3875,6 @@ export interface RecordSettingsResponse {
|
|
|
3856
3875
|
export interface ReportByHistogramBucket {
|
|
3857
3876
|
category: string;
|
|
3858
3877
|
count: number;
|
|
3859
|
-
mean: number;
|
|
3860
3878
|
sum: number;
|
|
3861
3879
|
lower_bound?: Bound;
|
|
3862
3880
|
upper_bound?: Bound;
|
|
@@ -3875,6 +3893,7 @@ export interface RestoreUsersRequest {
|
|
|
3875
3893
|
user_ids: string[];
|
|
3876
3894
|
}
|
|
3877
3895
|
export interface ReviewQueueItem {
|
|
3896
|
+
ai_text_severity: string;
|
|
3878
3897
|
bounce_count: number;
|
|
3879
3898
|
content_changed: boolean;
|
|
3880
3899
|
created_at: Date;
|
|
@@ -3895,7 +3914,6 @@ export interface ReviewQueueItem {
|
|
|
3895
3914
|
flags: Flag2[];
|
|
3896
3915
|
languages: string[];
|
|
3897
3916
|
teams: string[];
|
|
3898
|
-
completed_at: NullTime;
|
|
3899
3917
|
reviewed_at: NullTime;
|
|
3900
3918
|
assigned_to?: User;
|
|
3901
3919
|
entity_creator?: EntityCreator;
|
|
@@ -3905,6 +3923,7 @@ export interface ReviewQueueItem {
|
|
|
3905
3923
|
moderation_payload?: ModerationPayload;
|
|
3906
3924
|
}
|
|
3907
3925
|
export interface ReviewQueueItemResponse {
|
|
3926
|
+
ai_text_severity: string;
|
|
3908
3927
|
created_at: Date;
|
|
3909
3928
|
entity_id: string;
|
|
3910
3929
|
entity_type: string;
|
|
@@ -4506,8 +4525,13 @@ export interface UpdateAppRequest {
|
|
|
4506
4525
|
xiaomi_config?: XiaomiConfig;
|
|
4507
4526
|
}
|
|
4508
4527
|
export interface UpdateBlockListRequest {
|
|
4528
|
+
team?: string;
|
|
4509
4529
|
words?: string[];
|
|
4510
4530
|
}
|
|
4531
|
+
export interface UpdateBlockListResponse {
|
|
4532
|
+
duration: string;
|
|
4533
|
+
blocklist?: BlockListResponse;
|
|
4534
|
+
}
|
|
4511
4535
|
export interface UpdateCallMembersRequest {
|
|
4512
4536
|
remove_members?: string[];
|
|
4513
4537
|
update_members?: MemberRequest[];
|
|
@@ -4798,6 +4822,14 @@ export interface UpsertModerationTemplateResponse {
|
|
|
4798
4822
|
updated_at: Date;
|
|
4799
4823
|
config?: FeedsModerationTemplateConfig;
|
|
4800
4824
|
}
|
|
4825
|
+
export interface UpsertPushPreferencesRequest {
|
|
4826
|
+
preferences: PushPreferenceInput[];
|
|
4827
|
+
}
|
|
4828
|
+
export interface UpsertPushPreferencesResponse {
|
|
4829
|
+
duration: string;
|
|
4830
|
+
user_channel_preferences: Record<string, Record<string, ChannelPushPreferences>>;
|
|
4831
|
+
user_preferences: Record<string, PushPreferences>;
|
|
4832
|
+
}
|
|
4801
4833
|
export interface UpsertPushProviderRequest {
|
|
4802
4834
|
push_provider?: PushProvider;
|
|
4803
4835
|
}
|
|
@@ -4823,7 +4855,6 @@ export interface User {
|
|
|
4823
4855
|
updated_at?: Date;
|
|
4824
4856
|
teams?: string[];
|
|
4825
4857
|
privacy_settings?: PrivacySettings;
|
|
4826
|
-
push_notifications?: PushNotificationSettings;
|
|
4827
4858
|
}
|
|
4828
4859
|
export interface UserBannedEvent {
|
|
4829
4860
|
channel_id: string;
|
|
@@ -4861,26 +4892,6 @@ export interface UserDeletedEvent {
|
|
|
4861
4892
|
type: string;
|
|
4862
4893
|
user?: User;
|
|
4863
4894
|
}
|
|
4864
|
-
export interface UserEventPayload {
|
|
4865
|
-
banned: boolean;
|
|
4866
|
-
created_at: Date;
|
|
4867
|
-
id: string;
|
|
4868
|
-
language: string;
|
|
4869
|
-
online: boolean;
|
|
4870
|
-
role: string;
|
|
4871
|
-
updated_at: Date;
|
|
4872
|
-
blocked_user_ids: string[];
|
|
4873
|
-
teams: string[];
|
|
4874
|
-
custom: Record<string, any>;
|
|
4875
|
-
deactivated_at?: Date;
|
|
4876
|
-
deleted_at?: Date;
|
|
4877
|
-
image?: string;
|
|
4878
|
-
invisible?: boolean;
|
|
4879
|
-
last_active?: Date;
|
|
4880
|
-
name?: string;
|
|
4881
|
-
revoke_tokens_issued_before?: Date;
|
|
4882
|
-
privacy_settings?: PrivacySettingsResponse;
|
|
4883
|
-
}
|
|
4884
4895
|
export interface UserFeedbackReport {
|
|
4885
4896
|
unreported_count: number;
|
|
4886
4897
|
count_by_rating: Record<string, number>;
|
|
@@ -4953,7 +4964,6 @@ export interface UserRequest {
|
|
|
4953
4964
|
teams?: string[];
|
|
4954
4965
|
custom?: Record<string, any>;
|
|
4955
4966
|
privacy_settings?: PrivacySettingsResponse;
|
|
4956
|
-
push_notifications?: PushNotificationSettingsInput;
|
|
4957
4967
|
}
|
|
4958
4968
|
export interface UserResponse {
|
|
4959
4969
|
banned: boolean;
|
|
@@ -4966,7 +4976,6 @@ export interface UserResponse {
|
|
|
4966
4976
|
shadow_banned: boolean;
|
|
4967
4977
|
updated_at: Date;
|
|
4968
4978
|
blocked_user_ids: string[];
|
|
4969
|
-
devices: DeviceResponse[];
|
|
4970
4979
|
teams: string[];
|
|
4971
4980
|
custom: Record<string, any>;
|
|
4972
4981
|
ban_expires?: Date;
|
|
@@ -4976,9 +4985,48 @@ export interface UserResponse {
|
|
|
4976
4985
|
last_active?: Date;
|
|
4977
4986
|
name?: string;
|
|
4978
4987
|
revoke_tokens_issued_before?: Date;
|
|
4988
|
+
devices?: DeviceResponse[];
|
|
4979
4989
|
privacy_settings?: PrivacySettingsResponse;
|
|
4980
4990
|
push_notifications?: PushNotificationSettingsResponse;
|
|
4981
4991
|
}
|
|
4992
|
+
export interface UserResponseCommonFields {
|
|
4993
|
+
banned: boolean;
|
|
4994
|
+
created_at: Date;
|
|
4995
|
+
id: string;
|
|
4996
|
+
language: string;
|
|
4997
|
+
online: boolean;
|
|
4998
|
+
role: string;
|
|
4999
|
+
updated_at: Date;
|
|
5000
|
+
blocked_user_ids: string[];
|
|
5001
|
+
teams: string[];
|
|
5002
|
+
custom: Record<string, any>;
|
|
5003
|
+
deactivated_at?: Date;
|
|
5004
|
+
deleted_at?: Date;
|
|
5005
|
+
image?: string;
|
|
5006
|
+
last_active?: Date;
|
|
5007
|
+
name?: string;
|
|
5008
|
+
revoke_tokens_issued_before?: Date;
|
|
5009
|
+
}
|
|
5010
|
+
export interface UserResponsePrivacyFields {
|
|
5011
|
+
banned: boolean;
|
|
5012
|
+
created_at: Date;
|
|
5013
|
+
id: string;
|
|
5014
|
+
language: string;
|
|
5015
|
+
online: boolean;
|
|
5016
|
+
role: string;
|
|
5017
|
+
updated_at: Date;
|
|
5018
|
+
blocked_user_ids: string[];
|
|
5019
|
+
teams: string[];
|
|
5020
|
+
custom: Record<string, any>;
|
|
5021
|
+
deactivated_at?: Date;
|
|
5022
|
+
deleted_at?: Date;
|
|
5023
|
+
image?: string;
|
|
5024
|
+
invisible?: boolean;
|
|
5025
|
+
last_active?: Date;
|
|
5026
|
+
name?: string;
|
|
5027
|
+
revoke_tokens_issued_before?: Date;
|
|
5028
|
+
privacy_settings?: PrivacySettingsResponse;
|
|
5029
|
+
}
|
|
4982
5030
|
export interface UserSessionStats {
|
|
4983
5031
|
freeze_duration_seconds: number;
|
|
4984
5032
|
group: string;
|
|
@@ -5064,7 +5112,8 @@ export interface UserUnreadReminderEvent {
|
|
|
5064
5112
|
}
|
|
5065
5113
|
export interface UserUpdatedEvent {
|
|
5066
5114
|
created_at: Date;
|
|
5067
|
-
|
|
5115
|
+
custom: Record<string, any>;
|
|
5116
|
+
user: UserResponsePrivacyFields;
|
|
5068
5117
|
type: string;
|
|
5069
5118
|
received_at?: Date;
|
|
5070
5119
|
}
|
|
@@ -5129,6 +5178,7 @@ export interface WSEvent {
|
|
|
5129
5178
|
custom: Record<string, any>;
|
|
5130
5179
|
automoderation?: boolean;
|
|
5131
5180
|
channel_id?: string;
|
|
5181
|
+
channel_last_message_at?: Date;
|
|
5132
5182
|
channel_type?: string;
|
|
5133
5183
|
cid?: string;
|
|
5134
5184
|
connection_id?: string;
|
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>> => {
|