@amityco/ts-sdk 0.0.1-9f07ffa.0 → 0.0.1-a495d12.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.
@@ -12,5 +12,5 @@
12
12
  * @category Comment API
13
13
  * @async
14
14
  */
15
- export declare const deleteComment: (commentId: Amity.Comment['commentId']) => Promise<Amity.Comment<any>>;
15
+ export declare const deleteComment: (commentId: Amity.Comment['commentId'], permanent?: boolean) => Promise<Amity.Comment<any>>;
16
16
  //# sourceMappingURL=deleteComment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deleteComment.d.ts","sourceRoot":"","sources":["../../../src/comment/api/deleteComment.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,cACb,aAAa,CAAC,WAAW,CAAC,gCAiBtC,CAAA"}
1
+ {"version":3,"file":"deleteComment.d.ts","sourceRoot":"","sources":["../../../src/comment/api/deleteComment.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,cACb,aAAa,CAAC,WAAW,CAAC,cAC1B,OAAO,gCAsBnB,CAAA"}
@@ -13,7 +13,7 @@
13
13
  * @async
14
14
  **/
15
15
  export declare const queryGlobalFeed: (query?: {
16
- dataTypes?: ("video" | "image" | "file")[] | undefined;
16
+ dataTypes?: ("video" | "image" | "file" | "liveStream")[] | undefined;
17
17
  page?: Amity.Page | undefined;
18
18
  } | undefined) => Promise<{
19
19
  data: Record<string, Amity.Post<any>>;
package/dist/index.cjs.js CHANGED
@@ -2982,7 +2982,7 @@ const removeCommunityMembersRole = async (communityId, roleId, userIds) => {
2982
2982
  * @category Post API
2983
2983
  * @async
2984
2984
  */
2985
- const deletePost = async (postId, permanent) => {
2985
+ const deletePost = async (postId, permanent = false) => {
2986
2986
  const client = getActiveClient();
2987
2987
  client.log('post/deletePost', postId);
2988
2988
  // API-FIX: This endpoint has not been implemented yet.
@@ -3273,11 +3273,16 @@ const updateComment = async (commentId, patch) => {
3273
3273
  * @category Comment API
3274
3274
  * @async
3275
3275
  */
3276
- const deleteComment = async (commentId) => {
3276
+ const deleteComment = async (commentId, permanent = false) => {
3277
3277
  const client = getActiveClient();
3278
3278
  client.log('comment/deleteComment', commentId);
3279
3279
  // API-FIX: This endpoint has not been implemented yet.
3280
- await client.http.delete(`/api/v3/comments/${commentId}`);
3280
+ await client.http.delete(`/api/v4/comments/${commentId}`, {
3281
+ params: {
3282
+ commentId,
3283
+ permanent,
3284
+ },
3285
+ });
3281
3286
  const deleted = await getComment(commentId);
3282
3287
  const post = await getPost(deleted.referenceId);
3283
3288
  fireEvent('v3.post.didUpdate', { posts: [post] });
package/dist/index.esm.js CHANGED
@@ -2968,7 +2968,7 @@ const removeCommunityMembersRole = async (communityId, roleId, userIds) => {
2968
2968
  * @category Post API
2969
2969
  * @async
2970
2970
  */
2971
- const deletePost = async (postId, permanent) => {
2971
+ const deletePost = async (postId, permanent = false) => {
2972
2972
  const client = getActiveClient();
2973
2973
  client.log('post/deletePost', postId);
2974
2974
  // API-FIX: This endpoint has not been implemented yet.
@@ -3259,11 +3259,16 @@ const updateComment = async (commentId, patch) => {
3259
3259
  * @category Comment API
3260
3260
  * @async
3261
3261
  */
3262
- const deleteComment = async (commentId) => {
3262
+ const deleteComment = async (commentId, permanent = false) => {
3263
3263
  const client = getActiveClient();
3264
3264
  client.log('comment/deleteComment', commentId);
3265
3265
  // API-FIX: This endpoint has not been implemented yet.
3266
- await client.http.delete(`/api/v3/comments/${commentId}`);
3266
+ await client.http.delete(`/api/v4/comments/${commentId}`, {
3267
+ params: {
3268
+ commentId,
3269
+ permanent,
3270
+ },
3271
+ });
3267
3272
  const deleted = await getComment(commentId);
3268
3273
  const post = await getPost(deleted.referenceId);
3269
3274
  fireEvent('v3.post.didUpdate', { posts: [post] });
package/dist/index.umd.js CHANGED
@@ -2972,7 +2972,7 @@ var Amity = (function (exports, jsBase64, nativeIdGenerator, debug, axios, HttpA
2972
2972
  * @category Post API
2973
2973
  * @async
2974
2974
  */
2975
- const deletePost = async (postId, permanent) => {
2975
+ const deletePost = async (postId, permanent = false) => {
2976
2976
  const client = getActiveClient();
2977
2977
  client.log('post/deletePost', postId);
2978
2978
  // API-FIX: This endpoint has not been implemented yet.
@@ -3263,11 +3263,16 @@ var Amity = (function (exports, jsBase64, nativeIdGenerator, debug, axios, HttpA
3263
3263
  * @category Comment API
3264
3264
  * @async
3265
3265
  */
3266
- const deleteComment = async (commentId) => {
3266
+ const deleteComment = async (commentId, permanent = false) => {
3267
3267
  const client = getActiveClient();
3268
3268
  client.log('comment/deleteComment', commentId);
3269
3269
  // API-FIX: This endpoint has not been implemented yet.
3270
- await client.http.delete(`/api/v3/comments/${commentId}`);
3270
+ await client.http.delete(`/api/v4/comments/${commentId}`, {
3271
+ params: {
3272
+ commentId,
3273
+ permanent,
3274
+ },
3275
+ });
3271
3276
  const deleted = await getComment(commentId);
3272
3277
  const post = await getPost(deleted.referenceId);
3273
3278
  fireEvent('v3.post.didUpdate', { posts: [post] });
@@ -12,5 +12,5 @@
12
12
  * @category Post API
13
13
  * @async
14
14
  */
15
- export declare const deletePost: (postId: Amity.Post['postId'], permanent?: boolean | undefined) => Promise<Amity.Post<any>>;
15
+ export declare const deletePost: (postId: Amity.Post['postId'], permanent?: boolean) => Promise<Amity.Post<any>>;
16
16
  //# sourceMappingURL=deletePost.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deletePost.d.ts","sourceRoot":"","sources":["../../../src/post/api/deletePost.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,WACb,MAAM,IAAI,CAAC,QAAQ,CAAC,8DA2B7B,CAAA"}
1
+ {"version":3,"file":"deletePost.d.ts","sourceRoot":"","sources":["../../../src/post/api/deletePost.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,WACb,MAAM,IAAI,CAAC,QAAQ,CAAC,cACjB,OAAO,6BA0BnB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "0.0.1-9f07ffa.0",
3
+ "version": "0.0.1-a495d12.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",
@@ -21,13 +21,19 @@ import { getPost } from '~/post/api/getPost'
21
21
  */
22
22
  export const deleteComment = async (
23
23
  commentId: Amity.Comment['commentId'],
24
+ permanent: boolean = false,
24
25
  ) => {
25
26
  const client = getActiveClient()
26
27
  client.log('comment/deleteComment', commentId)
27
28
 
28
29
  // API-FIX: This endpoint has not been implemented yet.
29
30
  await client.http.delete<{ success: boolean }>(
30
- `/api/v3/comments/${commentId}`,
31
+ `/api/v4/comments/${commentId}`, {
32
+ params: {
33
+ commentId,
34
+ permanent,
35
+ },
36
+ },
31
37
  )
32
38
 
33
39
  const deleted = await getComment(commentId)
@@ -19,7 +19,7 @@ import { decoratePayload, toPage, toToken } from '~/core/query'
19
19
  * @async
20
20
  **/
21
21
  export const queryGlobalFeed = async (query?: {
22
- dataTypes?: ('video' | 'image' | 'file')[]
22
+ dataTypes?: ('video' | 'image' | 'file' | 'liveStream')[]
23
23
  page?: Amity.Page
24
24
  }) => {
25
25
  const client = getActiveClient()
@@ -20,7 +20,7 @@ import { getPost } from './getPost'
20
20
  */
21
21
  export const deletePost = async (
22
22
  postId: Amity.Post['postId'],
23
- permanent?: boolean,
23
+ permanent: boolean = false,
24
24
  ) => {
25
25
  const client = getActiveClient()
26
26
  client.log('post/deletePost', postId)