@amityco/ts-sdk 0.0.1-beta.40 → 0.0.1-beta.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +3 -1
  2. package/dist/category/api/queryCategories.d.ts.map +1 -1
  3. package/dist/channel/api/addChannelMembers.d.ts.map +1 -1
  4. package/dist/channel/api/addChannelMembersRole.d.ts.map +1 -1
  5. package/dist/channel/api/banChannelMembers.d.ts.map +1 -1
  6. package/dist/channel/api/createChannel.d.ts.map +1 -1
  7. package/dist/channel/api/getChannel.d.ts.map +1 -1
  8. package/dist/channel/api/joinChannel.d.ts.map +1 -1
  9. package/dist/channel/api/leaveChannel.d.ts.map +1 -1
  10. package/dist/channel/api/queryChannelMembers.d.ts.map +1 -1
  11. package/dist/channel/api/queryChannels.d.ts.map +1 -1
  12. package/dist/channel/api/removeChannelMembers.d.ts.map +1 -1
  13. package/dist/channel/api/removeChannelMembersRole.d.ts +1 -1
  14. package/dist/channel/api/removeChannelMembersRole.d.ts.map +1 -1
  15. package/dist/channel/api/startReading.d.ts +3 -3
  16. package/dist/channel/api/startReading.d.ts.map +1 -1
  17. package/dist/channel/api/stopReading.d.ts +2 -2
  18. package/dist/channel/api/stopReading.d.ts.map +1 -1
  19. package/dist/channel/api/unbanChannelMembers.d.ts.map +1 -1
  20. package/dist/channel/api/updateChannel.d.ts.map +1 -1
  21. package/dist/client/api/connectClient.d.ts.map +1 -1
  22. package/dist/client/api/disconnectClient.d.ts.map +1 -1
  23. package/dist/client/api/renewal.d.ts.map +1 -1
  24. package/dist/comment/api/createComment.d.ts.map +1 -1
  25. package/dist/comment/api/deleteComment.d.ts.map +1 -1
  26. package/dist/comment/api/getComment.d.ts.map +1 -1
  27. package/dist/comment/api/getComments.d.ts.map +1 -1
  28. package/dist/comment/api/queryComments.d.ts.map +1 -1
  29. package/dist/comment/api/updateComment.d.ts.map +1 -1
  30. package/dist/community/api/addCommunityMembers.d.ts.map +1 -1
  31. package/dist/community/api/addCommunityMembersRoles.d.ts.map +1 -1
  32. package/dist/community/api/createCommunity.d.ts.map +1 -1
  33. package/dist/community/api/deleteCommunity.d.ts.map +1 -1
  34. package/dist/community/api/getCommunity.d.ts.map +1 -1
  35. package/dist/community/api/getRecommendedCommunities.d.ts.map +1 -1
  36. package/dist/community/api/getTopTrendingCommunities.d.ts.map +1 -1
  37. package/dist/community/api/joinCommunity.d.ts.map +1 -1
  38. package/dist/community/api/leaveCommunity.d.ts.map +1 -1
  39. package/dist/community/api/queryCommunities.d.ts.map +1 -1
  40. package/dist/community/api/queryCommunityMembers.d.ts.map +1 -1
  41. package/dist/community/api/removeCommunityMembers.d.ts.map +1 -1
  42. package/dist/community/api/removeCommunityMembersRoles.d.ts.map +1 -1
  43. package/dist/community/api/updateCommunity.d.ts.map +1 -1
  44. package/dist/core/transports/http.d.ts.map +1 -1
  45. package/dist/feed/api/queryGlobalFeed.d.ts.map +1 -1
  46. package/dist/file/api/createFile.d.ts.map +1 -1
  47. package/dist/file/api/createImage.d.ts.map +1 -1
  48. package/dist/file/api/createVideo.d.ts.map +1 -1
  49. package/dist/file/api/deleteFile.d.ts.map +1 -1
  50. package/dist/file/api/getFile.d.ts.map +1 -1
  51. package/dist/follow/api/acceptFollower.d.ts.map +1 -1
  52. package/dist/follow/api/declineFollower.d.ts.map +1 -1
  53. package/dist/follow/api/follow.d.ts.map +1 -1
  54. package/dist/follow/api/getFollowInfo.d.ts.map +1 -1
  55. package/dist/follow/api/queryFollowers.d.ts.map +1 -1
  56. package/dist/follow/api/queryFollowings.d.ts.map +1 -1
  57. package/dist/follow/api/unfollow.d.ts.map +1 -1
  58. package/dist/index.cjs.js +426 -67
  59. package/dist/index.esm.js +426 -67
  60. package/dist/index.umd.js +2 -2
  61. package/dist/message/api/createMessage.d.ts.map +1 -1
  62. package/dist/message/api/deleteMessage.d.ts.map +1 -1
  63. package/dist/message/api/getMessage.d.ts.map +1 -1
  64. package/dist/message/api/queryMessages.d.ts.map +1 -1
  65. package/dist/message/api/updateMessage.d.ts.map +1 -1
  66. package/dist/poll/api/closePoll.d.ts.map +1 -1
  67. package/dist/poll/api/createPoll.d.ts.map +1 -1
  68. package/dist/poll/api/deletePoll.d.ts.map +1 -1
  69. package/dist/poll/api/getPoll.d.ts.map +1 -1
  70. package/dist/poll/api/votePoll.d.ts.map +1 -1
  71. package/dist/post/api/approvePost.d.ts.map +1 -1
  72. package/dist/post/api/createPost.d.ts.map +1 -1
  73. package/dist/post/api/declinePost.d.ts.map +1 -1
  74. package/dist/post/api/deletePost.d.ts.map +1 -1
  75. package/dist/post/api/getPost.d.ts.map +1 -1
  76. package/dist/post/api/getPosts.d.ts.map +1 -1
  77. package/dist/post/api/queryPosts.d.ts.map +1 -1
  78. package/dist/post/api/updatePost.d.ts.map +1 -1
  79. package/dist/reaction/api/addReaction.d.ts.map +1 -1
  80. package/dist/reaction/api/queryReactions.d.ts.map +1 -1
  81. package/dist/reaction/api/removeReaction.d.ts.map +1 -1
  82. package/dist/report/api/createReport.d.ts.map +1 -1
  83. package/dist/report/api/deleteReport.d.ts.map +1 -1
  84. package/dist/report/api/isReportedByMe.d.ts.map +1 -1
  85. package/dist/stream/api/createStream.d.ts.map +1 -1
  86. package/dist/stream/api/deleteStream.d.ts.map +1 -1
  87. package/dist/stream/api/getStream.d.ts.map +1 -1
  88. package/dist/stream/api/queryStreams.d.ts.map +1 -1
  89. package/dist/stream/api/updateStream.d.ts.map +1 -1
  90. package/dist/subChannel/api/createSubChannel.d.ts.map +1 -1
  91. package/dist/subChannel/api/deleteSubChannel.d.ts.map +1 -1
  92. package/dist/subChannel/api/getSubChannel.d.ts.map +1 -1
  93. package/dist/subChannel/api/querySubChannels.d.ts.map +1 -1
  94. package/dist/subChannel/api/updateSubChannel.d.ts.map +1 -1
  95. package/dist/user/api/getUser.d.ts.map +1 -1
  96. package/dist/user/api/getUsers.d.ts.map +1 -1
  97. package/dist/user/api/queryUsers.d.ts.map +1 -1
  98. package/dist/user/api/updateUser.d.ts.map +1 -1
  99. package/package.json +1 -1
  100. package/src/category/api/queryCategories.ts +3 -0
  101. package/src/channel/api/addChannelMembers.ts +4 -0
  102. package/src/channel/api/addChannelMembersRole.ts +4 -0
  103. package/src/channel/api/banChannelMembers.ts +4 -0
  104. package/src/channel/api/createChannel.ts +4 -0
  105. package/src/channel/api/getChannel.ts +4 -0
  106. package/src/channel/api/joinChannel.ts +4 -0
  107. package/src/channel/api/leaveChannel.ts +4 -0
  108. package/src/channel/api/queryChannelMembers.ts +4 -0
  109. package/src/channel/api/queryChannels.ts +4 -0
  110. package/src/channel/api/removeChannelMembers.ts +4 -0
  111. package/src/channel/api/removeChannelMembersRole.ts +5 -1
  112. package/src/channel/api/startReading.ts +7 -3
  113. package/src/channel/api/stopReading.ts +6 -2
  114. package/src/channel/api/unbanChannelMembers.ts +4 -0
  115. package/src/channel/api/updateChannel.ts +4 -0
  116. package/src/client/api/connectClient.ts +4 -0
  117. package/src/client/api/disconnectClient.ts +4 -0
  118. package/src/client/api/getToken.ts +1 -1
  119. package/src/client/api/renewal.ts +4 -0
  120. package/src/client/api/tests/getToken.test.ts +2 -2
  121. package/src/comment/api/createComment.ts +4 -0
  122. package/src/comment/api/deleteComment.ts +4 -0
  123. package/src/comment/api/getComment.ts +4 -0
  124. package/src/comment/api/getComments.ts +4 -0
  125. package/src/comment/api/queryComments.ts +4 -0
  126. package/src/comment/api/updateComment.ts +4 -0
  127. package/src/community/api/addCommunityMembers.ts +4 -0
  128. package/src/community/api/addCommunityMembersRoles.ts +4 -0
  129. package/src/community/api/createCommunity.ts +4 -0
  130. package/src/community/api/deleteCommunity.ts +4 -0
  131. package/src/community/api/getCommunity.ts +4 -0
  132. package/src/community/api/getRecommendedCommunities.ts +4 -0
  133. package/src/community/api/getTopTrendingCommunities.ts +4 -0
  134. package/src/community/api/joinCommunity.ts +4 -0
  135. package/src/community/api/leaveCommunity.ts +4 -0
  136. package/src/community/api/queryCommunities.ts +4 -0
  137. package/src/community/api/queryCommunityMembers.ts +4 -0
  138. package/src/community/api/removeCommunityMembers.ts +4 -0
  139. package/src/community/api/removeCommunityMembersRoles.ts +4 -0
  140. package/src/community/api/updateCommunity.ts +4 -0
  141. package/src/core/transports/http.ts +5 -0
  142. package/src/core/transports/test/http.test.ts +12 -0
  143. package/src/feed/api/queryGlobalFeed.ts +4 -0
  144. package/src/file/api/createFile.ts +4 -0
  145. package/src/file/api/createImage.ts +4 -0
  146. package/src/file/api/createVideo.ts +4 -0
  147. package/src/file/api/deleteFile.ts +4 -0
  148. package/src/file/api/getFile.ts +4 -0
  149. package/src/follow/api/acceptFollower.ts +4 -0
  150. package/src/follow/api/declineFollower.ts +4 -0
  151. package/src/follow/api/follow.ts +4 -0
  152. package/src/follow/api/getFollowInfo.ts +4 -0
  153. package/src/follow/api/queryFollowers.ts +4 -0
  154. package/src/follow/api/queryFollowings.ts +4 -0
  155. package/src/follow/api/unfollow.ts +4 -0
  156. package/src/message/api/createMessage.ts +9 -4
  157. package/src/message/api/deleteMessage.ts +4 -0
  158. package/src/message/api/getMessage.ts +4 -0
  159. package/src/message/api/queryMessages.ts +4 -0
  160. package/src/message/api/tests/createMessage.test.ts +16 -0
  161. package/src/message/api/updateMessage.ts +4 -0
  162. package/src/message/observers/liveMessages.ts +1 -1
  163. package/src/poll/api/closePoll.ts +4 -0
  164. package/src/poll/api/createPoll.ts +4 -0
  165. package/src/poll/api/deletePoll.ts +4 -0
  166. package/src/poll/api/getPoll.ts +4 -0
  167. package/src/poll/api/votePoll.ts +4 -0
  168. package/src/post/api/approvePost.ts +4 -0
  169. package/src/post/api/createPost.ts +4 -0
  170. package/src/post/api/declinePost.ts +4 -0
  171. package/src/post/api/deletePost.ts +4 -0
  172. package/src/post/api/getPost.ts +4 -0
  173. package/src/post/api/getPosts.ts +3 -0
  174. package/src/post/api/queryPosts.ts +4 -0
  175. package/src/post/api/updatePost.ts +4 -0
  176. package/src/reaction/api/addReaction.ts +4 -0
  177. package/src/reaction/api/queryReactions.ts +4 -0
  178. package/src/reaction/api/removeReaction.ts +4 -0
  179. package/src/report/api/createReport.ts +4 -0
  180. package/src/report/api/deleteReport.ts +4 -0
  181. package/src/report/api/isReportedByMe.ts +4 -0
  182. package/src/stream/api/createStream.ts +4 -0
  183. package/src/stream/api/deleteStream.ts +3 -0
  184. package/src/stream/api/getStream.ts +4 -0
  185. package/src/stream/api/queryStreams.ts +4 -0
  186. package/src/stream/api/updateStream.ts +3 -0
  187. package/src/subChannel/api/createSubChannel.ts +4 -0
  188. package/src/subChannel/api/deleteSubChannel.ts +4 -0
  189. package/src/subChannel/api/getSubChannel.ts +4 -0
  190. package/src/subChannel/api/querySubChannels.ts +4 -0
  191. package/src/subChannel/api/updateSubChannel.ts +4 -0
  192. package/src/user/api/getUser.ts +4 -0
  193. package/src/user/api/getUsers.ts +3 -0
  194. package/src/user/api/queryUsers.ts +4 -0
  195. package/src/user/api/updateUser.ts +4 -0
