@stream-io/node-sdk 0.3.1 → 0.4.1
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 +4136 -9282
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.es.js +4136 -9206
- package/dist/index.es.js.map +1 -1
- package/dist/src/BaseApi.d.ts +10 -0
- package/dist/src/StreamCall.d.ts +5 -37
- package/dist/src/StreamChannel.d.ts +7 -34
- package/dist/src/StreamChatClient.d.ts +2 -25
- package/dist/src/StreamClient.d.ts +51 -59
- package/dist/src/StreamModerationClient.d.ts +3 -0
- package/dist/src/StreamVideoClient.d.ts +2 -18
- package/dist/src/gen/chat/ChannelApi.d.ts +33 -0
- package/dist/src/gen/chat/ChatApi.d.ts +241 -0
- package/dist/src/gen/common/CommonApi.d.ts +99 -0
- package/dist/src/gen/model-decoders/index.d.ts +3 -0
- package/dist/src/gen/models/index.d.ts +3881 -0
- package/dist/src/gen/moderation/ModerationApi.d.ts +38 -0
- package/dist/src/gen/video/CallApi.d.ts +56 -0
- package/dist/src/gen/video/VideoApi.d.ts +151 -0
- package/dist/src/types.d.ts +25 -0
- package/dist/src/utils/create-token.d.ts +2 -0
- package/dist/src/utils/rate-limit.d.ts +2 -0
- package/index.ts +2 -3
- package/package.json +5 -4
- package/src/BaseApi.ts +115 -0
- package/src/StreamCall.ts +9 -199
- package/src/StreamChannel.ts +23 -246
- package/src/StreamChatClient.ts +3 -122
- package/src/StreamClient.ts +101 -345
- package/src/StreamModerationClient.ts +3 -0
- package/src/StreamVideoClient.ts +3 -95
- package/src/gen/chat/ChannelApi.ts +270 -0
- package/src/gen/chat/ChatApi.ts +1857 -0
- package/src/gen/common/CommonApi.ts +1004 -0
- package/src/gen/model-decoders/index.ts +1897 -0
- package/src/gen/models/index.ts +6794 -0
- package/src/gen/moderation/ModerationApi.ts +476 -0
- package/src/gen/video/CallApi.ts +309 -0
- package/src/gen/video/VideoApi.ts +1007 -0
- package/src/types.ts +35 -0
- package/src/utils/create-token.ts +6 -1
- package/src/utils/rate-limit.ts +21 -0
- package/dist/src/gen/chat/apis/ProductchatApi.d.ts +0 -1750
- package/dist/src/gen/chat/apis/index.d.ts +0 -1
- package/dist/src/gen/chat/index.d.ts +0 -3
- package/dist/src/gen/chat/models/index.d.ts +0 -14865
- package/dist/src/gen/chat/runtime.d.ts +0 -180
- package/dist/src/gen/video/apis/ProductvideoApi.d.ts +0 -648
- package/dist/src/gen/video/apis/index.d.ts +0 -1
- package/dist/src/gen/video/index.d.ts +0 -3
- package/dist/src/gen/video/models/index.d.ts +0 -5011
- package/dist/src/gen/video/runtime.d.ts +0 -180
- package/src/gen/chat/.openapi-generator/FILES +0 -6
- package/src/gen/chat/.openapi-generator/VERSION +0 -1
- package/src/gen/chat/.openapi-generator-ignore +0 -23
- package/src/gen/chat/apis/ProductchatApi.ts +0 -7007
- package/src/gen/chat/apis/index.ts +0 -3
- package/src/gen/chat/index.ts +0 -5
- package/src/gen/chat/models/index.ts +0 -14766
- package/src/gen/chat/runtime.ts +0 -415
- package/src/gen/video/.openapi-generator/FILES +0 -6
- package/src/gen/video/.openapi-generator/VERSION +0 -1
- package/src/gen/video/.openapi-generator-ignore +0 -23
- package/src/gen/video/apis/ProductvideoApi.ts +0 -2575
- package/src/gen/video/apis/index.ts +0 -3
- package/src/gen/video/index.ts +0 -5
- package/src/gen/video/models/index.ts +0 -5000
- package/src/gen/video/runtime.ts +0 -415
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApiConfig, RequestMetadata } from './types';
|
|
2
|
+
export declare class BaseApi {
|
|
3
|
+
private readonly apiConfig;
|
|
4
|
+
constructor(apiConfig: ApiConfig);
|
|
5
|
+
protected sendRequest: <T>(method: string, url: string, pathParams?: Record<string, string>, queryParams?: Record<string, any>, body?: any) => Promise<{
|
|
6
|
+
body: T;
|
|
7
|
+
metadata: RequestMetadata;
|
|
8
|
+
}>;
|
|
9
|
+
protected queryParamsStringify: (params: Record<string, any>) => string;
|
|
10
|
+
}
|
package/dist/src/StreamCall.d.ts
CHANGED
|
@@ -1,40 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { QueryCallMembersRequest } from './gen/models';
|
|
2
|
+
import { CallApi } from './gen/video/CallApi';
|
|
3
3
|
import { OmitTypeId } from './types';
|
|
4
|
-
export declare class StreamCall {
|
|
5
|
-
private readonly streamClient;
|
|
6
|
-
readonly type: string;
|
|
7
|
-
readonly id: string;
|
|
8
|
-
private readonly baseRequest;
|
|
9
|
-
private readonly apiClient;
|
|
10
|
-
constructor(streamClient: StreamClient, type: string, id: string);
|
|
4
|
+
export declare class StreamCall extends CallApi {
|
|
11
5
|
get cid(): string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
get: (request?: OmitTypeId<GetCallRequest>) => Promise<import("./gen/video").VideoGetCallResponse>;
|
|
15
|
-
delete: (videoDeleteCallRequest?: VideoDeleteCallRequest) => Promise<import("./gen/video").VideoDeleteCallResponse>;
|
|
16
|
-
getOrCreate: (videoGetOrCreateCallRequest?: VideoGetOrCreateCallRequest) => Promise<import("./gen/video").VideoGetOrCreateCallResponse>;
|
|
17
|
-
getSessionStatistics: (request: OmitTypeId<GetCallStatsRequest>) => Promise<import("./gen/video").VideoGetCallStatsResponse>;
|
|
18
|
-
create: (getOrCreateCallRequest?: VideoGetOrCreateCallRequest) => Promise<import("./gen/video").VideoGetOrCreateCallResponse>;
|
|
19
|
-
goLive: (videoGoLiveRequest?: VideoGoLiveRequest) => Promise<import("./gen/video").VideoGoLiveResponse>;
|
|
20
|
-
listRecordings: () => Promise<import("./gen/video").VideoListRecordingsResponse>;
|
|
21
|
-
deleteRecording: (request: OmitTypeId<DeleteRecordingRequest>) => Promise<import("./gen/video").VideoDeleteRecordingResponse>;
|
|
22
|
-
listTranscriptions: () => Promise<import("./gen/video").VideoListTranscriptionsResponse>;
|
|
23
|
-
muteUsers: (videoMuteUsersRequest: VideoMuteUsersRequest) => Promise<import("./gen/video").VideoMuteUsersResponse>;
|
|
24
|
-
queryMembers: (request?: OmitTypeId<VideoQueryCallMembersRequest>) => Promise<import("./gen/video").VideoQueryCallMembersResponse>;
|
|
25
|
-
sendCustomEvent: (videoSendCallEventRequest: VideoSendCallEventRequest) => Promise<import("./gen/video").VideoSendCallEventResponse>;
|
|
26
|
-
startHLSBroadcasting: () => Promise<import("./gen/video").VideoStartHLSBroadcastingResponse>;
|
|
27
|
-
startRecording: (request?: VideoStartRecordingRequest) => Promise<import("./gen/video").VideoStartRecordingResponse>;
|
|
28
|
-
startTranscription: (videoStartTranscriptionRequest?: VideoStartTranscriptionRequest) => Promise<import("./gen/video").VideoStartTranscriptionResponse>;
|
|
29
|
-
deleteTranscription: (request: OmitTypeId<DeleteTranscriptionRequest>) => Promise<import("./gen/video").VideoDeleteTranscriptionResponse>;
|
|
30
|
-
stopHLSBroadcasting: () => Promise<import("./gen/video").VideoStopHLSBroadcastingResponse>;
|
|
31
|
-
stopLive: () => Promise<import("./gen/video").VideoStopLiveResponse>;
|
|
32
|
-
stopRecording: () => Promise<import("./gen/video").VideoStopRecordingResponse>;
|
|
33
|
-
stopTranscription: () => Promise<import("./gen/video").VideoStopTranscriptionResponse>;
|
|
34
|
-
unblockUser: (videoUnblockUserRequest: VideoUnblockUserRequest) => Promise<import("./gen/video").VideoUnblockUserResponse>;
|
|
35
|
-
update: (videoUpdateCallRequest: VideoUpdateCallRequest) => Promise<import("./gen/video").VideoUpdateCallResponse>;
|
|
36
|
-
updateCallMembers: (videoUpdateCallMembersRequest: VideoUpdateCallMembersRequest) => Promise<import("./gen/video").VideoUpdateCallMembersResponse>;
|
|
37
|
-
updateUserPermissions: (videoUpdateUserPermissionsRequest: VideoUpdateUserPermissionsRequest) => Promise<import("./gen/video").VideoUpdateUserPermissionsResponse>;
|
|
38
|
-
pinVideo: (videoPinRequest: VideoPinRequest) => Promise<import("./gen/video").VideoPinResponse>;
|
|
39
|
-
unpinVideo: (videoUnpinRequest: VideoUnpinRequest) => Promise<import("./gen/video").VideoUnpinResponse>;
|
|
6
|
+
create: (request?: import("./gen/models").GetOrCreateCallRequest | undefined) => Promise<import("./types").StreamResponse<import("./gen/models").GetOrCreateCallResponse>>;
|
|
7
|
+
queryMembers: (request?: OmitTypeId<QueryCallMembersRequest>) => Promise<import("./types").StreamResponse<import("./gen/models").QueryCallMembersResponse>>;
|
|
40
8
|
}
|
|
@@ -1,37 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChannelGetOrCreateRequest,
|
|
1
|
+
import { ChannelApi } from './gen/chat/ChannelApi';
|
|
2
|
+
import { ChannelGetOrCreateRequest, QueryMembersRequest } from './gen/models';
|
|
3
3
|
import { OmitTypeId } from './types';
|
|
4
|
-
export declare class StreamChannel {
|
|
5
|
-
private readonly streamClient;
|
|
6
|
-
readonly type: string;
|
|
7
|
-
id?: string | undefined;
|
|
8
|
-
private readonly chatApi;
|
|
9
|
-
constructor(streamClient: StreamClient, type: string, id?: string | undefined);
|
|
4
|
+
export declare class StreamChannel extends ChannelApi {
|
|
10
5
|
get cid(): string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
markRead: (markReadRequest: MarkReadRequest) => Promise<import("./gen/chat").MarkReadResponse>;
|
|
16
|
-
markUnread: (markUnreadRequest: MarkUnreadRequest) => Promise<import("./gen/chat").Response>;
|
|
17
|
-
show: (showChannelRequest: ShowChannelRequest) => Promise<import("./gen/chat").ShowChannelResponse>;
|
|
18
|
-
hide: (hideChannelRequest: HideChannelRequest) => Promise<import("./gen/chat").HideChannelResponse>;
|
|
19
|
-
truncate: (truncateChannelRequest: TruncateChannelRequest) => Promise<import("./gen/chat").TruncateChannelResponse>;
|
|
20
|
-
queryMembers: (request: OmitTypeId<QueryMembersRequest>) => Promise<import("./gen/chat").MembersResponse>;
|
|
21
|
-
mute: (muteChannelRequest: Omit<MuteChannelRequest, 'channel_cids'>) => Promise<import("./gen/chat").MuteChannelResponse>;
|
|
22
|
-
unmute: (unmuteChannelRequest: Omit<UnmuteChannelRequest, 'channel_cids' | 'channel_cid'>) => Promise<import("./gen/chat").UnmuteResponse>;
|
|
23
|
-
sendMessage: (sendMessageRequest: SendMessageRequest) => Promise<import("./gen/chat").SendMessageResponse>;
|
|
24
|
-
deleteMessage: (request: DeleteMessageRequest) => Promise<import("./gen/chat").DeleteMessageResponse>;
|
|
25
|
-
updateMessage: (id: string, updateMessageRequest: UpdateMessageRequest) => Promise<import("./gen/chat").UpdateMessageResponse>;
|
|
26
|
-
updateMessagePartial: (id: string, updateMessagePartialRequest: UpdateMessagePartialRequest) => Promise<import("./gen/chat").UpdateMessagePartialResponse>;
|
|
27
|
-
getMessage: (request: GetMessageRequest) => Promise<import("./gen/chat").GetMessageResponse>;
|
|
28
|
-
getManyMessages: (request: OmitTypeId<GetManyMessagesRequest>) => Promise<import("./gen/chat").GetManyMessagesResponse>;
|
|
29
|
-
translateMessage: (id: string, translateMessageRequest: TranslateMessageRequest) => Promise<import("./gen/chat").MessageResponse>;
|
|
30
|
-
getMessagesAround: (request: GetRepliesRequest) => Promise<import("./gen/chat").GetRepliesResponse>;
|
|
31
|
-
getOpenGraphData: (request: GetOGRequest) => Promise<import("./gen/chat").GetOGResponse>;
|
|
32
|
-
sendMessageReaction: (messageId: string, sendReactionRequest: SendReactionRequest) => Promise<import("./gen/chat").SendReactionResponse>;
|
|
33
|
-
deleteMessageReaction: (messageId: string, request: Omit<DeleteReactionRequest, 'id'>) => Promise<import("./gen/chat").ReactionRemovalResponse>;
|
|
34
|
-
getMessageReactions: (messageId: string, request?: Omit<GetReactionsRequest, 'id'>) => Promise<import("./gen/chat").GetReactionsResponse>;
|
|
35
|
-
sendCustomEvent: (event: EventRequest) => Promise<import("./gen/chat").EventResponse>;
|
|
36
|
-
private get baseRequest();
|
|
6
|
+
getOrCreate: (channel_get_or_create_request?: ChannelGetOrCreateRequest) => Promise<import("./types").StreamResponse<import("./gen/models").ChannelStateResponse>>;
|
|
7
|
+
queryMembers(request?: {
|
|
8
|
+
payload?: OmitTypeId<QueryMembersRequest>;
|
|
9
|
+
}): Promise<import("./types").StreamResponse<import("./gen/models").MembersResponse>>;
|
|
37
10
|
}
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
+
import { ChatApi } from './gen/chat/ChatApi';
|
|
1
2
|
import { StreamChannel } from './StreamChannel';
|
|
2
|
-
|
|
3
|
-
import { CreateBlockListRequest, CreateChannelTypeRequest, CreateCommandRequest, DeleteBlockListRequest, DeleteChannelTypeRequest, DeleteCommandRequest, ExportChannelsRequest, GetBlockListRequest, GetChannelTypeRequest, GetCommandRequest, GetExportChannelsStatusRequest, QueryChannelsRequest, SearchRequest, UpdateBlockListRequest, UpdateChannelTypeRequest, UpdateCommandRequest } from './gen/chat';
|
|
4
|
-
export declare class StreamChatClient {
|
|
5
|
-
private readonly streamClient;
|
|
6
|
-
private readonly chatApi;
|
|
7
|
-
constructor(streamClient: StreamClient);
|
|
3
|
+
export declare class StreamChatClient extends ChatApi {
|
|
8
4
|
channel: (type: string, id?: string) => StreamChannel;
|
|
9
|
-
createBlockList: (createBlockListRequest: CreateBlockListRequest) => Promise<import("./gen/chat").Response>;
|
|
10
|
-
listBlockLists: () => Promise<import("./gen/chat").ListBlockListResponse>;
|
|
11
|
-
getBlockList: (request: GetBlockListRequest) => Promise<import("./gen/chat").GetBlockListResponse>;
|
|
12
|
-
updateBlockList: (name: string, updateBlockListRequest: UpdateBlockListRequest) => Promise<import("./gen/chat").Response>;
|
|
13
|
-
deleteBlockList: (request: DeleteBlockListRequest) => Promise<import("./gen/chat").Response>;
|
|
14
|
-
createChannelType: (createChannelTypeRequest: CreateChannelTypeRequest) => Promise<import("./gen/chat").CreateChannelTypeResponse>;
|
|
15
|
-
deleteChannelType: (request: DeleteChannelTypeRequest) => Promise<import("./gen/chat").Response>;
|
|
16
|
-
getChannelType: (request: GetChannelTypeRequest) => Promise<import("./gen/chat").Response>;
|
|
17
|
-
listChannelTypes: () => Promise<import("./gen/chat").ListChannelTypesResponse>;
|
|
18
|
-
updateChannelType: (name: string, updateChannelTypeRequest: UpdateChannelTypeRequest) => Promise<import("./gen/chat").UpdateChannelTypeResponse>;
|
|
19
|
-
queryChannels: (queryChannelsRequest?: QueryChannelsRequest) => Promise<import("./gen/chat").QueryChannelsResponse>;
|
|
20
|
-
searchMessages: (payload?: SearchRequest) => Promise<import("./gen/chat").SearchResponse>;
|
|
21
|
-
exportChannels: (exportChannelsRequest?: ExportChannelsRequest) => Promise<import("./gen/chat").ExportChannelsResponse>;
|
|
22
|
-
getExportStatus: (request: GetExportChannelsStatusRequest) => Promise<import("./gen/chat").GetExportChannelsStatusResponse>;
|
|
23
|
-
listCommands: () => Promise<import("./gen/chat").ListCommandsResponse>;
|
|
24
|
-
createCommand: (createCommandRequest: CreateCommandRequest) => Promise<import("./gen/chat").CreateCommandResponse>;
|
|
25
|
-
getCommand: (getCommandRequest: GetCommandRequest) => Promise<import("./gen/chat").GetCommandResponse>;
|
|
26
|
-
updateCommand: (name: string, updateCommandRequest: UpdateCommandRequest) => Promise<import("./gen/chat").UpdateCommandResponse>;
|
|
27
|
-
deleteCommand: (request: DeleteCommandRequest) => Promise<import("./gen/chat").DeleteCommandResponse>;
|
|
28
5
|
}
|
|
@@ -1,38 +1,73 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { CommonApi } from './gen/common/CommonApi';
|
|
3
3
|
import { StreamVideoClient } from './StreamVideoClient';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { StreamChatClient } from './StreamChatClient';
|
|
5
|
+
import { QueryBannedUsersRequest, UserRequest } from './gen/models';
|
|
6
|
+
import { StreamModerationClient } from './StreamModerationClient';
|
|
6
7
|
export interface StreamClientOptions {
|
|
7
8
|
timeout?: number;
|
|
8
9
|
basePath?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare class StreamClient {
|
|
11
|
-
|
|
11
|
+
export declare class StreamClient extends CommonApi {
|
|
12
|
+
readonly apiKey: string;
|
|
12
13
|
private readonly secret;
|
|
13
|
-
readonly config?:
|
|
14
|
+
readonly config?: StreamClientOptions | undefined;
|
|
14
15
|
readonly video: StreamVideoClient;
|
|
15
16
|
readonly chat: StreamChatClient;
|
|
17
|
+
readonly moderation: StreamModerationClient;
|
|
16
18
|
readonly options: StreamClientOptions;
|
|
17
|
-
private readonly chatApi;
|
|
18
|
-
private readonly token;
|
|
19
19
|
private static readonly DEFAULT_TIMEOUT;
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
* @param apiKey
|
|
23
23
|
* @param secret
|
|
24
|
-
* @param config
|
|
24
|
+
* @param config config object
|
|
25
|
+
*/
|
|
26
|
+
constructor(apiKey: string, secret: string, config?: StreamClientOptions | undefined);
|
|
27
|
+
upsertUsers: (users: UserRequest[]) => Promise<import("./types").StreamResponse<import("./gen/models").UpdateUsersResponse>>;
|
|
28
|
+
queryBannedUsers: (request?: {
|
|
29
|
+
payload?: QueryBannedUsersRequest;
|
|
30
|
+
}) => Promise<import("./types").StreamResponse<import("./gen/models").QueryBannedUsersResponse>>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param payload
|
|
34
|
+
* - user_id - the id of the user the token is for
|
|
35
|
+
* - validity_in_seconds - how many seconds is the token valid for (starting from issued at), by default it's 1 hour, dicarded if exp is provided
|
|
36
|
+
* - exp - when the token expires, unix timestamp in seconds
|
|
37
|
+
* - iat - issued at date of the token, unix timestamp in seconds, by default it's now
|
|
25
38
|
*/
|
|
26
|
-
|
|
39
|
+
generateUserToken: (payload: {
|
|
40
|
+
user_id: string;
|
|
41
|
+
validity_in_seconds?: number;
|
|
42
|
+
exp?: number;
|
|
43
|
+
iat?: number;
|
|
44
|
+
} & Record<string, unknown>) => string;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param payload
|
|
48
|
+
* - user_id - the id of the user the token is for
|
|
49
|
+
* - validity_in_seconds - how many seconds is the token valid for (starting from issued at), by default it's 1 hour, dicarded if exp is provided
|
|
50
|
+
* - exp - when the token expires, unix timestamp in seconds
|
|
51
|
+
* - iat - issued at date of the token, unix timestamp in seconds, by default it's now
|
|
52
|
+
*/
|
|
53
|
+
generateCallToken: (payload: {
|
|
54
|
+
user_id: string;
|
|
55
|
+
role?: string;
|
|
56
|
+
call_cids: string[];
|
|
57
|
+
validity_in_seconds?: number;
|
|
58
|
+
exp?: number;
|
|
59
|
+
iat?: number;
|
|
60
|
+
} & Record<string, unknown>) => string;
|
|
27
61
|
/**
|
|
28
62
|
*
|
|
29
63
|
* @param userID
|
|
30
64
|
* @param exp
|
|
31
65
|
* @param iat deprecated, the default date will be set internally
|
|
32
|
-
* @param call_cids this parameter is deprecated use `createCallToken` for call tokens
|
|
33
66
|
* @returns
|
|
67
|
+
*
|
|
68
|
+
* @deprecated use generateUserToken instead
|
|
34
69
|
*/
|
|
35
|
-
createToken(userID: string, exp?: number, iat?: number
|
|
70
|
+
createToken: (userID: string, exp?: number, iat?: number) => string;
|
|
36
71
|
/**
|
|
37
72
|
*
|
|
38
73
|
* @param userID
|
|
@@ -40,55 +75,12 @@ export declare class StreamClient {
|
|
|
40
75
|
* @param exp
|
|
41
76
|
* @param iat this is deprecated, the current date will be set internally
|
|
42
77
|
* @returns
|
|
78
|
+
*
|
|
79
|
+
* @deprecated use generateCallToken instead
|
|
43
80
|
*/
|
|
44
|
-
createCallToken(userIdOrObject: string | {
|
|
81
|
+
createCallToken: (userIdOrObject: string | {
|
|
45
82
|
user_id: string;
|
|
46
83
|
role?: string;
|
|
47
|
-
}, call_cids: string[], exp?: number, iat?: number)
|
|
48
|
-
createDevice: (createDeviceRequest: CreateDeviceRequest) => Promise<import("./gen/chat").Response>;
|
|
49
|
-
deleteDevice: (requestParameters: DeleteDeviceRequest) => Promise<import("./gen/chat").Response>;
|
|
50
|
-
listDevices: (requestParameters: ListDevicesRequest) => Promise<import("./gen/chat").ListDevicesResponse>;
|
|
51
|
-
listPushProviders: () => Promise<import("./gen/chat").ListPushProvidersResponse>;
|
|
52
|
-
deletePushProvider: (request: DeletePushProviderRequest) => Promise<import("./gen/chat").Response>;
|
|
53
|
-
upsertPushProvider: (request: PushProvider) => Promise<import("./gen/chat").UpsertPushProviderResponse>;
|
|
54
|
-
checkPush: (checkPushRequest: CheckPushRequest) => Promise<import("./gen/chat").CheckPushResponse>;
|
|
55
|
-
createGuest: (createGuestRequest: CreateGuestRequest) => Promise<import("./gen/chat").CreateGuestResponse>;
|
|
56
|
-
banUser: (banRequest: BanRequest) => Promise<import("./gen/chat").Response>;
|
|
57
|
-
deactivateUser: (deactivateUserRequest: DeactivateUserRequest & {
|
|
58
|
-
user_id: string;
|
|
59
|
-
}) => Promise<import("./gen/chat").DeactivateUserResponse>;
|
|
60
|
-
deactivateUsers: (deactivateUsersRequest: DeactivateUsersRequest) => Promise<import("./gen/chat").DeactivateUsersResponse>;
|
|
61
|
-
deleteUsers: (deleteUsersRequest: DeleteUsersRequest) => Promise<import("./gen/chat").DeleteUsersResponse>;
|
|
62
|
-
exportUser: (request: ExportUserRequest) => Promise<import("./gen/chat").ExportUserResponse>;
|
|
63
|
-
exportUsers: (exportUsersRequest: ExportUsersRequest) => Promise<import("./gen/chat").ExportUsersResponse>;
|
|
64
|
-
flag: (flagRequest: FlagRequest) => Promise<import("./gen/chat").FlagResponse>;
|
|
65
|
-
queryBannedUsers: (payload: QueryBannedUsersRequest) => Promise<import("./gen/chat").QueryBannedUsersResponse>;
|
|
66
|
-
queryUsers: (payload: QueryUsersPayload) => Promise<import("./gen/chat").QueryUsersResponse>;
|
|
67
|
-
reactivateUser: (reactivateUserRequest: ReactivateUserRequest & {
|
|
68
|
-
user_id: string;
|
|
69
|
-
}) => Promise<import("./gen/chat").ReactivateUserResponse>;
|
|
70
|
-
reactivateUsers: (reactivateUsersRequest: ReactivateUsersRequest) => Promise<import("./gen/chat").ReactivateUsersResponse>;
|
|
71
|
-
restoreUsers: (restoreUsersRequest: RestoreUsersRequest) => Promise<import("./gen/chat").Response>;
|
|
72
|
-
unbanUser: (request: UnbanRequest) => Promise<import("./gen/chat").Response>;
|
|
73
|
-
upsertUsers: (updateUsersRequest: UpdateUsersRequest) => Promise<import("./gen/chat").UpdateUsersResponse>;
|
|
74
|
-
updateUsersPartial: (request: {
|
|
75
|
-
users: UpdateUserPartialRequest[];
|
|
76
|
-
}) => Promise<import("./gen/chat").UpdateUsersResponse>;
|
|
77
|
-
muteUser: (muteUserRequest: MuteUserRequest) => Promise<import("./gen/chat").MuteUserResponse>;
|
|
78
|
-
unmuteUser: (unmuteUserRequest: UnmuteUserRequest) => Promise<import("./gen/chat").UnmuteResponse>;
|
|
79
|
-
sendCustomEventToUser: (userId: string, event: UserCustomEventRequest) => Promise<import("./gen/chat").Response>;
|
|
80
|
-
createRole: (createRoleRequest: CreateRoleRequest) => Promise<import("./gen/chat").CreateRoleResponse>;
|
|
81
|
-
deleteRole: (request: DeleteRoleRequest) => Promise<import("./gen/chat").Response>;
|
|
82
|
-
getPermission: (request: GetPermissionRequest) => Promise<import("./gen/chat").GetCustomPermissionResponse>;
|
|
83
|
-
listPermissions: () => Promise<import("./gen/chat").ListPermissionsResponse>;
|
|
84
|
-
listRoles: () => Promise<import("./gen/chat").ListRolesResponse>;
|
|
85
|
-
getAppSettings: () => Promise<import("./gen/chat").GetApplicationResponse>;
|
|
86
|
-
updateAppSettings: (updateAppRequest: UpdateAppRequest) => Promise<import("./gen/chat").Response>;
|
|
87
|
-
getRateLimits: () => Promise<import("./gen/chat").GetRateLimitsResponse>;
|
|
88
|
-
getTaskStatus: (request: GetTaskRequest) => Promise<import("./gen/chat").GetTaskResponse>;
|
|
84
|
+
}, call_cids: string[], exp?: number, iat?: number) => string;
|
|
89
85
|
verifyWebhook: (requestBody: string | Buffer, xSignature: string) => boolean;
|
|
90
|
-
blockUsers: (blockUsersRequest: BlockUsersRequest) => Promise<import("./gen/chat").BlockUsersResponse>;
|
|
91
|
-
unblockUsers: (unblockUsersRequest: UnblockUsersRequest) => Promise<import("./gen/chat").UnblockUsersResponse>;
|
|
92
|
-
getBlockedUsers: (request: GetBlockedUsersRequest) => Promise<import("./gen/chat").GetBlockedUsersResponse>;
|
|
93
|
-
getConfiguration: (product?: 'chat' | 'video') => Configuration;
|
|
94
86
|
}
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
+
import { VideoApi } from './gen/video/VideoApi';
|
|
1
2
|
import { StreamCall } from './StreamCall';
|
|
2
|
-
|
|
3
|
-
import { CheckExternalStorageRequest, DeleteCallTypeRequest, DeleteExternalStorageRequest, GetCallTypeRequest, VideoCreateCallTypeRequest, VideoCreateExternalStorageRequest, VideoQueryCallStatsRequest, VideoQueryCallsRequest, VideoUpdateCallTypeRequest, VideoUpdateExternalStorageRequest } from './gen/video';
|
|
4
|
-
export declare class StreamVideoClient {
|
|
5
|
-
private readonly streamClient;
|
|
6
|
-
private readonly apiClient;
|
|
7
|
-
constructor(streamClient: StreamClient);
|
|
3
|
+
export declare class StreamVideoClient extends VideoApi {
|
|
8
4
|
call: (type: string, id: string) => StreamCall;
|
|
9
|
-
queryCalls: (request?: VideoQueryCallsRequest) => Promise<import("./gen/video").VideoQueryCallsResponse>;
|
|
10
|
-
queryCallStatistics: (videoQueryCallStatsRequest?: VideoQueryCallStatsRequest) => Promise<import("./gen/video").VideoQueryCallStatsResponse>;
|
|
11
|
-
createCallType: (videoCreateCallTypeRequest: VideoCreateCallTypeRequest) => Promise<import("./gen/video").VideoCreateCallTypeResponse>;
|
|
12
|
-
deleteCallType: (request: DeleteCallTypeRequest) => Promise<import("./gen/video").VideoResponse>;
|
|
13
|
-
getCallType: (request: GetCallTypeRequest) => Promise<import("./gen/video").VideoGetCallTypeResponse>;
|
|
14
|
-
listCallTypes: () => Promise<import("./gen/video").VideoListCallTypeResponse>;
|
|
15
|
-
updateCallType: (name: string, videoUpdateCallTypeRequest: VideoUpdateCallTypeRequest) => Promise<import("./gen/video").VideoUpdateCallTypeResponse>;
|
|
16
|
-
listExternalStorages: () => Promise<import("./gen/video").VideoListExternalStorageResponse>;
|
|
17
|
-
createExternalStorage: (videoCreateExternalStorageRequest: VideoCreateExternalStorageRequest) => Promise<import("./gen/video").VideoCreateExternalStorageResponse>;
|
|
18
|
-
deleteExternalStorage: (request: DeleteExternalStorageRequest) => Promise<import("./gen/video").VideoDeleteExternalStorageResponse>;
|
|
19
|
-
updateExternalStorage: (name: string, videoUpdateExternalStorageRequest: VideoUpdateExternalStorageRequest) => Promise<import("./gen/video").VideoUpdateExternalStorageResponse>;
|
|
20
|
-
checkExternalStorage: (request: CheckExternalStorageRequest) => Promise<import("./gen/video").VideoCheckExternalStorageResponse>;
|
|
21
5
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ChatApi } from './ChatApi';
|
|
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 } from '../models';
|
|
4
|
+
export declare class ChannelApi {
|
|
5
|
+
protected chatApi: ChatApi;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
constructor(chatApi: ChatApi, type: string, id?: string | undefined);
|
|
9
|
+
delete: (request?: {
|
|
10
|
+
hard_delete?: boolean;
|
|
11
|
+
}) => Promise<StreamResponse<DeleteChannelResponse>>;
|
|
12
|
+
updateChannelPartial: (request?: UpdateChannelPartialRequest) => Promise<StreamResponse<UpdateChannelPartialResponse>>;
|
|
13
|
+
update: (request?: UpdateChannelRequest) => Promise<StreamResponse<UpdateChannelResponse>>;
|
|
14
|
+
sendEvent: (request: SendEventRequest) => Promise<StreamResponse<EventResponse>>;
|
|
15
|
+
deleteFile: (request?: {
|
|
16
|
+
url?: string;
|
|
17
|
+
}) => Promise<StreamResponse<Response>>;
|
|
18
|
+
uploadFile: (request?: FileUploadRequest) => Promise<StreamResponse<FileUploadResponse>>;
|
|
19
|
+
hide: (request?: HideChannelRequest) => Promise<StreamResponse<HideChannelResponse>>;
|
|
20
|
+
deleteImage: (request?: {
|
|
21
|
+
url?: string;
|
|
22
|
+
}) => Promise<StreamResponse<Response>>;
|
|
23
|
+
uploadImage: (request?: ImageUploadRequest) => Promise<StreamResponse<ImageUploadResponse>>;
|
|
24
|
+
sendMessage: (request: SendMessageRequest) => Promise<StreamResponse<SendMessageResponse>>;
|
|
25
|
+
getManyMessages: (request: {
|
|
26
|
+
ids: string[];
|
|
27
|
+
}) => Promise<StreamResponse<GetManyMessagesResponse>>;
|
|
28
|
+
getOrCreate: (request?: ChannelGetOrCreateRequest) => Promise<StreamResponse<ChannelStateResponse>>;
|
|
29
|
+
markRead: (request?: MarkReadRequest) => Promise<StreamResponse<MarkReadResponse>>;
|
|
30
|
+
show: (request?: ShowChannelRequest) => Promise<StreamResponse<ShowChannelResponse>>;
|
|
31
|
+
truncate: (request?: TruncateChannelRequest) => Promise<StreamResponse<TruncateChannelResponse>>;
|
|
32
|
+
markUnread: (request?: MarkUnreadRequest) => Promise<StreamResponse<Response>>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { BaseApi } from '../../BaseApi';
|
|
2
|
+
import { StreamResponse } from '../../types';
|
|
3
|
+
import { CastPollVoteRequest, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreatePollOptionRequest, CreatePollRequest, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, EventResponse, ExportChannelsRequest, ExportChannelsResponse, FileUploadRequest, FileUploadResponse, GetChannelTypeResponse, GetCommandResponse, GetExportChannelsStatusResponse, GetManyMessagesResponse, GetMessageResponse, GetReactionsResponse, GetRepliesResponse, GetThreadResponse, HideChannelRequest, HideChannelResponse, ImageUploadRequest, ImageUploadResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageResponse, MuteChannelRequest, MuteChannelResponse, PollOptionResponse, PollResponse, PollVoteResponse, PollVotesResponse, QueryBannedUsersRequest, QueryBannedUsersResponse, QueryChannelsRequest, QueryChannelsResponse, QueryMembersRequest, QueryMessageFlagsRequest, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryPollVotesRequest, QueryPollsRequest, QueryPollsResponse, QueryReactionsRequest, QueryReactionsResponse, QueryThreadsRequest, QueryThreadsResponse, ReactionRemovalResponse, Response, SearchRequest, SearchResponse, SendEventRequest, SendMessageRequest, SendMessageResponse, SendReactionRequest, SendReactionResponse, SendUserCustomEventRequest, ShowChannelRequest, ShowChannelResponse, SortParamRequest, TranslateMessageRequest, TruncateChannelRequest, TruncateChannelResponse, UnmuteChannelRequest, UnmuteResponse, UnreadCountsBatchRequest, UnreadCountsBatchResponse, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateChannelTypeRequest, UpdateChannelTypeResponse, UpdateCommandRequest, UpdateCommandResponse, UpdateMessagePartialRequest, UpdateMessagePartialResponse, UpdateMessageRequest, UpdateMessageResponse, UpdatePollOptionRequest, UpdatePollPartialRequest, UpdatePollRequest, UpdateThreadPartialRequest, UpdateThreadPartialResponse, WrappedUnreadCountsResponse } from '../models';
|
|
4
|
+
export declare class ChatApi extends BaseApi {
|
|
5
|
+
queryChannels: (request?: QueryChannelsRequest) => Promise<StreamResponse<QueryChannelsResponse>>;
|
|
6
|
+
deleteChannels: (request: DeleteChannelsRequest) => Promise<StreamResponse<DeleteChannelsResponse>>;
|
|
7
|
+
markChannelsRead: (request?: MarkChannelsReadRequest) => Promise<StreamResponse<MarkReadResponse>>;
|
|
8
|
+
getOrCreateDistinctChannel: (request: ChannelGetOrCreateRequest & {
|
|
9
|
+
type: string;
|
|
10
|
+
}) => Promise<StreamResponse<ChannelStateResponse>>;
|
|
11
|
+
deleteChannel: (request: {
|
|
12
|
+
type: string;
|
|
13
|
+
id: string;
|
|
14
|
+
hard_delete?: boolean;
|
|
15
|
+
}) => Promise<StreamResponse<DeleteChannelResponse>>;
|
|
16
|
+
updateChannelPartial: (request: UpdateChannelPartialRequest & {
|
|
17
|
+
type: string;
|
|
18
|
+
id: string;
|
|
19
|
+
}) => Promise<StreamResponse<UpdateChannelPartialResponse>>;
|
|
20
|
+
updateChannel: (request: UpdateChannelRequest & {
|
|
21
|
+
type: string;
|
|
22
|
+
id: string;
|
|
23
|
+
}) => Promise<StreamResponse<UpdateChannelResponse>>;
|
|
24
|
+
sendEvent: (request: SendEventRequest & {
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
}) => Promise<StreamResponse<EventResponse>>;
|
|
28
|
+
deleteFile: (request: {
|
|
29
|
+
type: string;
|
|
30
|
+
id: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
}) => Promise<StreamResponse<Response>>;
|
|
33
|
+
uploadFile: (request: FileUploadRequest & {
|
|
34
|
+
type: string;
|
|
35
|
+
id: string;
|
|
36
|
+
}) => Promise<StreamResponse<FileUploadResponse>>;
|
|
37
|
+
hideChannel: (request: HideChannelRequest & {
|
|
38
|
+
type: string;
|
|
39
|
+
id: string;
|
|
40
|
+
}) => Promise<StreamResponse<HideChannelResponse>>;
|
|
41
|
+
deleteImage: (request: {
|
|
42
|
+
type: string;
|
|
43
|
+
id: string;
|
|
44
|
+
url?: string;
|
|
45
|
+
}) => Promise<StreamResponse<Response>>;
|
|
46
|
+
uploadImage: (request: ImageUploadRequest & {
|
|
47
|
+
type: string;
|
|
48
|
+
id: string;
|
|
49
|
+
}) => Promise<StreamResponse<ImageUploadResponse>>;
|
|
50
|
+
sendMessage: (request: SendMessageRequest & {
|
|
51
|
+
type: string;
|
|
52
|
+
id: string;
|
|
53
|
+
}) => Promise<StreamResponse<SendMessageResponse>>;
|
|
54
|
+
getManyMessages: (request: {
|
|
55
|
+
type: string;
|
|
56
|
+
id: string;
|
|
57
|
+
ids: string[];
|
|
58
|
+
}) => Promise<StreamResponse<GetManyMessagesResponse>>;
|
|
59
|
+
getOrCreateChannel: (request: ChannelGetOrCreateRequest & {
|
|
60
|
+
type: string;
|
|
61
|
+
id: string;
|
|
62
|
+
}) => Promise<StreamResponse<ChannelStateResponse>>;
|
|
63
|
+
markRead: (request: MarkReadRequest & {
|
|
64
|
+
type: string;
|
|
65
|
+
id: string;
|
|
66
|
+
}) => Promise<StreamResponse<MarkReadResponse>>;
|
|
67
|
+
showChannel: (request: ShowChannelRequest & {
|
|
68
|
+
type: string;
|
|
69
|
+
id: string;
|
|
70
|
+
}) => Promise<StreamResponse<ShowChannelResponse>>;
|
|
71
|
+
truncateChannel: (request: TruncateChannelRequest & {
|
|
72
|
+
type: string;
|
|
73
|
+
id: string;
|
|
74
|
+
}) => Promise<StreamResponse<TruncateChannelResponse>>;
|
|
75
|
+
markUnread: (request: MarkUnreadRequest & {
|
|
76
|
+
type: string;
|
|
77
|
+
id: string;
|
|
78
|
+
}) => Promise<StreamResponse<Response>>;
|
|
79
|
+
listChannelTypes: () => Promise<StreamResponse<ListChannelTypesResponse>>;
|
|
80
|
+
createChannelType: (request: CreateChannelTypeRequest) => Promise<StreamResponse<CreateChannelTypeResponse>>;
|
|
81
|
+
deleteChannelType: (request: {
|
|
82
|
+
name: string;
|
|
83
|
+
}) => Promise<StreamResponse<Response>>;
|
|
84
|
+
getChannelType: (request: {
|
|
85
|
+
name: string;
|
|
86
|
+
}) => Promise<StreamResponse<GetChannelTypeResponse>>;
|
|
87
|
+
updateChannelType: (request: UpdateChannelTypeRequest & {
|
|
88
|
+
name: string;
|
|
89
|
+
}) => Promise<StreamResponse<UpdateChannelTypeResponse>>;
|
|
90
|
+
listCommands: () => Promise<StreamResponse<ListCommandsResponse>>;
|
|
91
|
+
createCommand: (request: CreateCommandRequest) => Promise<StreamResponse<CreateCommandResponse>>;
|
|
92
|
+
deleteCommand: (request: {
|
|
93
|
+
name: string;
|
|
94
|
+
}) => Promise<StreamResponse<DeleteCommandResponse>>;
|
|
95
|
+
getCommand: (request: {
|
|
96
|
+
name: string;
|
|
97
|
+
}) => Promise<StreamResponse<GetCommandResponse>>;
|
|
98
|
+
updateCommand: (request: UpdateCommandRequest & {
|
|
99
|
+
name: string;
|
|
100
|
+
}) => Promise<StreamResponse<UpdateCommandResponse>>;
|
|
101
|
+
exportChannels: (request: ExportChannelsRequest) => Promise<StreamResponse<ExportChannelsResponse>>;
|
|
102
|
+
getExportChannelsStatus: (request: {
|
|
103
|
+
id: string;
|
|
104
|
+
}) => Promise<StreamResponse<GetExportChannelsStatusResponse>>;
|
|
105
|
+
queryMembers: (request?: {
|
|
106
|
+
payload?: QueryMembersRequest;
|
|
107
|
+
}) => Promise<StreamResponse<MembersResponse>>;
|
|
108
|
+
queryMessageHistory: (request: QueryMessageHistoryRequest) => Promise<StreamResponse<QueryMessageHistoryResponse>>;
|
|
109
|
+
deleteMessage: (request: {
|
|
110
|
+
id: string;
|
|
111
|
+
hard?: boolean;
|
|
112
|
+
deleted_by?: string;
|
|
113
|
+
}) => Promise<StreamResponse<DeleteMessageResponse>>;
|
|
114
|
+
getMessage: (request: {
|
|
115
|
+
id: string;
|
|
116
|
+
show_deleted_message?: boolean;
|
|
117
|
+
}) => Promise<StreamResponse<GetMessageResponse>>;
|
|
118
|
+
updateMessage: (request: UpdateMessageRequest & {
|
|
119
|
+
id: string;
|
|
120
|
+
}) => Promise<StreamResponse<UpdateMessageResponse>>;
|
|
121
|
+
updateMessagePartial: (request: UpdateMessagePartialRequest & {
|
|
122
|
+
id: string;
|
|
123
|
+
}) => Promise<StreamResponse<UpdateMessagePartialResponse>>;
|
|
124
|
+
runMessageAction: (request: MessageActionRequest & {
|
|
125
|
+
id: string;
|
|
126
|
+
}) => Promise<StreamResponse<MessageResponse>>;
|
|
127
|
+
commitMessage: (request: CommitMessageRequest & {
|
|
128
|
+
id: string;
|
|
129
|
+
}) => Promise<StreamResponse<MessageResponse>>;
|
|
130
|
+
sendReaction: (request: SendReactionRequest & {
|
|
131
|
+
id: string;
|
|
132
|
+
}) => Promise<StreamResponse<SendReactionResponse>>;
|
|
133
|
+
deleteReaction: (request: {
|
|
134
|
+
id: string;
|
|
135
|
+
type: string;
|
|
136
|
+
user_id?: string;
|
|
137
|
+
}) => Promise<StreamResponse<ReactionRemovalResponse>>;
|
|
138
|
+
getReactions: (request: {
|
|
139
|
+
id: string;
|
|
140
|
+
limit?: number;
|
|
141
|
+
offset?: number;
|
|
142
|
+
}) => Promise<StreamResponse<GetReactionsResponse>>;
|
|
143
|
+
queryReactions: (request: QueryReactionsRequest & {
|
|
144
|
+
id: string;
|
|
145
|
+
}) => Promise<StreamResponse<QueryReactionsResponse>>;
|
|
146
|
+
translateMessage: (request: TranslateMessageRequest & {
|
|
147
|
+
id: string;
|
|
148
|
+
}) => Promise<StreamResponse<MessageResponse>>;
|
|
149
|
+
undeleteMessage: (request: UpdateMessageRequest & {
|
|
150
|
+
id: string;
|
|
151
|
+
}) => Promise<StreamResponse<UpdateMessageResponse>>;
|
|
152
|
+
castPollVote: (request: CastPollVoteRequest & {
|
|
153
|
+
message_id: string;
|
|
154
|
+
poll_id: string;
|
|
155
|
+
}) => Promise<StreamResponse<PollVoteResponse>>;
|
|
156
|
+
removePollVote: (request: {
|
|
157
|
+
message_id: string;
|
|
158
|
+
poll_id: string;
|
|
159
|
+
vote_id: string;
|
|
160
|
+
user_id?: string;
|
|
161
|
+
}) => Promise<StreamResponse<PollVoteResponse>>;
|
|
162
|
+
getReplies: (request: {
|
|
163
|
+
parent_id: string;
|
|
164
|
+
limit?: number;
|
|
165
|
+
offset?: number;
|
|
166
|
+
id_gte?: string;
|
|
167
|
+
id_gt?: string;
|
|
168
|
+
id_lte?: string;
|
|
169
|
+
id_lt?: string;
|
|
170
|
+
created_at_after_or_equal?: Date;
|
|
171
|
+
created_at_after?: Date;
|
|
172
|
+
created_at_before_or_equal?: Date;
|
|
173
|
+
created_at_before?: Date;
|
|
174
|
+
id_around?: string;
|
|
175
|
+
created_at_around?: Date;
|
|
176
|
+
sort?: SortParamRequest[];
|
|
177
|
+
}) => Promise<StreamResponse<GetRepliesResponse>>;
|
|
178
|
+
queryMessageFlags: (request?: {
|
|
179
|
+
payload?: QueryMessageFlagsRequest;
|
|
180
|
+
}) => Promise<StreamResponse<QueryMessageFlagsResponse>>;
|
|
181
|
+
muteChannel: (request?: MuteChannelRequest) => Promise<StreamResponse<MuteChannelResponse>>;
|
|
182
|
+
unmuteChannel: (request?: UnmuteChannelRequest) => Promise<StreamResponse<UnmuteResponse>>;
|
|
183
|
+
createPoll: (request: CreatePollRequest) => Promise<StreamResponse<PollResponse>>;
|
|
184
|
+
updatePoll: (request: UpdatePollRequest) => Promise<StreamResponse<PollResponse>>;
|
|
185
|
+
queryPolls: (request?: QueryPollsRequest & {
|
|
186
|
+
user_id?: string;
|
|
187
|
+
}) => Promise<StreamResponse<QueryPollsResponse>>;
|
|
188
|
+
deletePoll: (request: {
|
|
189
|
+
poll_id: string;
|
|
190
|
+
user_id?: string;
|
|
191
|
+
}) => Promise<StreamResponse<Response>>;
|
|
192
|
+
getPoll: (request: {
|
|
193
|
+
poll_id: string;
|
|
194
|
+
user_id?: string;
|
|
195
|
+
}) => Promise<StreamResponse<PollResponse>>;
|
|
196
|
+
updatePollPartial: (request: UpdatePollPartialRequest & {
|
|
197
|
+
poll_id: string;
|
|
198
|
+
}) => Promise<StreamResponse<PollResponse>>;
|
|
199
|
+
createPollOption: (request: CreatePollOptionRequest & {
|
|
200
|
+
poll_id: string;
|
|
201
|
+
}) => Promise<StreamResponse<PollOptionResponse>>;
|
|
202
|
+
updatePollOption: (request: UpdatePollOptionRequest & {
|
|
203
|
+
poll_id: string;
|
|
204
|
+
}) => Promise<StreamResponse<PollOptionResponse>>;
|
|
205
|
+
deletePollOption: (request: {
|
|
206
|
+
poll_id: string;
|
|
207
|
+
option_id: string;
|
|
208
|
+
user_id?: string;
|
|
209
|
+
}) => Promise<StreamResponse<Response>>;
|
|
210
|
+
getPollOption: (request: {
|
|
211
|
+
poll_id: string;
|
|
212
|
+
option_id: string;
|
|
213
|
+
user_id?: string;
|
|
214
|
+
}) => Promise<StreamResponse<PollOptionResponse>>;
|
|
215
|
+
queryPollVotes: (request: QueryPollVotesRequest & {
|
|
216
|
+
poll_id: string;
|
|
217
|
+
user_id?: string;
|
|
218
|
+
}) => Promise<StreamResponse<PollVotesResponse>>;
|
|
219
|
+
queryBannedUsers: (request?: {
|
|
220
|
+
payload?: QueryBannedUsersRequest;
|
|
221
|
+
}) => Promise<StreamResponse<QueryBannedUsersResponse>>;
|
|
222
|
+
search: (request?: {
|
|
223
|
+
payload?: SearchRequest;
|
|
224
|
+
}) => Promise<StreamResponse<SearchResponse>>;
|
|
225
|
+
queryThreads: (request?: QueryThreadsRequest) => Promise<StreamResponse<QueryThreadsResponse>>;
|
|
226
|
+
getThread: (request: {
|
|
227
|
+
message_id: string;
|
|
228
|
+
connection_id?: string;
|
|
229
|
+
reply_limit?: number;
|
|
230
|
+
participant_limit?: number;
|
|
231
|
+
member_limit?: number;
|
|
232
|
+
}) => Promise<StreamResponse<GetThreadResponse>>;
|
|
233
|
+
updateThreadPartial: (request: UpdateThreadPartialRequest & {
|
|
234
|
+
message_id: string;
|
|
235
|
+
}) => Promise<StreamResponse<UpdateThreadPartialResponse>>;
|
|
236
|
+
unreadCounts: () => Promise<StreamResponse<WrappedUnreadCountsResponse>>;
|
|
237
|
+
unreadCountsBatch: (request: UnreadCountsBatchRequest) => Promise<StreamResponse<UnreadCountsBatchResponse>>;
|
|
238
|
+
sendUserCustomEvent: (request: SendUserCustomEventRequest & {
|
|
239
|
+
user_id: string;
|
|
240
|
+
}) => Promise<StreamResponse<Response>>;
|
|
241
|
+
}
|