@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
|
@@ -3,5 +3,3 @@ export { onStreamStopped } from './onStreamStopped';
|
|
|
3
3
|
export { onStreamRecorded } from './onStreamRecorded';
|
|
4
4
|
export { onStreamFlagged } from './onStreamFlagged';
|
|
5
5
|
export { onStreamTerminated } from './onStreamTerminated';
|
|
6
|
-
export { onStreamViewerBanned } from './onStreamViewerBanned';
|
|
7
|
-
export { onStreamViewerUnbanned } from './onStreamViewerUnbanned';
|
|
@@ -22,7 +22,7 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
|
22
22
|
*/
|
|
23
23
|
export const getStream = async (
|
|
24
24
|
streamId: Amity.Stream['streamId'],
|
|
25
|
-
): Promise<Amity.Cached<Amity.
|
|
25
|
+
): Promise<Amity.Cached<Amity.Stream>> => {
|
|
26
26
|
const client = getActiveClient();
|
|
27
27
|
client.log('stream/getStream', streamId);
|
|
28
28
|
|
|
@@ -57,13 +57,13 @@ export const getStream = async (
|
|
|
57
57
|
*/
|
|
58
58
|
getStream.locally = (
|
|
59
59
|
streamId: Amity.Stream['streamId'],
|
|
60
|
-
): Amity.Cached<Amity.
|
|
60
|
+
): Amity.Cached<Amity.Stream> | undefined => {
|
|
61
61
|
const client = getActiveClient();
|
|
62
62
|
client.log('stream/getStream', streamId);
|
|
63
63
|
|
|
64
64
|
if (!client.cache) return;
|
|
65
65
|
|
|
66
|
-
const cached = pullFromCache<Amity.
|
|
66
|
+
const cached = pullFromCache<Amity.Stream>(['stream', 'get', streamId]);
|
|
67
67
|
|
|
68
68
|
if (!cached) return;
|
|
69
69
|
|
|
@@ -8,7 +8,6 @@ import { onStreamTerminated } from '~/streamRepository/events/onStreamTerminated
|
|
|
8
8
|
import { LinkedObject } from '~/utils/linkedObject';
|
|
9
9
|
import { getStream as _getStream } from '../internalApi/getStream';
|
|
10
10
|
import { onStreamRecorded, onStreamStarted, onStreamStopped } from '../events';
|
|
11
|
-
import { onStreamViewerBanned } from '../events/onStreamViewerBanned';
|
|
12
11
|
|
|
13
12
|
/* begin_public_function
|
|
14
13
|
id: stream.get
|
|
@@ -46,7 +45,6 @@ export const getStreamById = (
|
|
|
46
45
|
onStreamStopped,
|
|
47
46
|
onStreamFlagged,
|
|
48
47
|
onStreamTerminated,
|
|
49
|
-
onStreamViewerBanned,
|
|
50
48
|
]);
|
|
51
49
|
};
|
|
52
50
|
/* end_public_function */
|
|
@@ -12,8 +12,6 @@ import {
|
|
|
12
12
|
} from '~/streamRepository/events';
|
|
13
13
|
import { GetStreamsPageController } from '~/streamRepository/observers/getStreams/GetStreamsPageController';
|
|
14
14
|
import { GetStreamsQueryStreamController } from '~/streamRepository/observers/getStreams/GetStreamsQueryStreamController';
|
|
15
|
-
import { onStreamViewerBanned } from '~/streamRepository/events/onStreamViewerBanned';
|
|
16
|
-
import { onStreamViewerUnbanned } from '~/streamRepository/events/onStreamViewerUnbanned';
|
|
17
15
|
|
|
18
16
|
export class GetStreamsLiveCollectionController extends LiveCollectionController<
|
|
19
17
|
'stream',
|
|
@@ -79,8 +77,6 @@ export class GetStreamsLiveCollectionController extends LiveCollectionController
|
|
|
79
77
|
{ fn: onStreamStopped, action: 'onStreamStopped' },
|
|
80
78
|
{ fn: onStreamFlagged, action: 'onStreamFlagged' },
|
|
81
79
|
{ fn: onStreamTerminated, action: 'onStreamTerminated' },
|
|
82
|
-
{ fn: onStreamViewerBanned, action: 'onStreamViewerBanned' },
|
|
83
|
-
{ fn: onStreamViewerUnbanned, action: 'onStreamViewerUnbanned' },
|
|
84
80
|
]);
|
|
85
81
|
}
|
|
86
82
|
|
|
@@ -106,7 +102,7 @@ export class GetStreamsLiveCollectionController extends LiveCollectionController
|
|
|
106
102
|
this.queryStreamController.appendToQueryStream(response, direction, refresh);
|
|
107
103
|
}
|
|
108
104
|
|
|
109
|
-
private applyFilter = (data: Amity.
|
|
105
|
+
private applyFilter = (data: Amity.InternalStream[]): Amity.InternalStream[] => {
|
|
110
106
|
let streams = filterByPropEquality(data, 'isDeleted', this.query.isDeleted);
|
|
111
107
|
|
|
112
108
|
streams = streams.sort(
|
|
@@ -2,7 +2,6 @@ import { markAsRead } from '~/channelRepository/internalApi/markAsRead';
|
|
|
2
2
|
import { shallowClone } from '../shallowClone';
|
|
3
3
|
import { queryCache } from '~/cache/api';
|
|
4
4
|
import { channelMemberLinkedObject } from './channelMemberLinkedObject';
|
|
5
|
-
import { getMyMembership } from '~/channelRepository/observers/getMyMembership';
|
|
6
5
|
|
|
7
6
|
export const channelLinkedObject = (channel: Amity.InternalChannel): Amity.Channel => {
|
|
8
7
|
let previewMembers: Amity.Membership<'channel'>[] = [];
|
|
@@ -24,7 +23,5 @@ export const channelLinkedObject = (channel: Amity.InternalChannel): Amity.Chann
|
|
|
24
23
|
return shallowClone(channel, {
|
|
25
24
|
markAsRead: () => markAsRead(channel.channelInternalId),
|
|
26
25
|
previewMembers,
|
|
27
|
-
myMembership: (callback: Amity.LiveObjectCallback<Amity.Membership<'channel'> | undefined>) =>
|
|
28
|
-
getMyMembership(channel.channelId, callback),
|
|
29
26
|
});
|
|
30
27
|
};
|
|
@@ -3,22 +3,16 @@ import { commentLinkedObject } from '~/utils/linkedObject/commentLinkedObject';
|
|
|
3
3
|
import AnalyticsEngine from '../../analytic/service/analytic/AnalyticsEngine';
|
|
4
4
|
import { userLinkedObject } from './userLinkedObject';
|
|
5
5
|
import {
|
|
6
|
+
isAmityClipPost,
|
|
6
7
|
isAmityFilePost,
|
|
7
8
|
isAmityImagePost,
|
|
8
|
-
isAmityLivestreamPost,
|
|
9
|
-
isAmityPollPost,
|
|
10
9
|
isAmityVideoPost,
|
|
11
10
|
} from '../postTypePredicate';
|
|
12
|
-
import { streamLinkedObject } from './streamLinkedObject';
|
|
13
|
-
import { isNonNullable } from '..';
|
|
14
11
|
|
|
15
12
|
export const postLinkedObject = (post: Amity.InternalPost): Amity.Post => {
|
|
16
13
|
return {
|
|
17
14
|
...post,
|
|
18
|
-
|
|
19
|
-
.map(childPost => pullFromCache<Amity.InternalPost>(['post', 'get', childPost])?.data)
|
|
20
|
-
.filter(isNonNullable)
|
|
21
|
-
.map(postLinkedObject),
|
|
15
|
+
|
|
22
16
|
analytics: {
|
|
23
17
|
markAsViewed: () => {
|
|
24
18
|
const analyticsEngineInstance = AnalyticsEngine.getInstance();
|
|
@@ -76,23 +70,10 @@ export const postLinkedObject = (post: Amity.InternalPost): Amity.Post => {
|
|
|
76
70
|
: undefined;
|
|
77
71
|
},
|
|
78
72
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
'get',
|
|
84
|
-
post?.data?.streamId,
|
|
85
|
-
])?.data;
|
|
86
|
-
if (!cache) return;
|
|
87
|
-
|
|
88
|
-
return streamLinkedObject(cache);
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
getPollInfo(): Amity.Poll | undefined {
|
|
92
|
-
if (!isAmityPollPost(post)) return;
|
|
93
|
-
const cache = pullFromCache<Amity.Poll>(['poll', 'get', post?.data?.pollId])?.data;
|
|
94
|
-
if (!cache) return;
|
|
95
|
-
return cache;
|
|
73
|
+
getClipInfo(): Amity.File<'clip'> | undefined {
|
|
74
|
+
return isAmityClipPost(post)
|
|
75
|
+
? pullFromCache<Amity.File<'clip'>>(['file', 'get', post?.data?.fileId])?.data
|
|
76
|
+
: undefined;
|
|
96
77
|
},
|
|
97
78
|
};
|
|
98
79
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { pullFromCache } from '~/cache/api';
|
|
2
|
-
import { getLiveChat as _getLiveChat } from '~/streamRepository/internalApi/getLiveChat';
|
|
3
2
|
|
|
4
3
|
export const streamLinkedObject = (stream: Amity.InternalStream): Amity.Stream => {
|
|
5
4
|
return {
|
|
@@ -19,8 +18,5 @@ export const streamLinkedObject = (stream: Amity.InternalStream): Amity.Stream =
|
|
|
19
18
|
get user() {
|
|
20
19
|
return pullFromCache<Amity.User>(['user', 'get', stream.userId])?.data;
|
|
21
20
|
},
|
|
22
|
-
getLiveChat: () => _getLiveChat(stream),
|
|
23
|
-
isBanned: !stream.watcherUrl,
|
|
24
|
-
watcherUrl: null,
|
|
25
21
|
};
|
|
26
22
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export function isAmityImagePost(post
|
|
1
|
+
export function isAmityImagePost(post: Amity.InternalPost): post is Amity.Post<'image'> {
|
|
2
2
|
return !!(
|
|
3
|
-
post &&
|
|
4
3
|
post.data &&
|
|
5
4
|
typeof post.data !== 'string' &&
|
|
6
5
|
'fileId' in post.data &&
|
|
@@ -8,9 +7,8 @@ export function isAmityImagePost(post?: Amity.InternalPost): post is Amity.Post<
|
|
|
8
7
|
);
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
export function isAmityFilePost(post
|
|
10
|
+
export function isAmityFilePost(post: Amity.InternalPost): post is Amity.Post<'file'> {
|
|
12
11
|
return !!(
|
|
13
|
-
post &&
|
|
14
12
|
post.data &&
|
|
15
13
|
typeof post.data !== 'string' &&
|
|
16
14
|
'fileId' in post.data &&
|
|
@@ -18,9 +16,8 @@ export function isAmityFilePost(post?: Amity.InternalPost): post is Amity.Post<'
|
|
|
18
16
|
);
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
export function isAmityVideoPost(post
|
|
19
|
+
export function isAmityVideoPost(post: Amity.InternalPost): post is Amity.Post<'video'> {
|
|
22
20
|
return !!(
|
|
23
|
-
post &&
|
|
24
21
|
post.data &&
|
|
25
22
|
typeof post.data !== 'string' &&
|
|
26
23
|
'videoFileId' in post.data &&
|
|
@@ -29,22 +26,12 @@ export function isAmityVideoPost(post?: Amity.InternalPost): post is Amity.Post<
|
|
|
29
26
|
);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
|
-
export function
|
|
29
|
+
export function isAmityClipPost(post: Amity.InternalPost): post is Amity.Post<'clip'> {
|
|
33
30
|
return !!(
|
|
34
|
-
post &&
|
|
35
31
|
post.data &&
|
|
36
32
|
typeof post.data !== 'string' &&
|
|
37
|
-
'
|
|
38
|
-
post.
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function isAmityPollPost(post?: Amity.InternalPost): post is Amity.Post<'poll'> {
|
|
43
|
-
return !!(
|
|
44
|
-
post &&
|
|
45
|
-
post.data &&
|
|
46
|
-
typeof post.data !== 'string' &&
|
|
47
|
-
'pollId' in post.data &&
|
|
48
|
-
post.dataType === 'poll'
|
|
33
|
+
'fileId' in post.data &&
|
|
34
|
+
'thumbnailFileId' in post.data &&
|
|
35
|
+
post.dataType === 'clip'
|
|
49
36
|
);
|
|
50
37
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
declare global {
|
|
3
|
-
namespace Amity {
|
|
4
|
-
type RawLiveReaction = {
|
|
5
|
-
userId: string;
|
|
6
|
-
referenceId: string;
|
|
7
|
-
referencePublicId: string;
|
|
8
|
-
referenceType: string;
|
|
9
|
-
reactionName: string;
|
|
10
|
-
occurredAt: string;
|
|
11
|
-
};
|
|
12
|
-
type InternalLiveReaction = RawLiveReaction;
|
|
13
|
-
type LiveReaction = InternalLiveReaction;
|
|
14
|
-
type CreateLiveReactionRequest = Omit<RawLiveReaction, 'userId' | 'referenceId' | 'occurredAt'>;
|
|
15
|
-
type CreateLiveReactionResponse = {
|
|
16
|
-
addedIds: string[];
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=liveReaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"liveReaction.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/liveReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,eAAe,GAAG;YACrB,MAAM,EAAE,MAAM,CAAC;YACf,WAAW,EAAE,MAAM,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC;YAC1B,aAAa,EAAE,MAAM,CAAC;YACtB,YAAY,EAAE,MAAM,CAAC;YAErB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;QAEF,KAAK,oBAAoB,GAAG,eAAe,CAAC;QAE5C,KAAK,YAAY,GAAG,oBAAoB,CAAC;QAEzC,KAAK,yBAAyB,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,YAAY,CAAC,CAAC;QAEhG,KAAK,0BAA0B,GAAG;YAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;SACpB,CAAC;KACH;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onChannelSetMuted.d.ts","sourceRoot":"","sources":["../../../src/channelRepository/events/onChannelSetMuted.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB,aAAc,MAAM,QAAQ,CAAC,MAAM,qBAAqB,CAAC,eA6BtF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onChannelSetUserMuted.d.ts","sourceRoot":"","sources":["../../../src/channelRepository/events/onChannelSetUserMuted.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,qBAAqB,uBACZ,MAAM,qBAAqB,UAAU,MAAM,UAAU,CAAC,SAAS,CAAC,KAAK,IAAI,KAC5F,MAAM,YAwCR,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* get current user's membership data
|
|
4
|
-
*
|
|
5
|
-
* @returns the {@link Amity.Membership<'channel'>} objects
|
|
6
|
-
*
|
|
7
|
-
* @category Channel API
|
|
8
|
-
* @async
|
|
9
|
-
*/
|
|
10
|
-
export declare const getMyMembership: (channelId: string) => Amity.Cached<Amity.Membership<'channel'>>;
|
|
11
|
-
//# sourceMappingURL=getMyMembership.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMyMembership.d.ts","sourceRoot":"","sources":["../../../src/channelRepository/internalApi/getMyMembership.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,eAAO,MAAM,eAAe,cAAe,MAAM,KAAG,MAAM,MAAM,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,CAsB3F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMyMembership.d.ts","sourceRoot":"","sources":["../../../src/channelRepository/observers/getMyMembership.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,eAAe,cACf,MAAM,YACP,MAAM,kBAAkB,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,KAC1E,MAAM,YAgFR,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { acceptInvitation } from '@amityco/ts-sdk'
|
|
4
|
-
* const isAccepted = await acceptInvitation(invitationId)
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @param referenceId that is target post's ID linked with a livestream
|
|
9
|
-
* @param reactionName that is the reaction name
|
|
10
|
-
* @param streamId stream id
|
|
11
|
-
* @returns a success boolean if the reaction was added
|
|
12
|
-
*
|
|
13
|
-
* @category Live Reaction API
|
|
14
|
-
* @async
|
|
15
|
-
*/
|
|
16
|
-
export declare const createReaction: ({ referenceId, referenceType, reactionName, streamId, }: Pick<Amity.CreateLiveReactionRequest, "referenceType" | "reactionName"> & {
|
|
17
|
-
referenceId: string;
|
|
18
|
-
streamId: string;
|
|
19
|
-
}) => Promise<boolean>;
|
|
20
|
-
//# sourceMappingURL=createReaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createReaction.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/api/createReaction.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc;iBAMZ,MAAM;cACT,MAAM;MACd,QAAQ,OAAO,CAyBlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onLiveReactionCreated } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onLiveReactionCreated(reactions => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when a batch of {@link Amity.LiveReaction} has been created
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Live Reaction Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onLiveReactionCreated: (callback: Amity.Listener<Amity.LiveReaction[]>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onLiveReactionCreated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onLiveReactionCreated.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/events/onLiveReactionCreated.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,aACtB,MAAM,QAAQ,CAAC,MAAM,YAAY,EAAE,CAAC,KAC7C,MAAM,YAiBR,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onLiveReactionCreatedLocal } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onLiveReactionCreatedLocal(reactions => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when a batch of {@link Amity.LiveReaction} has been created
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Live Reaction Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onLiveReactionCreatedLocal: (callback: Amity.Listener<Amity.LiveReaction[]>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onLiveReactionCreatedLocal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onLiveReactionCreatedLocal.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/events/onLiveReactionCreatedLocal.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,0BAA0B,aAC3B,MAAM,QAAQ,CAAC,MAAM,YAAY,EAAE,CAAC,KAC7C,MAAM,YASR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/liveReactionRepository/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { acceptInvitation } from '@amityco/ts-sdk'
|
|
4
|
-
* const isAccepted = await acceptInvitation(invitationId)
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Accepts array of {@link Amity.LiveReaction} object without userId
|
|
8
|
-
*
|
|
9
|
-
* @param reactions the array of {@link Amity.LiveReaction} to create
|
|
10
|
-
// TODO: confirm what is the ids in addedIds
|
|
11
|
-
* @returns An object addedIds contains array of reaction ID
|
|
12
|
-
*
|
|
13
|
-
* @category Live Reaction API
|
|
14
|
-
* @async
|
|
15
|
-
*/
|
|
16
|
-
export declare const createLiveReaction: ({ reactions, liveStreamId, }: {
|
|
17
|
-
reactions: Amity.CreateLiveReactionRequest[];
|
|
18
|
-
liveStreamId: string;
|
|
19
|
-
}) => Promise<Amity.CreateLiveReactionResponse>;
|
|
20
|
-
//# sourceMappingURL=createLiveReaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLiveReaction.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/internalApi/createLiveReaction.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB;eAIlB,MAAM,yBAAyB,EAAE;kBAC9B,MAAM;MAClB,QAAQ,MAAM,0BAA0B,CAc3C,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* ```js
|
|
4
|
-
* import { getReactions } from '@amityco/ts-sdk';
|
|
5
|
-
*
|
|
6
|
-
* const unsubscribe = getReactions(response => {
|
|
7
|
-
* reactions = response.data
|
|
8
|
-
* });
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* Observe live reactions {@link_Amity.LiveReaction} that have been created in a post linked with a stream
|
|
12
|
-
*
|
|
13
|
-
* @param callback the function to call when new data are available
|
|
14
|
-
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the events
|
|
15
|
-
*
|
|
16
|
-
* @category Live Reaction Observable
|
|
17
|
-
*/
|
|
18
|
-
export declare const getReactions: (postId: string, callback: Amity.Listener<Amity.LiveReaction[]>) => Amity.Unsubscriber;
|
|
19
|
-
//# sourceMappingURL=getReactions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getReactions.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/observers/getReactions.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,YAAY,WACf,MAAM,YACJ,MAAM,QAAQ,CAAC,MAAM,YAAY,EAAE,CAAC,KAC7C,MAAM,YAgCR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/observers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
declare class LiveReactionSyncEngine {
|
|
2
|
-
private readonly TIMER_INTERVAL_MS;
|
|
3
|
-
private buffer;
|
|
4
|
-
private timer;
|
|
5
|
-
private isSyncing;
|
|
6
|
-
private connectionListener;
|
|
7
|
-
private isConnected;
|
|
8
|
-
constructor();
|
|
9
|
-
startReactionsSync(): void;
|
|
10
|
-
stopReactionsSync(): void;
|
|
11
|
-
createLiveReaction(liveReaction: Amity.CreateLiveReactionRequest & {
|
|
12
|
-
streamId: string;
|
|
13
|
-
}): void;
|
|
14
|
-
private addConnectionListener;
|
|
15
|
-
private removeConnectionListener;
|
|
16
|
-
private syncLiveReactions;
|
|
17
|
-
private clearBuffer;
|
|
18
|
-
onSessionEstablished(): void;
|
|
19
|
-
onSessionDestroyed(): void;
|
|
20
|
-
onTokenExpired(): void;
|
|
21
|
-
}
|
|
22
|
-
declare const _default: {
|
|
23
|
-
getInstance: () => LiveReactionSyncEngine;
|
|
24
|
-
};
|
|
25
|
-
export default _default;
|
|
26
|
-
//# sourceMappingURL=ReactionSyncEngine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReactionSyncEngine.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/service/ReactionSyncEngine.ts"],"names":[],"mappings":"AAKA,cAAM,sBAAsB;IAC1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAc;IAEhD,OAAO,CAAC,MAAM,CAAkE;IAEhF,OAAO,CAAC,KAAK,CAA2B;IAExC,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,kBAAkB,CAAsB;IAEhD,OAAO,CAAC,WAAW,CAAQ;;IAM3B,kBAAkB;IAQlB,iBAAiB;IAOjB,kBAAkB,CAAC,YAAY,EAAE,KAAK,CAAC,yBAAyB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;IAIvF,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,iBAAiB;IAoCzB,OAAO,CAAC,WAAW;IAKnB,oBAAoB;IAKpB,kBAAkB;IAclB,cAAc;CAGf;;;;AAID,wBAOE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReactionSyncEngineOnLoginHandler.d.ts","sourceRoot":"","sources":["../../../src/liveReactionRepository/utils/ReactionSyncEngineOnLoginHandler.ts"],"names":[],"mappings":";AAGA,wBAeE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* ```js
|
|
4
|
-
* import { StreamRepository } from '@amityco/ts-sdk'
|
|
5
|
-
* const updated = await StreamRepository.editStream(streamId, { title: 'foobar' })
|
|
6
|
-
* ```
|
|
7
|
-
*
|
|
8
|
-
* Updates an {@link Amity.Stream}
|
|
9
|
-
*
|
|
10
|
-
* @param streamId The ID of the {@link Amity.Stream} to edit
|
|
11
|
-
* @param patch The patch data to apply
|
|
12
|
-
* @returns the updated {@link Amity.Stream} object
|
|
13
|
-
*
|
|
14
|
-
* @category Stream API
|
|
15
|
-
* @async
|
|
16
|
-
*/
|
|
17
|
-
export declare const editStream: (streamId: Amity.Stream['streamId'], patch: Patch<Amity.Stream, 'title' | 'thumbnailFileId' | 'description' | 'metadata' | 'channelEnabled'>) => Promise<Amity.Cached<Amity.Stream>>;
|
|
18
|
-
//# sourceMappingURL=editStream.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/editStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,UAAU,aACX,MAAM,MAAM,CAAC,UAAU,CAAC,SAC3B,MACL,MAAM,MAAM,EACZ,OAAO,GAAG,iBAAiB,GAAG,aAAa,GAAG,UAAU,GAAG,gBAAgB,CAC5E,KACA,QAAQ,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,CAkBpC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onStreamViewerBanned } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onStreamViewerBanned(stream => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when a user in channel linked to stream has been banned
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Stream Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onStreamViewerBanned: (callback: Amity.Listener<Amity.InternalStream>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onStreamViewerBanned.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onStreamViewerBanned.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/events/onStreamViewerBanned.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,aACrB,MAAM,QAAQ,CAAC,MAAM,cAAc,CAAC,KAC7C,MAAM,YAoCR,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onStreamViewerUnbanned } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onStreamViewerBanned(stream => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when a user in channel linked to stream has been unbanned
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Stream Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onStreamViewerUnbanned: (callback: Amity.Listener<Amity.InternalStream>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onStreamViewerUnbanned.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onStreamViewerUnbanned.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/events/onStreamViewerUnbanned.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,aACvB,MAAM,QAAQ,CAAC,MAAM,cAAc,CAAC,KAC7C,MAAM,YAwBR,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { getStream } from '@amityco/ts-sdk'
|
|
4
|
-
* const stream = await getStream('foobar')
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Fetches a {@link Amity.Channel} object linked with a current stream
|
|
8
|
-
*
|
|
9
|
-
* @param stream {@link Amity.Stream} that has linked live channel
|
|
10
|
-
* @returns the associated {@link Amity.Channel<'live'>} object
|
|
11
|
-
*
|
|
12
|
-
* @category Stream API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const getLiveChat: (stream: Amity.InternalStream) => Promise<Amity.Channel<'live'> | undefined>;
|
|
16
|
-
//# sourceMappingURL=getLiveChat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLiveChat.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/internalApi/getLiveChat.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,WAAW,WACd,MAAM,cAAc,KAC3B,QAAQ,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,CAkC3C,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
namespace Amity {
|
|
5
|
-
type RawLiveReaction = {
|
|
6
|
-
userId: string; // user's public ID
|
|
7
|
-
referenceId: string; // post's internal ID
|
|
8
|
-
referencePublicId: string; // post's public ID
|
|
9
|
-
referenceType: string; // 'post'
|
|
10
|
-
reactionName: string; // 'love
|
|
11
|
-
// date string in ISO format
|
|
12
|
-
occurredAt: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type InternalLiveReaction = RawLiveReaction;
|
|
16
|
-
|
|
17
|
-
type LiveReaction = InternalLiveReaction;
|
|
18
|
-
|
|
19
|
-
type CreateLiveReactionRequest = Omit<RawLiveReaction, 'userId' | 'referenceId' | 'occurredAt'>;
|
|
20
|
-
|
|
21
|
-
type CreateLiveReactionResponse = {
|
|
22
|
-
addedIds: string[];
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|