@@ -3,6 +3,7 @@ import { disableCache, enableCache, pullFromCache, pushToCache } from '~/cache/a
3
3
 
4
4
  import { client, generateRawMessage, pause } from '~/utils/tests';
5
5
 
6
+ import { createQuery, runQuery } from '~/core/query';
6
7
  import { convertFromRaw } from '../../utils';
7
8
  import { onMessageCreated } from '../../events';
8
9
  import { createMessage } from '../createMessage';
@@ -192,4 +193,19 @@ describe('uniqueId / referenceId', () => {
192
193
  }),
193
194
  );
194
195
  });
196
+
197
+ it('should pass referenceId if cache is turned off', async () => {
198
+ disableCache();
199
+ client.http.post = jest.fn().mockResolvedValue({ data: { messages: [rawMessageToCreate] } });
200
+
201
+ runQuery(createQuery(createMessage, bundle));
202
+ await pause();
203
+
204
+ expect(client.http.post).toHaveBeenCalledWith(
205
+ expect.anything(),
206
+ expect.objectContaining({
207
+ referenceId: expect.stringMatching(/LOCAL_/),
208
+ }),
209
+ );
210
+ });
195
211
  });
@@ -5,6 +5,9 @@ import { pullFromCache, upsertInCache } from '~/cache/api';
5
5
  import { fireEvent } from '~/core/events';
