@hubs101/js-api-skd-client 1.0.10571 → 1.0.10572

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.
@@ -6,6 +6,7 @@ export declare const _likePost: (basePath: string, token: string, postId: string
6
6
  export declare const _unlikePost: (basePath: string, token: string, postId: string) => Promise<Post>;
7
7
  export declare const _likeComment: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
8
8
  export declare const _unlikeComment: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
9
+ export declare const _unlikeCommentNative: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
9
10
  export declare const _unlikePostNative: (basePath: string, token: string, postId: string) => Promise<Post>;
10
11
  export declare const _addComment: (basePath: string, token: string, postId: string, body: CommentBody) => Promise<Comment>;
11
12
  export declare const _addPost: (basePath: string, token: string, body: PostBody) => Promise<Post>;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports._addPostNative = exports._deleteComment = exports._deletePost = exports._updatePost = exports._addPost = exports._addComment = exports._unlikePostNative = exports._unlikeComment = exports._likeComment = exports._unlikePost = exports._likePost = exports._fetchPostDetails = exports._fetchPosts = void 0;
12
+ exports._addPostNative = exports._deleteComment = exports._deletePost = exports._updatePost = exports._addPost = exports._addComment = exports._unlikePostNative = exports._unlikeCommentNative = exports._unlikeComment = exports._likeComment = exports._unlikePost = exports._likePost = exports._fetchPostDetails = exports._fetchPosts = void 0;
13
13
  const api_1 = require("../../utils/api");
14
14
  const base_1 = require("../../utils/base");
15
15
  const _fetchPosts = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -50,6 +50,12 @@ const _unlikeComment = (basePath, token, postId, commentId) => __awaiter(void 0,
50
50
  return response;
51
51
  });
52
52
  exports._unlikeComment = _unlikeComment;
53
+ const _unlikeCommentNative = (basePath, token, postId, commentId) => __awaiter(void 0, void 0, void 0, function* () {
54
+ const base = (0, base_1.getBasePath)(basePath);
55
+ const response = yield (0, api_1.deleteRequest)(`${base.POSTS}/${postId}/comment/${commentId}/like`, null, token);
56
+ return response;
57
+ });
58
+ exports._unlikeCommentNative = _unlikeCommentNative;
53
59
  const _unlikePostNative = (basePath, token, postId) => __awaiter(void 0, void 0, void 0, function* () {
54
60
  const base = (0, base_1.getBasePath)(basePath);
55
61
  const response = yield (0, api_1.deleteRequest)(`${base.POSTS}/${postId}/like`, {}, token);
package/lib/index.js CHANGED
@@ -815,6 +815,10 @@ function EventAPIProvider(props) {
815
815
  (0, api_1.validateConfig)(config);
816
816
  return (0, posts_1._unlikeComment)(config.baseUrl, config.token, postId, commentId);
817
817
  }), [config, config.baseUrl, config.token]);
818
+ const unlikeCommentNative = react_1.default.useCallback((postId, commentId) => __awaiter(this, void 0, void 0, function* () {
819
+ (0, api_1.validateConfig)(config);
820
+ return (0, posts_1._unlikeCommentNative)(config.baseUrl, config.token, postId, commentId);
821
+ }), [config, config.baseUrl, config.token]);
818
822
  const unlikePostNative = react_1.default.useCallback((postId) => __awaiter(this, void 0, void 0, function* () {
819
823
  (0, api_1.validateConfig)(config);
820
824
  return (0, posts_1._unlikePostNative)(config.baseUrl, config.token, postId);
@@ -1286,6 +1290,7 @@ function EventAPIProvider(props) {
1286
1290
  unlikePost,
1287
1291
  likeComment,
1288
1292
  unlikeComment,
1293
+ unlikeCommentNative,
1289
1294
  unlikePostNative,
1290
1295
  addComment,
1291
1296
  addPost,
@@ -1543,6 +1548,7 @@ exports.BaseAPI = {
1543
1548
  unlikePost: posts_1._unlikePost,
1544
1549
  likeComment: posts_1._likeComment,
1545
1550
  unlikeComment: posts_1._unlikeComment,
1551
+ unlikeCommentNative: posts_1._unlikeCommentNative,
1546
1552
  unlikePostNative: posts_1._unlikePostNative,
1547
1553
  addComment: posts_1._addComment,
1548
1554
  addPost: posts_1._addPost,
@@ -265,6 +265,7 @@ export type BaseAPIType = {
265
265
  unlikePost: (basePath: string, token: string, postId: string) => Promise<Post>;
266
266
  likeComment: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
267
267
  unlikeComment: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
268
+ unlikeCommentNative: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
268
269
  unlikePostNative: (basePath: string, token: string, postId: string) => Promise<Post>;
269
270
  addComment: (basePath: string, token: string, postId: string, body: CommentBody) => Promise<Comment>;
270
271
  addPost: (basePath: string, token: string, body: PostBody) => Promise<Post>;
@@ -551,6 +552,7 @@ export type EventAPIType = {
551
552
  unlikePost: (postId: string) => Promise<Post>;
552
553
  likeComment: (postId: string, commentId: string) => Promise<Post>;
553
554
  unlikeComment: (postId: string, commentId: string) => Promise<Post>;
555
+ unlikeCommentNative: (postId: string, commentId: string) => Promise<Post>;
554
556
  unlikePostNative: (postId: string) => Promise<Post>;
555
557
  addComment: (postId: string, body: CommentBody) => Promise<Comment>;
556
558
  addPost: (body: PostBody) => Promise<Post>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10571",
3
+ "version": "1.0.10572",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",