@replyke/core 7.0.0-beta.2 → 7.0.0-beta.21
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/dist/cjs/hooks/auth/useAuth.d.ts +1 -1
- package/dist/cjs/hooks/auth/useAuth.js +2 -2
- package/dist/cjs/hooks/auth/useAuth.js.map +1 -1
- package/dist/cjs/hooks/collections/index.d.ts +4 -0
- package/dist/cjs/hooks/collections/index.js +16 -0
- package/dist/cjs/hooks/collections/index.js.map +1 -0
- package/dist/cjs/hooks/collections/useCollectionEntitiesWrapper.d.ts +21 -0
- package/dist/cjs/hooks/collections/useCollectionEntitiesWrapper.js +209 -0
- package/dist/cjs/hooks/collections/useCollectionEntitiesWrapper.js.map +1 -0
- package/dist/cjs/hooks/collections/useCollections.d.ts +43 -0
- package/dist/cjs/hooks/collections/useCollections.js +277 -0
- package/dist/cjs/hooks/collections/useCollections.js.map +1 -0
- package/dist/cjs/hooks/collections/useCollectionsActions.d.ts +21 -0
- package/dist/cjs/hooks/{lists/useListsActions.js → collections/useCollectionsActions.js} +112 -118
- package/dist/cjs/hooks/collections/useCollectionsActions.js.map +1 -0
- package/dist/cjs/hooks/{lists → collections}/useIsEntitySaved.d.ts +2 -2
- package/dist/cjs/hooks/{lists → collections}/useIsEntitySaved.js +3 -3
- package/dist/cjs/hooks/collections/useIsEntitySaved.js.map +1 -0
- package/dist/cjs/hooks/comments/index.d.ts +2 -1
- package/dist/cjs/hooks/comments/index.js +3 -3
- package/dist/cjs/hooks/comments/index.js.map +1 -1
- package/dist/cjs/hooks/comments/useCommentSectionData.js +24 -11
- package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/cjs/hooks/comments/useCommentVotes.d.ts +2 -0
- package/dist/cjs/hooks/comments/useCommentVotes.js +7 -0
- package/dist/cjs/hooks/comments/useCommentVotes.js.map +1 -1
- package/dist/cjs/hooks/comments/useEntityComments.d.ts +2 -1
- package/dist/cjs/hooks/comments/useEntityComments.js +2 -1
- package/dist/cjs/hooks/comments/useEntityComments.js.map +1 -1
- package/dist/cjs/hooks/comments/useFetchComment.d.ts +3 -4
- package/dist/cjs/hooks/comments/useFetchComment.js +7 -5
- package/dist/cjs/hooks/comments/useFetchComment.js.map +1 -1
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.d.ts +3 -4
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js +9 -6
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js.map +1 -1
- package/dist/cjs/hooks/comments/useFetchManyComments.d.ts +2 -2
- package/dist/cjs/hooks/comments/useFetchManyComments.js +5 -7
- package/dist/cjs/hooks/comments/useFetchManyComments.js.map +1 -1
- package/dist/cjs/hooks/comments/useFetchManyCommentsWrapper.d.ts +21 -0
- package/dist/cjs/hooks/comments/{useProfileComments.js → useFetchManyCommentsWrapper.js} +40 -18
- package/dist/cjs/hooks/comments/useFetchManyCommentsWrapper.js.map +1 -0
- package/dist/cjs/hooks/comments/useReplies.js +1 -0
- package/dist/cjs/hooks/comments/useReplies.js.map +1 -1
- package/dist/cjs/hooks/entities/index.d.ts +2 -0
- package/dist/cjs/hooks/entities/index.js +3 -1
- package/dist/cjs/hooks/entities/index.js.map +1 -1
- package/dist/cjs/hooks/entities/useEntityData.js +1 -9
- package/dist/cjs/hooks/entities/useEntityData.js.map +1 -1
- package/dist/cjs/hooks/entities/useEntityVotes.d.ts +2 -0
- package/dist/cjs/hooks/entities/useEntityVotes.js +9 -0
- package/dist/cjs/hooks/entities/useEntityVotes.js.map +1 -1
- package/dist/cjs/hooks/entities/useFetchManyEntitiesWrapper.d.ts +41 -0
- package/dist/cjs/hooks/entities/useFetchManyEntitiesWrapper.js +241 -0
- package/dist/cjs/hooks/entities/useFetchManyEntitiesWrapper.js.map +1 -0
- package/dist/cjs/hooks/entity-lists/index.d.ts +1 -1
- package/dist/cjs/hooks/entity-lists/useEntityList.d.ts +2 -2
- package/dist/cjs/hooks/entity-lists/useEntityList.js +45 -17
- package/dist/cjs/hooks/entity-lists/useEntityList.js.map +1 -1
- package/dist/cjs/hooks/entity-lists/useEntityListActions.d.ts +6 -3
- package/dist/cjs/hooks/entity-lists/useEntityListActions.js +3 -0
- package/dist/cjs/hooks/entity-lists/useEntityListActions.js.map +1 -1
- package/dist/cjs/hooks/space-lists/useSpaceList.js +1 -1
- package/dist/cjs/hooks/space-lists/useSpaceList.js.map +1 -1
- package/dist/cjs/hooks/spaces/index.d.ts +1 -0
- package/dist/cjs/hooks/spaces/index.js +3 -1
- package/dist/cjs/hooks/spaces/index.js.map +1 -1
- package/dist/cjs/hooks/spaces/useCheckMyMembership.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useCheckMyMembership.js +71 -0
- package/dist/cjs/hooks/spaces/useCheckMyMembership.js.map +1 -0
- package/dist/cjs/hooks/users/index.d.ts +1 -0
- package/dist/cjs/hooks/users/index.js +3 -1
- package/dist/cjs/hooks/users/index.js.map +1 -1
- package/dist/cjs/hooks/users/useFetchUserByUsername.d.ts +5 -0
- package/dist/cjs/hooks/users/useFetchUserByUsername.js +72 -0
- package/dist/cjs/hooks/users/useFetchUserByUsername.js.map +1 -0
- package/dist/cjs/index.d.ts +8 -8
- package/dist/cjs/index.js +11 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/models/{List.d.ts → Collection.d.ts} +2 -4
- package/dist/cjs/interfaces/models/{List.js → Collection.js} +1 -1
- package/dist/cjs/interfaces/models/Collection.js.map +1 -0
- package/dist/cjs/interfaces/models/Comment.d.ts +5 -1
- package/dist/cjs/interfaces/models/Space.d.ts +13 -0
- package/dist/cjs/store/api/appNotificationsApi.d.ts +181 -181
- package/dist/cjs/store/api/baseApi.d.ts +1 -1
- package/dist/cjs/store/api/baseApi.js +2 -1
- package/dist/cjs/store/api/baseApi.js.map +1 -1
- package/dist/cjs/store/api/collectionsApi.d.ts +4541 -0
- package/dist/cjs/store/api/collectionsApi.js +244 -0
- package/dist/cjs/store/api/collectionsApi.js.map +1 -0
- package/dist/cjs/store/api/entityListsApi.d.ts +111 -110
- package/dist/cjs/store/api/entityListsApi.js +13 -8
- package/dist/cjs/store/api/entityListsApi.js.map +1 -1
- package/dist/cjs/store/api/index.d.ts +1 -1
- package/dist/cjs/store/api/index.js +2 -2
- package/dist/cjs/store/api/index.js.map +1 -1
- package/dist/cjs/store/api/spacesApi.d.ts +950 -950
- package/dist/cjs/store/api/userApi.d.ts +3 -3
- package/dist/cjs/store/index.d.ts +4 -4
- package/dist/cjs/store/rootReducer.d.ts +4 -4
- package/dist/cjs/store/rootReducer.js +2 -2
- package/dist/cjs/store/rootReducer.js.map +1 -1
- package/dist/cjs/store/slices/authSlice.d.ts +1 -3
- package/dist/cjs/store/slices/authSlice.js +3 -9
- package/dist/cjs/store/slices/authSlice.js.map +1 -1
- package/dist/cjs/store/slices/authThunks.js +0 -3
- package/dist/cjs/store/slices/authThunks.js.map +1 -1
- package/dist/cjs/store/slices/collectionsSlice.d.ts +427 -0
- package/dist/cjs/store/slices/collectionsSlice.js +211 -0
- package/dist/cjs/store/slices/collectionsSlice.js.map +1 -0
- package/dist/cjs/store/slices/entityListsSlice.d.ts +80 -63
- package/dist/cjs/store/slices/entityListsSlice.js +45 -21
- package/dist/cjs/store/slices/entityListsSlice.js.map +1 -1
- package/dist/cjs/store/slices/spaceListsSlice.d.ts +1 -1
- package/dist/cjs/utils/env.js +3 -3
- package/dist/esm/hooks/auth/useAuth.d.ts +1 -1
- package/dist/esm/hooks/auth/useAuth.js +3 -3
- package/dist/esm/hooks/auth/useAuth.js.map +1 -1
- package/dist/esm/hooks/collections/index.d.ts +4 -0
- package/dist/esm/hooks/collections/index.js +6 -0
- package/dist/esm/hooks/collections/index.js.map +1 -0
- package/dist/esm/hooks/collections/useCollectionEntitiesWrapper.d.ts +21 -0
- package/dist/esm/hooks/collections/useCollectionEntitiesWrapper.js +204 -0
- package/dist/esm/hooks/collections/useCollectionEntitiesWrapper.js.map +1 -0
- package/dist/esm/hooks/collections/useCollections.d.ts +43 -0
- package/dist/esm/hooks/collections/useCollections.js +272 -0
- package/dist/esm/hooks/collections/useCollections.js.map +1 -0
- package/dist/esm/hooks/collections/useCollectionsActions.d.ts +21 -0
- package/dist/esm/hooks/{lists/useListsActions.js → collections/useCollectionsActions.js} +103 -109
- package/dist/esm/hooks/collections/useCollectionsActions.js.map +1 -0
- package/dist/esm/hooks/{lists → collections}/useIsEntitySaved.d.ts +2 -2
- package/dist/esm/hooks/{lists → collections}/useIsEntitySaved.js +3 -3
- package/dist/esm/hooks/collections/useIsEntitySaved.js.map +1 -0
- package/dist/esm/hooks/comments/index.d.ts +2 -1
- package/dist/esm/hooks/comments/index.js +1 -1
- package/dist/esm/hooks/comments/index.js.map +1 -1
- package/dist/esm/hooks/comments/useCommentSectionData.js +24 -11
- package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/esm/hooks/comments/useCommentVotes.d.ts +2 -0
- package/dist/esm/hooks/comments/useCommentVotes.js +7 -0
- package/dist/esm/hooks/comments/useCommentVotes.js.map +1 -1
- package/dist/esm/hooks/comments/useEntityComments.d.ts +2 -1
- package/dist/esm/hooks/comments/useEntityComments.js +2 -1
- package/dist/esm/hooks/comments/useEntityComments.js.map +1 -1
- package/dist/esm/hooks/comments/useFetchComment.d.ts +3 -4
- package/dist/esm/hooks/comments/useFetchComment.js +7 -5
- package/dist/esm/hooks/comments/useFetchComment.js.map +1 -1
- package/dist/esm/hooks/comments/useFetchCommentByForeignId.d.ts +3 -4
- package/dist/esm/hooks/comments/useFetchCommentByForeignId.js +9 -6
- package/dist/esm/hooks/comments/useFetchCommentByForeignId.js.map +1 -1
- package/dist/esm/hooks/comments/useFetchManyComments.d.ts +2 -2
- package/dist/esm/hooks/comments/useFetchManyComments.js +5 -7
- package/dist/esm/hooks/comments/useFetchManyComments.js.map +1 -1
- package/dist/esm/hooks/comments/useFetchManyCommentsWrapper.d.ts +21 -0
- package/dist/esm/hooks/comments/{useProfileComments.js → useFetchManyCommentsWrapper.js} +40 -18
- package/dist/esm/hooks/comments/useFetchManyCommentsWrapper.js.map +1 -0
- package/dist/esm/hooks/comments/useReplies.js +1 -0
- package/dist/esm/hooks/comments/useReplies.js.map +1 -1
- package/dist/esm/hooks/entities/index.d.ts +2 -0
- package/dist/esm/hooks/entities/index.js +1 -0
- package/dist/esm/hooks/entities/index.js.map +1 -1
- package/dist/esm/hooks/entities/useEntityData.js +1 -9
- package/dist/esm/hooks/entities/useEntityData.js.map +1 -1
- package/dist/esm/hooks/entities/useEntityVotes.d.ts +2 -0
- package/dist/esm/hooks/entities/useEntityVotes.js +9 -0
- package/dist/esm/hooks/entities/useEntityVotes.js.map +1 -1
- package/dist/esm/hooks/entities/useFetchManyEntitiesWrapper.d.ts +41 -0
- package/dist/esm/hooks/entities/useFetchManyEntitiesWrapper.js +236 -0
- package/dist/esm/hooks/entities/useFetchManyEntitiesWrapper.js.map +1 -0
- package/dist/esm/hooks/entity-lists/index.d.ts +1 -1
- package/dist/esm/hooks/entity-lists/useEntityList.d.ts +2 -2
- package/dist/esm/hooks/entity-lists/useEntityList.js +46 -18
- package/dist/esm/hooks/entity-lists/useEntityList.js.map +1 -1
- package/dist/esm/hooks/entity-lists/useEntityListActions.d.ts +6 -3
- package/dist/esm/hooks/entity-lists/useEntityListActions.js +3 -0
- package/dist/esm/hooks/entity-lists/useEntityListActions.js.map +1 -1
- package/dist/esm/hooks/space-lists/useSpaceList.js +1 -1
- package/dist/esm/hooks/space-lists/useSpaceList.js.map +1 -1
- package/dist/esm/hooks/spaces/index.d.ts +1 -0
- package/dist/esm/hooks/spaces/index.js +1 -0
- package/dist/esm/hooks/spaces/index.js.map +1 -1
- package/dist/esm/hooks/spaces/useCheckMyMembership.d.ts +5 -0
- package/dist/esm/hooks/spaces/useCheckMyMembership.js +66 -0
- package/dist/esm/hooks/spaces/useCheckMyMembership.js.map +1 -0
- package/dist/esm/hooks/users/index.d.ts +1 -0
- package/dist/esm/hooks/users/index.js +1 -0
- package/dist/esm/hooks/users/index.js.map +1 -1
- package/dist/esm/hooks/users/useFetchUserByUsername.d.ts +5 -0
- package/dist/esm/hooks/users/useFetchUserByUsername.js +67 -0
- package/dist/esm/hooks/users/useFetchUserByUsername.js.map +1 -0
- package/dist/esm/index.d.ts +8 -8
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/models/{List.d.ts → Collection.d.ts} +2 -4
- package/dist/esm/interfaces/models/Collection.js +2 -0
- package/dist/esm/interfaces/models/Collection.js.map +1 -0
- package/dist/esm/interfaces/models/Comment.d.ts +5 -1
- package/dist/esm/interfaces/models/Space.d.ts +13 -0
- package/dist/esm/store/api/appNotificationsApi.d.ts +181 -181
- package/dist/esm/store/api/baseApi.d.ts +1 -1
- package/dist/esm/store/api/baseApi.js +2 -1
- package/dist/esm/store/api/baseApi.js.map +1 -1
- package/dist/esm/store/api/collectionsApi.d.ts +4541 -0
- package/dist/esm/store/api/collectionsApi.js +241 -0
- package/dist/esm/store/api/collectionsApi.js.map +1 -0
- package/dist/esm/store/api/entityListsApi.d.ts +111 -110
- package/dist/esm/store/api/entityListsApi.js +13 -8
- package/dist/esm/store/api/entityListsApi.js.map +1 -1
- package/dist/esm/store/api/index.d.ts +1 -1
- package/dist/esm/store/api/index.js +2 -2
- package/dist/esm/store/api/index.js.map +1 -1
- package/dist/esm/store/api/spacesApi.d.ts +950 -950
- package/dist/esm/store/api/userApi.d.ts +3 -3
- package/dist/esm/store/index.d.ts +4 -4
- package/dist/esm/store/rootReducer.d.ts +4 -4
- package/dist/esm/store/rootReducer.js +2 -2
- package/dist/esm/store/rootReducer.js.map +1 -1
- package/dist/esm/store/slices/authSlice.d.ts +1 -3
- package/dist/esm/store/slices/authSlice.js +2 -7
- package/dist/esm/store/slices/authSlice.js.map +1 -1
- package/dist/esm/store/slices/authThunks.js +1 -4
- package/dist/esm/store/slices/authThunks.js.map +1 -1
- package/dist/esm/store/slices/collectionsSlice.d.ts +427 -0
- package/dist/esm/store/slices/collectionsSlice.js +202 -0
- package/dist/esm/store/slices/collectionsSlice.js.map +1 -0
- package/dist/esm/store/slices/entityListsSlice.d.ts +80 -63
- package/dist/esm/store/slices/entityListsSlice.js +44 -20
- package/dist/esm/store/slices/entityListsSlice.js.map +1 -1
- package/dist/esm/store/slices/spaceListsSlice.d.ts +1 -1
- package/dist/esm/utils/env.js +3 -3
- package/package.json +1 -1
- package/dist/cjs/hooks/comments/useProfileComments.d.ts +0 -18
- package/dist/cjs/hooks/comments/useProfileComments.js.map +0 -1
- package/dist/cjs/hooks/lists/index.d.ts +0 -3
- package/dist/cjs/hooks/lists/index.js +0 -14
- package/dist/cjs/hooks/lists/index.js.map +0 -1
- package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/cjs/hooks/lists/useLists.d.ts +0 -36
- package/dist/cjs/hooks/lists/useLists.js +0 -239
- package/dist/cjs/hooks/lists/useLists.js.map +0 -1
- package/dist/cjs/hooks/lists/useListsActions.d.ts +0 -21
- package/dist/cjs/hooks/lists/useListsActions.js.map +0 -1
- package/dist/cjs/interfaces/models/List.js.map +0 -1
- package/dist/cjs/store/api/listsApi.d.ts +0 -3564
- package/dist/cjs/store/api/listsApi.js +0 -288
- package/dist/cjs/store/api/listsApi.js.map +0 -1
- package/dist/cjs/store/slices/listsSlice.d.ts +0 -1911
- package/dist/cjs/store/slices/listsSlice.js +0 -211
- package/dist/cjs/store/slices/listsSlice.js.map +0 -1
- package/dist/esm/hooks/comments/useProfileComments.d.ts +0 -18
- package/dist/esm/hooks/comments/useProfileComments.js.map +0 -1
- package/dist/esm/hooks/lists/index.d.ts +0 -3
- package/dist/esm/hooks/lists/index.js +0 -5
- package/dist/esm/hooks/lists/index.js.map +0 -1
- package/dist/esm/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/esm/hooks/lists/useLists.d.ts +0 -36
- package/dist/esm/hooks/lists/useLists.js +0 -234
- package/dist/esm/hooks/lists/useLists.js.map +0 -1
- package/dist/esm/hooks/lists/useListsActions.d.ts +0 -21
- package/dist/esm/hooks/lists/useListsActions.js.map +0 -1
- package/dist/esm/interfaces/models/List.js +0 -2
- package/dist/esm/interfaces/models/List.js.map +0 -1
- package/dist/esm/store/api/listsApi.d.ts +0 -3564
- package/dist/esm/store/api/listsApi.js +0 -285
- package/dist/esm/store/api/listsApi.js.map +0 -1
- package/dist/esm/store/slices/listsSlice.d.ts +0 -1911
- package/dist/esm/store/slices/listsSlice.js +0 -202
- package/dist/esm/store/slices/listsSlice.js.map +0 -1
|
@@ -16,6 +16,7 @@ export { default as useJoinSpace } from "./useJoinSpace";
|
|
|
16
16
|
export { default as useLeaveSpace } from "./useLeaveSpace";
|
|
17
17
|
export { default as useFetchSpaceMembers } from "./useFetchSpaceMembers";
|
|
18
18
|
export { default as useFetchMySpaces } from "./useFetchMySpaces";
|
|
19
|
+
export { default as useCheckMyMembership } from "./useCheckMyMembership";
|
|
19
20
|
export { default as useUpdateMemberRole } from "./useUpdateMemberRole";
|
|
20
21
|
export { default as useApproveMember } from "./useApproveMember";
|
|
21
22
|
export { default as useDeclineMember } from "./useDeclineMember";
|
|
@@ -17,6 +17,7 @@ export { default as useJoinSpace } from "./useJoinSpace";
|
|
|
17
17
|
export { default as useLeaveSpace } from "./useLeaveSpace";
|
|
18
18
|
export { default as useFetchSpaceMembers } from "./useFetchSpaceMembers";
|
|
19
19
|
export { default as useFetchMySpaces } from "./useFetchMySpaces";
|
|
20
|
+
export { default as useCheckMyMembership } from "./useCheckMyMembership";
|
|
20
21
|
// Member management hooks
|
|
21
22
|
export { default as useUpdateMemberRole } from "./useUpdateMemberRole";
|
|
22
23
|
export { default as useApproveMember } from "./useApproveMember";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,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E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { useCallback } from "react";
|
|
38
|
+
import useProject from "../projects/useProject";
|
|
39
|
+
import useAxiosPrivate from "../../config/useAxiosPrivate";
|
|
40
|
+
function useCheckMyMembership() {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var projectId = useProject().projectId;
|
|
43
|
+
var axios = useAxiosPrivate();
|
|
44
|
+
var checkMyMembership = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
45
|
+
var response;
|
|
46
|
+
var spaceId = _b.spaceId;
|
|
47
|
+
return __generator(this, function (_c) {
|
|
48
|
+
switch (_c.label) {
|
|
49
|
+
case 0:
|
|
50
|
+
if (!projectId) {
|
|
51
|
+
throw new Error("No projectId available.");
|
|
52
|
+
}
|
|
53
|
+
if (!spaceId) {
|
|
54
|
+
throw new Error("Please pass a spaceId");
|
|
55
|
+
}
|
|
56
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId, "/membership/me"))];
|
|
57
|
+
case 1:
|
|
58
|
+
response = _c.sent();
|
|
59
|
+
return [2 /*return*/, response.data];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}); }, [projectId, axios]);
|
|
63
|
+
return checkMyMembership;
|
|
64
|
+
}
|
|
65
|
+
export default useCheckMyMembership;
|
|
66
|
+
//# sourceMappingURL=useCheckMyMembership.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCheckMyMembership.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useCheckMyMembership.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,SAAS,oBAAoB;IAA7B,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,iBAAiB,GAAG,WAAW,CACnC,gEAAO,EAAgC;;YAA9B,OAAO,aAAA;;;;oBACd,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,qBAAW,OAAO,mBAAgB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;SACtB,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as useFetchUser } from "./useFetchUser";
|
|
2
2
|
export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
|
|
3
|
+
export { default as useFetchUserByUsername } from "./useFetchUserByUsername";
|
|
3
4
|
export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
|
|
4
5
|
export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
|
|
5
6
|
export { default as useMentions } from "./useMentions";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as useFetchUser } from "./useFetchUser";
|
|
2
2
|
export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
|
|
3
|
+
export { default as useFetchUserByUsername } from "./useFetchUserByUsername";
|
|
3
4
|
export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
|
|
4
5
|
export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
|
|
5
6
|
export { default as useMentions } from "./useMentions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { useCallback } from "react";
|
|
38
|
+
import useProject from "../projects/useProject";
|
|
39
|
+
import axios from "../../config/axios";
|
|
40
|
+
function useFetchUserByUsername() {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var projectId = useProject().projectId;
|
|
43
|
+
var fetchUserByUsername = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
44
|
+
var response;
|
|
45
|
+
var username = _b.username;
|
|
46
|
+
return __generator(this, function (_c) {
|
|
47
|
+
switch (_c.label) {
|
|
48
|
+
case 0:
|
|
49
|
+
if (!projectId) {
|
|
50
|
+
throw new Error("No project specified");
|
|
51
|
+
}
|
|
52
|
+
if (!username) {
|
|
53
|
+
throw new Error("Please specify a username");
|
|
54
|
+
}
|
|
55
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/users/by-username"), {
|
|
56
|
+
params: { username: username },
|
|
57
|
+
})];
|
|
58
|
+
case 1:
|
|
59
|
+
response = _c.sent();
|
|
60
|
+
return [2 /*return*/, response.data];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}); }, [projectId]);
|
|
64
|
+
return fetchUserByUsername;
|
|
65
|
+
}
|
|
66
|
+
export default useFetchUserByUsername;
|
|
67
|
+
//# sourceMappingURL=useFetchUserByUsername.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchUserByUsername.js","sourceRoot":"","sources":["../../../../src/hooks/users/useFetchUserByUsername.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAGvC,SAAS,sBAAsB;IAA/B,iBAuBC;IAtBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,mBAAmB,GAAG,WAAW,CACrC,gEAAO,EAAkC;;YAAhC,QAAQ,cAAA;;;;oBACf,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,QAAQ,EAAE,CAAC;wBACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;oBAC/C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAC,WAAI,SAAS,uBAAoB,EAAE;4BAClE,MAAM,EAAE,EAAE,QAAQ,UAAA,EAAE;yBACrB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBAEF,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,eAAe,sBAAsB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ export { useSignTestingJwt } from "./hooks/crypto";
|
|
|
12
12
|
export { useAuth, type UseAuthValues } from "./hooks/auth";
|
|
13
13
|
export { useUser, useUserActions, type UseUserProps, type UseUserValues, } from "./hooks/user";
|
|
14
14
|
export { useAppNotifications, useAppNotificationsActions, type UseAppNotificationsProps, type UseAppNotificationsValues, } from "./hooks/app-notifications";
|
|
15
|
-
export {
|
|
16
|
-
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
|
|
17
|
-
export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListFetchOptions, } from "./hooks/entity-lists";
|
|
15
|
+
export { useCollections, useCollectionsActions, useIsEntityInCollection, type UseCollectionsProps, type UseCollectionsValues, } from "./hooks/collections";
|
|
16
|
+
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useFetchManyEntitiesWrapper, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, type UseFetchManyEntitiesWrapperProps, type UseFetchManyEntitiesWrapperValues, } from "./hooks/entities";
|
|
17
|
+
export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListSort, type EntityListFetchOptions, } from "./hooks/entity-lists";
|
|
18
18
|
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchMySpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useSpacePermissions, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, } from "./hooks/spaces";
|
|
19
19
|
export { useSpaceList, useSpaceListActions, type UseSpaceListProps, type UseSpaceListValues, } from "./hooks/space-lists";
|
|
20
|
-
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments,
|
|
21
|
-
export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
|
|
20
|
+
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, type UseFetchManyCommentsWrapperProps, type UseFetchManyCommentsWrapperValues, } from "./hooks/comments";
|
|
21
|
+
export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
|
|
22
22
|
export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
|
|
23
23
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
|
|
24
24
|
export { useCreateReport } from "./hooks/reports";
|
|
@@ -31,9 +31,9 @@ export type { PaginatedResponse, PaginationMetadata, } from "./interfaces/IPagin
|
|
|
31
31
|
export type { EntityCommentsTree } from "./interfaces/EntityCommentsTree";
|
|
32
32
|
export type { UserFull, User, AuthUser, UserRole, } from "./interfaces/models/User";
|
|
33
33
|
export * as AppNotification from "./interfaces/models/AppNotification";
|
|
34
|
-
export type { Entity } from "./interfaces/models/Entity";
|
|
35
|
-
export type {
|
|
36
|
-
export type { Comment, GifData } from "./interfaces/models/Comment";
|
|
34
|
+
export type { Entity, EntityInclude, EntityIncludeArray, EntityIncludeParam, } from "./interfaces/models/Entity";
|
|
35
|
+
export type { Collection } from "./interfaces/models/Collection";
|
|
36
|
+
export type { Comment, GifData, CommentInclude, CommentIncludeArray, CommentIncludeParam, } from "./interfaces/models/Comment";
|
|
37
37
|
export type { Mention } from "./interfaces/models/Mention";
|
|
38
38
|
export type { Space, SpaceDetailed, SpacePreview, SpaceMemberPermissions, ReadingPermission, PostingPermission, PaginationMeta, MySpaceItem, MySpacesResponse, JoinSpaceResponse, LeaveSpaceResponse, UpdateMemberRoleResponse, ApproveMemberResponse, DeclineMemberResponse, DeleteSpaceResponse, } from "./interfaces/models/Space";
|
|
39
39
|
export type { SpaceMember, SpaceMemberRole, SpaceMemberStatus, SpaceMemberWithUser, SpaceMembersResponse, } from "./interfaces/models/SpaceMember";
|
package/dist/esm/index.js
CHANGED
|
@@ -19,10 +19,10 @@ export { useAuth } from "./hooks/auth";
|
|
|
19
19
|
export { useUser, useUserActions, } from "./hooks/user";
|
|
20
20
|
// -- app notifications
|
|
21
21
|
export { useAppNotifications, useAppNotificationsActions, } from "./hooks/app-notifications";
|
|
22
|
-
// --
|
|
23
|
-
export {
|
|
22
|
+
// -- collections
|
|
23
|
+
export { useCollections, useCollectionsActions, useIsEntityInCollection, } from "./hooks/collections";
|
|
24
24
|
// -- entities
|
|
25
|
-
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
|
|
25
|
+
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useFetchManyEntitiesWrapper, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
|
|
26
26
|
// -- entity lists
|
|
27
27
|
export { useEntityList, useEntityListActions, } from "./hooks/entity-lists";
|
|
28
28
|
// -- spaces
|
|
@@ -30,9 +30,9 @@ export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetch
|
|
|
30
30
|
// -- space lists
|
|
31
31
|
export { useSpaceList, useSpaceListActions, } from "./hooks/space-lists";
|
|
32
32
|
// -- comments
|
|
33
|
-
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments,
|
|
33
|
+
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, } from "./hooks/comments";
|
|
34
34
|
// -- users
|
|
35
|
-
export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
|
|
35
|
+
export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
|
|
36
36
|
// -- follows
|
|
37
37
|
export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
|
|
38
38
|
// -- connections
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,+CAA+C;AAC/C,OAAO,EACL,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAE3D,oBAAoB;AACpB,OAAO,EACL,OAAO,EACP,cAAc,GAGf,MAAM,cAAc,CAAC;AAEtB,uBAAuB;AACvB,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAG3B,MAAM,2BAA2B,CAAC;AAEnC,
|
|
1
|
+
{"version":3,"file":"index.js","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EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAchD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAmDvE,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,sCAAsC,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export interface List {
|
|
1
|
+
export interface Collection {
|
|
3
2
|
id: string;
|
|
4
3
|
projectId: string;
|
|
5
4
|
userId: string;
|
|
6
5
|
parentId: string | null;
|
|
7
6
|
name: string;
|
|
8
|
-
|
|
9
|
-
entities: Partial<Entity>[];
|
|
7
|
+
entityCount?: number;
|
|
10
8
|
createdAt: Date;
|
|
11
9
|
updatedAt: Date;
|
|
12
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../../src/interfaces/models/Collection.ts"],"names":[],"mappings":""}
|
|
@@ -16,8 +16,9 @@ export interface Comment {
|
|
|
16
16
|
entityId: string;
|
|
17
17
|
entity?: Entity;
|
|
18
18
|
userId: string;
|
|
19
|
-
user
|
|
19
|
+
user?: User;
|
|
20
20
|
parentId: string | null;
|
|
21
|
+
parentComment?: Comment;
|
|
21
22
|
content: string | null;
|
|
22
23
|
gif: GifData | null;
|
|
23
24
|
mentions: Mention[];
|
|
@@ -30,3 +31,6 @@ export interface Comment {
|
|
|
30
31
|
deletedAt: Date | null;
|
|
31
32
|
parentDeletedAt: Date | null;
|
|
32
33
|
}
|
|
34
|
+
export type CommentInclude = "user" | "entity" | "space" | "parent";
|
|
35
|
+
export type CommentIncludeArray = CommentInclude[];
|
|
36
|
+
export type CommentIncludeParam = CommentInclude | CommentIncludeArray;
|
|
@@ -100,6 +100,19 @@ export interface DeclineMemberResponse {
|
|
|
100
100
|
status: "rejected";
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
+
export interface CheckMyMembershipResponse {
|
|
104
|
+
isMember: boolean;
|
|
105
|
+
role: "admin" | "moderator" | "member" | null;
|
|
106
|
+
status: "pending" | "active" | "banned" | "rejected" | null;
|
|
107
|
+
joinedAt: Date | null;
|
|
108
|
+
permissions: {
|
|
109
|
+
canPost: boolean;
|
|
110
|
+
canModerate: boolean;
|
|
111
|
+
canRead: boolean;
|
|
112
|
+
isAdmin: boolean;
|
|
113
|
+
isModerator: boolean;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
103
116
|
export interface DeleteSpaceResponse {
|
|
104
117
|
message: string;
|
|
105
118
|
deletedSpace: {
|