6
6
  import { convertParams, convertResponseFromRaw } from '../utils';
7
7
 
8
+ /* begin_public_function
9
+ id: message.edit
10
+ */
8
11
  /**
9
12
  * ```js
10
13
  * import { updateMessage } from '@amityco/ts-sdk'
@@ -93,3 +96,4 @@ updateMessage.optimistically = (
93
96
  cachedAt,
94
97
  };
95
98
  };
99
+ /* end_public_function */
@@ -116,7 +116,7 @@ export const liveMessages = (
116
116
 
117
117
  runQuery(
118
118
  query,
119
- ({ data: result, error, loading, prevPage: page }) => {
119
+ ({ data: result, error, loading, nextPage: page }) => {
120
120
  const data = {
121
121
  loading,
122
122
  error,
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
 
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: poll.close
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { closePoll } from '@amityco/ts-sdk'
@@ -40,3 +43,4 @@ export const closePoll = async (
40
43
  cachedAt,
41
44
  };
42
45
  };
46
+ /* end_public_function */
@@ -2,6 +2,9 @@ import { getActiveClient } from '~/client/api';
2
2
 
3
3
  import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
 
5
+ /* begin_public_function
6
+ id: poll.create
7
+ */
5
8
  /**
6
9
  * ```js
7
10
  * import { createPoll } from '@amityco/ts-sdk'
@@ -43,3 +46,4 @@ export const createPoll = async (
43
46
  cachedAt,
44
47
  };
45
48
  };
49
+ /* end_public_function */
@@ -5,6 +5,9 @@ import { upsertInCache } from '~/cache/api';
5
5
 
6
6
  import { getPoll } from './getPoll';
7
7
 
8
+ /* begin_public_function
9
+ id: poll.delete
10
+ */
8
11
  /**
9
12
  * ```js
10
13
  * import { deletePoll } from '@amityco/ts-sdk'
@@ -37,3 +40,4 @@ export const deletePoll = async (pollId: Amity.Poll['pollId']): Promise<boolean>
37
40
 
38
41
  return success;
39
42
  };
43
+ /* end_public_function */
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
  import { pullFromCache } from '~/cache/api';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: poll.get
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { getPoll } from '@amityco/ts-sdk'
@@ -33,6 +36,7 @@ export const getPoll = async (pollId: Amity.Poll['pollId']): Promise<Amity.Cache
33
36
  cachedAt,
34
37
  };
35
38
  };
39
+ /* end_public_function */
36
40
 
37
41
  /**
38
42
  * ```js
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
 
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: poll.vote
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { votePoll } from '@amityco/ts-sdk'
@@ -42,3 +45,4 @@ export const votePoll = async (
42
45
  cachedAt,
43
46
  };
44
47
  };
48
+ /* end_public_function */
@@ -4,6 +4,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
  import { fireEvent } from '~/core/events';
5
5
  import { prepareMembershipPayload } from '~/group/utils';
6
6
 
7
+ /* begin_public_function
8
+ id: post.approve
9
+ */
7
10
  /**
8
11
  * ```js
9
12
  * import { approvePost } from '@amityco/ts-sdk'
@@ -46,3 +49,4 @@ export const approvePost = async (
46
49
  cachedAt,
47
50
  };
48
51
  };
52
+ /* end_public_function */
@@ -4,6 +4,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
  import { fireEvent } from '~/core/events';
5
5
  import { prepareMembershipPayload } from '~/group/utils';
6
6
 
7
+ /* begin_public_function
8
+ 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
9
+ */
7
10
  /**
8
11
  * ```js
9
12
  * import { createPost } from '@amityco/ts-sdk'
@@ -54,3 +57,4 @@ export const createPost = async <T extends Amity.PostContentType | string>(
54
57
  cachedAt,
55
58
  };
56
59
  };
60
+ /* end_public_function */
@@ -4,6 +4,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
  import { fireEvent } from '~/core/events';
5
5
  import { prepareMembershipPayload } from '~/group/utils';
6
6
 
7
+ /* begin_public_function
8
+ id: post.decline
9
+ */
7
10
  /**
8
11
  * ```js
9
12
  * import { declinePost } from '@amityco/ts-sdk'
@@ -46,3 +49,4 @@ export const declinePost = async (
46
49
  cachedAt,
47
50
  };
48
51
  };
52
+ /* end_public_function */
@@ -7,6 +7,9 @@ import { pushToTombstone } from '~/cache/api/pushToTombstone';
7
7
 
8
8
  import { getPost } from './getPost';
9
9
 
10
+ /* begin_public_function
11
+ id: post.soft_delete, post.hard_delete
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { deletePost } from '@amityco/ts-sdk'
@@ -79,3 +82,4 @@ export const deletePost = async (
79
82
 
80
83
  return deleted;
81
84
  };
85
+ /* end_public_function */
@@ -7,6 +7,9 @@ import { checkIfShouldGoesToTombstone } from '~/cache/utils';
7
7
  import { pushToTombstone } from '~/cache/api/pushToTombstone';
8
8
  import { prepareMembershipPayload } from '~/group/utils';
9
9
 
10
+ /* begin_public_function
11
+ id: post.get
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { getPost } from '@amityco/ts-sdk'
@@ -55,6 +58,7 @@ export const getPost = async (postId: Amity.Post['postId']): Promise<Amity.Cache
55
58
  cachedAt,
56
59
  };
57
60
  };
61
+ /* end_public_function */
58
62
 
59
63
  /**
60
64
  * ```js
@@ -4,6 +4,9 @@ import { pullFromCache } from '~/cache/api';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
  import { prepareMembershipPayload } from '~/group/utils';
6
6
 
7
+ /* begin_public_function
8
+ id: post.get_by_ids
9
+ */
7
10
  /**
8
11
  * ```js
9
12
  * import { getPosts } from '@amityco/ts-sdk'
@@ -7,6 +7,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
7
7
  import { getResolver } from '~/core/model';
8
8
  import { prepareMembershipPayload } from '~/group/utils';
9
9
 
10
+ /* begin_public_function
11
+ id: post.query, feed.query.community_feed, feed.query.user_feed
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { queryPosts } from '@amityco/ts-sdk'
@@ -71,6 +74,7 @@ export const queryPosts = async (
71
74
 
72
75
  return { data: posts, cachedAt, prevPage, nextPage };
73
76
  };
77
+ /* end_public_function */
74
78
 
75
79
  /**
76
80
  * ```js
@@ -4,6 +4,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
  import { fireEvent } from '~/core/events';
5
5
  import { prepareMembershipPayload } from '~/group/utils';
6
6
 
7
+ /* begin_public_function
8
+ id: post.edit
9
+ */
7
10
  /**
8
11
  * ```js
9
12
  * import { updatePost } from '@amityco/ts-sdk'
@@ -52,3 +55,4 @@ export const updatePost = async (
52
55
  cachedAt,
53
56
  };
54
57
  };
58
+ /* end_public_function */
@@ -5,6 +5,9 @@ import { upsertInCache, pullFromCache, pushToCache } from '~/cache/api';
5
5
  import { UNSYNCED_OBJECT_CACHED_AT_VALUE } from '~/utils/constants';
6
6
  import { dispatchReactable } from '../utils';
7
7
 
8
+ /* begin_public_function
9
+ id: reaction.add
10
+ */
8
11
  /**
9
12
  * ```js
10
13
  * import { addReaction } from '@amityco/ts-sdk'
@@ -53,6 +56,7 @@ export const addReaction = async (
53
56
 
54
57
  return true;
55
58
  };
59
+ /* end_public_function */
56
60
 
57
61
  /**
58
62
  * ```js
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api/activeClient';
3
3
  import { toToken, toPageRaw } from '~/core/query';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: reaction.query
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { queryReactions } from '@amityco/ts-sdk'
@@ -52,3 +55,4 @@ export const queryReactions = async (
52
55
 
53
56
  return { data: reactions, prevPage, nextPage };
54
57
  };
58
+ /* end_public_function */
@@ -6,6 +6,9 @@ import { UNSYNCED_OBJECT_CACHED_AT_VALUE } from '~/utils/constants';
6
6
 
7
7
  import { dispatchReactable } from '../utils';
8
8
 
9
+ /* begin_public_function
10
+ id: reaction.remove
11
+ */
9
12
  /**
10
13
  * ```js
11
14
  * import { deleteReaction } from '@amityco/ts-sdk'
@@ -56,6 +59,7 @@ export const removeReaction = async (
56
59
 
57
60
  return true;
58
61
  };
62
+ /* end_public_function */
59
63
 
60
64
  /**
61
65
  * ```js
@@ -7,6 +7,9 @@ import { prepareMembershipPayload } from '~/group/utils';
7
7
  import { prepareMessagePayload } from '~/message/utils';
8
8
  import REFERENCE_TYPES from '../constants/referenceTypes';
9
9
 
10
+ /* begin_public_function
11
+ id: user.flag, message.flag, post.flag, comment.flag
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { createReport } from '@amityco/ts-sdk'
@@ -59,3 +62,4 @@ export const createReport = async (
59
62
 
60
63
  return !!payload;
61
64
  };
65
+ /* end_public_function */
@@ -7,6 +7,9 @@ import { prepareMembershipPayload } from '~/group/utils';
7
7
  import { prepareMessagePayload } from '~/message/utils';
8
8
  import REFERENCE_TYPES from '../constants/referenceTypes';
9
9
 
10
+ /* begin_public_function
11
+ id: user.unflag, message.unflag, post.unflag, comment.unflag
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { deleteReport } from '@amityco/ts-sdk'
@@ -60,3 +63,4 @@ export const deleteReport = async (
60
63
 
61
64
  return !!payload;
62
65
  };
66
+ /* end_public_function */
@@ -2,6 +2,9 @@ import { getActiveClient } from '~/client/api/activeClient';
2
2
  import { synchronousWSCall } from '~/core/transports';
3
3
  import REFERENCE_TYPES from '../constants/referenceTypes';
4
4
 
5
+ /* begin_public_function
6
+ id: user.check_flag_by_me, message.check_flag_by_me, post.check_flag_by_me, comment.check_flag_by_me
7
+ */
5
8
  /**
6
9
  * ```js
7
10
  * import { isReportedByMe } from '@amityco/ts-sdk'
@@ -42,3 +45,4 @@ export const isReportedByMe = async (
42
45
 
43
46
  return result ?? isFlagByMe ?? false;
44
47
  };
48
+ /* end_public_function */
@@ -2,6 +2,9 @@ import { getActiveClient } from '~/client/api';
2
2
 
3
3
  import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
 
5
+ /* begin_public_function
6
+ id: stream.create
7
+ */
5
8
  /**
6
9
  * ```js
7
10
  * import { createStream } from '@amityco/ts-sdk'
@@ -34,3 +37,4 @@ export const createStream = async (
34
37
  cachedAt,
35
38
  };
36
39
  };
40
+ /* end_public_function */
@@ -6,6 +6,9 @@ import { getStream } from './getStream';
6
6
 
7
7
  // import { unwrapPayload } from '~/core/transports'
8
8
 
9
+ /* begin_public_function
10
+ id: stream.delete
11
+ */
9
12
  /**
10
13
  * ```js
11
14
  * import { deleteStream } from '@amityco/ts-sdk'
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
  import { pullFromCache } from '~/cache/api';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: stream.get
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { getStream } from '@amityco/ts-sdk'
@@ -37,6 +40,7 @@ export const getStream = async (
37
40
  cachedAt,
38
41
  };
39
42
  };
43
+ /* end_public_function */
40
44
 
41
45
  /**
42
46
  * ```js
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
  import { toPage, toToken } from '~/core/query';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: stream.query
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { queryStreams } from '@amityco/ts-sdk'
@@ -55,6 +58,7 @@ export const queryStreams = async (query?: {
55
58
 
56
59
  return { data: videoStreamings, cachedAt, prevPage, nextPage };
57
60
  };
61
+ /* end_public_function */
58
62
 
59
63
  /**
60
64
  * ```js
@@ -2,6 +2,9 @@ import { getActiveClient } from '~/client/api';
2
2
 
3
3
  import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
 
5
+ /* begin_public_function
6
+ id: stream.update
7
+ */
5
8
  /**
6
9
  * ```js
7
10
  * import { updateStream } from '@amityco/ts-sdk'
@@ -3,6 +3,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
3
3
  import { fireEvent } from '~/core/events';
4
4
  import { prepareSubChannelPayload } from '../utils';
5
5
 
6
+ /* begin_public_function
7
+ id: subchannel.create
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { createSubChannel } from '@amityco/ts-sdk'
@@ -39,3 +42,4 @@ export const createSubChannel = async <T extends Amity.ChannelType>(
39
42
  cachedAt,
40
43
  };
41
44
  };
45
+ /* end_public_function */
@@ -5,6 +5,9 @@ import { fireEvent } from '~/core/events';
5
5
  import { getFutureDate } from '~/core/model';
6
6
  import { getSubChannel } from './getSubChannel';
7
7
 
8
+ /* begin_public_function
9
+ id: subchannel.soft_delete, subchannel.hard_delete
10
+ */
8
11
  /**
9
12
  * ```js
10
13
  * import { deleteSubChannel } from '@amityco/ts-sdk'
@@ -51,3 +54,4 @@ export const deleteSubChannel = async (
51
54
 
52
55
  return deleted;
53
56
  };
57
+ /* end_public_function */
@@ -7,6 +7,9 @@ import { getActiveClient } from '~/client/api';
7
7
  import { fireEvent } from '~/core/events';
8
8
  import { prepareSubChannelPayload } from '../utils';
9
9
 
10
+ /* begin_public_function
11
+ id: subchannel.get
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { getSubChannel } from '@amityco/ts-sdk'
@@ -52,6 +55,7 @@ export const getSubChannel = async (
52
55
  throw error;
53
56
  }
54
57
  };
58
+ /* end_public_function */
55
59
 
56
60
  /**
57
61
  * ```js
@@ -6,6 +6,9 @@ import { toPage, toToken } from '~/core/query';
6
6
  import { fireEvent } from '~/core/events';
7
7
  import { convertQueryParams, prepareSubChannelPayload } from '../utils';
8
8
 
9
+ /* begin_public_function
10
+ id: subchannel.query
11
+ */
9
12
  /**
10
13
  * ```js
11
14
  * import { querySubChannels } from '@amityco/ts-sdk'
@@ -63,6 +66,7 @@ export const querySubChannels = async (
63
66
 
64
67
  return { data: subChannels, cachedAt, prevPage, nextPage };
65
68
  };
69
+ /* end_public_function */
66
70
 
67
71
  /**
68
72
  * ```js
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
  import { fireEvent } from '~/core/events';
4
4
  import { prepareSubChannelPayload } from '../utils';
5
5
 
6
+ /* begin_public_function
7
+ id: subchannel.update
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { updateSubChannel } from '@amityco/ts-sdk'
@@ -41,3 +44,4 @@ export const updateSubChannel = async (
41
44
  cachedAt,
42
45
  };
43
46
  };
47
+ /* end_public_function */
@@ -8,6 +8,9 @@ import { isInTombstone } from '~/cache/api/isInTombstone';
8
8
  import { checkIfShouldGoesToTombstone } from '~/cache/utils';
9
9
  import { pushToTombstone } from '~/cache/api/pushToTombstone';
10
10
 
11
+ /* begin_public_function
12
+ id: user.get
13
+ */
11
14
  /**
12
15
  * ```js
13
16
  * import { getUser } from '@amityco/ts-sdk'
@@ -63,6 +66,7 @@ export const getUser = async (
63
66
  cachedAt,
64
67
  };
65
68
  };
69
+ /* end_public_function */
66
70
 
67
71
  /**
68
72
  * ```js
@@ -4,6 +4,9 @@ import { pullFromCache } from '~/cache/api';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
  import { fireEvent } from '~/core/events';
6
6
 
7
+ /* begin_public_function
8
+ id: user.get_by_ids
9
+ */
7
10
  /**
8
11
  * ```js
9
12
  * import { getUsers } from '@amityco/ts-sdk'
@@ -7,6 +7,9 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
7
7
  import { getResolver } from '~/core/model';
8
8
  import { fireEvent } from '~/core/events';
9
9
 
10
+ /* begin_public_function
11
+ id: user.query, user.search
12
+ */
10
13
  /**
11
14
  * ```js
12
15
  * import { queryUsers } from '@amityco/ts-sdk'
@@ -72,6 +75,7 @@ export const queryUsers = async (
72
75
 
73
76
  return { data: users, cachedAt, prevPage, nextPage };
74
77
  };
78
+ /* end_public_function */
75
79
 
76
80
  /**
77
81
  * ```js
@@ -3,6 +3,9 @@ import { getActiveClient } from '~/client/api';
3
3
  import { fireEvent } from '~/core/events';
4
4
  import { ingestInCache } from '~/cache/api/ingestInCache';
5
5
 
6
+ /* begin_public_function
7
+ id: client.update_user
8
+ */
6
9
  /**
7
10
  * ```js
8
11
  * import { updateUser } from '@amityco/ts-sdk'
@@ -53,3 +56,4 @@ export const updateUser = async (
53
56
  cachedAt,
54
57
  };
55
58
  };
59
+ /* end_public_function */