@stream-io/node-sdk 0.4.19 → 0.4.20
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 +115 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +115 -98
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/BaseApi.d.ts +1 -0
- package/dist/src/StreamClient.d.ts +7 -0
- package/dist/src/gen/chat/ChannelApi.d.ts +9 -1
- package/dist/src/gen/chat/ChatApi.d.ts +17 -1
- package/dist/src/gen/models/index.d.ts +119 -119
- package/dist/src/gen/moderation/ModerationApi.d.ts +1 -11
- package/dist/src/types.d.ts +3 -0
- package/package.json +2 -1
- package/src/BaseApi.ts +9 -1
- package/src/StreamClient.ts +18 -1
- package/src/gen/chat/ChannelApi.ts +29 -0
- package/src/gen/chat/ChatApi.ts +89 -1
- package/src/gen/model-decoders/index.ts +50 -63
- package/src/gen/models/index.ts +214 -206
- package/src/gen/moderation/ModerationApi.ts +0 -94
- package/src/types.ts +4 -0
package/dist/src/BaseApi.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiConfig, RequestMetadata } from './types';
|
|
2
2
|
export declare class BaseApi {
|
|
3
3
|
protected readonly apiConfig: ApiConfig;
|
|
4
|
+
private readonly dispatcher;
|
|
4
5
|
constructor(apiConfig: ApiConfig);
|
|
5
6
|
protected sendRequest: <T>(method: string, url: string, pathParams?: Record<string, string>, queryParams?: Record<string, any>, body?: any) => Promise<{
|
|
6
7
|
body: T;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import { CommonApi } from './gen/common/CommonApi';
|
|
3
4
|
import { StreamVideoClient } from './StreamVideoClient';
|
|
4
5
|
import { StreamChatClient } from './StreamChatClient';
|
|
5
6
|
import { QueryBannedUsersPayload, UserRequest } from './gen/models';
|
|
6
7
|
import { StreamModerationClient } from './StreamModerationClient';
|
|
8
|
+
import { Agent } from 'undici';
|
|
7
9
|
export interface StreamClientOptions {
|
|
8
10
|
timeout?: number;
|
|
9
11
|
basePath?: string;
|
|
12
|
+
/** The max number of clients to create. `null` if no limit. Default is 100. Has no effect if `agent` is provided. */
|
|
13
|
+
maxConnections?: number | null;
|
|
14
|
+
/** The [HTTP Agent](https://undici.nodejs.org/#/docs/api/Agent.md) to use. */
|
|
15
|
+
agent?: Agent;
|
|
10
16
|
}
|
|
11
17
|
export declare class StreamClient extends CommonApi {
|
|
12
18
|
readonly apiKey: string;
|
|
@@ -17,6 +23,7 @@ export declare class StreamClient extends CommonApi {
|
|
|
17
23
|
readonly moderation: StreamModerationClient;
|
|
18
24
|
readonly options: StreamClientOptions;
|
|
19
25
|
private static readonly DEFAULT_TIMEOUT;
|
|
26
|
+
private static readonly MAX_CONNECTIONS;
|
|
20
27
|
/**
|
|
21
28
|
*
|
|
22
29
|
* @param apiKey
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatApi } from './ChatApi';
|
|
2
2
|
import { StreamResponse } from '../../types';
|
|
3
|
-
import { ChannelGetOrCreateRequest, ChannelStateResponse, DeleteChannelResponse, EventResponse, FileUploadRequest, FileUploadResponse, GetManyMessagesResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, Response, SendEventRequest, SendMessageRequest, SendMessageResponse, ShowChannelRequest, ShowChannelResponse, TruncateChannelRequest, TruncateChannelResponse, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateMemberPartialRequest, UpdateMemberPartialResponse } from '../models';
|
|
3
|
+
import { ChannelGetOrCreateRequest, ChannelStateResponse, DeleteChannelResponse, EventResponse, FileUploadRequest, FileUploadResponse, GetDraftResponse, GetManyMessagesResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, Response, SendEventRequest, SendMessageRequest, SendMessageResponse, ShowChannelRequest, ShowChannelResponse, TruncateChannelRequest, TruncateChannelResponse, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateMemberPartialRequest, UpdateMemberPartialResponse } from '../models';
|
|
4
4
|
export declare class ChannelApi {
|
|
5
5
|
protected chatApi: ChatApi;
|
|
6
6
|
readonly type: string;
|
|
@@ -11,6 +11,14 @@ export declare class ChannelApi {
|
|
|
11
11
|
}) => Promise<StreamResponse<DeleteChannelResponse>>;
|
|
12
12
|
updateChannelPartial: (request?: UpdateChannelPartialRequest) => Promise<StreamResponse<UpdateChannelPartialResponse>>;
|
|
13
13
|
update: (request?: UpdateChannelRequest) => Promise<StreamResponse<UpdateChannelResponse>>;
|
|
14
|
+
deleteDraft: (request?: {
|
|
15
|
+
parent_id?: string;
|
|
16
|
+
user_id?: string;
|
|
17
|
+
}) => Promise<StreamResponse<Response>>;
|
|
18
|
+
getDraft: (request?: {
|
|
19
|
+
parent_id?: string;
|
|
20
|
+
user_id?: string;
|
|
21
|
+
}) => Promise<StreamResponse<GetDraftResponse>>;
|
|
14
22
|
sendEvent: (request: SendEventRequest) => Promise<StreamResponse<EventResponse>>;
|
|
15
23
|
deleteFile: (request?: {
|
|
16
24
|
url?: string;
|
|
@@ -1,10 +1,13 @@
|
|
|
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, 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';
|
|
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, GetDraftResponse, 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, QueryDraftsRequest, QueryDraftsResponse, 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: {
|
|
7
7
|
id: string;
|
|
8
|
+
prev?: string;
|
|
9
|
+
next?: string;
|
|
10
|
+
limit?: number;
|
|
8
11
|
}) => Promise<StreamResponse<GetCampaignResponse>>;
|
|
9
12
|
startCampaign: (request: StartCampaignRequest & {
|
|
10
13
|
id: string;
|
|
@@ -31,6 +34,18 @@ export declare class ChatApi extends BaseApi {
|
|
|
31
34
|
type: string;
|
|
32
35
|
id: string;
|
|
33
36
|
}) => Promise<StreamResponse<UpdateChannelResponse>>;
|
|
37
|
+
deleteDraft: (request: {
|
|
38
|
+
type: string;
|
|
39
|
+
id: string;
|
|
40
|
+
parent_id?: string;
|
|
41
|
+
user_id?: string;
|
|
42
|
+
}) => Promise<StreamResponse<Response>>;
|
|
43
|
+
getDraft: (request: {
|
|
44
|
+
type: string;
|
|
45
|
+
id: string;
|
|
46
|
+
parent_id?: string;
|
|
47
|
+
user_id?: string;
|
|
48
|
+
}) => Promise<StreamResponse<GetDraftResponse>>;
|
|
34
49
|
sendEvent: (request: SendEventRequest & {
|
|
35
50
|
type: string;
|
|
36
51
|
id: string;
|
|
@@ -113,6 +128,7 @@ export declare class ChatApi extends BaseApi {
|
|
|
113
128
|
updateCommand: (request: UpdateCommandRequest & {
|
|
114
129
|
name: string;
|
|
115
130
|
}) => Promise<StreamResponse<UpdateCommandResponse>>;
|
|
131
|
+
queryDrafts: (request?: QueryDraftsRequest) => Promise<StreamResponse<QueryDraftsResponse>>;
|
|
116
132
|
exportChannels: (request: ExportChannelsRequest) => Promise<StreamResponse<ExportChannelsResponse>>;
|
|
117
133
|
queryMembers: (request?: {
|
|
118
134
|
payload?: QueryMembersPayload;
|
|
@@ -162,6 +162,16 @@ export interface AsyncExportErrorEvent {
|
|
|
162
162
|
type: string;
|
|
163
163
|
received_at?: Date;
|
|
164
164
|
}
|
|
165
|
+
export interface AsyncExportModerationLogsEvent {
|
|
166
|
+
created_at: Date;
|
|
167
|
+
finished_at: Date;
|
|
168
|
+
started_at: Date;
|
|
169
|
+
task_id: string;
|
|
170
|
+
url: string;
|
|
171
|
+
custom: Record<string, any>;
|
|
172
|
+
type: string;
|
|
173
|
+
received_at?: Date;
|
|
174
|
+
}
|
|
165
175
|
export interface AsyncExportUsersEvent {
|
|
166
176
|
created_at: Date;
|
|
167
177
|
finished_at: Date;
|
|
@@ -373,9 +383,6 @@ export interface BlockedUserResponse {
|
|
|
373
383
|
blocked_user: UserResponse;
|
|
374
384
|
user: UserResponse;
|
|
375
385
|
}
|
|
376
|
-
export interface BodyguardImageAnalysisConfig {
|
|
377
|
-
rules?: BodyguardRule[];
|
|
378
|
-
}
|
|
379
386
|
export interface BodyguardRule {
|
|
380
387
|
action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove';
|
|
381
388
|
label: string;
|
|
@@ -869,6 +876,18 @@ export interface CallUpdatedEvent {
|
|
|
869
876
|
capabilities_by_role: Record<string, string[]>;
|
|
870
877
|
type: string;
|
|
871
878
|
}
|
|
879
|
+
export interface CallUserFeedbackSubmittedEvent {
|
|
880
|
+
call_cid: string;
|
|
881
|
+
created_at: Date;
|
|
882
|
+
rating: number;
|
|
883
|
+
session_id: string;
|
|
884
|
+
user: UserResponse;
|
|
885
|
+
type: string;
|
|
886
|
+
reason?: string;
|
|
887
|
+
sdk?: string;
|
|
888
|
+
sdk_version?: string;
|
|
889
|
+
custom?: Record<string, any>;
|
|
890
|
+
}
|
|
872
891
|
export interface CallUserMutedEvent {
|
|
873
892
|
call_cid: string;
|
|
874
893
|
created_at: Date;
|
|
@@ -938,6 +957,8 @@ export interface CampaignStatsResponse {
|
|
|
938
957
|
stats_completed_at: Date;
|
|
939
958
|
stats_messages_sent: number;
|
|
940
959
|
stats_started_at: Date;
|
|
960
|
+
stats_users_read: number;
|
|
961
|
+
stats_users_sent: number;
|
|
941
962
|
}
|
|
942
963
|
export interface CastPollVoteRequest {
|
|
943
964
|
user_id?: string;
|
|
@@ -957,6 +978,7 @@ export interface Channel {
|
|
|
957
978
|
auto_translation_enabled?: boolean;
|
|
958
979
|
cooldown?: number;
|
|
959
980
|
deleted_at?: Date;
|
|
981
|
+
last_campaigns?: string;
|
|
960
982
|
last_message_at?: Date;
|
|
961
983
|
member_count?: number;
|
|
962
984
|
team?: string;
|
|
@@ -1234,6 +1256,7 @@ export interface ChannelStateResponse {
|
|
|
1234
1256
|
read?: ReadStateResponse[];
|
|
1235
1257
|
watchers?: UserResponse[];
|
|
1236
1258
|
channel?: ChannelResponse;
|
|
1259
|
+
draft?: DraftResponse;
|
|
1237
1260
|
membership?: ChannelMember;
|
|
1238
1261
|
push_preferences?: ChannelPushPreferences;
|
|
1239
1262
|
}
|
|
@@ -1249,6 +1272,7 @@ export interface ChannelStateResponseFields {
|
|
|
1249
1272
|
read?: ReadStateResponse[];
|
|
1250
1273
|
watchers?: UserResponse[];
|
|
1251
1274
|
channel?: ChannelResponse;
|
|
1275
|
+
draft?: DraftResponse;
|
|
1252
1276
|
membership?: ChannelMember;
|
|
1253
1277
|
push_preferences?: ChannelPushPreferences;
|
|
1254
1278
|
}
|
|
@@ -1828,6 +1852,30 @@ export interface DeviceResponse {
|
|
|
1828
1852
|
push_provider_name?: string;
|
|
1829
1853
|
voip?: boolean;
|
|
1830
1854
|
}
|
|
1855
|
+
export interface DraftPayloadResponse {
|
|
1856
|
+
id: string;
|
|
1857
|
+
text: string;
|
|
1858
|
+
custom: Record<string, any>;
|
|
1859
|
+
html?: string;
|
|
1860
|
+
mml?: string;
|
|
1861
|
+
parent_id?: string;
|
|
1862
|
+
poll_id?: string;
|
|
1863
|
+
quoted_message_id?: string;
|
|
1864
|
+
show_in_channel?: boolean;
|
|
1865
|
+
silent?: boolean;
|
|
1866
|
+
type?: string;
|
|
1867
|
+
attachments?: Attachment[];
|
|
1868
|
+
mentioned_users?: UserResponse[];
|
|
1869
|
+
}
|
|
1870
|
+
export interface DraftResponse {
|
|
1871
|
+
channel_cid: string;
|
|
1872
|
+
created_at: Date;
|
|
1873
|
+
message: DraftPayloadResponse;
|
|
1874
|
+
parent_id?: string;
|
|
1875
|
+
channel?: ChannelResponse;
|
|
1876
|
+
parent_message?: MessageResponse;
|
|
1877
|
+
quoted_message?: MessageResponse;
|
|
1878
|
+
}
|
|
1831
1879
|
export interface EdgeResponse {
|
|
1832
1880
|
continent_code: string;
|
|
1833
1881
|
country_iso_code: string;
|
|
@@ -1898,6 +1946,7 @@ export interface EntityCreator {
|
|
|
1898
1946
|
online: boolean;
|
|
1899
1947
|
role: string;
|
|
1900
1948
|
custom: Record<string, any>;
|
|
1949
|
+
teams_role: Record<string, string>;
|
|
1901
1950
|
ban_expires?: Date;
|
|
1902
1951
|
created_at?: Date;
|
|
1903
1952
|
deactivated_at?: Date;
|
|
@@ -1937,6 +1986,7 @@ export interface EntityCreatorResponse {
|
|
|
1937
1986
|
devices?: DeviceResponse[];
|
|
1938
1987
|
privacy_settings?: PrivacySettingsResponse;
|
|
1939
1988
|
push_notifications?: PushNotificationSettingsResponse;
|
|
1989
|
+
teams_role?: Record<string, string>;
|
|
1940
1990
|
}
|
|
1941
1991
|
export interface ErrorResult {
|
|
1942
1992
|
type: string;
|
|
@@ -2035,22 +2085,6 @@ export interface FirebaseConfigFields {
|
|
|
2035
2085
|
server_key?: string;
|
|
2036
2086
|
}
|
|
2037
2087
|
export interface Flag {
|
|
2038
|
-
created_at: Date;
|
|
2039
|
-
created_by_automod: boolean;
|
|
2040
|
-
updated_at: Date;
|
|
2041
|
-
approved_at?: Date;
|
|
2042
|
-
reason?: string;
|
|
2043
|
-
rejected_at?: Date;
|
|
2044
|
-
reviewed_at?: Date;
|
|
2045
|
-
reviewed_by?: string;
|
|
2046
|
-
target_message_id?: string;
|
|
2047
|
-
custom?: Record<string, any>;
|
|
2048
|
-
details?: FlagDetails;
|
|
2049
|
-
target_message?: Message;
|
|
2050
|
-
target_user?: User;
|
|
2051
|
-
user?: User;
|
|
2052
|
-
}
|
|
2053
|
-
export interface Flag2 {
|
|
2054
2088
|
created_at: Date;
|
|
2055
2089
|
entity_id: string;
|
|
2056
2090
|
entity_type: string;
|
|
@@ -2066,22 +2100,6 @@ export interface Flag2 {
|
|
|
2066
2100
|
moderation_payload?: ModerationPayload;
|
|
2067
2101
|
user?: User;
|
|
2068
2102
|
}
|
|
2069
|
-
export interface Flag2Response {
|
|
2070
|
-
created_at: Date;
|
|
2071
|
-
entity_id: string;
|
|
2072
|
-
entity_type: string;
|
|
2073
|
-
updated_at: Date;
|
|
2074
|
-
user_id: string;
|
|
2075
|
-
result: Array<Record<string, any>>;
|
|
2076
|
-
entity_creator_id?: string;
|
|
2077
|
-
reason?: string;
|
|
2078
|
-
review_queue_item_id?: string;
|
|
2079
|
-
type?: string;
|
|
2080
|
-
labels?: string[];
|
|
2081
|
-
custom?: Record<string, any>;
|
|
2082
|
-
moderation_payload?: ModerationPayload;
|
|
2083
|
-
user?: UserResponse;
|
|
2084
|
-
}
|
|
2085
2103
|
export interface FlagDetails {
|
|
2086
2104
|
original_text: string;
|
|
2087
2105
|
extra: Record<string, any>;
|
|
@@ -2168,6 +2186,7 @@ export interface FullUserResponse {
|
|
|
2168
2186
|
revoke_tokens_issued_before?: Date;
|
|
2169
2187
|
latest_hidden_channels?: string[];
|
|
2170
2188
|
privacy_settings?: PrivacySettingsResponse;
|
|
2189
|
+
teams_role?: Record<string, string>;
|
|
2171
2190
|
}
|
|
2172
2191
|
export interface GeofenceResponse {
|
|
2173
2192
|
name: string;
|
|
@@ -2251,6 +2270,7 @@ export interface GetCallTypeResponse {
|
|
|
2251
2270
|
export interface GetCampaignResponse {
|
|
2252
2271
|
duration: string;
|
|
2253
2272
|
campaign?: CampaignResponse;
|
|
2273
|
+
users?: PagerResponse;
|
|
2254
2274
|
}
|
|
2255
2275
|
export interface GetChannelTypeResponse {
|
|
2256
2276
|
automod: 'disabled' | 'simple' | 'AI';
|
|
@@ -2304,6 +2324,10 @@ export interface GetCustomPermissionResponse {
|
|
|
2304
2324
|
duration: string;
|
|
2305
2325
|
permission: Permission;
|
|
2306
2326
|
}
|
|
2327
|
+
export interface GetDraftResponse {
|
|
2328
|
+
duration: string;
|
|
2329
|
+
draft: DraftResponse;
|
|
2330
|
+
}
|
|
2307
2331
|
export interface GetEdgesResponse {
|
|
2308
2332
|
duration: string;
|
|
2309
2333
|
edges: EdgeResponse[];
|
|
@@ -2321,14 +2345,6 @@ export interface GetMessageResponse {
|
|
|
2321
2345
|
message: MessageWithChannelResponse;
|
|
2322
2346
|
pending_message_metadata?: Record<string, string>;
|
|
2323
2347
|
}
|
|
2324
|
-
export interface GetModerationAnalyticsRequest {
|
|
2325
|
-
end_date?: string;
|
|
2326
|
-
start_date?: string;
|
|
2327
|
-
}
|
|
2328
|
-
export interface GetModerationAnalyticsResponse {
|
|
2329
|
-
duration: string;
|
|
2330
|
-
analytics?: ModerationAnalytics;
|
|
2331
|
-
}
|
|
2332
2348
|
export interface GetOGResponse {
|
|
2333
2349
|
duration: string;
|
|
2334
2350
|
custom: Record<string, any>;
|
|
@@ -2408,12 +2424,6 @@ export interface GetThreadResponse {
|
|
|
2408
2424
|
duration: string;
|
|
2409
2425
|
thread: ThreadStateResponse;
|
|
2410
2426
|
}
|
|
2411
|
-
export interface GetUserModerationReportResponse {
|
|
2412
|
-
duration: string;
|
|
2413
|
-
user_blocks: UserBlock[];
|
|
2414
|
-
user_mutes: UserMute[];
|
|
2415
|
-
user: UserResponse;
|
|
2416
|
-
}
|
|
2417
2427
|
export interface GoLiveRequest {
|
|
2418
2428
|
recording_storage_name?: string;
|
|
2419
2429
|
start_closed_caption?: boolean;
|
|
@@ -2820,6 +2830,9 @@ export interface MessageNewEvent {
|
|
|
2820
2830
|
message?: Message;
|
|
2821
2831
|
user?: User;
|
|
2822
2832
|
}
|
|
2833
|
+
export interface MessageOptions {
|
|
2834
|
+
include_thread_participants?: boolean;
|
|
2835
|
+
}
|
|
2823
2836
|
export interface MessagePaginationParams {
|
|
2824
2837
|
}
|
|
2825
2838
|
export interface MessageReadEvent {
|
|
@@ -2888,6 +2901,7 @@ export interface MessageResponse {
|
|
|
2888
2901
|
quoted_message_id?: string;
|
|
2889
2902
|
show_in_channel?: boolean;
|
|
2890
2903
|
thread_participants?: UserResponse[];
|
|
2904
|
+
draft?: DraftResponse;
|
|
2891
2905
|
i18n?: Record<string, string>;
|
|
2892
2906
|
image_labels?: Record<string, string[]>;
|
|
2893
2907
|
moderation?: ModerationV2Response;
|
|
@@ -2964,6 +2978,7 @@ export interface MessageWithChannelResponse {
|
|
|
2964
2978
|
quoted_message_id?: string;
|
|
2965
2979
|
show_in_channel?: boolean;
|
|
2966
2980
|
thread_participants?: UserResponse[];
|
|
2981
|
+
draft?: DraftResponse;
|
|
2967
2982
|
i18n?: Record<string, string>;
|
|
2968
2983
|
image_labels?: Record<string, string[]>;
|
|
2969
2984
|
moderation?: ModerationV2Response;
|
|
@@ -2980,21 +2995,6 @@ export interface ModerationActionConfig {
|
|
|
2980
2995
|
order: number;
|
|
2981
2996
|
custom: Record<string, any>;
|
|
2982
2997
|
}
|
|
2983
|
-
export interface ModerationAnalytics {
|
|
2984
|
-
total_items_moderated: number;
|
|
2985
|
-
ai_image_harms: Array<Record<string, any>>;
|
|
2986
|
-
ai_text_harms: Array<Record<string, any>>;
|
|
2987
|
-
ai_video_harms: Array<Record<string, any>>;
|
|
2988
|
-
blocklist_by_list: Array<Record<string, any>>;
|
|
2989
|
-
blocklist_matches: Array<Record<string, any>>;
|
|
2990
|
-
model_accuracy: Array<Record<string, any>>;
|
|
2991
|
-
moderator_actions: Array<Record<string, any>>;
|
|
2992
|
-
moderator_productivity: Array<Record<string, any>>;
|
|
2993
|
-
semantic_filter_top_matches: Array<Record<string, any>>;
|
|
2994
|
-
sla_metrics: Array<Record<string, any>>;
|
|
2995
|
-
action_distribution_over_time: Record<string, Record<string, any>>;
|
|
2996
|
-
detection_by_engine_over_time: Record<string, Record<string, any>>;
|
|
2997
|
-
}
|
|
2998
2998
|
export interface ModerationCustomActionEvent {
|
|
2999
2999
|
created_at: Date;
|
|
3000
3000
|
type: string;
|
|
@@ -3002,15 +3002,6 @@ export interface ModerationCustomActionEvent {
|
|
|
3002
3002
|
message?: Message;
|
|
3003
3003
|
user?: User;
|
|
3004
3004
|
}
|
|
3005
|
-
export interface ModerationEvent {
|
|
3006
|
-
created_at: Date;
|
|
3007
|
-
custom: Record<string, any>;
|
|
3008
|
-
type: string;
|
|
3009
|
-
received_at?: Date;
|
|
3010
|
-
flags?: Flag2Response[];
|
|
3011
|
-
action?: ActionLogResponse;
|
|
3012
|
-
review_queue_item?: ReviewQueueItemResponse;
|
|
3013
|
-
}
|
|
3014
3005
|
export interface ModerationFlaggedEvent {
|
|
3015
3006
|
created_at: Date;
|
|
3016
3007
|
type: string;
|
|
@@ -3037,15 +3028,6 @@ export interface ModerationResponse {
|
|
|
3037
3028
|
spam: number;
|
|
3038
3029
|
toxic: number;
|
|
3039
3030
|
}
|
|
3040
|
-
export interface ModerationUsageStats {
|
|
3041
|
-
app_pk: number;
|
|
3042
|
-
id: number;
|
|
3043
|
-
organization_id: number;
|
|
3044
|
-
reference_date: Date;
|
|
3045
|
-
updated_at: Date;
|
|
3046
|
-
usage_amount: number;
|
|
3047
|
-
usage_type: string;
|
|
3048
|
-
}
|
|
3049
3031
|
export interface ModerationV2Response {
|
|
3050
3032
|
action: string;
|
|
3051
3033
|
original_text: string;
|
|
@@ -3055,15 +3037,6 @@ export interface ModerationV2Response {
|
|
|
3055
3037
|
image_harms?: string[];
|
|
3056
3038
|
text_harms?: string[];
|
|
3057
3039
|
}
|
|
3058
|
-
export interface ModeratorStats {
|
|
3059
|
-
id: string;
|
|
3060
|
-
items_reviewed: number;
|
|
3061
|
-
action_counts: Record<string, number>;
|
|
3062
|
-
}
|
|
3063
|
-
export interface ModeratorStatsResponse {
|
|
3064
|
-
duration: string;
|
|
3065
|
-
moderator_stats: ModeratorStats[];
|
|
3066
|
-
}
|
|
3067
3040
|
export interface MuteChannelRequest {
|
|
3068
3041
|
expiration?: number;
|
|
3069
3042
|
user_id?: string;
|
|
@@ -3202,6 +3175,7 @@ export interface OwnUser {
|
|
|
3202
3175
|
teams?: string[];
|
|
3203
3176
|
privacy_settings?: PrivacySettings;
|
|
3204
3177
|
push_preferences?: PushPreferences;
|
|
3178
|
+
teams_role?: Record<string, string>;
|
|
3205
3179
|
}
|
|
3206
3180
|
export interface OwnUserResponse {
|
|
3207
3181
|
banned: boolean;
|
|
@@ -3231,6 +3205,11 @@ export interface OwnUserResponse {
|
|
|
3231
3205
|
latest_hidden_channels?: string[];
|
|
3232
3206
|
privacy_settings?: PrivacySettingsResponse;
|
|
3233
3207
|
push_preferences?: PushPreferences;
|
|
3208
|
+
teams_role?: Record<string, string>;
|
|
3209
|
+
}
|
|
3210
|
+
export interface PagerResponse {
|
|
3211
|
+
next?: string;
|
|
3212
|
+
prev?: string;
|
|
3234
3213
|
}
|
|
3235
3214
|
export interface PaginationParams {
|
|
3236
3215
|
limit?: number;
|
|
@@ -3587,6 +3566,7 @@ export interface QueryCampaignsRequest {
|
|
|
3587
3566
|
limit?: number;
|
|
3588
3567
|
next?: string;
|
|
3589
3568
|
prev?: string;
|
|
3569
|
+
user_limit?: number;
|
|
3590
3570
|
sort?: SortParamRequest[];
|
|
3591
3571
|
filter?: Record<string, any>;
|
|
3592
3572
|
}
|
|
@@ -3611,6 +3591,21 @@ export interface QueryChannelsResponse {
|
|
|
3611
3591
|
duration: string;
|
|
3612
3592
|
channels: ChannelStateResponseFields[];
|
|
3613
3593
|
}
|
|
3594
|
+
export interface QueryDraftsRequest {
|
|
3595
|
+
limit?: number;
|
|
3596
|
+
next?: string;
|
|
3597
|
+
prev?: string;
|
|
3598
|
+
user_id?: string;
|
|
3599
|
+
sort?: SortParamRequest[];
|
|
3600
|
+
filter?: Record<string, any>;
|
|
3601
|
+
user?: UserRequest;
|
|
3602
|
+
}
|
|
3603
|
+
export interface QueryDraftsResponse {
|
|
3604
|
+
duration: string;
|
|
3605
|
+
drafts: DraftResponse[];
|
|
3606
|
+
next?: string;
|
|
3607
|
+
prev?: string;
|
|
3608
|
+
}
|
|
3614
3609
|
export interface QueryFeedModerationTemplate {
|
|
3615
3610
|
created_at: Date;
|
|
3616
3611
|
name: string;
|
|
@@ -3786,21 +3781,6 @@ export interface QueryThreadsResponse {
|
|
|
3786
3781
|
next?: string;
|
|
3787
3782
|
prev?: string;
|
|
3788
3783
|
}
|
|
3789
|
-
export interface QueryUsageStatsRequest {
|
|
3790
|
-
limit?: number;
|
|
3791
|
-
next?: string;
|
|
3792
|
-
prev?: string;
|
|
3793
|
-
user_id?: string;
|
|
3794
|
-
sort?: SortParamRequest[];
|
|
3795
|
-
filter?: Record<string, any>;
|
|
3796
|
-
user?: UserRequest;
|
|
3797
|
-
}
|
|
3798
|
-
export interface QueryUsageStatsResponse {
|
|
3799
|
-
duration: string;
|
|
3800
|
-
items: ModerationUsageStats[];
|
|
3801
|
-
next?: string;
|
|
3802
|
-
prev?: string;
|
|
3803
|
-
}
|
|
3804
3784
|
export interface QueryUserFeedbackRequest {
|
|
3805
3785
|
limit?: number;
|
|
3806
3786
|
next?: string;
|
|
@@ -3828,11 +3808,6 @@ export interface QueryUsersResponse {
|
|
|
3828
3808
|
duration: string;
|
|
3829
3809
|
users: FullUserResponse[];
|
|
3830
3810
|
}
|
|
3831
|
-
export interface QueueStatsResponse {
|
|
3832
|
-
avg_time_to_action: number;
|
|
3833
|
-
duration: string;
|
|
3834
|
-
time_to_action_buckets: Record<string, number>;
|
|
3835
|
-
}
|
|
3836
3811
|
export interface RTMPBroadcastRequest {
|
|
3837
3812
|
name: string;
|
|
3838
3813
|
stream_url: string;
|
|
@@ -4010,6 +3985,7 @@ export interface ReviewQueueItem {
|
|
|
4010
3985
|
created_at: Date;
|
|
4011
3986
|
entity_id: string;
|
|
4012
3987
|
entity_type: string;
|
|
3988
|
+
flags_count: number;
|
|
4013
3989
|
has_image: boolean;
|
|
4014
3990
|
has_text: boolean;
|
|
4015
3991
|
has_video: boolean;
|
|
@@ -4022,7 +3998,7 @@ export interface ReviewQueueItem {
|
|
|
4022
3998
|
updated_at: Date;
|
|
4023
3999
|
actions: ActionLog[];
|
|
4024
4000
|
bans: Ban[];
|
|
4025
|
-
flags:
|
|
4001
|
+
flags: Flag[];
|
|
4026
4002
|
languages: string[];
|
|
4027
4003
|
teams: string[];
|
|
4028
4004
|
reviewed_at: NullTime;
|
|
@@ -4035,11 +4011,21 @@ export interface ReviewQueueItem {
|
|
|
4035
4011
|
moderation_payload?: ModerationPayload;
|
|
4036
4012
|
reaction?: Reaction;
|
|
4037
4013
|
}
|
|
4014
|
+
export interface ReviewQueueItemNewEvent {
|
|
4015
|
+
created_at: Date;
|
|
4016
|
+
custom: Record<string, any>;
|
|
4017
|
+
type: string;
|
|
4018
|
+
received_at?: Date;
|
|
4019
|
+
flags?: FlagResponse[];
|
|
4020
|
+
action?: ActionLogResponse;
|
|
4021
|
+
review_queue_item?: ReviewQueueItemResponse;
|
|
4022
|
+
}
|
|
4038
4023
|
export interface ReviewQueueItemResponse {
|
|
4039
4024
|
ai_text_severity: string;
|
|
4040
4025
|
created_at: Date;
|
|
4041
4026
|
entity_id: string;
|
|
4042
4027
|
entity_type: string;
|
|
4028
|
+
flags_count: number;
|
|
4043
4029
|
id: string;
|
|
4044
4030
|
recommended_action: string;
|
|
4045
4031
|
reviewed_by: string;
|
|
@@ -4048,7 +4034,7 @@ export interface ReviewQueueItemResponse {
|
|
|
4048
4034
|
updated_at: Date;
|
|
4049
4035
|
actions: ActionLogResponse[];
|
|
4050
4036
|
bans: Ban[];
|
|
4051
|
-
flags:
|
|
4037
|
+
flags: FlagResponse[];
|
|
4052
4038
|
languages: string[];
|
|
4053
4039
|
completed_at?: Date;
|
|
4054
4040
|
entity_creator_id?: string;
|
|
@@ -4063,6 +4049,15 @@ export interface ReviewQueueItemResponse {
|
|
|
4063
4049
|
moderation_payload?: ModerationPayload;
|
|
4064
4050
|
reaction?: Reaction;
|
|
4065
4051
|
}
|
|
4052
|
+
export interface ReviewQueueItemUpdatedEvent {
|
|
4053
|
+
created_at: Date;
|
|
4054
|
+
custom: Record<string, any>;
|
|
4055
|
+
type: string;
|
|
4056
|
+
received_at?: Date;
|
|
4057
|
+
flags?: FlagResponse[];
|
|
4058
|
+
action?: ActionLogResponse;
|
|
4059
|
+
review_queue_item?: ReviewQueueItemResponse;
|
|
4060
|
+
}
|
|
4066
4061
|
export interface RingSettings {
|
|
4067
4062
|
auto_cancel_timeout_ms: number;
|
|
4068
4063
|
incoming_call_timeout_ms: number;
|
|
@@ -4125,6 +4120,7 @@ export interface SearchPayload {
|
|
|
4125
4120
|
query?: string;
|
|
4126
4121
|
sort?: SortParamRequest[];
|
|
4127
4122
|
message_filter_conditions?: Record<string, any>;
|
|
4123
|
+
message_options?: MessageOptions;
|
|
4128
4124
|
}
|
|
4129
4125
|
export interface SearchResponse {
|
|
4130
4126
|
duration: string;
|
|
@@ -4170,6 +4166,7 @@ export interface SearchResultMessage {
|
|
|
4170
4166
|
show_in_channel?: boolean;
|
|
4171
4167
|
thread_participants?: UserResponse[];
|
|
4172
4168
|
channel?: ChannelResponse;
|
|
4169
|
+
draft?: DraftResponse;
|
|
4173
4170
|
i18n?: Record<string, string>;
|
|
4174
4171
|
image_labels?: Record<string, string[]>;
|
|
4175
4172
|
moderation?: ModerationV2Response;
|
|
@@ -4284,6 +4281,7 @@ export interface StartCampaignRequest {
|
|
|
4284
4281
|
export interface StartCampaignResponse {
|
|
4285
4282
|
duration: string;
|
|
4286
4283
|
campaign?: CampaignResponse;
|
|
4284
|
+
users?: PagerResponse;
|
|
4287
4285
|
}
|
|
4288
4286
|
export interface StartClosedCaptionsRequest {
|
|
4289
4287
|
enable_transcription?: boolean;
|
|
@@ -4456,6 +4454,7 @@ export interface ThreadStateResponse {
|
|
|
4456
4454
|
thread_participants?: ThreadParticipant[];
|
|
4457
4455
|
channel?: ChannelResponse;
|
|
4458
4456
|
created_by?: UserResponse;
|
|
4457
|
+
draft?: DraftResponse;
|
|
4459
4458
|
parent_message?: MessageResponse;
|
|
4460
4459
|
}
|
|
4461
4460
|
export interface ThreadUpdatedEvent {
|
|
@@ -4926,7 +4925,6 @@ export interface UpsertConfigRequest {
|
|
|
4926
4925
|
team?: string;
|
|
4927
4926
|
user_id?: string;
|
|
4928
4927
|
ai_image_config?: AIImageConfig;
|
|
4929
|
-
ai_image_lite_config?: BodyguardImageAnalysisConfig;
|
|
4930
4928
|
ai_text_config?: AITextConfig;
|
|
4931
4929
|
ai_video_config?: AIVideoConfig;
|
|
4932
4930
|
automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
|
|
@@ -4975,6 +4973,7 @@ export interface User {
|
|
|
4975
4973
|
online: boolean;
|
|
4976
4974
|
role: string;
|
|
4977
4975
|
custom: Record<string, any>;
|
|
4976
|
+
teams_role: Record<string, string>;
|
|
4978
4977
|
ban_expires?: Date;
|
|
4979
4978
|
created_at?: Date;
|
|
4980
4979
|
deactivated_at?: Date;
|
|
@@ -5001,11 +5000,6 @@ export interface UserBannedEvent {
|
|
|
5001
5000
|
team?: string;
|
|
5002
5001
|
user?: User;
|
|
5003
5002
|
}
|
|
5004
|
-
export interface UserBlock {
|
|
5005
|
-
blocked_by_user_id: string;
|
|
5006
|
-
blocked_user_id: string;
|
|
5007
|
-
created_at: Date;
|
|
5008
|
-
}
|
|
5009
5003
|
export interface UserCustomEventRequest {
|
|
5010
5004
|
type: string;
|
|
5011
5005
|
custom?: Record<string, any>;
|
|
@@ -5096,6 +5090,7 @@ export interface UserRequest {
|
|
|
5096
5090
|
teams?: string[];
|
|
5097
5091
|
custom?: Record<string, any>;
|
|
5098
5092
|
privacy_settings?: PrivacySettingsResponse;
|
|
5093
|
+
teams_role?: Record<string, string>;
|
|
5099
5094
|
}
|
|
5100
5095
|
export interface UserResponse {
|
|
5101
5096
|
banned: boolean;
|
|
@@ -5120,6 +5115,7 @@ export interface UserResponse {
|
|
|
5120
5115
|
devices?: DeviceResponse[];
|
|
5121
5116
|
privacy_settings?: PrivacySettingsResponse;
|
|
5122
5117
|
push_notifications?: PushNotificationSettingsResponse;
|
|
5118
|
+
teams_role?: Record<string, string>;
|
|
5123
5119
|
}
|
|
5124
5120
|
export interface UserResponseCommonFields {
|
|
5125
5121
|
banned: boolean;
|
|
@@ -5138,6 +5134,7 @@ export interface UserResponseCommonFields {
|
|
|
5138
5134
|
last_active?: Date;
|
|
5139
5135
|
name?: string;
|
|
5140
5136
|
revoke_tokens_issued_before?: Date;
|
|
5137
|
+
teams_role?: Record<string, string>;
|
|
5141
5138
|
}
|
|
5142
5139
|
export interface UserResponsePrivacyFields {
|
|
5143
5140
|
banned: boolean;
|
|
@@ -5158,6 +5155,7 @@ export interface UserResponsePrivacyFields {
|
|
|
5158
5155
|
name?: string;
|
|
5159
5156
|
revoke_tokens_issued_before?: Date;
|
|
5160
5157
|
privacy_settings?: PrivacySettingsResponse;
|
|
5158
|
+
teams_role?: Record<string, string>;
|
|
5161
5159
|
}
|
|
5162
5160
|
export interface UserSessionStats {
|
|
5163
5161
|
freeze_duration_seconds: number;
|
|
@@ -5269,9 +5267,11 @@ export interface VelocityFilterConfigRule {
|
|
|
5269
5267
|
fast_spam_threshold: number;
|
|
5270
5268
|
fast_spam_ttl: number;
|
|
5271
5269
|
ip_ban: boolean;
|
|
5270
|
+
probation_period: number;
|
|
5272
5271
|
shadow_ban: boolean;
|
|
5273
5272
|
slow_spam_threshold: number;
|
|
5274
5273
|
slow_spam_ttl: number;
|
|
5274
|
+
url_only: boolean;
|
|
5275
5275
|
slow_spam_ban_duration?: number;
|
|
5276
5276
|
}
|
|
5277
5277
|
export interface VideoDimension {
|