@hubs101/js-api-skd-client 1.0.10566 → 1.0.10568
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/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);
|
|
@@ -10,6 +10,7 @@ export declare const _rateSession: (basePath: string, token: string, sessionId:
|
|
|
10
10
|
}) => Promise<APIResponse>;
|
|
11
11
|
export declare const _reserveSeat: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
12
12
|
export declare const _removeSeat: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
13
|
+
export declare const _removeSeatNative: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
13
14
|
export declare const _watchSession: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
14
15
|
export declare const _postSessionComment: (basePath: string, token: string, sessionId: string, message: string) => Promise<Session>;
|
|
15
16
|
export declare const _refetchSessionDiscussion: (basePath: string, token: string, sessionId: string) => Promise<Session>;
|
|
@@ -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._fetchColocatedAgenda = exports._promoteSession = exports._deleteSession = exports._updateSession = exports._createSession = exports._fetchSelectedEventSessions = exports._reportSessionAction = exports._refetchSessionDiscussion = exports._postSessionComment = exports._watchSession = exports._removeSeat = exports._reserveSeat = exports._rateSession = exports._unpinSession = exports._pinSession = exports._fetchZoomSignature = exports._fetchAgenda = void 0;
|
|
12
|
+
exports._fetchColocatedAgenda = exports._promoteSession = exports._deleteSession = exports._updateSession = exports._createSession = exports._fetchSelectedEventSessions = exports._reportSessionAction = exports._refetchSessionDiscussion = exports._postSessionComment = exports._watchSession = exports._removeSeatNative = exports._removeSeat = exports._reserveSeat = exports._rateSession = exports._unpinSession = exports._pinSession = exports._fetchZoomSignature = exports._fetchAgenda = void 0;
|
|
13
13
|
const api_1 = require("../../utils/api");
|
|
14
14
|
const base_1 = require("../../utils/base");
|
|
15
15
|
const _fetchAgenda = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -50,9 +50,15 @@ const _reserveSeat = (basePath, token, sessionId) => __awaiter(void 0, void 0, v
|
|
|
50
50
|
exports._reserveSeat = _reserveSeat;
|
|
51
51
|
const _removeSeat = (basePath, token, sessionId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
52
|
const base = (0, base_1.getBasePath)(basePath);
|
|
53
|
-
return yield (0, api_1.deleteRequest)(`${base.SESSIONS}/${sessionId}/reserve`,
|
|
53
|
+
return yield (0, api_1.deleteRequest)(`${base.SESSIONS}/${sessionId}/reserve`, {}, token);
|
|
54
54
|
});
|
|
55
55
|
exports._removeSeat = _removeSeat;
|
|
56
|
+
const _removeSeatNative = (basePath, token, sessionId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
58
|
+
const response = yield (0, api_1.deleteRequest)(`${base.SESSIONS}/${sessionId}/reserve`, null, token);
|
|
59
|
+
return response;
|
|
60
|
+
});
|
|
61
|
+
exports._removeSeatNative = _removeSeatNative;
|
|
56
62
|
const _watchSession = (basePath, token, sessionId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
63
|
const base = (0, base_1.getBasePath)(basePath);
|
|
58
64
|
return yield (0, api_1.getRequest)(`${base.SESSIONS}/${sessionId}/watch`, token);
|
package/lib/index.js
CHANGED
|
@@ -731,6 +731,10 @@ function EventAPIProvider(props) {
|
|
|
731
731
|
(0, api_1.validateConfig)(config);
|
|
732
732
|
return (0, sessions_1._removeSeat)(config.baseUrl, config.token, sessionId);
|
|
733
733
|
}), [config, config.baseUrl, config.token]);
|
|
734
|
+
const removeSeatNative = react_1.default.useCallback((sessionId) => __awaiter(this, void 0, void 0, function* () {
|
|
735
|
+
(0, api_1.validateConfig)(config);
|
|
736
|
+
return (0, sessions_1._removeSeatNative)(config.baseUrl, config.token, sessionId);
|
|
737
|
+
}), [config, config.baseUrl, config.token]);
|
|
734
738
|
const watchSession = react_1.default.useCallback((sessionId) => __awaiter(this, void 0, void 0, function* () {
|
|
735
739
|
(0, api_1.validateConfig)(config);
|
|
736
740
|
return (0, sessions_1._watchSession)(config.baseUrl, config.token, sessionId);
|
|
@@ -811,9 +815,9 @@ function EventAPIProvider(props) {
|
|
|
811
815
|
(0, api_1.validateConfig)(config);
|
|
812
816
|
return (0, posts_1._unlikeComment)(config.baseUrl, config.token, postId, commentId);
|
|
813
817
|
}), [config, config.baseUrl, config.token]);
|
|
814
|
-
const
|
|
818
|
+
const unlikePostNative = react_1.default.useCallback((postId) => __awaiter(this, void 0, void 0, function* () {
|
|
815
819
|
(0, api_1.validateConfig)(config);
|
|
816
|
-
return (0, posts_1.
|
|
820
|
+
return (0, posts_1._unlikePostNative)(config.baseUrl, config.token, postId);
|
|
817
821
|
}), [config, config.baseUrl, config.token]);
|
|
818
822
|
const addComment = react_1.default.useCallback((postId, body) => __awaiter(this, void 0, void 0, function* () {
|
|
819
823
|
(0, api_1.validateConfig)(config);
|
|
@@ -1261,6 +1265,7 @@ function EventAPIProvider(props) {
|
|
|
1261
1265
|
rateSession,
|
|
1262
1266
|
reserveSeat,
|
|
1263
1267
|
removeSeat,
|
|
1268
|
+
removeSeatNative,
|
|
1264
1269
|
watchSession,
|
|
1265
1270
|
postSessionComment,
|
|
1266
1271
|
refetchSessionDiscussion,
|
|
@@ -1281,7 +1286,7 @@ function EventAPIProvider(props) {
|
|
|
1281
1286
|
unlikePost,
|
|
1282
1287
|
likeComment,
|
|
1283
1288
|
unlikeComment,
|
|
1284
|
-
|
|
1289
|
+
unlikePostNative,
|
|
1285
1290
|
addComment,
|
|
1286
1291
|
addPost,
|
|
1287
1292
|
updatePost,
|
|
@@ -1516,6 +1521,7 @@ exports.BaseAPI = {
|
|
|
1516
1521
|
rateSession: sessions_1._rateSession,
|
|
1517
1522
|
reserveSeat: sessions_1._reserveSeat,
|
|
1518
1523
|
removeSeat: sessions_1._removeSeat,
|
|
1524
|
+
removeSeatNative: sessions_1._removeSeatNative,
|
|
1519
1525
|
watchSession: sessions_1._watchSession,
|
|
1520
1526
|
postSessionComment: sessions_1._postSessionComment,
|
|
1521
1527
|
refetchSessionDiscussion: sessions_1._refetchSessionDiscussion,
|
|
@@ -1537,7 +1543,7 @@ exports.BaseAPI = {
|
|
|
1537
1543
|
unlikePost: posts_1._unlikePost,
|
|
1538
1544
|
likeComment: posts_1._likeComment,
|
|
1539
1545
|
unlikeComment: posts_1._unlikeComment,
|
|
1540
|
-
|
|
1546
|
+
unlikePostNative: posts_1._unlikePostNative,
|
|
1541
1547
|
addComment: posts_1._addComment,
|
|
1542
1548
|
addPost: posts_1._addPost,
|
|
1543
1549
|
updatePost: posts_1._updatePost,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -244,6 +244,7 @@ export type BaseAPIType = {
|
|
|
244
244
|
}) => Promise<APIResponse>;
|
|
245
245
|
reserveSeat: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
246
246
|
removeSeat: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
247
|
+
removeSeatNative: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
247
248
|
watchSession: (basePath: string, token: string, sessionId: string) => Promise<APIResponse>;
|
|
248
249
|
postSessionComment: (basePath: string, token: string, sessionId: string, message: string) => Promise<Session>;
|
|
249
250
|
refetchSessionDiscussion: (basePath: string, token: string, sessionId: string) => Promise<Session>;
|
|
@@ -264,7 +265,7 @@ export type BaseAPIType = {
|
|
|
264
265
|
unlikePost: (basePath: string, token: string, postId: string) => Promise<Post>;
|
|
265
266
|
likeComment: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
|
|
266
267
|
unlikeComment: (basePath: string, token: string, postId: string, commentId: string) => Promise<Post>;
|
|
267
|
-
|
|
268
|
+
unlikePostNative: (basePath: string, token: string, postId: string) => Promise<Post>;
|
|
268
269
|
addComment: (basePath: string, token: string, postId: string, body: CommentBody) => Promise<Comment>;
|
|
269
270
|
addPost: (basePath: string, token: string, body: PostBody) => Promise<Post>;
|
|
270
271
|
updatePost: (basePath: string, token: string, postId: string, body: UpdatePostBody) => Promise<Post>;
|
|
@@ -528,6 +529,7 @@ export type EventAPIType = {
|
|
|
528
529
|
}) => Promise<APIResponse>;
|
|
529
530
|
reserveSeat: (sessionId: string) => Promise<APIResponse>;
|
|
530
531
|
removeSeat: (sessionId: string) => Promise<APIResponse>;
|
|
532
|
+
removeSeatNative: (sessionId: string) => Promise<APIResponse>;
|
|
531
533
|
watchSession: (sessionId: string) => Promise<APIResponse>;
|
|
532
534
|
postSessionComment: (sessionId: string, message: string) => Promise<Session>;
|
|
533
535
|
refetchSessionDiscussion: (sessionId: string) => Promise<Session>;
|
|
@@ -549,7 +551,7 @@ export type EventAPIType = {
|
|
|
549
551
|
unlikePost: (postId: string) => Promise<Post>;
|
|
550
552
|
likeComment: (postId: string, commentId: string) => Promise<Post>;
|
|
551
553
|
unlikeComment: (postId: string, commentId: string) => Promise<Post>;
|
|
552
|
-
|
|
554
|
+
unlikePostNative: (postId: string, commentId: string) => Promise<Post>;
|
|
553
555
|
addComment: (postId: string, body: CommentBody) => Promise<Comment>;
|
|
554
556
|
addPost: (body: PostBody) => Promise<Post>;
|
|
555
557
|
addPostNative: (body: FormData) => Promise<Post>;
|