@amityco/ts-sdk 7.6.1-2841ad2c.0 → 7.6.1-8ef2910.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/core/events.d.ts +1 -6
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +1 -26
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/domains/channel.d.ts +0 -6
- package/dist/@types/domains/channel.d.ts.map +1 -1
- package/dist/@types/domains/content.d.ts +8 -2
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/@types/domains/feed.d.ts +2 -1
- package/dist/@types/domains/feed.d.ts.map +1 -1
- package/dist/@types/domains/file.d.ts +3 -1
- package/dist/@types/domains/file.d.ts.map +1 -1
- package/dist/@types/domains/post.d.ts +3 -3
- package/dist/@types/domains/post.d.ts.map +1 -1
- package/dist/@types/domains/stream.d.ts +1 -9
- package/dist/@types/domains/stream.d.ts.map +1 -1
- package/dist/@types/index.d.ts +0 -1
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/channelRepository/api/createChannel.d.ts +1 -3
- package/dist/channelRepository/api/createChannel.d.ts.map +1 -1
- package/dist/channelRepository/channelMembership/observers/getMembers/ChannelMemberLiveCollectionController.d.ts.map +1 -1
- package/dist/channelRepository/events/index.d.ts +1 -1
- package/dist/channelRepository/events/index.d.ts.map +1 -1
- package/dist/channelRepository/events/onChannelMuted.d.ts +2 -0
- package/dist/channelRepository/events/onChannelMuted.d.ts.map +1 -0
- package/dist/channelRepository/internalApi/getChannel.d.ts.map +1 -1
- package/dist/channelRepository/observers/getChannels/ChannelLiveCollectionController.d.ts.map +1 -1
- package/dist/client/api/login.d.ts.map +1 -1
- package/dist/communityRepository/api/getCommunity.d.ts +1 -1
- package/dist/communityRepository/api/getCommunity.d.ts.map +1 -1
- package/dist/core/events.d.ts +3 -3
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/subscription.d.ts +1 -2
- package/dist/core/subscription.d.ts.map +1 -1
- package/dist/feedRepository/api/getCustomRankingGlobalFeed.d.ts +1 -1
- package/dist/feedRepository/api/getCustomRankingGlobalFeed.d.ts.map +1 -1
- package/dist/feedRepository/api/queryGlobalFeed.d.ts.map +1 -1
- package/dist/fileRepository/api/index.d.ts +1 -0
- package/dist/fileRepository/api/index.d.ts.map +1 -1
- package/dist/fileRepository/api/uploadClip.d.ts +17 -0
- package/dist/fileRepository/api/uploadClip.d.ts.map +1 -0
- package/dist/index.cjs.js +5660 -6239
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +5763 -6340
- package/dist/index.umd.js +3 -3
- package/dist/liveStreamPlayer/utils/eventRegister.d.ts +1 -2
- package/dist/liveStreamPlayer/utils/eventRegister.d.ts.map +1 -1
- package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +0 -4
- package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
- package/dist/messagePreview/utils/getSubChannelMessagePreviewWithUser.d.ts +1 -1
- package/dist/messageRepository/api/deleteMessage.d.ts.map +1 -1
- package/dist/messageRepository/observers/getMessage.d.ts.map +1 -1
- package/dist/messageRepository/observers/getMessages/MessageLiveCollectionController.d.ts.map +1 -1
- package/dist/messageRepository/observers/getMessages/MessageQueryStreamController.d.ts.map +1 -1
- package/dist/postRepository/api/createClipPost.d.ts +32 -0
- package/dist/postRepository/api/createClipPost.d.ts.map +1 -0
- package/dist/postRepository/api/createPost.d.ts.map +1 -1
- package/dist/postRepository/api/index.d.ts +1 -0
- package/dist/postRepository/api/index.d.ts.map +1 -1
- package/dist/postRepository/utils/payload.d.ts.map +1 -1
- package/dist/streamRepository/api/createStream.d.ts +1 -1
- package/dist/streamRepository/api/createStream.d.ts.map +1 -1
- package/dist/streamRepository/api/index.d.ts +0 -1
- package/dist/streamRepository/api/index.d.ts.map +1 -1
- package/dist/streamRepository/api/updateStream.d.ts +1 -4
- package/dist/streamRepository/api/updateStream.d.ts.map +1 -1
- package/dist/streamRepository/events/index.d.ts +0 -2
- package/dist/streamRepository/events/index.d.ts.map +1 -1
- package/dist/streamRepository/internalApi/getStream.d.ts +2 -2
- package/dist/streamRepository/internalApi/getStream.d.ts.map +1 -1
- package/dist/streamRepository/observers/getStreamById.d.ts.map +1 -1
- package/dist/streamRepository/observers/getStreams/GetStreamsLiveCollectionController.d.ts.map +1 -1
- package/dist/utils/linkedObject/channelLinkedObject.d.ts.map +1 -1
- package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
- package/dist/utils/linkedObject/streamLinkedObject.d.ts.map +1 -1
- package/dist/utils/postTypePredicate.d.ts +4 -5
- package/dist/utils/postTypePredicate.d.ts.map +1 -1
- package/dist/utils/tests/dummy/comment.d.ts +1 -1
- package/package.json +1 -1
- package/src/@types/core/events.ts +1 -10
- package/src/@types/core/payload.ts +1 -33
- package/src/@types/domains/channel.ts +0 -9
- package/src/@types/domains/content.ts +10 -0
- package/src/@types/domains/feed.ts +2 -1
- package/src/@types/domains/file.ts +5 -0
- package/src/@types/domains/post.ts +4 -4
- package/src/@types/domains/stream.ts +1 -13
- package/src/@types/index.ts +0 -1
- package/src/channelRepository/api/createChannel.ts +8 -11
- package/src/channelRepository/channelMembership/observers/getMembers/ChannelMemberLiveCollectionController.ts +0 -2
- package/src/channelRepository/events/index.ts +1 -1
- package/src/channelRepository/events/onChannelMuted.ts +39 -0
- package/src/channelRepository/internalApi/getChannel.ts +1 -0
- package/src/channelRepository/observers/getChannel.ts +2 -2
- package/src/channelRepository/observers/getChannels/ChannelLiveCollectionController.ts +2 -2
- package/src/channelRepository/utils/constructChannelObject.ts +2 -2
- package/src/client/api/login.ts +0 -2
- package/src/communityRepository/api/getCommunity.ts +0 -9
- package/src/core/events.ts +1 -4
- package/src/core/subscription.ts +6 -10
- package/src/feedRepository/api/getCustomRankingGlobalFeed.ts +1 -1
- package/src/feedRepository/api/queryGlobalFeed.ts +3 -1
- package/src/fileRepository/api/index.ts +1 -0
- package/src/fileRepository/api/uploadClip.ts +71 -0
- package/src/index.ts +0 -2
- package/src/liveStreamPlayer/api/getPlayer.ts +1 -1
- package/src/liveStreamPlayer/utils/eventRegister.ts +1 -16
- package/src/messageRepository/api/deleteMessage.ts +0 -16
- package/src/messageRepository/observers/getMessage.ts +0 -2
- package/src/messageRepository/observers/getMessages/MessageLiveCollectionController.ts +0 -2
- package/src/messageRepository/observers/getMessages/MessageQueryStreamController.ts +0 -13
- package/src/postRepository/api/createClipPost.ts +62 -0
- package/src/postRepository/api/createPost.ts +2 -3
- package/src/postRepository/api/index.ts +2 -0
- package/src/postRepository/api/queryPosts.ts +1 -1
- package/src/postRepository/observers/getPosts/PostPaginationController.ts +1 -1
- package/src/postRepository/utils/payload.ts +1 -37
- package/src/streamRepository/api/createStream.ts +1 -4
- package/src/streamRepository/api/index.ts +0 -1
- package/src/streamRepository/api/updateStream.ts +1 -8
- package/src/streamRepository/events/index.ts +0 -2
- package/src/streamRepository/internalApi/getStream.ts +3 -3
- package/src/streamRepository/observers/getStreamById.ts +0 -2
- package/src/streamRepository/observers/getStreams/GetStreamsLiveCollectionController.ts +1 -5
- package/src/utils/linkedObject/channelLinkedObject.ts +0 -3
- package/src/utils/linkedObject/postLinkedObject.ts +6 -25
- package/src/utils/linkedObject/streamLinkedObject.ts +0 -4
- package/src/utils/postTypePredicate.ts +7 -20
- package/dist/@types/domains/liveReaction.d.ts +0 -20
- package/dist/@types/domains/liveReaction.d.ts.map +0 -1
- package/dist/channelRepository/events/onChannelSetMuted.d.ts +0 -2
- package/dist/channelRepository/events/onChannelSetMuted.d.ts.map +0 -1
- package/dist/channelRepository/events/onChannelSetUserMuted.d.ts +0 -2
- package/dist/channelRepository/events/onChannelSetUserMuted.d.ts.map +0 -1
- package/dist/channelRepository/internalApi/getMyMembership.d.ts +0 -11
- package/dist/channelRepository/internalApi/getMyMembership.d.ts.map +0 -1
- package/dist/channelRepository/observers/getMyMembership.d.ts +0 -2
- package/dist/channelRepository/observers/getMyMembership.d.ts.map +0 -1
- package/dist/liveReactionRepository/api/createReaction.d.ts +0 -20
- package/dist/liveReactionRepository/api/createReaction.d.ts.map +0 -1
- package/dist/liveReactionRepository/api/index.d.ts +0 -2
- package/dist/liveReactionRepository/api/index.d.ts.map +0 -1
- package/dist/liveReactionRepository/events/index.d.ts +0 -2
- package/dist/liveReactionRepository/events/index.d.ts.map +0 -1
- package/dist/liveReactionRepository/events/onLiveReactionCreated.d.ts +0 -17
- package/dist/liveReactionRepository/events/onLiveReactionCreated.d.ts.map +0 -1
- package/dist/liveReactionRepository/events/onLiveReactionCreatedLocal.d.ts +0 -17
- package/dist/liveReactionRepository/events/onLiveReactionCreatedLocal.d.ts.map +0 -1
- package/dist/liveReactionRepository/index.d.ts +0 -4
- package/dist/liveReactionRepository/index.d.ts.map +0 -1
- package/dist/liveReactionRepository/internalApi/createLiveReaction.d.ts +0 -20
- package/dist/liveReactionRepository/internalApi/createLiveReaction.d.ts.map +0 -1
- package/dist/liveReactionRepository/observers/getReactions.d.ts +0 -19
- package/dist/liveReactionRepository/observers/getReactions.d.ts.map +0 -1
- package/dist/liveReactionRepository/observers/index.d.ts +0 -2
- package/dist/liveReactionRepository/observers/index.d.ts.map +0 -1
- package/dist/liveReactionRepository/service/ReactionSyncEngine.d.ts +0 -26
- package/dist/liveReactionRepository/service/ReactionSyncEngine.d.ts.map +0 -1
- package/dist/liveReactionRepository/utils/ReactionSyncEngineOnLoginHandler.d.ts +0 -3
- package/dist/liveReactionRepository/utils/ReactionSyncEngineOnLoginHandler.d.ts.map +0 -1
- package/dist/streamRepository/api/editStream.d.ts +0 -18
- package/dist/streamRepository/api/editStream.d.ts.map +0 -1
- package/dist/streamRepository/events/onStreamViewerBanned.d.ts +0 -17
- package/dist/streamRepository/events/onStreamViewerBanned.d.ts.map +0 -1
- package/dist/streamRepository/events/onStreamViewerUnbanned.d.ts +0 -17
- package/dist/streamRepository/events/onStreamViewerUnbanned.d.ts.map +0 -1
- package/dist/streamRepository/internalApi/getLiveChat.d.ts +0 -16
- package/dist/streamRepository/internalApi/getLiveChat.d.ts.map +0 -1
- package/src/@types/domains/liveReaction.ts +0 -25
- package/src/channelRepository/events/onChannelSetMuted.ts +0 -48
- package/src/channelRepository/events/onChannelSetUserMuted.ts +0 -65
- package/src/channelRepository/internalApi/getMyMembership.ts +0 -37
- package/src/channelRepository/observers/getMyMembership.ts +0 -98
- package/src/liveReactionRepository/api/createReaction.ts +0 -58
- package/src/liveReactionRepository/api/index.ts +0 -1
- package/src/liveReactionRepository/events/index.ts +0 -1
- package/src/liveReactionRepository/events/onLiveReactionCreated.ts +0 -37
- package/src/liveReactionRepository/events/onLiveReactionCreatedLocal.ts +0 -29
- package/src/liveReactionRepository/index.ts +0 -3
- package/src/liveReactionRepository/internalApi/createLiveReaction.ts +0 -42
- package/src/liveReactionRepository/observers/getReactions.ts +0 -59
- package/src/liveReactionRepository/observers/index.ts +0 -1
- package/src/liveReactionRepository/service/ReactionSyncEngine.ts +0 -138
- package/src/liveReactionRepository/utils/ReactionSyncEngineOnLoginHandler.ts +0 -19
- package/src/streamRepository/api/editStream.ts +0 -51
- package/src/streamRepository/events/onStreamViewerBanned.ts +0 -58
- package/src/streamRepository/events/onStreamViewerUnbanned.ts +0 -47
- package/src/streamRepository/internalApi/getLiveChat.ts +0 -59
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getActiveClient } from '~/client/api/activeClient';
|
|
2
|
+
import { createEventSubscriber } from '~/core/events';
|
|
3
|
+
|
|
4
|
+
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
5
|
+
|
|
6
|
+
import { prepareChannelPayload } from '../utils';
|
|
7
|
+
import { constructChannelDynamicValue } from '../utils/constructChannelDynamicValue';
|
|
8
|
+
|
|
9
|
+
type CallbackFn = Amity.Listener<Amity.StaticInternalChannel>;
|
|
10
|
+
const callbacks: CallbackFn[] = [];
|
|
11
|
+
let mainDisposer: (() => void) | null = null;
|
|
12
|
+
|
|
13
|
+
const dispose = (cb: CallbackFn) => {
|
|
14
|
+
const index = callbacks.indexOf(cb);
|
|
15
|
+
if (index > -1) {
|
|
16
|
+
callbacks.splice(index, 1);
|
|
17
|
+
}
|
|
18
|
+
if (callbacks.length === 0) {
|
|
19
|
+
mainDisposer?.();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const onChannelMuted = (callback: Amity.Listener<Amity.StaticInternalChannel>) => {
|
|
24
|
+
if (callbacks.length === 0) {
|
|
25
|
+
const client = getActiveClient();
|
|
26
|
+
|
|
27
|
+
const filter = async (payload: Amity.ChannelPayload) => {
|
|
28
|
+
const data = await prepareChannelPayload(payload);
|
|
29
|
+
|
|
30
|
+
ingestInCache(data);
|
|
31
|
+
callbacks.forEach(cb => cb(data.channels[0]));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
mainDisposer = createEventSubscriber(client, 'onChannelMuted', 'channel.setMuted', filter);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
callbacks.push(callback);
|
|
38
|
+
return () => dispose(callback);
|
|
39
|
+
};
|
|
@@ -9,6 +9,7 @@ import { pushToTombstone } from '~/cache/api/pushToTombstone';
|
|
|
9
9
|
|
|
10
10
|
import { prepareChannelPayload } from '../utils';
|
|
11
11
|
import { prepareUnreadCountInfo } from '../utils/prepareUnreadCountInfo';
|
|
12
|
+
import { constructChannelDynamicValue } from '../utils/constructChannelDynamicValue';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* ```js
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
onChannelMemberBanned,
|
|
11
11
|
onChannelMemberRemoved,
|
|
12
12
|
onChannelMemberUnbanned,
|
|
13
|
-
|
|
13
|
+
onChannelMuted,
|
|
14
14
|
onChannelUpdated,
|
|
15
15
|
} from '../events';
|
|
16
16
|
import { dropFromCache, pullFromCache } from '~/cache/api';
|
|
@@ -104,7 +104,7 @@ export const getChannel = (
|
|
|
104
104
|
onChannelMemberRemoved,
|
|
105
105
|
onChannelMemberBanned,
|
|
106
106
|
onChannelMemberUnbanned,
|
|
107
|
-
|
|
107
|
+
onChannelMuted,
|
|
108
108
|
convertEventPayload(onChannelMarkerFetched, 'entityId', 'channel'),
|
|
109
109
|
convertEventPayload(onChannelMarkerUpdated, 'entityId', 'channel'),
|
|
110
110
|
convertEventPayload(
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
onChannelLeft,
|
|
12
12
|
onChannelMemberAdded,
|
|
13
13
|
onChannelMemberRemoved,
|
|
14
|
+
onChannelMuted,
|
|
14
15
|
onChannelUpdated,
|
|
15
16
|
} from '~/channelRepository/events';
|
|
16
17
|
import {
|
|
@@ -57,7 +58,6 @@ import { onUserMessageFeedMarkerResolved } from '~/marker/events/onUserMessageFe
|
|
|
57
58
|
import { onChannelUnreadInfoUpdatedLocal } from '~/marker/events/onChannelUnreadInfoUpdatedLocal';
|
|
58
59
|
import { constructChannelObject } from '~/channelRepository/utils/constructChannelObject';
|
|
59
60
|
import { onChannelUnreadUpdatedLocal } from '~/channelRepository/events/onChannelUnreadUpdatedLocal';
|
|
60
|
-
import { onChannelSetMuted } from '~/channelRepository/events/onChannelSetMuted';
|
|
61
61
|
|
|
62
62
|
export class ChannelLiveCollectionController extends LiveCollectionController<
|
|
63
63
|
'channel',
|
|
@@ -313,7 +313,7 @@ export class ChannelLiveCollectionController extends LiveCollectionController<
|
|
|
313
313
|
},
|
|
314
314
|
{ fn: onChannelDeleted, action: Amity.ChannelActionType.OnDelete },
|
|
315
315
|
{ fn: onChannelUpdated, action: Amity.ChannelActionType.OnUpdate },
|
|
316
|
-
{ fn:
|
|
316
|
+
{ fn: onChannelMuted, action: Amity.ChannelActionType.OnMute },
|
|
317
317
|
{
|
|
318
318
|
fn: (callback: Amity.Listener<Amity.StaticInternalChannel>) => {
|
|
319
319
|
return onChannelJoined(channel => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getChannelMessagePreviewWithUser } from '~/messagePreview/utils';
|
|
2
2
|
import { constructChannelDynamicValue } from './constructChannelDynamicValue';
|
|
3
|
-
import {
|
|
3
|
+
import { LinkedObject } from '~/utils/linkedObject';
|
|
4
4
|
|
|
5
5
|
export const constructChannelObject = (channel: Amity.StaticInternalChannel): Amity.Channel => {
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ export const constructChannelObject = (channel: Amity.StaticInternalChannel): Am
|
|
|
10
10
|
* 3. [LinkedObject.channel] add markAsRead >> Amity.InternalChannel -> Amity.Channel
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
return
|
|
13
|
+
return LinkedObject.channel(
|
|
14
14
|
constructChannelDynamicValue(getChannelMessagePreviewWithUser(channel)),
|
|
15
15
|
);
|
|
16
16
|
};
|
package/src/client/api/login.ts
CHANGED
|
@@ -13,7 +13,6 @@ import analyticsEngineOnLoginHandler from '~/analytic/utils/analyticsEngineOnLog
|
|
|
13
13
|
import readReceiptSyncEngineOnLoginHandler from '~/client/utils/ReadReceiptSync/readReceiptSyncEngineOnLoginHandler';
|
|
14
14
|
import legacyReadReceiptSyncEngineOnLoginHandler from '~/client/utils/ReadReceiptSync/legacyReadReceiptSyncEngineOnLoginHandler';
|
|
15
15
|
import objectResolverEngineOnLoginHandler from '~/client/utils/ObjectResolver/objectResolverEngineOnLoginHandler';
|
|
16
|
-
import reactionSyncEngineOnLoginHandler from '~/liveReactionRepository/utils/ReactionSyncEngineOnLoginHandler';
|
|
17
16
|
import { logout } from './logout';
|
|
18
17
|
|
|
19
18
|
import { getActiveClient } from './activeClient';
|
|
@@ -202,7 +201,6 @@ export const login = async (
|
|
|
202
201
|
markReadEngineOnLoginHandler(),
|
|
203
202
|
analyticsEngineOnLoginHandler(),
|
|
204
203
|
objectResolverEngineOnLoginHandler(),
|
|
205
|
-
reactionSyncEngineOnLoginHandler(),
|
|
206
204
|
);
|
|
207
205
|
|
|
208
206
|
if (client.useLegacyUnreadCount) {
|
|
@@ -5,7 +5,6 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
|
5
5
|
|
|
6
6
|
import { saveCommunityUsers } from '~/communityRepository/utils/saveCommunityUsers';
|
|
7
7
|
import { prepareCommunityPayload } from '../utils';
|
|
8
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* ```js
|
|
@@ -23,8 +22,6 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
23
22
|
*/
|
|
24
23
|
export const getCommunity = async (
|
|
25
24
|
communityId: Amity.Community['communityId'],
|
|
26
|
-
type?: Amity.JoinRequestType,
|
|
27
|
-
includeDiscoverablePrivateCommunity?: boolean,
|
|
28
25
|
): Promise<Amity.Cached<Amity.InternalCommunity>> => {
|
|
29
26
|
const client = getActiveClient();
|
|
30
27
|
client.log('community/getCommunity', communityId);
|
|
@@ -32,12 +29,6 @@ export const getCommunity = async (
|
|
|
32
29
|
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
33
30
|
const { data: payload } = await client.http.get<Amity.CommunityPayload>(
|
|
34
31
|
`/api/v3/communities/${communityId}`,
|
|
35
|
-
{
|
|
36
|
-
params: {
|
|
37
|
-
type: 'communityJoinRequest',
|
|
38
|
-
includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
32
|
);
|
|
42
33
|
|
|
43
34
|
const data = prepareCommunityPayload(payload);
|
package/src/core/events.ts
CHANGED
|
@@ -32,10 +32,7 @@ const MQTT_EVENTS = [
|
|
|
32
32
|
'video-streaming.didFlag',
|
|
33
33
|
'video-streaming.didTerminate',
|
|
34
34
|
|
|
35
|
-
'
|
|
36
|
-
'video-streaming.viewerDidUnban',
|
|
37
|
-
|
|
38
|
-
'liveReaction.created',
|
|
35
|
+
// 'user.didGlobalBan' remove due to message event,
|
|
39
36
|
] as const;
|
|
40
37
|
|
|
41
38
|
/** @hidden */
|
package/src/core/subscription.ts
CHANGED
|
@@ -154,16 +154,6 @@ export const getSmartFeedMessageTopic = (): string => {
|
|
|
154
154
|
return `${getNetworkId(user)}/smartfeed/${user._id}/messages`;
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
export const getLiveStreamTopic = (): string => {
|
|
158
|
-
const user = getActiveUser();
|
|
159
|
-
|
|
160
|
-
return `${getNetworkId(user)}/videostreaming`;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
export const getLiveReactionTopic = (post: Amity.Post) => {
|
|
164
|
-
return `${post.path}/liveReaction`;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
157
|
let mqttAccessToken: string;
|
|
168
158
|
let mqttUserId: string;
|
|
169
159
|
|
|
@@ -178,3 +168,9 @@ export function subscribeTopic(
|
|
|
178
168
|
|
|
179
169
|
return mqtt.subscribe(topic, callback);
|
|
180
170
|
}
|
|
171
|
+
|
|
172
|
+
export const getLiveStreamTopic = (): string => {
|
|
173
|
+
const user = getActiveUser();
|
|
174
|
+
|
|
175
|
+
return `${getNetworkId(user)}/videostreaming`;
|
|
176
|
+
};
|
|
@@ -23,7 +23,7 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
23
23
|
* @async
|
|
24
24
|
* */
|
|
25
25
|
export const getCustomRankingGlobalFeed = async (query?: {
|
|
26
|
-
dataTypes?: ('video' | 'image' | 'file' | 'liveStream')[];
|
|
26
|
+
dataTypes?: ('video' | 'image' | 'file' | 'liveStream' | 'clip')[];
|
|
27
27
|
limit?: number;
|
|
28
28
|
queryToken?: string;
|
|
29
29
|
}): Promise<
|
|
@@ -32,7 +32,7 @@ export const queryGlobalFeed = async (
|
|
|
32
32
|
const client = getActiveClient();
|
|
33
33
|
client.log('feed/queryGlobalFeed', query);
|
|
34
34
|
|
|
35
|
-
const { queryToken, ...params } = query ?? {};
|
|
35
|
+
const { queryToken, dataTypes, resolveParent, ...params } = query ?? {};
|
|
36
36
|
|
|
37
37
|
const options = (() => {
|
|
38
38
|
if (queryToken) return { token: queryToken };
|
|
@@ -44,6 +44,8 @@ export const queryGlobalFeed = async (
|
|
|
44
44
|
{
|
|
45
45
|
params: {
|
|
46
46
|
...params,
|
|
47
|
+
dataTypes,
|
|
48
|
+
resolveParent: resolveParent ?? true,
|
|
47
49
|
options,
|
|
48
50
|
},
|
|
49
51
|
},
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { getActiveClient } from '~/client/api/activeClient';
|
|
2
|
+
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
3
|
+
import GlobalFileAccessType from '~/client/utils/GlobalFileAccessType';
|
|
4
|
+
|
|
5
|
+
/* begin_public_function
|
|
6
|
+
id: file.upload.clip
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* ```js
|
|
10
|
+
* import { FileRepository } from '@amityco/ts-sdk'
|
|
11
|
+
* const created = await FileRepository.uploadClip(formData)
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* Creates an {@link Amity.File}
|
|
15
|
+
*
|
|
16
|
+
* @param formData The data necessary to create a new {@link Amity.File}
|
|
17
|
+
* @param onProgress The callback to track the upload progress
|
|
18
|
+
* @returns The newly created {@link Amity.File}
|
|
19
|
+
*
|
|
20
|
+
* @category File API
|
|
21
|
+
* @async
|
|
22
|
+
*/
|
|
23
|
+
export const uploadClip = async (
|
|
24
|
+
formData: FormData,
|
|
25
|
+
feedType?: Amity.ContentFeedType,
|
|
26
|
+
onProgress?: (percent: number) => void,
|
|
27
|
+
): Promise<Amity.Cached<Amity.File<'clip'>[]>> => {
|
|
28
|
+
const client = getActiveClient();
|
|
29
|
+
client.log('file/uploadClip', formData);
|
|
30
|
+
|
|
31
|
+
const file = formData.get('files');
|
|
32
|
+
|
|
33
|
+
if (!file) throw new Error('The formData object must have a `files` key.');
|
|
34
|
+
|
|
35
|
+
const accessType = GlobalFileAccessType.getInstance().getFileAccessType();
|
|
36
|
+
formData.append('accessType', accessType);
|
|
37
|
+
|
|
38
|
+
formData.append('preferredFilename', (file as File).name);
|
|
39
|
+
|
|
40
|
+
if (feedType) {
|
|
41
|
+
formData.append('feedType', feedType);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const headers =
|
|
45
|
+
'getHeaders' in formData
|
|
46
|
+
? (formData as any).getHeaders()
|
|
47
|
+
: { 'content-type': 'multipart/form-data' };
|
|
48
|
+
|
|
49
|
+
const { data } = await client.upload.post<Amity.CreateFilePayload<'clip'>>(
|
|
50
|
+
'/api/v4/clips',
|
|
51
|
+
formData,
|
|
52
|
+
{
|
|
53
|
+
headers,
|
|
54
|
+
onUploadProgress({ loaded, total = 100 }) {
|
|
55
|
+
onProgress && onProgress(Math.round((loaded * 100) / total));
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// API-FIX: payload should be serialized properly
|
|
61
|
+
// const { files } = data
|
|
62
|
+
|
|
63
|
+
const cachedAt = client.cache && Date.now();
|
|
64
|
+
if (client.cache) ingestInCache({ files: data }, { cachedAt });
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
data,
|
|
68
|
+
cachedAt,
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/* end_public_function */
|
package/src/index.ts
CHANGED
|
@@ -60,7 +60,7 @@ export const getPlayer = async (parameters: { streamId: string }): Promise<HTMLV
|
|
|
60
60
|
video.src = recording.mp4.url;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
new EventRegister(video, resolution
|
|
63
|
+
new EventRegister(video, resolution).registerEvents();
|
|
64
64
|
|
|
65
65
|
return video;
|
|
66
66
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import uuid from 'react-native-uuid';
|
|
2
2
|
import { getUsageCollector } from '../api/getUsageCollector';
|
|
3
|
-
import { onStreamViewerBanned } from '~/streamRepository/events';
|
|
4
3
|
|
|
5
4
|
const SECOND = 1000;
|
|
6
5
|
/*
|
|
@@ -33,9 +32,7 @@ export class EventRegister {
|
|
|
33
32
|
|
|
34
33
|
_observer: MutationObserver;
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
constructor(player: HTMLVideoElement, resolution: string, streamId: string) {
|
|
35
|
+
constructor(player: HTMLVideoElement, resolution: string) {
|
|
39
36
|
this.player = player;
|
|
40
37
|
this.resolution = resolution;
|
|
41
38
|
this._startTime = null;
|
|
@@ -56,22 +53,10 @@ export class EventRegister {
|
|
|
56
53
|
mutation.removedNodes.forEach(node => {
|
|
57
54
|
if (node === player) {
|
|
58
55
|
this._unregisterEvents();
|
|
59
|
-
this._SDKUnsubscribers.forEach(fn => fn?.());
|
|
60
56
|
}
|
|
61
57
|
});
|
|
62
58
|
});
|
|
63
59
|
});
|
|
64
|
-
|
|
65
|
-
this._SDKUnsubscribers.push(
|
|
66
|
-
onStreamViewerBanned(stream => {
|
|
67
|
-
// if still has stream.watcherUrl, the current user has not banned.
|
|
68
|
-
if (stream.watcherUrl) return;
|
|
69
|
-
this.player.pause();
|
|
70
|
-
this.player.removeAttribute('src');
|
|
71
|
-
this.player.load();
|
|
72
|
-
this.player.remove();
|
|
73
|
-
}),
|
|
74
|
-
);
|
|
75
60
|
}
|
|
76
61
|
|
|
77
62
|
_resetStartTime() {
|
|
@@ -23,22 +23,6 @@ export const deleteMessage = async (
|
|
|
23
23
|
const client = getActiveClient();
|
|
24
24
|
client.log('message/deleteMessage', messageId);
|
|
25
25
|
|
|
26
|
-
if (messageId.includes('LOCAL_')) {
|
|
27
|
-
const message = pullFromCache<Amity.InternalMessage>(['message', 'get', messageId])?.data;
|
|
28
|
-
if (!message) throw Error('messageId not found');
|
|
29
|
-
|
|
30
|
-
const deletedMessage = {
|
|
31
|
-
...message,
|
|
32
|
-
isDeleted: true,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
fireEvent('local.message.deleted', {
|
|
36
|
-
messages: [deletedMessage],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
return LinkedObject.message(deletedMessage);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
26
|
// API-FIX: This endpoint has not been implemented yet.
|
|
43
27
|
const { data: deleted } = await client.http.delete<Amity.MessagePayload>(
|
|
44
28
|
`/api/v5/messages/${encodeURIComponent(messageId)}`,
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
onMessageReactionAdded,
|
|
12
12
|
onMessageReactionRemoved,
|
|
13
13
|
} from '../events';
|
|
14
|
-
import { onStreamViewerBanned } from '~/streamRepository/events/onStreamViewerBanned';
|
|
15
14
|
import { onMessageFetched } from '../events/onMessageFetched';
|
|
16
15
|
import { LinkedObject } from '~/utils/linkedObject';
|
|
17
16
|
|
|
@@ -58,7 +57,6 @@ export const getMessage = (
|
|
|
58
57
|
onMessageReactionRemoved,
|
|
59
58
|
convertEventPayload(onMessageMarkerFetched, 'contentId', 'message'),
|
|
60
59
|
convertEventPayload(onMessageMarked, 'contentId', 'message'),
|
|
61
|
-
convertEventPayload(onStreamViewerBanned, 'channelId', 'message'),
|
|
62
60
|
]);
|
|
63
61
|
};
|
|
64
62
|
/* end_public_function */
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
onMessageUnflagged,
|
|
12
12
|
onMessageUpdated,
|
|
13
13
|
} from '~/messageRepository/events';
|
|
14
|
-
import { onStreamViewerBanned } from '~/streamRepository/events/onStreamViewerBanned';
|
|
15
14
|
import { convertEventPayload } from '~/utils/event';
|
|
16
15
|
import { LiveCollectionController } from '~/core/liveCollection/LiveCollectionController';
|
|
17
16
|
import { onMessageMarked, onMessageMarkerFetched } from '~/marker/events';
|
|
@@ -71,7 +70,6 @@ export class MessageLiveCollectionController extends LiveCollectionController<
|
|
|
71
70
|
action: 'onUpdate',
|
|
72
71
|
},
|
|
73
72
|
{ fn: convertEventPayload(onMessageMarked, 'contentId', 'message'), action: 'onUpdate' },
|
|
74
|
-
{ fn: convertEventPayload(onStreamViewerBanned, 'channelId', 'message'), action: 'onUpdate' },
|
|
75
73
|
]);
|
|
76
74
|
}
|
|
77
75
|
|
|
@@ -116,19 +116,6 @@ export class MessageQueryStreamController extends QueryStreamController<
|
|
|
116
116
|
pushToCache(this.cacheKey, collection);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
if (action === 'onDelete' && payload.syncState === Amity.SyncState.Error) {
|
|
120
|
-
const collection = pullFromCache<Amity.MessageLiveCollectionCache>(this.cacheKey)?.data;
|
|
121
|
-
if (!collection) return;
|
|
122
|
-
|
|
123
|
-
if (collection.data.includes(payload.messageId)) {
|
|
124
|
-
const newCollectionData = collection.data.filter(
|
|
125
|
-
messageId => messageId !== payload.messageId,
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
pushToCache(this.cacheKey, { ...collection, data: newCollectionData });
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
119
|
this.notifyChange({ origin: Amity.LiveDataOrigin.EVENT, loading: false });
|
|
133
120
|
};
|
|
134
121
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { getActiveClient } from '~/client/api/activeClient';
|
|
2
|
+
|
|
3
|
+
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
4
|
+
import { fireEvent } from '~/core/events';
|
|
5
|
+
import { prepareMembershipPayload } from '~/group/utils';
|
|
6
|
+
import { LinkedObject } from '~/utils/linkedObject';
|
|
7
|
+
|
|
8
|
+
/* begin_public_function
|
|
9
|
+
id: post.create.clip_post
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* ```js
|
|
13
|
+
* import { PostRepository } from '@amityco/ts-sdk'
|
|
14
|
+
* const created = await PostRepository.createClipPost({
|
|
15
|
+
* targetType: 'user',
|
|
16
|
+
* targetId: 'foobar',
|
|
17
|
+
* dataType: 'clip',
|
|
18
|
+
* data: { text: 'hello world' },
|
|
19
|
+
* attachments: [{ type: 'clip', fileId: 'fileId123', displayMode: 'fill', isMuted: false }]
|
|
20
|
+
* }))
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Creates an {@link Amity.Post}
|
|
24
|
+
*
|
|
25
|
+
* @param bundle The data necessary to create a new {@link Amity.Post}
|
|
26
|
+
* @returns The newly created {@link Amity.Post}
|
|
27
|
+
*
|
|
28
|
+
* @category Post API
|
|
29
|
+
* @async
|
|
30
|
+
*/
|
|
31
|
+
export const createClipPost = async <T extends Amity.PostContentType | string>(
|
|
32
|
+
bundle: Pick<Amity.Post<T>, 'targetType' | 'targetId'> &
|
|
33
|
+
Partial<Pick<Amity.Post<T>, 'metadata' | 'mentionees' | 'tags'>> & {
|
|
34
|
+
data: { [k: string]: any };
|
|
35
|
+
attachments: {
|
|
36
|
+
type: T;
|
|
37
|
+
fileId: Amity.File['fileId'];
|
|
38
|
+
displayMode?: Amity.ClipDisplayMode;
|
|
39
|
+
isMuted?: boolean;
|
|
40
|
+
}[];
|
|
41
|
+
},
|
|
42
|
+
): Promise<Amity.Cached<Amity.Post>> => {
|
|
43
|
+
const client = getActiveClient();
|
|
44
|
+
client.log('post/createPost', bundle);
|
|
45
|
+
|
|
46
|
+
const { data: payload } = await client.http.post<Amity.PostPayload>('/api/v4/posts', bundle);
|
|
47
|
+
|
|
48
|
+
fireEvent('post.created', payload);
|
|
49
|
+
|
|
50
|
+
const data = prepareMembershipPayload(payload, 'communityUsers');
|
|
51
|
+
const cachedAt = client.cache && Date.now();
|
|
52
|
+
|
|
53
|
+
if (client.cache) ingestInCache(data, { cachedAt });
|
|
54
|
+
|
|
55
|
+
const { posts } = data;
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
data: LinkedObject.post(posts[0]),
|
|
59
|
+
cachedAt,
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/* end_public_function */
|
|
@@ -2,8 +2,8 @@ import { getActiveClient } from '~/client/api';
|
|
|
2
2
|
|
|
3
3
|
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
4
4
|
import { fireEvent } from '~/core/events';
|
|
5
|
+
import { prepareMembershipPayload } from '~/group/utils';
|
|
5
6
|
import { LinkedObject } from '~/utils/linkedObject';
|
|
6
|
-
import { preparePostPayload } from '../utils/payload';
|
|
7
7
|
|
|
8
8
|
/* begin_public_function
|
|
9
9
|
id: post.create.text_post, post.create.image_post, post.create.file_post, post.create.video_post, post.create.poll_post, post.create.livestream_post, post.create.custom_post
|
|
@@ -46,8 +46,7 @@ export const createPost = async <T extends Amity.PostContentType | string>(
|
|
|
46
46
|
|
|
47
47
|
fireEvent('post.created', payload);
|
|
48
48
|
|
|
49
|
-
const data =
|
|
50
|
-
|
|
49
|
+
const data = prepareMembershipPayload(payload, 'communityUsers');
|
|
51
50
|
const cachedAt = client.cache && Date.now();
|
|
52
51
|
|
|
53
52
|
if (client.cache) ingestInCache(data, { cachedAt });
|
|
@@ -43,7 +43,7 @@ export const queryPosts = async (
|
|
|
43
43
|
// API-FIX: parameters should be querystring. (1)
|
|
44
44
|
// API-FIX: backend should answer Amity.Response (2)
|
|
45
45
|
// const { data } = await client.http.get<Amity.Response<Amity.PagedResponse<Amity.PostPayload>>>(
|
|
46
|
-
const { data } = await client.http.get<Amity.PostPayload & Amity.Pagination>(`/api/
|
|
46
|
+
const { data } = await client.http.get<Amity.PostPayload & Amity.Pagination>(`/api/v5/posts`, {
|
|
47
47
|
params: {
|
|
48
48
|
...params,
|
|
49
49
|
isDeleted: inferIsDeleted(includeDeleted),
|
|
@@ -23,7 +23,7 @@ export class PostPaginationController extends PaginationController<
|
|
|
23
23
|
const options = token ? { ...baseOptions, token } : { ...baseOptions, limit };
|
|
24
24
|
|
|
25
25
|
const { data: queryResponse } = await this.http.get<Amity.PostPayload & Amity.Pagination>(
|
|
26
|
-
`/api/
|
|
26
|
+
`/api/v5/posts`,
|
|
27
27
|
{
|
|
28
28
|
params: {
|
|
29
29
|
...params,
|
|
@@ -1,28 +1,8 @@
|
|
|
1
1
|
import { addPostSetting } from '~/communityRepository/utils';
|
|
2
2
|
import { updateMembershipStatus } from '~/communityRepository/utils/communityWithMembership';
|
|
3
|
-
import { isAmityLivestreamPost } from '~/utils/postTypePredicate';
|
|
4
|
-
|
|
5
|
-
const updateStreamReferences = (
|
|
6
|
-
streams: Amity.RawStream[],
|
|
7
|
-
streamId: string | undefined,
|
|
8
|
-
postId: string,
|
|
9
|
-
) => {
|
|
10
|
-
if (!streamId) return streams;
|
|
11
|
-
|
|
12
|
-
return streams.map(stream =>
|
|
13
|
-
stream.streamId === streamId
|
|
14
|
-
? {
|
|
15
|
-
...stream,
|
|
16
|
-
referenceType: 'post',
|
|
17
|
-
referenceId: postId,
|
|
18
|
-
postId,
|
|
19
|
-
}
|
|
20
|
-
: stream,
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
3
|
|
|
24
4
|
export const preparePostPayload = (payload: Amity.PostPayload): Amity.ProcessedPostPayload => {
|
|
25
|
-
const { posts: postsData,
|
|
5
|
+
const { posts: postsData, ...postPayload } = payload;
|
|
26
6
|
|
|
27
7
|
// Unpack community payload by mapping payload field to postSetting value.
|
|
28
8
|
const communitiesWithPostSetting = addPostSetting({ communities: postPayload.communities });
|
|
@@ -44,34 +24,18 @@ export const preparePostPayload = (payload: Amity.PostPayload): Amity.ProcessedP
|
|
|
44
24
|
mappedCommunityUsers,
|
|
45
25
|
);
|
|
46
26
|
|
|
47
|
-
let mappedNewStream: Amity.RawStream[] = [];
|
|
48
|
-
|
|
49
27
|
// feed type
|
|
50
28
|
const posts = postsData.map(post => {
|
|
51
29
|
const feedType = postPayload.feeds.find(feed => feed.feedId === post.feedId)?.feedType;
|
|
52
|
-
const childPosts = payload.postChildren.filter(
|
|
53
|
-
children => children.parentPostId === post.postId,
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
if (childPosts.length > 0 && isAmityLivestreamPost(childPosts[0])) {
|
|
57
|
-
mappedNewStream = updateStreamReferences(
|
|
58
|
-
videoStreamings,
|
|
59
|
-
childPosts[0].data?.streamId,
|
|
60
|
-
post.postId,
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
30
|
|
|
64
31
|
return {
|
|
65
32
|
...post,
|
|
66
|
-
childPosts,
|
|
67
33
|
feedType,
|
|
68
34
|
};
|
|
69
35
|
});
|
|
70
36
|
|
|
71
37
|
return {
|
|
72
38
|
...postPayload,
|
|
73
|
-
postChildren,
|
|
74
|
-
videoStreamings: mappedNewStream,
|
|
75
39
|
posts,
|
|
76
40
|
communities: communityWithMembershipStatus,
|
|
77
41
|
communityUsers: mappedCommunityUsers,
|
|
@@ -21,10 +21,7 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
21
21
|
* @async
|
|
22
22
|
*/
|
|
23
23
|
export const createStream = async (
|
|
24
|
-
bundle: Pick<
|
|
25
|
-
Amity.InternalStream,
|
|
26
|
-
'title' | 'thumbnailFileId' | 'description' | 'channelEnabled'
|
|
27
|
-
> & {
|
|
24
|
+
bundle: Pick<Amity.InternalStream, 'title' | 'thumbnailFileId' | 'description'> & {
|
|
28
25
|
isSecure?: boolean;
|
|
29
26
|
},
|
|
30
27
|
): Promise<Amity.Cached<Amity.Stream>> => {
|
|
@@ -7,9 +7,6 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
7
7
|
id: stream.update
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
* @deprecated this function is deprecated,
|
|
11
|
-
* please use {@link Amity.StreamRepository.editStream} instead.
|
|
12
|
-
*
|
|
13
10
|
* ```js
|
|
14
11
|
* import { updateStream } from '@amityco/ts-sdk'
|
|
15
12
|
* const updated = await updateStream(streamId, { title: 'foobar' })
|
|
@@ -24,13 +21,9 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
24
21
|
* @category Stream API
|
|
25
22
|
* @async
|
|
26
23
|
*/
|
|
27
|
-
|
|
28
24
|
export const updateStream = async (
|
|
29
25
|
streamId: Amity.Stream['streamId'],
|
|
30
|
-
patch: Patch<
|
|
31
|
-
Amity.Stream,
|
|
32
|
-
'title' | 'thumbnailFileId' | 'description' | 'metadata' | 'channelEnabled'
|
|
33
|
-
>,
|
|
26
|
+
patch: Patch<Amity.Stream, 'title' | 'thumbnailFileId' | 'description' | 'metadata'>,
|
|
34
27
|
): Promise<Amity.Cached<Amity.Stream>> => {
|
|
35
28
|
const client = getActiveClient();
|
|
36
29
|
client.log('stream/updateStream', streamId, patch);
|