@amityco/ts-sdk 7.6.1-c97e594b.0 → 7.6.1-ce05a481.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.
Files changed (145) hide show
  1. package/dist/@types/core/payload.d.ts +1 -1
  2. package/dist/@types/core/payload.d.ts.map +1 -1
  3. package/dist/@types/domains/channel.d.ts +0 -2
  4. package/dist/@types/domains/channel.d.ts.map +1 -1
  5. package/dist/@types/domains/content.d.ts +8 -2
  6. package/dist/@types/domains/content.d.ts.map +1 -1
  7. package/dist/@types/domains/feed.d.ts +6 -1
  8. package/dist/@types/domains/feed.d.ts.map +1 -1
  9. package/dist/@types/domains/file.d.ts +3 -1
  10. package/dist/@types/domains/file.d.ts.map +1 -1
  11. package/dist/@types/domains/post.d.ts +3 -3
  12. package/dist/@types/domains/post.d.ts.map +1 -1
  13. package/dist/@types/domains/stream.d.ts +0 -4
  14. package/dist/@types/domains/stream.d.ts.map +1 -1
  15. package/dist/channelRepository/api/createChannel.d.ts +1 -3
  16. package/dist/channelRepository/api/createChannel.d.ts.map +1 -1
  17. package/dist/channelRepository/internalApi/getChannel.d.ts.map +1 -1
  18. package/dist/communityRepository/api/getCommunity.d.ts +1 -1
  19. package/dist/communityRepository/api/getCommunity.d.ts.map +1 -1
  20. package/dist/core/model/index.d.ts.map +1 -1
  21. package/dist/feedRepository/api/getCustomRankingGlobalFeed.d.ts +1 -1
  22. package/dist/feedRepository/api/getCustomRankingGlobalFeed.d.ts.map +1 -1
  23. package/dist/feedRepository/api/queryGlobalFeed.d.ts.map +1 -1
  24. package/dist/feedRepository/index.d.ts +1 -1
  25. package/dist/feedRepository/index.d.ts.map +1 -1
  26. package/dist/feedRepository/observers/getCustomRankingGlobalFeed/LiveCollectionController.d.ts +13 -0
  27. package/dist/feedRepository/observers/getCustomRankingGlobalFeed/LiveCollectionController.d.ts.map +1 -0
  28. package/dist/feedRepository/observers/getCustomRankingGlobalFeed/PaginationController.d.ts +5 -0
  29. package/dist/feedRepository/observers/getCustomRankingGlobalFeed/PaginationController.d.ts.map +1 -0
  30. package/dist/feedRepository/observers/getCustomRankingGlobalFeed/QueryStreamController.d.ts +15 -0
  31. package/dist/feedRepository/observers/getCustomRankingGlobalFeed/QueryStreamController.d.ts.map +1 -0
  32. package/dist/feedRepository/observers/getCustomRankingGlobalFeed.d.ts +23 -0
  33. package/dist/feedRepository/observers/getCustomRankingGlobalFeed.d.ts.map +1 -0
  34. package/dist/feedRepository/observers/getGlobalFeed/LiveCollectionController.d.ts +13 -0
  35. package/dist/feedRepository/observers/getGlobalFeed/LiveCollectionController.d.ts.map +1 -0
  36. package/dist/feedRepository/observers/getGlobalFeed/PaginationController.d.ts +5 -0
  37. package/dist/feedRepository/observers/getGlobalFeed/PaginationController.d.ts.map +1 -0
  38. package/dist/feedRepository/observers/getGlobalFeed/QueryStreamController.d.ts +15 -0
  39. package/dist/feedRepository/observers/getGlobalFeed/QueryStreamController.d.ts.map +1 -0
  40. package/dist/feedRepository/observers/getGlobalFeed.d.ts +22 -0
  41. package/dist/feedRepository/observers/getGlobalFeed.d.ts.map +1 -0
  42. package/dist/feedRepository/observers/index.d.ts +3 -0
  43. package/dist/feedRepository/observers/index.d.ts.map +1 -0
  44. package/dist/feedRepository/observers/utils.d.ts +6 -0
  45. package/dist/feedRepository/observers/utils.d.ts.map +1 -0
  46. package/dist/fileRepository/api/index.d.ts +1 -0
  47. package/dist/fileRepository/api/index.d.ts.map +1 -1
  48. package/dist/fileRepository/api/uploadClip.d.ts +17 -0
  49. package/dist/fileRepository/api/uploadClip.d.ts.map +1 -0
  50. package/dist/index.cjs.js +7384 -7173
  51. package/dist/index.esm.js +9384 -9173
  52. package/dist/index.umd.js +3 -3
  53. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +0 -2
  54. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
  55. package/dist/messagePreview/utils/getSubChannelMessagePreviewWithUser.d.ts +1 -1
  56. package/dist/messageRepository/api/deleteMessage.d.ts.map +1 -1
  57. package/dist/messageRepository/observers/getMessages/MessageQueryStreamController.d.ts.map +1 -1
  58. package/dist/postRepository/api/createClipPost.d.ts +32 -0
  59. package/dist/postRepository/api/createClipPost.d.ts.map +1 -0
  60. package/dist/postRepository/api/createPost.d.ts.map +1 -1
  61. package/dist/postRepository/api/index.d.ts +1 -0
  62. package/dist/postRepository/api/index.d.ts.map +1 -1
  63. package/dist/postRepository/events/utils.d.ts.map +1 -1
  64. package/dist/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostLiveCollectionController.d.ts.map +1 -1
  65. package/dist/postRepository/observers/getPinnedPosts/PinnedPostLiveCollectionController.d.ts.map +1 -1
  66. package/dist/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.d.ts +6 -0
  67. package/dist/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.d.ts.map +1 -1
  68. package/dist/postRepository/observers/getPosts/PostLiveCollectionController.d.ts.map +1 -1
  69. package/dist/postRepository/observers/utils.d.ts +13 -0
  70. package/dist/postRepository/observers/utils.d.ts.map +1 -0
  71. package/dist/postRepository/utils/payload.d.ts.map +1 -1
  72. package/dist/reactionRepository/api/addReaction.d.ts.map +1 -1
  73. package/dist/reactionRepository/api/removeReaction.d.ts.map +1 -1
  74. package/dist/streamRepository/api/createStream.d.ts +1 -1
  75. package/dist/streamRepository/api/createStream.d.ts.map +1 -1
  76. package/dist/streamRepository/api/index.d.ts +0 -1
  77. package/dist/streamRepository/api/index.d.ts.map +1 -1
  78. package/dist/streamRepository/api/updateStream.d.ts +1 -4
  79. package/dist/streamRepository/api/updateStream.d.ts.map +1 -1
  80. package/dist/streamRepository/internalApi/getStream.d.ts +2 -2
  81. package/dist/streamRepository/internalApi/getStream.d.ts.map +1 -1
  82. package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
  83. package/dist/utils/linkedObject/streamLinkedObject.d.ts.map +1 -1
  84. package/dist/utils/postTypePredicate.d.ts +4 -5
  85. package/dist/utils/postTypePredicate.d.ts.map +1 -1
  86. package/dist/utils/tests/dummy/comment.d.ts +1 -1
  87. package/package.json +1 -1
  88. package/src/@types/core/payload.ts +1 -1
  89. package/src/@types/domains/channel.ts +0 -3
  90. package/src/@types/domains/content.ts +10 -0
  91. package/src/@types/domains/feed.ts +18 -1
  92. package/src/@types/domains/file.ts +5 -0
  93. package/src/@types/domains/post.ts +4 -4
  94. package/src/@types/domains/stream.ts +0 -4
  95. package/src/channelRepository/api/createChannel.ts +9 -12
  96. package/src/channelRepository/internalApi/getChannel.ts +1 -0
  97. package/src/channelRepository/utils/constructChannelObject.ts +2 -2
  98. package/src/commentRepository/api/deleteComment.ts +6 -6
  99. package/src/communityRepository/api/getCommunity.ts +0 -9
  100. package/src/core/model/index.ts +2 -1
  101. package/src/feedRepository/api/getCustomRankingGlobalFeed.ts +1 -1
  102. package/src/feedRepository/api/queryGlobalFeed.ts +3 -1
  103. package/src/feedRepository/index.ts +1 -1
  104. package/src/feedRepository/observers/getCustomRankingGlobalFeed/LiveCollectionController.ts +95 -0
  105. package/src/feedRepository/observers/getCustomRankingGlobalFeed/PaginationController.ts +25 -0
  106. package/src/feedRepository/observers/getCustomRankingGlobalFeed/QueryStreamController.ts +101 -0
  107. package/src/feedRepository/observers/getCustomRankingGlobalFeed.ts +57 -0
  108. package/src/feedRepository/observers/getGlobalFeed/LiveCollectionController.ts +91 -0
  109. package/src/feedRepository/observers/getGlobalFeed/PaginationController.ts +23 -0
  110. package/src/feedRepository/observers/getGlobalFeed/QueryStreamController.ts +99 -0
  111. package/src/feedRepository/observers/getGlobalFeed.ts +56 -0
  112. package/src/feedRepository/observers/index.ts +2 -0
  113. package/src/feedRepository/observers/utils.ts +85 -0
  114. package/src/fileRepository/api/index.ts +1 -0
  115. package/src/fileRepository/api/uploadClip.ts +71 -0
  116. package/src/messageRepository/api/deleteMessage.ts +0 -16
  117. package/src/messageRepository/observers/getMessages/MessageQueryStreamController.ts +0 -13
  118. package/src/postRepository/api/createClipPost.ts +62 -0
  119. package/src/postRepository/api/createPost.ts +2 -3
  120. package/src/postRepository/api/index.ts +2 -0
  121. package/src/postRepository/api/queryPosts.ts +1 -1
  122. package/src/postRepository/events/utils.ts +35 -1
  123. package/src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostLiveCollectionController.ts +5 -0
  124. package/src/postRepository/observers/getPinnedPosts/PinnedPostLiveCollectionController.ts +7 -1
  125. package/src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts +27 -0
  126. package/src/postRepository/observers/getPosts/PostLiveCollectionController.ts +2 -74
  127. package/src/postRepository/observers/getPosts/PostPaginationController.ts +1 -1
  128. package/src/postRepository/observers/utils.ts +97 -0
  129. package/src/postRepository/utils/payload.ts +1 -37
  130. package/src/reactionRepository/api/addReaction.ts +1 -0
  131. package/src/reactionRepository/api/removeReaction.ts +1 -0
  132. package/src/streamRepository/api/createStream.ts +1 -4
  133. package/src/streamRepository/api/index.ts +0 -1
  134. package/src/streamRepository/api/updateStream.ts +1 -8
  135. package/src/streamRepository/internalApi/getStream.ts +3 -3
  136. package/src/streamRepository/observers/getStreams/GetStreamsLiveCollectionController.ts +1 -1
  137. package/src/utils/linkedObject/postLinkedObject.ts +8 -28
  138. package/src/utils/linkedObject/streamLinkedObject.ts +0 -2
  139. package/src/utils/postTypePredicate.ts +6 -20
  140. package/dist/streamRepository/api/editStream.d.ts +0 -18
  141. package/dist/streamRepository/api/editStream.d.ts.map +0 -1
  142. package/dist/streamRepository/internalApi/getLiveChat.d.ts +0 -16
  143. package/dist/streamRepository/internalApi/getLiveChat.d.ts.map +0 -1
  144. package/src/streamRepository/api/editStream.ts +0 -51
  145. package/src/streamRepository/internalApi/getLiveChat.ts +0 -59
