@hubs101/js-api-skd-client 1.0.10567 → 1.0.10569
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/event/index.js +1 -1
- package/lib/api/posts/index.d.ts +1 -1
- package/lib/api/posts/index.js +4 -4
- package/lib/index.js +4 -4
- package/lib/types/base.d.ts +2 -2
- package/package.json +1 -1
package/lib/api/event/index.js
CHANGED
|
@@ -120,7 +120,7 @@ const _deleteSpeakerRole = (basePath, token, attendeeId) => __awaiter(void 0, vo
|
|
|
120
120
|
exports._deleteSpeakerRole = _deleteSpeakerRole;
|
|
121
121
|
const _deleteGroup = (basePath, token, groupId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
122
122
|
const base = (0, base_1.getBasePath)(basePath);
|
|
123
|
-
const response = yield (0, api_1.deleteRequest)(`${base.GROUPS}/${groupId}`,
|
|
123
|
+
const response = yield (0, api_1.deleteRequest)(`${base.GROUPS}/${groupId}`, null, token);
|
|
124
124
|
return response;
|
|
125
125
|
});
|
|
126
126
|
exports._deleteGroup = _deleteGroup;
|
package/lib/api/posts/index.d.ts
CHANGED
|
@@ -6,7 +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
|
|
9
|
+
export declare const _unlikePostNative: (basePath: string, token: string, postId: string) => Promise<Post>;
|
|
10
10
|
export declare const _addComment: (basePath: string, token: string, postId: string, body: CommentBody) => Promise<Comment>;
|
|
11
11
|
export declare const _addPost: (basePath: string, token: string, body: PostBody) => Promise<Post>;
|
|
12
12
|
export declare const _updatePost: (basePath: string, token: string, postId: string, body: UpdatePostBody) => Promise<Post>;
|
package/lib/api/posts/index.js
CHANGED
|
@@ -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.
|
|
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;
|
|
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,12 +50,12 @@ const _unlikeComment = (basePath, token, postId, commentId) => __awaiter(void 0,
|
|
|
50
50
|
return response;
|
|
51
51
|
});
|
|
52
52
|
exports._unlikeComment = _unlikeComment;
|
|
53
|
-
const
|
|
53
|
+
const _unlikePostNative = (basePath, token, postId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
54
|
const base = (0, base_1.getBasePath)(basePath);
|
|
55
|
-
const response = yield (0, api_1.deleteRequest)(`${base.POSTS}/${postId}/
|
|
55
|
+
const response = yield (0, api_1.deleteRequest)(`${base.POSTS}/${postId}/like`, {}, token);
|
|
56
56
|
return response;
|
|
57
57
|
});
|
|
58
|
-
exports.
|
|
58
|
+
exports._unlikePostNative = _unlikePostNative;
|
|
59
59
|
const _addComment = (basePath, token, postId, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
60
|
const base = (0, base_1.getBasePath)(basePath);
|
|
61
61
|
const comment = yield (0, api_1.postRequest)(`${base.POSTS}/${postId}/comment`, body, token);
|
package/lib/index.js
CHANGED
|
@@ -815,9 +815,9 @@ 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
|
|
818
|
+
const unlikePostNative = react_1.default.useCallback((postId) => __awaiter(this, void 0, void 0, function* () {
|
|
819
819
|
(0, api_1.validateConfig)(config);
|
|
820
|
-
return (0, posts_1.
|
|
820
|
+
return (0, posts_1._unlikePostNative)(config.baseUrl, config.token, postId);
|
|
821
821
|
}), [config, config.baseUrl, config.token]);
|
|
822
822
|
const addComment = react_1.default.useCallback((postId, body) => __awaiter(this, void 0, void 0, function* () {
|
|
823
823
|
(0, api_1.validateConfig)(config);
|
|
@@ -1286,7 +1286,7 @@ function EventAPIProvider(props) {
|
|
|
1286
1286
|
unlikePost,
|
|
1287
1287
|
likeComment,
|
|
1288
1288
|
unlikeComment,
|
|
1289
|
-
|
|
1289
|
+
unlikePostNative,
|
|
1290
1290
|
addComment,
|
|
1291
1291
|
addPost,
|
|
1292
1292
|
updatePost,
|
|
@@ -1543,7 +1543,7 @@ exports.BaseAPI = {
|
|
|
1543
1543
|
unlikePost: posts_1._unlikePost,
|
|
1544
1544
|
likeComment: posts_1._likeComment,
|
|
1545
1545
|
unlikeComment: posts_1._unlikeComment,
|
|
1546
|
-
|
|
1546
|
+
unlikePostNative: posts_1._unlikePostNative,
|
|
1547
1547
|
addComment: posts_1._addComment,
|
|
1548
1548
|
addPost: posts_1._addPost,
|
|
1549
1549
|
updatePost: posts_1._updatePost,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -265,7 +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
|
-
|
|
268
|
+
unlikePostNative: (basePath: string, token: string, postId: string) => Promise<Post>;
|
|
269
269
|
addComment: (basePath: string, token: string, postId: string, body: CommentBody) => Promise<Comment>;
|
|
270
270
|
addPost: (basePath: string, token: string, body: PostBody) => Promise<Post>;
|
|
271
271
|
updatePost: (basePath: string, token: string, postId: string, body: UpdatePostBody) => Promise<Post>;
|
|
@@ -551,7 +551,7 @@ export type EventAPIType = {
|
|
|
551
551
|
unlikePost: (postId: string) => Promise<Post>;
|
|
552
552
|
likeComment: (postId: string, commentId: string) => Promise<Post>;
|
|
553
553
|
unlikeComment: (postId: string, commentId: string) => Promise<Post>;
|
|
554
|
-
|
|
554
|
+
unlikePostNative: (postId: string) => Promise<Post>;
|
|
555
555
|
addComment: (postId: string, body: CommentBody) => Promise<Comment>;
|
|
556
556
|
addPost: (body: PostBody) => Promise<Post>;
|
|
557
557
|
addPostNative: (body: FormData) => Promise<Post>;
|