@@ -21,8 +21,6 @@ export declare const getChannelMessagePreviewWithUser: (channel: Amity.StaticInt
21
21
  messagePreviewId?: string | undefined;
22
22
  isPublic?: boolean | undefined;
23
23
  lastActivity: string;
24
- attachedToPostId?: string | undefined;
25
- attachedToVideoStreamId?: string | undefined;
26
24
  } & Amity.Metadata & Amity.Taggable & Amity.CreatedAt & Amity.UpdatedAt & Amity.DeletedAt & {
27
25
  isDeleted?: boolean | undefined;
28
26
  } & Amity.Subscribable & {
@@ -1 +1 @@
1
- {"version":3,"file":"getChannelMessagePreviewWithUser.d.ts","sourceRoot":"","sources":["../../../src/messagePreview/utils/getChannelMessagePreviewWithUser.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gCAAgC,YAClC,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEpB,MAAM,cAAc,GAAG,IAAI;CAoB5C,CAAC"}
1
+ {"version":3,"file":"getChannelMessagePreviewWithUser.d.ts","sourceRoot":"","sources":["../../../src/messagePreview/utils/getChannelMessagePreviewWithUser.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gCAAgC,YAClC,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEpB,MAAM,cAAc,GAAG,IAAI;CAoB5C,CAAC"}
@@ -3,7 +3,7 @@ export declare const getSubChannelMessagePreviewWithUser: (subChannel: Amity.Sub
3
3
  user: Amity.InternalUser | undefined;
4
4
  messagePreviewId: string;
5
5
  subChannelName: string;
6
- data?: string | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataPoll | Amity.ContentDataStream | Record<string, unknown> | undefined;
6
+ data?: string | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataPoll | Amity.ContentDataStream | Amity.ContentDataClip | Record<string, unknown> | undefined;
7
7
  dataType?: any;
8
8
  channelId: string;
9
9
  subChannelId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"deleteMessage.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/api/deleteMessage.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa;gBACb,MAAM,OAAO,CAAC,WAAW,CAAC,GACpC,QAAQ,MAAM,OAAO,CAAC;IAiCzB;;;;;;;;;;;;OAYG;8BAEU,MAAM,OAAO,CAAC,WAAW,CAAC,GACpC,MAAM,MAAM,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS;CAjBzC,CAAC"}
1
+ {"version":3,"file":"deleteMessage.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/api/deleteMessage.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa;gBACb,MAAM,OAAO,CAAC,WAAW,CAAC,GACpC,QAAQ,MAAM,OAAO,CAAC;IAiBzB;;;;;;;;;;;;OAYG;8BAEU,MAAM,OAAO,CAAC,WAAW,CAAC,GACpC,MAAM,MAAM,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS;CAjBzC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/messageRepository/observers/getMessages/MessageQueryStreamController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAIpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAG5E,qBAAa,4BAA6B,SAAQ,qBAAqB,CACrE,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,sBAAsB,CAC7B;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAEsB;IAE5C,OAAO,CAAC,oBAAoB,CAA8B;gBAGxD,KAAK,EAAE,KAAK,CAAC,sBAAsB,EACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,KAAK,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,EAC1F,oBAAoB,EAAE,2BAA2B;IAS7C,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc;IAWjD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC1D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAsBjB,OAAO,CAAC,MAAM,EAAE,MAAM,aACH,MAAM,eAAe;IAgExC,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;QAC3E,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE;CAIN"}
1
+ {"version":3,"file":"MessageQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/messageRepository/observers/getMessages/MessageQueryStreamController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAIpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAG5E,qBAAa,4BAA6B,SAAQ,qBAAqB,CACrE,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,sBAAsB,CAC7B;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAEsB;IAE5C,OAAO,CAAC,oBAAoB,CAA8B;gBAGxD,KAAK,EAAE,KAAK,CAAC,sBAAsB,EACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,KAAK,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,EAC1F,oBAAoB,EAAE,2BAA2B;IAS7C,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc;IAWjD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC1D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAsBjB,OAAO,CAAC,MAAM,EAAE,MAAM,aACH,MAAM,eAAe;IAmDxC,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;QAC3E,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE;CAIN"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * ```js
3
+ * import { PostRepository } from '@amityco/ts-sdk'
4
+ * const created = await PostRepository.createClipPost({
5
+ * targetType: 'user',
6
+ * targetId: 'foobar',
7
+ * dataType: 'clip',
8
+ * data: { text: 'hello world' },
9
+ * attachments: [{ type: 'clip', fileId: 'fileId123', displayMode: 'fill', isMuted: false }]
10
+ * }))
11
+ * ```
12
+ *
13
+ * Creates an {@link Amity.Post}
14
+ *
15
+ * @param bundle The data necessary to create a new {@link Amity.Post}
16
+ * @returns The newly created {@link Amity.Post}
17
+ *
18
+ * @category Post API
19
+ * @async
20
+ */
21
+ export declare const createClipPost: <T extends string>(bundle: Pick<Amity.Post<T>, "targetType" | "targetId"> & Partial<Pick<Amity.Post<T>, "metadata" | "tags" | "mentionees">> & {
22
+ data: {
23
+ [k: string]: any;
24
+ };
25
+ attachments: {
26
+ type: T;
27
+ fileId: Amity.File['fileId'];
28
+ displayMode?: Amity.ClipDisplayMode | undefined;
29
+ isMuted?: boolean | undefined;
30
+ }[];
31
+ }) => Promise<Amity.Cached<Amity.Post>>;
32
+ //# sourceMappingURL=createClipPost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClipPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createClipPost.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc;;;;;;gBAMX,UAAU,CAAC,QAAQ,CAAC;;;;MAKjC,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAmBlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createPost.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU;;;;;;;gBAKgB,UAAU,CAAC,QAAQ,CAAC;;MAExD,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAyBlC,CAAC"}
1
+ {"version":3,"file":"createPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/createPost.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU;;;;;;;gBAKgB,UAAU,CAAC,QAAQ,CAAC;;MAExD,QAAQ,MAAM,MAAM,CAAC,MAAM,IAAI,CAAC,CAwBlC,CAAC"}
@@ -9,4 +9,5 @@ export * from './declinePost';
9
9
  export * from './flagPost';
10
10
  export * from './unflagPost';
11
11
  export * from './isPostFlaggedByMe';
12
+ export * from './createClipPost';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAE/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAE3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AAEpC,cAAc,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,yBAAyB,UAC7B,MAAM,MAAM,cAAc,YACvB,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAoE7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAClC,MAAM,KAAK,MAAM,eAAe,EAAE,wBAAwB,GAAG,2BAA2B,CAAC,YACtF,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAgC7C,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/events/utils.ts"],"names":[],"mappings":"AAmCA,eAAO,MAAM,yBAAyB,UAC7B,MAAM,MAAM,cAAc,YACvB,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAwE7C,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAClC,MAAM,KAAK,MAAM,eAAe,EAAE,wBAAwB,GAAG,2BAA2B,CAAC,YACtF,MAAM,QAAQ,CAAC,MAAM,YAAY,CAAC,uBAkC7C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalPinnedPostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAE9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAO1F,qBAAa,wCAAyC,SAAQ,wBAAwB,CACpF,YAAY,EACZ,KAAK,CAAC,8BAA8B,EACpC,KAAK,CAAC,UAAU,EAChB,oCAAoC,CACrC;IACC,OAAO,CAAC,qBAAqB,CAAwC;IAErE,OAAO,CAAC,KAAK,CAAuC;gBAGlD,KAAK,EAAE,KAAK,CAAC,8BAA8B,EAC3C,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;IAoB1D,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,UAAU;IAIrF,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,YAAY,CAAC;IAK7D,iBAAiB;IAUjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;CAmB1E"}
1
+ {"version":3,"file":"GlobalPinnedPostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAE9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAQ1F,qBAAa,wCAAyC,SAAQ,wBAAwB,CACpF,YAAY,EACZ,KAAK,CAAC,8BAA8B,EACpC,KAAK,CAAC,UAAU,EAChB,oCAAoC,CACrC;IACC,OAAO,CAAC,qBAAqB,CAAwC;IAErE,OAAO,CAAC,KAAK,CAAuC;gBAGlD,KAAK,EAAE,KAAK,CAAC,8BAA8B,EAC3C,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;IAoB1D,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,UAAU;IAIrF,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,YAAY,CAAC;IAK7D,iBAAiB;IAcjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;CAmB1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedPostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAK1F,qBAAa,kCAAmC,SAAQ,wBAAwB,CAC9E,YAAY,EACZ,KAAK,CAAC,wBAAwB,EAC9B,KAAK,CAAC,UAAU,EAChB,8BAA8B,CAC/B;IACC,OAAO,CAAC,qBAAqB,CAAkC;IAE/D,OAAO,CAAC,KAAK,CAAiC;gBAG5C,KAAK,EAAE,KAAK,CAAC,wBAAwB,EACrC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;IAoB1D,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,UAAU;IAIrF,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,YAAY,CAAC;IAK7D,iBAAiB;IAIjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IAsBzE,OAAO,CAAC,WAAW;CAapB"}
1
+ {"version":3,"file":"PinnedPostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAM1F,qBAAa,kCAAmC,SAAQ,wBAAwB,CAC9E,YAAY,EACZ,KAAK,CAAC,wBAAwB,EAC9B,KAAK,CAAC,UAAU,EAChB,8BAA8B,CAC/B;IACC,OAAO,CAAC,qBAAqB,CAAkC;IAE/D,OAAO,CAAC,KAAK,CAAiC;gBAG5C,KAAK,EAAE,KAAK,CAAC,wBAAwB,EACrC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;IAoB1D,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,UAAU;IAIrF,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,YAAY,CAAC;IAK7D,iBAAiB;IASjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IAsBzE,OAAO,CAAC,WAAW;CAapB"}
@@ -1,9 +1,15 @@
1
1
  import { QueryStreamController } from '~/core/liveCollection/QueryStreamController';
2
+ import { EnumPostActions } from '../enums';
2
3
  export declare class PinnedPostQueryStreamController extends QueryStreamController<Amity.PinnedPostPayload, Amity.PinnedPostLiveCollection> {
3
4
  private notifyChange;
4
5
  private preparePayload;
5
6
  constructor(query: Amity.PinnedPostLiveCollection, cacheKey: string[], notifyChange: (params: Amity.LiveCollectionNotifyParams) => void, preparePayload: (response: Amity.PinnedPostPayload) => Amity.ProcessedPostPayload);
6
7
  saveToMainDB(response: Amity.PinnedPostPayload): Promise<void>;
7
8
  appendToQueryStream(response: Amity.PinnedPostPayload & Partial<Amity.Pagination>, direction: Amity.LiveCollectionPageDirection, refresh?: boolean): void;
9
+ reactor(action: EnumPostActions): (post: Amity.InternalPost) => void;
10
+ subscribeRTE(createSubscriber: {
11
+ fn: (reactor: (post: Amity.InternalPost) => void) => Amity.Unsubscriber;
12
+ action: EnumPostActions;
13
+ }[]): Amity.Unsubscriber[];
8
14
  }
9
15
  //# sourceMappingURL=PinnedPostQueryStreamController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedPostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAOpF,qBAAa,+BAAgC,SAAQ,qBAAqB,CACxE,KAAK,CAAC,iBAAiB,EACvB,KAAK,CAAC,wBAAwB,CAC/B;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAAoE;gBAGxF,KAAK,EAAE,KAAK,CAAC,wBAAwB,EACrC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB,KAAK,KAAK,CAAC,oBAAoB;IAQ7E,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB;IAcpD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC7D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;CAsBlB"}
1
+ {"version":3,"file":"PinnedPostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAMpF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,qBAAa,+BAAgC,SAAQ,qBAAqB,CACxE,KAAK,CAAC,iBAAiB,EACvB,KAAK,CAAC,wBAAwB,CAC/B;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAAoE;gBAGxF,KAAK,EAAE,KAAK,CAAC,wBAAwB,EACrC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB,KAAK,KAAK,CAAC,oBAAoB;IAQ7E,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB;IAcpD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC7D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAuBjB,OAAO,CAAC,MAAM,EAAE,eAAe,UACf,MAAM,YAAY;IAgBlC,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,KAAK,KAAK,CAAC,YAAY,CAAC;QACxE,MAAM,EAAE,eAAe,CAAC;KACzB,EAAE;CAIN"}
@@ -1 +1 @@
1
- {"version":3,"file":"PostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AA+B1F,qBAAa,4BAA6B,SAAQ,wBAAwB,CACxE,MAAM,EACN,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,IAAI,EACV,wBAAwB,CACzB;IACC,OAAO,CAAC,qBAAqB,CAA4B;IAEzD,OAAO,CAAC,KAAK,CAA2B;gBAE5B,KAAK,EAAE,KAAK,CAAC,kBAAkB,EAAE,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC;IAmB/F,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU;IAI/E,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,MAAM,CAAC;IAIvD,iBAAiB;IA0DjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IAsBzE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE;CA+BvC"}
1
+ {"version":3,"file":"PostLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPosts/PostLiveCollectionController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAa1F,qBAAa,4BAA6B,SAAQ,wBAAwB,CACxE,MAAM,EACN,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,IAAI,EACV,wBAAwB,CACzB;IACC,OAAO,CAAC,qBAAqB,CAA4B;IAEzD,OAAO,CAAC,KAAK,CAA2B;gBAE5B,KAAK,EAAE,KAAK,CAAC,kBAAkB,EAAE,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC;IAmB/F,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU;IAI/E,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,MAAM,CAAC;IAIvD,iBAAiB;IAIjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IAsBzE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE;CA+BvC"}
@@ -0,0 +1,13 @@
1
+ import { EnumPostActions } from '~/postRepository/observers/enums';
2
+ export declare const generateCommentSubscriptions: ({ cacheKey, resolveId, }: {
3
+ cacheKey: Amity.CacheKey;
4
+ resolveId?: ((id: string) => string) | undefined;
5
+ }) => {
6
+ fn: (callback: Amity.Listener<Amity.InternalPost<any>>) => Amity.Unsubscriber;
7
+ action: EnumPostActions;
8
+ }[];
9
+ export declare const getPostSubscription: (cacheKey: Amity.CacheKey) => {
10
+ fn: (callback: Amity.Listener<Amity.InternalPost<any>>) => Amity.Unsubscriber;
11
+ action: EnumPostActions;
12
+ }[];
13
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/postRepository/observers/utils.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAgCnE,eAAO,MAAM,4BAA4B;;sBAKtB,MAAM,KAAK,MAAM;;;;GAsBnC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;GAiB/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/postRepository/utils/payload.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,kBAAkB,YAAa,MAAM,WAAW,KAAG,MAAM,oBAuDrE,CAAC;AAEF,eAAO,MAAM,gCAAgC,4CAI1C,MAAM,yBAAyB,KAAG,MAAM,kCAO1C,CAAC"}
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/postRepository/utils/payload.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,YAAa,MAAM,WAAW,KAAG,MAAM,oBAuCrE,CAAC;AAEF,eAAO,MAAM,gCAAgC,4CAI1C,MAAM,yBAAyB,KAAG,MAAM,kCAO1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"addReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/addReaction.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,WAAW;oBACP,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,QAAQ,OAAO,CAAC;IAmFnB;;;;;;;;;;;;;;SAcK;kCAEY,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,OAAO,GAAG,SAAS;CAtBrB,CAAC"}
1
+ {"version":3,"file":"addReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/addReaction.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,WAAW;oBACP,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,QAAQ,OAAO,CAAC;IAoFnB;;;;;;;;;;;;;;SAcK;kCAEY,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,OAAO,GAAG,SAAS;CAtBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"removeReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/removeReaction.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,cAAc;oBACV,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,QAAQ,OAAO,CAAC;IAsFnB;;;;;;;;;;;;;;SAcK;kCAEY,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,OAAO,GAAG,SAAS;CAtBrB,CAAC"}
1
+ {"version":3,"file":"removeReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/removeReaction.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,cAAc;oBACV,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,QAAQ,OAAO,CAAC;IAuFnB;;;;;;;;;;;;;;SAcK;kCAEY,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,eAAe,CAAC,cAAc,CAAC,GAClD,OAAO,GAAG,SAAS;CAtBrB,CAAC"}
@@ -12,7 +12,7 @@
12
12
  * @category Stream API
13
13
  * @async
14
14
  */
15
- export declare const createStream: (bundle: Pick<Amity.InternalStream, 'title' | 'thumbnailFileId' | 'description' | 'channelEnabled'> & {
15
+ export declare const createStream: (bundle: Pick<Amity.InternalStream, 'title' | 'thumbnailFileId' | 'description'> & {
16
16
  isSecure?: boolean;
17
17
  }) => Promise<Amity.Cached<Amity.Stream>>;
18
18
  //# sourceMappingURL=createStream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/createStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,WACf,KACN,MAAM,cAAc,EACpB,OAAO,GAAG,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAC/D,GAAG;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,KACA,QAAQ,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,CAepC,CAAC"}
1
+ {"version":3,"file":"createStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/createStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,WACf,KAAK,MAAM,cAAc,EAAE,OAAO,GAAG,iBAAiB,GAAG,aAAa,CAAC,GAAG;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,KACA,QAAQ,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,CAepC,CAAC"}
@@ -2,5 +2,4 @@ export * from './createStream';
2
2
  export * from './updateStream';
3
3
  export * from './deleteStream';
4
4
  export * from './disposeStream';
5
- export * from './editStream';
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @deprecated this function is deprecated,
3
- * please use {@link Amity.StreamRepository.editStream} instead.
4
- *
5
2
  * ```js
6
3
  * import { updateStream } from '@amityco/ts-sdk'
7
4
  * const updated = await updateStream(streamId, { title: 'foobar' })
@@ -16,5 +13,5 @@
16
13
  * @category Stream API
17
14
  * @async
18
15
  */
19
- export declare const updateStream: (streamId: Amity.Stream['streamId'], patch: Patch<Amity.Stream, 'title' | 'thumbnailFileId' | 'description' | 'metadata' | 'channelEnabled'>) => Promise<Amity.Cached<Amity.Stream>>;
16
+ export declare const updateStream: (streamId: Amity.Stream['streamId'], patch: Patch<Amity.Stream, 'title' | 'thumbnailFileId' | 'description' | 'metadata'>) => Promise<Amity.Cached<Amity.Stream>>;
20
17
  //# sourceMappingURL=updateStream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"updateStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/updateStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,YAAY,aACb,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
+ {"version":3,"file":"updateStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/api/updateStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,aACb,MAAM,MAAM,CAAC,UAAU,CAAC,SAC3B,MAAM,MAAM,MAAM,EAAE,OAAO,GAAG,iBAAiB,GAAG,aAAa,GAAG,UAAU,CAAC,KACnF,QAAQ,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,CAkBpC,CAAC"}
@@ -13,7 +13,7 @@
13
13
  * @async
14
14
  */
15
15
  export declare const getStream: {
16
- (streamId: Amity.Stream['streamId']): Promise<Amity.Cached<Amity.InternalStream>>;
16
+ (streamId: Amity.Stream['streamId']): Promise<Amity.Cached<Amity.Stream>>;
17
17
  /**
18
18
  * ```js
19
19
  * import { getStream } from '@amityco/ts-sdk'
@@ -27,6 +27,6 @@ export declare const getStream: {
27
27
  *
28
28
  * @category Stream API
29
29
  */
30
- locally(streamId: Amity.Stream['streamId']): Amity.Cached<Amity.InternalStream> | undefined;
30
+ locally(streamId: Amity.Stream['streamId']): Amity.Cached<Amity.Stream> | undefined;
31
31
  };
32
32
  //# sourceMappingURL=getStream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/internalApi/getStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS;eACV,MAAM,MAAM,CAAC,UAAU,CAAC,GACjC,QAAQ,MAAM,MAAM,CAAC,MAAM,cAAc,CAAC,CAAC;IAoB9C;;;;;;;;;;;;OAYG;sBAES,MAAM,MAAM,CAAC,UAAU,CAAC,GACjC,MAAM,MAAM,CAAC,MAAM,cAAc,CAAC,GAAG,SAAS;CAlBhD,CAAC"}
1
+ {"version":3,"file":"getStream.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/internalApi/getStream.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS;eACV,MAAM,MAAM,CAAC,UAAU,CAAC,GACjC,QAAQ,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,CAAC;IAoBtC;;;;;;;;;;;;OAYG;sBAES,MAAM,MAAM,CAAC,UAAU,CAAC,GACjC,MAAM,MAAM,CAAC,MAAM,MAAM,CAAC,GAAG,SAAS;CAlBxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"postLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/postLinkedObject.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAmFjE,CAAC"}
1
+ {"version":3,"file":"postLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/postLinkedObject.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,gBAAgB,SAAU,MAAM,YAAY,KAAG,MAAM,IAiEjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"streamLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/streamLinkedObject.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,WAAY,MAAM,cAAc,KAAG,MAAM,MAoBvE,CAAC"}
1
+ {"version":3,"file":"streamLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/streamLinkedObject.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,WAAY,MAAM,cAAc,KAAG,MAAM,MAmBvE,CAAC"}
@@ -1,6 +1,5 @@
1
- export declare function isAmityImagePost(post?: Amity.InternalPost): post is Amity.Post<'image'>;
2
- export declare function isAmityFilePost(post?: Amity.InternalPost): post is Amity.Post<'file'>;
3
- export declare function isAmityVideoPost(post?: Amity.InternalPost): post is Amity.Post<'video'>;
4
- export declare function isAmityLivestreamPost(post?: Amity.InternalPost): post is Amity.Post<'liveStream'>;
5
- export declare function isAmityPollPost(post?: Amity.InternalPost): post is Amity.Post<'poll'>;
1
+ export declare function isAmityImagePost(post: Amity.InternalPost): post is Amity.Post<'image'>;
2
+ export declare function isAmityFilePost(post: Amity.InternalPost): post is Amity.Post<'file'>;
3
+ export declare function isAmityVideoPost(post: Amity.InternalPost): post is Amity.Post<'video'>;
4
+ export declare function isAmityClipPost(post: Amity.InternalPost): post is Amity.Post<'clip'>;
6
5
  //# sourceMappingURL=postTypePredicate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postTypePredicate.d.ts","sourceRoot":"","sources":["../../src/utils/postTypePredicate.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAQvF;AAED,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAQrF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CASvF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAQjG;AAED,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAQrF"}
1
+ {"version":3,"file":"postTypePredicate.d.ts","sourceRoot":"","sources":["../../src/utils/postTypePredicate.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAOtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAQtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAOpF"}
@@ -23,7 +23,7 @@ export declare const generateComment: (params?: Partial<Amity.InternalComment>)
23
23
  referenceType: Amity.CommentReferenceType;
24
24
  dataType?: any;
25
25
  dataTypes?: any[] | undefined;
26
- data?: string | Record<string, unknown> | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataPoll | Amity.ContentDataStream | undefined;
26
+ data?: string | Record<string, unknown> | Amity.ContentDataText | Amity.ContentDataFile | Amity.ContentDataImage | Amity.ContentDataVideo | Amity.ContentDataPoll | Amity.ContentDataStream | Amity.ContentDataClip | undefined;
27
27
  metadata?: Record<string, any> | undefined;
28
28
  flagCount: number;
29
29
  hashFlag: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.6.1-c97e594b.0",
3
+ "version": "7.6.1-ce05a481.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",
@@ -78,7 +78,7 @@ declare global {
78
78
  metadata: Amity.MetadataFor<T>;
79
79
  };
80
80
  accessType: Amity.FileAccessType;
81
- } & (T extends 'video' ? Amity.VideoFileExtraPayload : unknown) &
81
+ } & (T extends 'video' | 'clip' ? Amity.VideoFileExtraPayload : unknown) &
82
82
  Amity.Timestamps &
83
83
  Amity.SoftDelete;
84
84
 
@@ -61,9 +61,6 @@ declare global {
61
61
  isPublic?: boolean;
62
62
 
63
63
  lastActivity: Amity.timestamp;
64
-
65
- attachedToPostId?: string;
66
- attachedToVideoStreamId?: string;
67
64
  } & Amity.Metadata &
68
65
  Amity.Taggable &
69
66
  Amity.Timestamps &
@@ -32,6 +32,7 @@ declare global {
32
32
  | 'poll'
33
33
  | 'json'
34
34
  | 'liveStream'
35
+ | 'clip'
35
36
  | string;
36
37
 
37
38
  type ContentFeedType = ValueOf<typeof ContentFeedType>;
@@ -62,6 +63,13 @@ declare global {
62
63
  };
63
64
  };
64
65
 
66
+ type ContentDataClip = {
67
+ thumbnailFileId: Amity.File<'image'>['fileId'];
68
+ fileId: Amity.File<'clip'>['fileId'];
69
+ isMuted?: boolean;
70
+ displayMode?: Amity.ClipDisplayMode;
71
+ };
72
+
65
73
  type ContentDataPoll = {
66
74
  pollId: Amity.Poll['pollId'];
67
75
  };
@@ -82,6 +90,8 @@ declare global {
82
90
  ? ContentDataPoll
83
91
  : T extends 'liveStream'
84
92
  ? ContentDataStream
93
+ : T extends 'clip'
94
+ ? ContentDataClip
85
95
  : T extends 'json'
86
96
  ? Record<string, unknown>
87
97
  : T extends string
@@ -11,8 +11,25 @@ declare global {
11
11
  } & Amity.Timestamps;
12
12
 
13
13
  type QueryGlobalFeed = {
14
- dataType?: 'video' | 'image' | 'file' | 'liveStream';
14
+ dataTypes?: ('video' | 'image' | 'file' | 'liveStream' | 'clip')[];
15
15
  queryToken?: string;
16
+ resolveParent?: boolean;
16
17
  };
18
+
19
+ type CustomRankingGlobalFeedLiveCollection = Amity.LiveCollectionParams<
20
+ Omit<QueryGlobalFeed, 'resolveParent' | 'queryToken'>
21
+ >;
22
+
23
+ type CustomRankingGlobalFeedLiveCollectionCache = Amity.LiveCollectionCache<
24
+ Amity.InternalPost['postId'],
25
+ QueryGlobalFeed
26
+ >;
27
+
28
+ type GlobalFeedLiveCollection = Amity.LiveCollectionParams<Omit<QueryGlobalFeed, 'queryToken'>>;
29
+
30
+ type GlobalFeedLiveCollectionCache = Amity.LiveCollectionCache<
31
+ Amity.InternalPost['postId'],
32
+ QueryGlobalFeed
33
+ >;
17
34
  }
18
35
  }
@@ -2,6 +2,7 @@ export const FileType = Object.freeze({
2
2
  FILE: 'file',
3
3
  IMAGE: 'image',
4
4
  VIDEO: 'video',
5
+ CLIP: 'clip',
5
6
  });
6
7
 
7
8
  export const VideoResolution = Object.freeze({
@@ -55,12 +56,16 @@ declare global {
55
56
 
56
57
  type VideoMetadata = Record<string, never>;
57
58
 
59
+ type ClipMetadata = Record<string, never>;
60
+
58
61
  type MetadataFor<T extends FileType> = T extends 'file'
59
62
  ? FileMetadata
60
63
  : T extends 'image'
61
64
  ? ImageMetadata
62
65
  : T extends 'video'
63
66
  ? VideoMetadata
67
+ : T extends 'clip'
68
+ ? ClipMetadata
64
69
  : never;
65
70
 
66
71
  type File<T extends FileType = any> = Amity.FilePayload<T>;
@@ -5,6 +5,7 @@ export const PostContentType = Object.freeze({
5
5
  VIDEO: 'video',
6
6
  LIVESTREAM: 'liveStream',
7
7
  POLL: 'poll',
8
+ CLIP: 'clip',
8
9
  });
9
10
 
10
11
  declare global {
@@ -70,11 +71,9 @@ declare global {
70
71
 
71
72
  type InternalPost<T extends PostContentType = any> = RawPost<T> & {
72
73
  feedType?: 'reviewing' | 'published';
73
- // childPosts?: Amity.RawPost[];
74
74
  };
75
75
 
76
76
  type PostLinkObject = {
77
- childrenPosts: Amity.Post[];
78
77
  latestComments: (Amity.Comment | null)[];
79
78
  creator: Amity.User | undefined;
80
79
  analytics: {
@@ -84,12 +83,13 @@ declare global {
84
83
  getVideoInfo: () => Amity.File<'video'> | undefined;
85
84
  getVideoThumbnailInfo: () => Amity.File<'image'> | undefined;
86
85
  getFileInfo: () => Amity.File<'file'> | undefined;
87
- getPollInfo: () => Amity.Poll | undefined;
88
- getLivestreamInfo: () => Amity.Stream | undefined;
86
+ getClipInfo: () => Amity.File<'clip'> | undefined;
89
87
  };
90
88
 
91
89
  type Post<T extends PostContentType = any> = Amity.InternalPost<T> & Amity.PostLinkObject;
92
90
 
91
+ type ClipDisplayMode = 'fill' | 'fit';
92
+
93
93
  type QueryPosts = {
94
94
  targetId: string;
95
95
  targetType: Amity.InternalPost['targetType'];
@@ -73,9 +73,6 @@ declare global {
73
73
  */
74
74
  targetId?: string; // communityId, userId, etc..
75
75
  targetType?: string; // 'community', 'user', etc..
76
- channelId?: string;
77
- postId?: string;
78
- channelEnabled?: boolean;
79
76
  } & Amity.Metadata &
80
77
  Amity.Timestamps &
81
78
  Amity.SoftDelete;
@@ -84,7 +81,6 @@ declare global {
84
81
 
85
82
  type StreamLinkedObject = {
86
83
  moderation?: Amity.StreamModeration;
87
- getLiveChat: () => Promise<Amity.Channel<'live'> | undefined>;
88
84
  };
89
85
 
90
86
  type Stream = Amity.InternalStream & Amity.StreamLinkedObject;
@@ -1,9 +1,9 @@
1
- import { getActiveClient } from '~/client/api/activeClient';
1
+ import { getActiveClient } from '~/client/api';
2
2
 
3
3
  import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
 
5
- import { prepareChannelPayload } from '../utils/prepareChannelPayload';
6
- import { constructChannelObject } from '../utils/constructChannelObject';
5
+ import { prepareChannelPayload } from '../utils';
6
+ import { constructChannelDynamicValue } from '../utils/constructChannelDynamicValue';
7
7
 
8
8
  /* begin_public_function
9
9
  id: channel.create
@@ -23,14 +23,11 @@ import { constructChannelObject } from '../utils/constructChannelObject';
23
23
  * @async
24
24
  */
25
25
  export const createChannel = async <T extends Amity.ChannelType>(
26
- bundle: {
27
- type: T;
28
- userIds?: Amity.InternalUser['userId'][];
29
- // For live channel linked with a livestream post
30
- videoStreamId?: string;
31
- postId?: string;
32
- } & Pick<Amity.Channel<T>, 'displayName' | 'avatarFileId' | 'tags' | 'metadata' | 'isPublic'>,
33
- ): Promise<Amity.Cached<Amity.Channel<T>>> => {
26
+ bundle: { type: T; userIds?: Amity.InternalUser['userId'][] } & Pick<
27
+ Amity.Channel<T>,
28
+ 'displayName' | 'avatarFileId' | 'tags' | 'metadata' | 'isPublic'
29
+ >,
30
+ ): Promise<Amity.Cached<Amity.InternalChannel>> => {
34
31
  const client = getActiveClient();
35
32
  client.log('user/createChannel', bundle);
36
33
 
@@ -56,7 +53,7 @@ export const createChannel = async <T extends Amity.ChannelType>(
56
53
 
57
54
  const { channels } = data;
58
55
  return {
59
- data: constructChannelObject(channels[0]),
56
+ data: constructChannelDynamicValue(channels[0]),
60
57
  cachedAt,
61
58
  };
62
59
  };
@@ -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
@@ -1,6 +1,6 @@
1
1
  import { getChannelMessagePreviewWithUser } from '~/messagePreview/utils';
2
2
  import { constructChannelDynamicValue } from './constructChannelDynamicValue';
3
- import { channelLinkedObject } from '~/utils/linkedObject/channelLinkedObject';
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 channelLinkedObject(
13
+ return LinkedObject.channel(
14
14
  constructChannelDynamicValue(getChannelMessagePreviewWithUser(channel)),
15
15
  );
16
16
  };
@@ -49,6 +49,12 @@ export const deleteComment = async (
49
49
  // to support hard deletion
50
50
  const deleted = { ...comment.data, isDeleted: true };
51
51
 
52
+ if (permanent) {
53
+ scheduleTask(() => pushToTombstone('comment', commentId));
54
+ } else {
55
+ upsertInCache(['comment', 'get', commentId], { isDeleted: true });
56
+ }
57
+
52
58
  if (comment.data.referenceType === 'story') {
53
59
  const story = await getStoryByStoryId(comment.data.referenceId);
54
60
 
@@ -96,12 +102,6 @@ export const deleteComment = async (
96
102
  communityUsers: [],
97
103
  });
98
104
 
99
- if (permanent) {
100
- scheduleTask(() => pushToTombstone('comment', commentId));
101
- } else {
102
- upsertInCache(['comment', 'get', commentId], { isDeleted: true });
103
- }
104
-
105
105
  return deleted;
106
106
  };
107
107
  /* end_public_function */
@@ -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);
@@ -61,7 +61,8 @@ export const PAYLOAD2MODEL: Record<string, Amity.Domain> = {
61
61
 
62
62
  /** hidden */
63
63
  export const isOutdated = <T extends Amity.UpdatedAt>(prevData: T, nextData: T): boolean => {
64
- if ('updatedAt' in nextData && 'updatedAt' in nextData) {
64
+ // Check if the new value is outdated.
65
+ if ('updatedAt' in nextData && 'updatedAt' in prevData) {
65
66
  return new Date(nextData.updatedAt!) < new Date(prevData.updatedAt!);
66
67
  }
67
68
 
@@ -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<