synapse-react-client 3.1.24 → 3.1.26
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/components/styled/LeftRightPanel.d.ts +10 -0
- package/dist/components/styled/LeftRightPanel.js +45 -0
- package/dist/components/styled/LeftRightPanel.js.map +1 -0
- package/dist/containers/CardContainerLogic.js +4 -3
- package/dist/containers/CardContainerLogic.js.map +1 -1
- package/dist/containers/SynapseNavDrawer.js +1 -3
- package/dist/containers/SynapseNavDrawer.js.map +1 -1
- package/dist/containers/TextField.d.ts +8 -0
- package/dist/containers/TextField.js +22 -0
- package/dist/containers/TextField.js.map +1 -0
- package/dist/containers/access_requirement_list/AccessRequirementList.js +15 -12
- package/dist/containers/access_requirement_list/AccessRequirementList.js.map +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/CancelRequestDataAccess.d.ts +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/CancelRequestDataAccess.js +21 -16
- package/dist/containers/access_requirement_list/managedACTAccess/CancelRequestDataAccess.js.map +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccess.js +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccess.js.map +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep1.js +14 -9
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep1.js.map +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep2.js +22 -18
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessStep2.js.map +1 -1
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessSuccess.js +11 -7
- package/dist/containers/access_requirement_list/managedACTAccess/RequestDataAccessSuccess.js.map +1 -1
- package/dist/containers/auth/AuthenticationMethodSelection.d.ts +17 -0
- package/dist/containers/auth/AuthenticationMethodSelection.js +49 -0
- package/dist/containers/auth/AuthenticationMethodSelection.js.map +1 -0
- package/dist/containers/auth/LoginFlowBackButton.d.ts +10 -0
- package/dist/containers/auth/LoginFlowBackButton.js +38 -0
- package/dist/containers/auth/LoginFlowBackButton.js.map +1 -0
- package/dist/containers/auth/LoginForm.d.ts +18 -0
- package/dist/containers/auth/LoginForm.js +32 -0
- package/dist/containers/auth/LoginForm.js.map +1 -0
- package/dist/containers/auth/LoginPage.d.ts +2 -3
- package/dist/containers/auth/LoginPage.js +84 -25
- package/dist/containers/auth/LoginPage.js.map +1 -1
- package/dist/containers/auth/RecoveryCodeForm.d.ts +8 -0
- package/dist/containers/auth/RecoveryCodeForm.js +30 -0
- package/dist/containers/auth/RecoveryCodeForm.js.map +1 -0
- package/dist/containers/auth/StandaloneLoginForm.d.ts +12 -0
- package/dist/containers/auth/StandaloneLoginForm.js +24 -0
- package/dist/containers/auth/StandaloneLoginForm.js.map +1 -0
- package/dist/containers/auth/TOTPForm.d.ts +8 -0
- package/dist/containers/auth/TOTPForm.js +38 -0
- package/dist/containers/auth/TOTPForm.js.map +1 -0
- package/dist/containers/auth/UsernamePasswordForm.d.ts +9 -0
- package/dist/containers/auth/UsernamePasswordForm.js +29 -0
- package/dist/containers/auth/UsernamePasswordForm.js.map +1 -0
- package/dist/containers/home_page/featured-data/QueryPerFacetPlotsCard.js +2 -1
- package/dist/containers/home_page/featured-data/QueryPerFacetPlotsCard.js.map +1 -1
- package/dist/containers/table/StandaloneQueryWrapper.js +2 -1
- package/dist/containers/table/StandaloneQueryWrapper.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/style/base/_core.scss +0 -13
- package/dist/style/components/_access-requirement-list.scss +0 -7
- package/dist/umd/synapse-react-client.development.css +0 -17
- package/dist/umd/synapse-react-client.development.css.map +2 -2
- package/dist/umd/synapse-react-client.development.js +28424 -27327
- package/dist/umd/synapse-react-client.development.js.map +4 -4
- package/dist/umd/synapse-react-client.production.min.css +1 -1
- package/dist/umd/synapse-react-client.production.min.js +89 -83
- package/dist/umd.index.d.ts +8 -6
- package/dist/umd.index.js +5 -3
- package/dist/umd.index.js.map +1 -1
- package/dist/utils/SynapseClient.d.ts +30 -16
- package/dist/utils/SynapseClient.js +99 -120
- package/dist/utils/SynapseClient.js.map +1 -1
- package/dist/utils/SynapseClientError.d.ts +4 -1
- package/dist/utils/SynapseClientError.js +2 -5
- package/dist/utils/SynapseClientError.js.map +1 -1
- package/dist/utils/SynapseConstants.d.ts +1 -0
- package/dist/utils/SynapseConstants.js +2 -1
- package/dist/utils/SynapseConstants.js.map +1 -1
- package/dist/utils/SynapseContext.d.ts +6 -4
- package/dist/utils/SynapseContext.js +26 -6
- package/dist/utils/SynapseContext.js.map +1 -1
- package/dist/utils/functions/ArrayUtils.d.ts +5 -0
- package/dist/utils/functions/ArrayUtils.js +25 -0
- package/dist/utils/functions/ArrayUtils.js.map +1 -0
- package/dist/utils/hooks/SynapseAPI/KeyFactory.d.ts +102 -0
- package/dist/utils/hooks/SynapseAPI/KeyFactory.js +308 -0
- package/dist/utils/hooks/SynapseAPI/KeyFactory.js.map +1 -0
- package/dist/utils/hooks/SynapseAPI/QueryClientUtils.d.ts +9 -0
- package/dist/utils/hooks/SynapseAPI/QueryClientUtils.js +18 -0
- package/dist/utils/hooks/SynapseAPI/QueryClientUtils.js.map +1 -0
- package/dist/utils/hooks/SynapseAPI/dataaccess/useAccessApprovals.js +2 -2
- package/dist/utils/hooks/SynapseAPI/dataaccess/useAccessApprovals.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/dataaccess/useAccessRequirements.js +13 -14
- package/dist/utils/hooks/SynapseAPI/dataaccess/useAccessRequirements.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/dataaccess/useDataAccessSubmission.js +17 -18
- package/dist/utils/hooks/SynapseAPI/dataaccess/useDataAccessSubmission.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/dataaccess/useGetApprovedSubmissionInfo.js +2 -2
- package/dist/utils/hooks/SynapseAPI/dataaccess/useGetApprovedSubmissionInfo.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/doi/useDOI.js +2 -2
- package/dist/utils/hooks/SynapseAPI/doi/useDOI.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/download/useDownloadList.d.ts +0 -8
- package/dist/utils/hooks/SynapseAPI/download/useDownloadList.js +13 -29
- package/dist/utils/hooks/SynapseAPI/download/useDownloadList.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useEntity.js +19 -19
- package/dist/utils/hooks/SynapseAPI/entity/useEntity.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useEntityBoundSchema.js +4 -5
- package/dist/utils/hooks/SynapseAPI/entity/useEntityBoundSchema.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useEntityBundle.js +2 -3
- package/dist/utils/hooks/SynapseAPI/entity/useEntityBundle.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useGetEntityChildren.js +4 -5
- package/dist/utils/hooks/SynapseAPI/entity/useGetEntityChildren.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useGetEntityHeaders.js +4 -4
- package/dist/utils/hooks/SynapseAPI/entity/useGetEntityHeaders.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useGetQueryResultBundle.js +8 -9
- package/dist/utils/hooks/SynapseAPI/entity/useGetQueryResultBundle.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/entity/useSchema.js +3 -1
- package/dist/utils/hooks/SynapseAPI/entity/useSchema.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/file/useFiles.js +4 -3
- package/dist/utils/hooks/SynapseAPI/file/useFiles.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/file/useUploadDestination.js +2 -2
- package/dist/utils/hooks/SynapseAPI/file/useUploadDestination.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/index.d.ts +2 -0
- package/dist/utils/hooks/SynapseAPI/index.js +2 -0
- package/dist/utils/hooks/SynapseAPI/index.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/oauth/useOAuthClient.js +6 -6
- package/dist/utils/hooks/SynapseAPI/oauth/useOAuthClient.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/search/useSearch.js +4 -4
- package/dist/utils/hooks/SynapseAPI/search/useSearch.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/team/useTeamMembers.js +4 -4
- package/dist/utils/hooks/SynapseAPI/team/useTeamMembers.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/trash/useTrashCan.js +6 -6
- package/dist/utils/hooks/SynapseAPI/trash/useTrashCan.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useFavorites.js +8 -8
- package/dist/utils/hooks/SynapseAPI/user/useFavorites.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useGetUserChallenges.js +2 -2
- package/dist/utils/hooks/SynapseAPI/user/useGetUserChallenges.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useGetUserProjects.js +2 -2
- package/dist/utils/hooks/SynapseAPI/user/useGetUserProjects.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useGetUserTeams.js +2 -2
- package/dist/utils/hooks/SynapseAPI/user/useGetUserTeams.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/usePersonalAccessToken.js +2 -2
- package/dist/utils/hooks/SynapseAPI/user/usePersonalAccessToken.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useProjects.js +4 -4
- package/dist/utils/hooks/SynapseAPI/user/useProjects.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useUserBundle.js +17 -24
- package/dist/utils/hooks/SynapseAPI/user/useUserBundle.js.map +1 -1
- package/dist/utils/hooks/SynapseAPI/user/useUserGroupHeader.js +6 -4
- package/dist/utils/hooks/SynapseAPI/user/useUserGroupHeader.js.map +1 -1
- package/dist/utils/hooks/index.d.ts +15 -0
- package/dist/utils/hooks/index.js +20 -0
- package/dist/utils/hooks/index.js.map +1 -0
- package/dist/utils/hooks/useDetectSSOCode.d.ts +8 -0
- package/dist/utils/hooks/useDetectSSOCode.js +90 -0
- package/dist/utils/hooks/useDetectSSOCode.js.map +1 -0
- package/dist/utils/hooks/useFocus.d.ts +15 -0
- package/dist/utils/hooks/useFocus.js +25 -0
- package/dist/utils/hooks/useFocus.js.map +1 -0
- package/dist/utils/hooks/useLogin.d.ts +15 -0
- package/dist/utils/hooks/useLogin.js +155 -0
- package/dist/utils/hooks/useLogin.js.map +1 -0
- package/dist/utils/hooks/useTraceUpdate.d.ts +1 -0
- package/dist/utils/hooks/useTraceUpdate.js +22 -0
- package/dist/utils/hooks/useTraceUpdate.js.map +1 -0
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.js +5 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/synapseTypes/ErrorResponse.d.ts +22 -0
- package/dist/utils/synapseTypes/ErrorResponse.js +17 -0
- package/dist/utils/synapseTypes/ErrorResponse.js.map +1 -0
- package/dist/utils/synapseTypes/LoginResponse.d.ts +0 -1
- package/dist/utils/synapseTypes/TwoFactorAuthLoginRequest.d.ts +12 -0
- package/dist/utils/synapseTypes/TwoFactorAuthLoginRequest.js +3 -0
- package/dist/utils/synapseTypes/TwoFactorAuthLoginRequest.js.map +1 -0
- package/package.json +9 -7
- package/dist/assets/ButtonWithIcon.d.ts +0 -12
- package/dist/assets/ButtonWithIcon.js +0 -17
- package/dist/assets/ButtonWithIcon.js.map +0 -1
- package/dist/containers/auth/Login.d.ts +0 -24
- package/dist/containers/auth/Login.js +0 -125
- package/dist/containers/auth/Login.js.map +0 -1
- package/dist/utils/hooks/SynapseAPI/entity/queryKeys.d.ts +0 -93
- package/dist/utils/hooks/SynapseAPI/entity/queryKeys.js +0 -69
- package/dist/utils/hooks/SynapseAPI/entity/queryKeys.js.map +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { SubmissionSearchRequest } from '../../synapseTypes/AccessSubmission';
|
|
2
|
+
import { AccessApprovalSearchRequest, BatchFileRequest, EntityBundleRequest, EntityChildrenRequest, FileHandle, QueryBundleRequest, ReferenceList, RestrictionInformationRequest, TYPE_FILTER } from '../../synapseTypes';
|
|
3
|
+
import { AccessRequirementSearchRequest } from '../../synapseTypes/AccessRequirement/AccessRequirementSearch';
|
|
4
|
+
import { SubmissionInfoPageRequest } from '../../synapseTypes/SubmissionInfo';
|
|
5
|
+
import { AvailableFilesRequest } from '../../synapseTypes/DownloadListV2/QueryRequestDetails';
|
|
6
|
+
import { QueryKey } from 'react-query';
|
|
7
|
+
import { DiscussionFilter, DiscussionReplyOrder, DiscussionThreadOrder } from '../../synapseTypes/DiscussionBundle';
|
|
8
|
+
import { SearchQuery } from '../../synapseTypes/Search';
|
|
9
|
+
import { SubscriptionObjectType } from '../../synapseTypes/Subscription';
|
|
10
|
+
import { FavoriteSortBy, FavoriteSortDirection } from '../../synapseTypes/FavoriteSortBy';
|
|
11
|
+
import { GetProjectsParameters } from '../../synapseTypes/GetProjectsParams';
|
|
12
|
+
import { PrincipalAliasRequest } from '../../synapseTypes/Principal/PrincipalServices';
|
|
13
|
+
/**
|
|
14
|
+
* Returns a react-query Query Key.
|
|
15
|
+
*
|
|
16
|
+
* Co-location of react-query keys for queries related to Synapse data. Two objectives of this strategy are
|
|
17
|
+
* - minimize the risk of inappropriate cache key collisions
|
|
18
|
+
* - simplify clearing the approprate query caches when the entity data is updated
|
|
19
|
+
*
|
|
20
|
+
* For more information, see https://tkdodo.eu/blog/leveraging-the-query-function-context
|
|
21
|
+
*/
|
|
22
|
+
export declare class KeyFactory {
|
|
23
|
+
accessToken: string | undefined;
|
|
24
|
+
constructor(accessToken: string | undefined);
|
|
25
|
+
/**
|
|
26
|
+
* Returns a react-query Query Key. Prepends the key with the access token, so that the key is unique per-session.
|
|
27
|
+
* Also removes trailing undefined elements from the passed args, so a key can be generated for query invalidation.
|
|
28
|
+
* @param args
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private getKey;
|
|
32
|
+
getAllEntityDataQueryKey(): QueryKey;
|
|
33
|
+
getEntityQueryKey(id: string): QueryKey;
|
|
34
|
+
getEntityActivityQueryKey(id: string, versionNumber?: number): QueryKey;
|
|
35
|
+
getEntityVersionQueryKey(id: string, versionNumber?: string | number): QueryKey;
|
|
36
|
+
getPaginatedEntityVersionsQueryKey(id: string, limit: number, offset: number): QueryKey;
|
|
37
|
+
getEntityVersionsQueryKey(id: string): QueryKey;
|
|
38
|
+
getEntityChildrenQueryKey(request: EntityChildrenRequest, infinite: boolean): QueryKey;
|
|
39
|
+
getEntityJsonQueryKey(id: string): QueryKey;
|
|
40
|
+
getEntityBundleQueryKey(id: string, version: number | undefined, bundleRequest: EntityBundleRequest): QueryKey;
|
|
41
|
+
getEntityPathQueryKey(id: string): QueryKey;
|
|
42
|
+
getEntityBoundJsonSchemaQueryKey(id: string): QueryKey;
|
|
43
|
+
getEntitySchemaValidationResultsQueryKey(id: string): QueryKey;
|
|
44
|
+
getEntityHeaderQueryKey(id: string): QueryKey;
|
|
45
|
+
getEntityHeadersQueryKey(references: ReferenceList): QueryKey;
|
|
46
|
+
getEntityTableQueryResultQueryKey(queryBundleRequest: QueryBundleRequest, infinite: boolean): QueryKey;
|
|
47
|
+
getEntityTableQueryResultWithAsyncStatusQueryKey(queryBundleRequest: QueryBundleRequest, infinite: boolean): QueryKey;
|
|
48
|
+
getFullTableQueryResultQueryKey(queryBundleRequest: QueryBundleRequest): QueryKey;
|
|
49
|
+
getDownloadListBaseQueryKey(): QueryKey;
|
|
50
|
+
getDownloadListAvailableFilesQueryKey(request: AvailableFilesRequest): QueryKey;
|
|
51
|
+
getDownloadListAvailableFilesInfiniteQueryKey(request: AvailableFilesRequest): QueryKey;
|
|
52
|
+
getDownloadListActionsRequiredQueryKey(): QueryKey;
|
|
53
|
+
getDownloadListActionsRequiredInfiniteQueryKey(): QueryKey;
|
|
54
|
+
getDownloadListStatisticsQueryKey(): QueryKey;
|
|
55
|
+
searchAccessApprovalsQueryKey(params?: AccessApprovalSearchRequest): QueryKey;
|
|
56
|
+
getAccessRequirementQueryKey(id?: string): QueryKey;
|
|
57
|
+
getAccessRequirementAclQueryKey(id: string): QueryKey;
|
|
58
|
+
searchAccessRequirementsQueryKey(params?: AccessRequirementSearchRequest): QueryKey;
|
|
59
|
+
getAccessRequirementWikiPageKey(id: string): QueryKey;
|
|
60
|
+
getAccessRequirementRestrictionInformationQueryKey(request?: RestrictionInformationRequest): QueryKey;
|
|
61
|
+
getDataAccessSubmissionQueryKey(id?: string): QueryKey;
|
|
62
|
+
searchDataAccessSubmissionQueryKey(params?: SubmissionSearchRequest): QueryKey;
|
|
63
|
+
getApprovedSubmissionInfoQueryKey(request?: SubmissionInfoPageRequest): QueryKey;
|
|
64
|
+
getValidationSchemaQueryKey(schema$id: string): QueryKey;
|
|
65
|
+
getPresignedUrlContentQueryKey(fileHandle: FileHandle, request: BatchFileRequest, maxSizeBytes?: number): QueryKey;
|
|
66
|
+
getProfileImageQueryKey(userId: string): QueryKey;
|
|
67
|
+
getDefaultUploadDestinationQueryKey(containerEntityId: string): QueryKey;
|
|
68
|
+
getForumModeratorsQueryKey(forumId: string): QueryKey;
|
|
69
|
+
getAllForumThreadsQueryKey(forumId: string): QueryKey;
|
|
70
|
+
getForumThreadsQueryKey(forumId: string, limit: number, sort: DiscussionThreadOrder, ascending: boolean, filter?: DiscussionFilter): QueryKey;
|
|
71
|
+
getAllRepliesQueryKey(threadId: string): QueryKey;
|
|
72
|
+
getRepliesQueryKey(threadId: string, ascending?: boolean, limit?: number, sort?: DiscussionReplyOrder, filter?: DiscussionFilter): QueryKey;
|
|
73
|
+
getReplyQueryKey(threadId: string, replyId: string, messageKey: string): QueryKey;
|
|
74
|
+
getThreadQueryKey(threadId: string): QueryKey;
|
|
75
|
+
getThreadBodyQueryKey(threadId: string, messageKey: string): QueryKey;
|
|
76
|
+
getMyOAuthClientsQueryKey(): QueryKey;
|
|
77
|
+
getDOIAssociationQueryKey(objectType: string, objectId: string, versionNumber?: number): QueryKey;
|
|
78
|
+
getAllSubscribersQueryKey(): QueryKey;
|
|
79
|
+
getSubscribersQueryKey(objectId: string, objectType: SubscriptionObjectType): QueryKey;
|
|
80
|
+
getSubscriptionQueryKey(objectId: string, objectType: SubscriptionObjectType): QueryKey;
|
|
81
|
+
getAllSubscriptionsQueryKey(): QueryKey;
|
|
82
|
+
getSearchEntitiesQueryKey(query: SearchQuery): QueryKey;
|
|
83
|
+
getTeamMembersQueryKey(teamId: string): QueryKey;
|
|
84
|
+
getIsUserMemberOfTeamQueryKey(teamId: string, userId: string): QueryKey;
|
|
85
|
+
getFavoritesQueryKey(): QueryKey;
|
|
86
|
+
getUserFavoritesQueryKey(sort: FavoriteSortBy, sortDirection: FavoriteSortDirection): QueryKey;
|
|
87
|
+
getUserFavoritesInfiniteQueryKey(sort: FavoriteSortBy, sortDirection: FavoriteSortDirection): QueryKey;
|
|
88
|
+
getTrashCanItemsQueryKey(): QueryKey;
|
|
89
|
+
getUserChallengesQueryKey(userId: string): QueryKey;
|
|
90
|
+
getUserProjectsQueryKey(userId: string, projectParams: GetProjectsParameters): QueryKey;
|
|
91
|
+
getUserTeamsQueryKey(userId: string): QueryKey;
|
|
92
|
+
getPersonalAccessTokensQueryKey(): QueryKey;
|
|
93
|
+
getMyProjectsQueryKey(params?: GetProjectsParameters): QueryKey;
|
|
94
|
+
getNotificationEmailQueryKey(): QueryKey;
|
|
95
|
+
getCurrentUserProfileQueryKey(): QueryKey;
|
|
96
|
+
getUserBundleQueryKey(userId: string, mask?: number): QueryKey;
|
|
97
|
+
getUserProfileQueryKey(userId: string): QueryKey;
|
|
98
|
+
getPrincipalAliasQueryKey(request: PrincipalAliasRequest): QueryKey;
|
|
99
|
+
getUserGroupHeaderQueryKey(id: string): QueryKey;
|
|
100
|
+
getUserGroupHeaderWithAliasQueryKey(aliases: string[]): QueryKey;
|
|
101
|
+
getUserGroupHeaderSearchQueryKey(prefix: string, filter?: TYPE_FILTER): QueryKey;
|
|
102
|
+
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KeyFactory = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var ArrayUtils_1 = require("../../functions/ArrayUtils");
|
|
6
|
+
var entityQueryKeyObjects = {
|
|
7
|
+
/* Query key for all entities */
|
|
8
|
+
all: { objectType: 'entity' },
|
|
9
|
+
// Data for an entity
|
|
10
|
+
entity: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.all[1]), { id: id })); },
|
|
11
|
+
// Data for a particular version of an entity
|
|
12
|
+
version: function (id, versionNumber) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { versionNumber: versionNumber })); },
|
|
13
|
+
// List of Entity Versions
|
|
14
|
+
versions: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { scope: 'versions' })); },
|
|
15
|
+
versionsQuery: function (id, limit, offset) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.versions(id)), { versionQuery: {
|
|
16
|
+
limit: limit,
|
|
17
|
+
offset: offset,
|
|
18
|
+
} })); },
|
|
19
|
+
// JSON Representation of an entity
|
|
20
|
+
json: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { scope: 'json' })); },
|
|
21
|
+
activity: function (id, versionNumber) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.version(id)), { scope: 'activity' })); },
|
|
22
|
+
// Entity path
|
|
23
|
+
path: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { scope: 'path' })); },
|
|
24
|
+
// Entity bundle
|
|
25
|
+
bundle: function (id, versionNumber, bundleRequest) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.version(id, versionNumber)), { scope: 'entityBundle', entityBundleRequest: bundleRequest })); },
|
|
26
|
+
children: function (request, infinite) {
|
|
27
|
+
var _a;
|
|
28
|
+
return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity((_a = request.parentId) !== null && _a !== void 0 ? _a : 'root')), { scope: 'children', isInfinite: infinite, entityChildrenRequest: request }));
|
|
29
|
+
},
|
|
30
|
+
tableQueryResult: function (queryBundleRequest, infinite) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(queryBundleRequest.entityId)), { scope: 'tableQueryResult', isInfinite: infinite, tableQueryBundleRequest: queryBundleRequest })); },
|
|
31
|
+
tableQueryResultWithAsyncStatus: function (queryBundleRequest, infinite) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(queryBundleRequest.entityId)), { scope: 'tableQueryResultWithAsyncStatus', isInfinite: infinite, tableQueryBundleRequest: queryBundleRequest })); },
|
|
32
|
+
fullTableQueryResult: function (queryBundleRequest) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(queryBundleRequest.entityId)), { scope: 'fullTableQueryResult', tableQueryBundleRequest: queryBundleRequest })); },
|
|
33
|
+
boundJSONSchema: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { scope: 'boundJSONSchema' })); },
|
|
34
|
+
schemaValidationResults: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { scope: 'schemaValidationResults' })); },
|
|
35
|
+
header: function (id) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.entity(id)), { scope: 'entityHeaders' })); },
|
|
36
|
+
headers: function (references) { return (tslib_1.__assign(tslib_1.__assign({}, entityQueryKeyObjects.all), { scope: 'entityHeaders', entityHeadersRequest: references })); },
|
|
37
|
+
};
|
|
38
|
+
var downloadListQueryKeys = {
|
|
39
|
+
/* Key used to invalidate all download list queries */
|
|
40
|
+
base: 'downloadList',
|
|
41
|
+
availableFiles: function (request) { return [
|
|
42
|
+
downloadListQueryKeys.base,
|
|
43
|
+
'availableFiles',
|
|
44
|
+
request,
|
|
45
|
+
]; },
|
|
46
|
+
availableFilesInfinite: function (request) { return [
|
|
47
|
+
downloadListQueryKeys.availableFiles(request),
|
|
48
|
+
'infinite',
|
|
49
|
+
]; },
|
|
50
|
+
getActionsRequired: function () { return [downloadListQueryKeys.base, 'actionsRequired']; },
|
|
51
|
+
getActionsRequiredInfinite: function () { return tslib_1.__spreadArray(tslib_1.__spreadArray([], downloadListQueryKeys.getActionsRequired(), true), [
|
|
52
|
+
'infinite',
|
|
53
|
+
], false); },
|
|
54
|
+
getStatistics: function () { return [downloadListQueryKeys.base, 'statistics']; },
|
|
55
|
+
};
|
|
56
|
+
var ACCESS_REQUIREMENT_QUERY_KEY = 'accessRequirement';
|
|
57
|
+
/**
|
|
58
|
+
* Returns a react-query Query Key.
|
|
59
|
+
*
|
|
60
|
+
* Co-location of react-query keys for queries related to Synapse data. Two objectives of this strategy are
|
|
61
|
+
* - minimize the risk of inappropriate cache key collisions
|
|
62
|
+
* - simplify clearing the approprate query caches when the entity data is updated
|
|
63
|
+
*
|
|
64
|
+
* For more information, see https://tkdodo.eu/blog/leveraging-the-query-function-context
|
|
65
|
+
*/
|
|
66
|
+
var KeyFactory = /** @class */ (function () {
|
|
67
|
+
function KeyFactory(accessToken) {
|
|
68
|
+
this.accessToken = undefined;
|
|
69
|
+
this.accessToken = accessToken;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns a react-query Query Key. Prepends the key with the access token, so that the key is unique per-session.
|
|
73
|
+
* Also removes trailing undefined elements from the passed args, so a key can be generated for query invalidation.
|
|
74
|
+
* @param args
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
KeyFactory.prototype.getKey = function () {
|
|
78
|
+
var args = [];
|
|
79
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
80
|
+
args[_i] = arguments[_i];
|
|
81
|
+
}
|
|
82
|
+
return tslib_1.__spreadArray([this.accessToken], (0, ArrayUtils_1.removeTrailingUndefinedElements)(args), true);
|
|
83
|
+
};
|
|
84
|
+
KeyFactory.prototype.getAllEntityDataQueryKey = function () {
|
|
85
|
+
return this.getKey(entityQueryKeyObjects.all);
|
|
86
|
+
};
|
|
87
|
+
KeyFactory.prototype.getEntityQueryKey = function (id) {
|
|
88
|
+
return this.getKey(entityQueryKeyObjects.entity(id));
|
|
89
|
+
};
|
|
90
|
+
KeyFactory.prototype.getEntityActivityQueryKey = function (id, versionNumber) {
|
|
91
|
+
return this.getKey(entityQueryKeyObjects.activity(id, versionNumber));
|
|
92
|
+
};
|
|
93
|
+
KeyFactory.prototype.getEntityVersionQueryKey = function (id, versionNumber) {
|
|
94
|
+
return this.getKey(entityQueryKeyObjects.version(id, versionNumber));
|
|
95
|
+
};
|
|
96
|
+
KeyFactory.prototype.getPaginatedEntityVersionsQueryKey = function (id, limit, offset) {
|
|
97
|
+
return this.getKey(entityQueryKeyObjects.versionsQuery(id, limit, offset));
|
|
98
|
+
};
|
|
99
|
+
KeyFactory.prototype.getEntityVersionsQueryKey = function (id) {
|
|
100
|
+
return this.getKey(entityQueryKeyObjects.versions(id));
|
|
101
|
+
};
|
|
102
|
+
KeyFactory.prototype.getEntityChildrenQueryKey = function (request, infinite) {
|
|
103
|
+
return this.getKey(entityQueryKeyObjects.children(request, infinite));
|
|
104
|
+
};
|
|
105
|
+
KeyFactory.prototype.getEntityJsonQueryKey = function (id) {
|
|
106
|
+
return this.getKey(entityQueryKeyObjects.json(id));
|
|
107
|
+
};
|
|
108
|
+
KeyFactory.prototype.getEntityBundleQueryKey = function (id, version, bundleRequest) {
|
|
109
|
+
return this.getKey(entityQueryKeyObjects.bundle(id, version, bundleRequest));
|
|
110
|
+
};
|
|
111
|
+
KeyFactory.prototype.getEntityPathQueryKey = function (id) {
|
|
112
|
+
return this.getKey(entityQueryKeyObjects.path(id));
|
|
113
|
+
};
|
|
114
|
+
KeyFactory.prototype.getEntityBoundJsonSchemaQueryKey = function (id) {
|
|
115
|
+
return this.getKey(entityQueryKeyObjects.boundJSONSchema(id));
|
|
116
|
+
};
|
|
117
|
+
KeyFactory.prototype.getEntitySchemaValidationResultsQueryKey = function (id) {
|
|
118
|
+
return this.getKey(entityQueryKeyObjects.schemaValidationResults(id));
|
|
119
|
+
};
|
|
120
|
+
KeyFactory.prototype.getEntityHeaderQueryKey = function (id) {
|
|
121
|
+
return this.getKey(entityQueryKeyObjects.header(id));
|
|
122
|
+
};
|
|
123
|
+
KeyFactory.prototype.getEntityHeadersQueryKey = function (references) {
|
|
124
|
+
return this.getKey(entityQueryKeyObjects.headers(references));
|
|
125
|
+
};
|
|
126
|
+
KeyFactory.prototype.getEntityTableQueryResultQueryKey = function (queryBundleRequest, infinite) {
|
|
127
|
+
return this.getKey(entityQueryKeyObjects.tableQueryResult(queryBundleRequest, infinite));
|
|
128
|
+
};
|
|
129
|
+
KeyFactory.prototype.getEntityTableQueryResultWithAsyncStatusQueryKey = function (queryBundleRequest, infinite) {
|
|
130
|
+
return this.getKey(entityQueryKeyObjects.tableQueryResultWithAsyncStatus(queryBundleRequest, infinite));
|
|
131
|
+
};
|
|
132
|
+
KeyFactory.prototype.getFullTableQueryResultQueryKey = function (queryBundleRequest) {
|
|
133
|
+
return this.getKey(entityQueryKeyObjects.fullTableQueryResult(queryBundleRequest));
|
|
134
|
+
};
|
|
135
|
+
KeyFactory.prototype.getDownloadListBaseQueryKey = function () {
|
|
136
|
+
return this.getKey(downloadListQueryKeys.base);
|
|
137
|
+
};
|
|
138
|
+
KeyFactory.prototype.getDownloadListAvailableFilesQueryKey = function (request) {
|
|
139
|
+
return this.getKey.apply(this, downloadListQueryKeys.availableFiles(request));
|
|
140
|
+
};
|
|
141
|
+
KeyFactory.prototype.getDownloadListAvailableFilesInfiniteQueryKey = function (request) {
|
|
142
|
+
return this.getKey.apply(this, downloadListQueryKeys.availableFilesInfinite(request));
|
|
143
|
+
};
|
|
144
|
+
KeyFactory.prototype.getDownloadListActionsRequiredQueryKey = function () {
|
|
145
|
+
return this.getKey.apply(this, downloadListQueryKeys.getActionsRequired());
|
|
146
|
+
};
|
|
147
|
+
KeyFactory.prototype.getDownloadListActionsRequiredInfiniteQueryKey = function () {
|
|
148
|
+
return this.getKey.apply(this, downloadListQueryKeys.getActionsRequiredInfinite());
|
|
149
|
+
};
|
|
150
|
+
KeyFactory.prototype.getDownloadListStatisticsQueryKey = function () {
|
|
151
|
+
return this.getKey.apply(this, downloadListQueryKeys.getStatistics());
|
|
152
|
+
};
|
|
153
|
+
KeyFactory.prototype.searchAccessApprovalsQueryKey = function (params) {
|
|
154
|
+
return this.getKey('accessApprovalSearch', params);
|
|
155
|
+
};
|
|
156
|
+
KeyFactory.prototype.getAccessRequirementQueryKey = function (id) {
|
|
157
|
+
return this.getKey(ACCESS_REQUIREMENT_QUERY_KEY, id);
|
|
158
|
+
};
|
|
159
|
+
KeyFactory.prototype.getAccessRequirementAclQueryKey = function (id) {
|
|
160
|
+
return this.getKey(ACCESS_REQUIREMENT_QUERY_KEY, id, 'acl');
|
|
161
|
+
};
|
|
162
|
+
KeyFactory.prototype.searchAccessRequirementsQueryKey = function (params) {
|
|
163
|
+
return this.getKey(ACCESS_REQUIREMENT_QUERY_KEY, 'search', params);
|
|
164
|
+
};
|
|
165
|
+
KeyFactory.prototype.getAccessRequirementWikiPageKey = function (id) {
|
|
166
|
+
return this.getKey(ACCESS_REQUIREMENT_QUERY_KEY, id, 'wikiPageKey');
|
|
167
|
+
};
|
|
168
|
+
KeyFactory.prototype.getAccessRequirementRestrictionInformationQueryKey = function (request) {
|
|
169
|
+
return this.getKey(ACCESS_REQUIREMENT_QUERY_KEY, 'restrictionInformation', request);
|
|
170
|
+
};
|
|
171
|
+
KeyFactory.prototype.getDataAccessSubmissionQueryKey = function (id) {
|
|
172
|
+
return this.getKey('dataAccessSubmission', id);
|
|
173
|
+
};
|
|
174
|
+
KeyFactory.prototype.searchDataAccessSubmissionQueryKey = function (params) {
|
|
175
|
+
return this.getKey('accessSubmissionSearch', params);
|
|
176
|
+
};
|
|
177
|
+
KeyFactory.prototype.getApprovedSubmissionInfoQueryKey = function (request) {
|
|
178
|
+
return this.getKey('approvedSubmissionInfo', request);
|
|
179
|
+
};
|
|
180
|
+
KeyFactory.prototype.getValidationSchemaQueryKey = function (schema$id) {
|
|
181
|
+
return this.getKey('validationSchema', schema$id);
|
|
182
|
+
};
|
|
183
|
+
KeyFactory.prototype.getPresignedUrlContentQueryKey = function (fileHandle, request, maxSizeBytes) {
|
|
184
|
+
return this.getKey('presignedUrlContent', fileHandle, request, maxSizeBytes);
|
|
185
|
+
};
|
|
186
|
+
KeyFactory.prototype.getProfileImageQueryKey = function (userId) {
|
|
187
|
+
return this.getKey('profileImageData', userId);
|
|
188
|
+
};
|
|
189
|
+
KeyFactory.prototype.getDefaultUploadDestinationQueryKey = function (containerEntityId) {
|
|
190
|
+
return this.getKey('uploadDestination', 'default', containerEntityId);
|
|
191
|
+
};
|
|
192
|
+
KeyFactory.prototype.getForumModeratorsQueryKey = function (forumId) {
|
|
193
|
+
return this.getKey('moderators', forumId);
|
|
194
|
+
};
|
|
195
|
+
KeyFactory.prototype.getAllForumThreadsQueryKey = function (forumId) {
|
|
196
|
+
return this.getKey('forumthread', forumId);
|
|
197
|
+
};
|
|
198
|
+
KeyFactory.prototype.getForumThreadsQueryKey = function (forumId, limit, sort, ascending, filter) {
|
|
199
|
+
return this.getKey('forumthread', forumId, {
|
|
200
|
+
limit: limit,
|
|
201
|
+
filter: filter,
|
|
202
|
+
sort: sort,
|
|
203
|
+
ascending: ascending,
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
KeyFactory.prototype.getAllRepliesQueryKey = function (threadId) {
|
|
207
|
+
return this.getKey('reply', threadId);
|
|
208
|
+
};
|
|
209
|
+
KeyFactory.prototype.getRepliesQueryKey = function (threadId, ascending, limit, sort, filter) {
|
|
210
|
+
return this.getKey('reply', threadId, { limit: limit, filter: filter, sort: sort, ascending: ascending });
|
|
211
|
+
};
|
|
212
|
+
KeyFactory.prototype.getReplyQueryKey = function (threadId, replyId, messageKey) {
|
|
213
|
+
return this.getKey('reply', threadId, { replyId: replyId, messageKey: messageKey });
|
|
214
|
+
};
|
|
215
|
+
KeyFactory.prototype.getThreadQueryKey = function (threadId) {
|
|
216
|
+
return this.getKey('thread', threadId);
|
|
217
|
+
};
|
|
218
|
+
KeyFactory.prototype.getThreadBodyQueryKey = function (threadId, messageKey) {
|
|
219
|
+
return this.getKey('thread', threadId, messageKey);
|
|
220
|
+
};
|
|
221
|
+
KeyFactory.prototype.getMyOAuthClientsQueryKey = function () {
|
|
222
|
+
return this.getKey('oauthClient');
|
|
223
|
+
};
|
|
224
|
+
KeyFactory.prototype.getDOIAssociationQueryKey = function (objectType, objectId, versionNumber) {
|
|
225
|
+
return this.getKey([
|
|
226
|
+
'doi',
|
|
227
|
+
'association',
|
|
228
|
+
objectType,
|
|
229
|
+
objectId,
|
|
230
|
+
versionNumber,
|
|
231
|
+
]);
|
|
232
|
+
};
|
|
233
|
+
KeyFactory.prototype.getAllSubscribersQueryKey = function () {
|
|
234
|
+
return this.getKey('subscribers');
|
|
235
|
+
};
|
|
236
|
+
KeyFactory.prototype.getSubscribersQueryKey = function (objectId, objectType) {
|
|
237
|
+
return this.getKey('subscribers', objectId, objectType);
|
|
238
|
+
};
|
|
239
|
+
KeyFactory.prototype.getSubscriptionQueryKey = function (objectId, objectType) {
|
|
240
|
+
return this.getKey('subscription', objectId, objectType);
|
|
241
|
+
};
|
|
242
|
+
KeyFactory.prototype.getAllSubscriptionsQueryKey = function () {
|
|
243
|
+
return this.getKey('subscription');
|
|
244
|
+
};
|
|
245
|
+
KeyFactory.prototype.getSearchEntitiesQueryKey = function (query) {
|
|
246
|
+
return this.getKey('searchEntities', query);
|
|
247
|
+
};
|
|
248
|
+
KeyFactory.prototype.getTeamMembersQueryKey = function (teamId) {
|
|
249
|
+
return this.getKey('team', teamId, 'membersList');
|
|
250
|
+
};
|
|
251
|
+
KeyFactory.prototype.getIsUserMemberOfTeamQueryKey = function (teamId, userId) {
|
|
252
|
+
return this.getKey('team', teamId, 'member', userId);
|
|
253
|
+
};
|
|
254
|
+
KeyFactory.prototype.getFavoritesQueryKey = function () {
|
|
255
|
+
return this.getKey('favorites');
|
|
256
|
+
};
|
|
257
|
+
KeyFactory.prototype.getUserFavoritesQueryKey = function (sort, sortDirection) {
|
|
258
|
+
return this.getKey('favorites', sort, sortDirection);
|
|
259
|
+
};
|
|
260
|
+
KeyFactory.prototype.getUserFavoritesInfiniteQueryKey = function (sort, sortDirection) {
|
|
261
|
+
return this.getKey('favorites', 'infinite', sort, sortDirection);
|
|
262
|
+
};
|
|
263
|
+
KeyFactory.prototype.getTrashCanItemsQueryKey = function () {
|
|
264
|
+
return this.getKey('trashCan', 'list');
|
|
265
|
+
};
|
|
266
|
+
KeyFactory.prototype.getUserChallengesQueryKey = function (userId) {
|
|
267
|
+
return this.getKey('userChallenges', userId);
|
|
268
|
+
};
|
|
269
|
+
KeyFactory.prototype.getUserProjectsQueryKey = function (userId, projectParams) {
|
|
270
|
+
return this.getKey('userProjects', userId, projectParams);
|
|
271
|
+
};
|
|
272
|
+
KeyFactory.prototype.getUserTeamsQueryKey = function (userId) {
|
|
273
|
+
return this.getKey('userTeams', userId);
|
|
274
|
+
};
|
|
275
|
+
KeyFactory.prototype.getPersonalAccessTokensQueryKey = function () {
|
|
276
|
+
return this.getKey('personalAccessTokens');
|
|
277
|
+
};
|
|
278
|
+
KeyFactory.prototype.getMyProjectsQueryKey = function (params) {
|
|
279
|
+
return this.getKey('myProjects', params);
|
|
280
|
+
};
|
|
281
|
+
KeyFactory.prototype.getNotificationEmailQueryKey = function () {
|
|
282
|
+
return this.getKey('notificationEmail');
|
|
283
|
+
};
|
|
284
|
+
KeyFactory.prototype.getCurrentUserProfileQueryKey = function () {
|
|
285
|
+
return this.getKey('user', 'current', 'profile');
|
|
286
|
+
};
|
|
287
|
+
KeyFactory.prototype.getUserBundleQueryKey = function (userId, mask) {
|
|
288
|
+
return this.getKey('user', userId, 'bundle', mask);
|
|
289
|
+
};
|
|
290
|
+
KeyFactory.prototype.getUserProfileQueryKey = function (userId) {
|
|
291
|
+
return this.getKey('user', userId, 'profile');
|
|
292
|
+
};
|
|
293
|
+
KeyFactory.prototype.getPrincipalAliasQueryKey = function (request) {
|
|
294
|
+
return this.getKey('principalAlias', request);
|
|
295
|
+
};
|
|
296
|
+
KeyFactory.prototype.getUserGroupHeaderQueryKey = function (id) {
|
|
297
|
+
return this.getKey('userGroupHeader', id);
|
|
298
|
+
};
|
|
299
|
+
KeyFactory.prototype.getUserGroupHeaderWithAliasQueryKey = function (aliases) {
|
|
300
|
+
return this.getKey('userGroupHeader', aliases);
|
|
301
|
+
};
|
|
302
|
+
KeyFactory.prototype.getUserGroupHeaderSearchQueryKey = function (prefix, filter) {
|
|
303
|
+
return this.getKey('userGroupHeader', 'search', prefix, filter);
|
|
304
|
+
};
|
|
305
|
+
return KeyFactory;
|
|
306
|
+
}());
|
|
307
|
+
exports.KeyFactory = KeyFactory;
|
|
308
|
+
//# sourceMappingURL=KeyFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyFactory.js","sourceRoot":"","sources":["../../../../src/lib/utils/hooks/SynapseAPI/KeyFactory.ts"],"names":[],"mappings":";;;;AA6BA,yDAA4E;AAE5E,IAAM,qBAAqB,GAAG;IAC5B,gCAAgC;IAChC,GAAG,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;IAC7B,qBAAqB;IACrB,MAAM,EAAE,UAAC,EAAU,IAAK,OAAA,uCAAM,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAE,EAAE,EAAE,EAAE,IAAG,EAA7C,CAA6C;IACrE,6CAA6C;IAC7C,OAAO,EAAE,UAAC,EAAU,EAAE,aAA+B,IAAK,OAAA,uCACrD,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,KACnC,aAAa,eAAA,IACb,EAHwD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,iBAAiB,EAAE,EAAE,CAAC,CAAA;IAC3C,CAAC;IACM,wDAAmC,GAA1C,UAA2C,OAAiB;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;IAChD,CAAC;IAEM,qDAAgC,GAAvC,UACE,MAAc,EACd,MAAoB;QAEpB,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACjE,CAAC;IACH,iBAAC;AAAD,CAAC,AAhYD,IAgYC;AAhYY,gCAAU"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { QueryClient } from 'react-query';
|
|
2
|
+
import { KeyFactory } from './KeyFactory';
|
|
3
|
+
/**
|
|
4
|
+
* Invalidate all queries for the given entity.
|
|
5
|
+
* @param queryClient
|
|
6
|
+
* @param keyFactory
|
|
7
|
+
* @param id
|
|
8
|
+
*/
|
|
9
|
+
export declare function invalidateAllQueriesForEntity(queryClient: QueryClient, keyFactory: KeyFactory, id: string): Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.invalidateAllQueriesForEntity = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Invalidate all queries for the given entity.
|
|
6
|
+
* @param queryClient
|
|
7
|
+
* @param keyFactory
|
|
8
|
+
* @param id
|
|
9
|
+
*/
|
|
10
|
+
function invalidateAllQueriesForEntity(queryClient, keyFactory, id) {
|
|
11
|
+
// TODO: Figure out how to handle cases where the change can affect other entities.
|
|
12
|
+
// Some examples:
|
|
13
|
+
// - deleting an entity should invalidate the parent's children
|
|
14
|
+
// - moving an entity should invalidate the old and new parent's children
|
|
15
|
+
return queryClient.invalidateQueries(keyFactory.getEntityQueryKey(id));
|
|
16
|
+
}
|
|
17
|
+
exports.invalidateAllQueriesForEntity = invalidateAllQueriesForEntity;
|
|
18
|
+
//# sourceMappingURL=QueryClientUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryClientUtils.js","sourceRoot":"","sources":["../../../../src/lib/utils/hooks/SynapseAPI/QueryClientUtils.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,SAAgB,6BAA6B,CAC3C,WAAwB,EACxB,UAAsB,EACtB,EAAU;IAEV,mFAAmF;IACnF,iBAAiB;IACjB,gEAAgE;IAChE,0EAA0E;IAC1E,OAAO,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAA;AACxE,CAAC;AAVD,sEAUC"}
|
|
@@ -7,8 +7,8 @@ var __1 = require("../../..");
|
|
|
7
7
|
var SynapseContext_1 = require("../../../SynapseContext");
|
|
8
8
|
function useSearchAccessApprovalsInfinite(params, options) {
|
|
9
9
|
var _this = this;
|
|
10
|
-
var
|
|
11
|
-
return (0, react_query_1.useInfiniteQuery)(
|
|
10
|
+
var _a = (0, SynapseContext_1.useSynapseContext)(), accessToken = _a.accessToken, keyFactory = _a.keyFactory;
|
|
11
|
+
return (0, react_query_1.useInfiniteQuery)(keyFactory.searchAccessApprovalsQueryKey(params), function (context) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
12
12
|
return tslib_1.__generator(this, function (_a) {
|
|
13
13
|
switch (_a.label) {
|
|
14
14
|
case 0: return [4 /*yield*/, __1.SynapseClient.searchAccessApprovals(tslib_1.__assign(tslib_1.__assign({}, params), { nextPageToken: context.pageParam }), accessToken)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessApprovals.js","sourceRoot":"","sources":["../../../../../src/lib/utils/hooks/SynapseAPI/dataaccess/useAccessApprovals.ts"],"names":[],"mappings":";;;;AAAA,2CAAuE;AACvE,8BAAwC;AAExC,0DAA2D;AAM3D,SAAgB,gCAAgC,CAC9C,MAAmC,EACnC,OAGC;IALH,
|
|
1
|
+
{"version":3,"file":"useAccessApprovals.js","sourceRoot":"","sources":["../../../../../src/lib/utils/hooks/SynapseAPI/dataaccess/useAccessApprovals.ts"],"names":[],"mappings":";;;;AAAA,2CAAuE;AACvE,8BAAwC;AAExC,0DAA2D;AAM3D,SAAgB,gCAAgC,CAC9C,MAAmC,EACnC,OAGC;IALH,iBAwBC;IAjBO,IAAA,KAA8B,IAAA,kCAAiB,GAAE,EAA/C,WAAW,iBAAA,EAAE,UAAU,gBAAwB,CAAA;IACvD,OAAO,IAAA,8BAAgB,EACrB,UAAU,CAAC,6BAA6B,CAAC,MAAM,CAAC,EAChD,UAAM,OAAO;;;wBACJ,qBAAM,iBAAa,CAAC,qBAAqB,uCAEzC,MAAM,KACT,aAAa,EAAE,OAAO,CAAC,SAAS,KAElC,WAAW,CACZ,EAAA;wBAND,sBAAO,SAMN,EAAA;;;SACF,wCAEI,OAAO,KACV,gBAAgB,EAAE,UAAA,IAAI,IAAI,OAAA,IAAI,CAAC,aAAa,EAAlB,CAAkB,IAE/C,CAAA;AACH,CAAC;AAxBD,4EAwBC"}
|
|
@@ -5,33 +5,31 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var react_query_1 = require("react-query");
|
|
6
6
|
var __1 = require("../../..");
|
|
7
7
|
var SynapseContext_1 = require("../../../SynapseContext");
|
|
8
|
-
var queryKeys_1 = require("../entity/queryKeys");
|
|
9
|
-
var ACCESS_REQUIREMENT_QUERY_KEY = 'accessRequirement';
|
|
10
8
|
function useGetAccessRequirements(accessRequirementId, options) {
|
|
11
|
-
var
|
|
12
|
-
return (0, react_query_1.useQuery)(
|
|
9
|
+
var _a = (0, SynapseContext_1.useSynapseContext)(), accessToken = _a.accessToken, keyFactory = _a.keyFactory;
|
|
10
|
+
return (0, react_query_1.useQuery)(keyFactory.getAccessRequirementQueryKey(String(accessRequirementId)), function () {
|
|
13
11
|
return __1.SynapseClient.getAccessRequirementById(accessToken, accessRequirementId);
|
|
14
12
|
}, options);
|
|
15
13
|
}
|
|
16
14
|
exports.useGetAccessRequirements = useGetAccessRequirements;
|
|
17
15
|
function useGetAccessRequirementWikiPageKey(accessRequirementId, options) {
|
|
18
|
-
var
|
|
19
|
-
return (0, react_query_1.useQuery)(
|
|
16
|
+
var _a = (0, SynapseContext_1.useSynapseContext)(), accessToken = _a.accessToken, keyFactory = _a.keyFactory;
|
|
17
|
+
return (0, react_query_1.useQuery)(keyFactory.getAccessRequirementWikiPageKey(accessRequirementId), function () {
|
|
20
18
|
return __1.SynapseClient.getWikiPageKeyForAccessRequirement(accessToken, accessRequirementId);
|
|
21
19
|
}, options);
|
|
22
20
|
}
|
|
23
21
|
exports.useGetAccessRequirementWikiPageKey = useGetAccessRequirementWikiPageKey;
|
|
24
22
|
function useGetAccessRequirementACL(accessRequirementId, options) {
|
|
25
|
-
var
|
|
26
|
-
return (0, react_query_1.useQuery)(
|
|
23
|
+
var _a = (0, SynapseContext_1.useSynapseContext)(), accessToken = _a.accessToken, keyFactory = _a.keyFactory;
|
|
24
|
+
return (0, react_query_1.useQuery)(keyFactory.getAccessRequirementAclQueryKey(accessRequirementId), function () {
|
|
27
25
|
return __1.SynapseClient.getAccessRequirementAcl(accessToken, accessRequirementId);
|
|
28
26
|
}, options);
|
|
29
27
|
}
|
|
30
28
|
exports.useGetAccessRequirementACL = useGetAccessRequirementACL;
|
|
31
29
|
function useSearchAccessRequirementsInfinite(params, options) {
|
|
32
30
|
var _this = this;
|
|
33
|
-
var
|
|
34
|
-
return (0, react_query_1.useInfiniteQuery)(
|
|
31
|
+
var _a = (0, SynapseContext_1.useSynapseContext)(), accessToken = _a.accessToken, keyFactory = _a.keyFactory;
|
|
32
|
+
return (0, react_query_1.useInfiniteQuery)(keyFactory.searchAccessRequirementsQueryKey(params), function (context) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
35
33
|
return tslib_1.__generator(this, function (_a) {
|
|
36
34
|
switch (_a.label) {
|
|
37
35
|
case 0: return [4 /*yield*/, __1.SynapseClient.searchAccessRequirements(accessToken, tslib_1.__assign(tslib_1.__assign({}, params), { nextPageToken: context.pageParam }))];
|
|
@@ -42,14 +40,15 @@ function useSearchAccessRequirementsInfinite(params, options) {
|
|
|
42
40
|
}
|
|
43
41
|
exports.useSearchAccessRequirementsInfinite = useSearchAccessRequirementsInfinite;
|
|
44
42
|
function useGetRestrictionInformation(request, options) {
|
|
45
|
-
var
|
|
46
|
-
return (0, react_query_1.useQuery)(
|
|
43
|
+
var _a = (0, SynapseContext_1.useSynapseContext)(), accessToken = _a.accessToken, keyFactory = _a.keyFactory;
|
|
44
|
+
return (0, react_query_1.useQuery)(keyFactory.getAccessRequirementRestrictionInformationQueryKey(request), function () { return __1.SynapseClient.getRestrictionInformation(request, accessToken); }, options);
|
|
47
45
|
}
|
|
48
46
|
exports.useGetRestrictionInformation = useGetRestrictionInformation;
|
|
49
47
|
function useCreateLockAccessRequirement(options) {
|
|
50
48
|
var _this = this;
|
|
51
49
|
var accessToken = (0, SynapseContext_1.useSynapseContext)().accessToken;
|
|
52
50
|
var queryClient = (0, react_query_1.useQueryClient)();
|
|
51
|
+
var keyFactory = (0, SynapseContext_1.useSynapseContext)().keyFactory;
|
|
53
52
|
return (0, react_query_1.useMutation)(tslib_1.__assign(tslib_1.__assign({}, options), { mutationFn: function (entityId) {
|
|
54
53
|
return __1.SynapseClient.createLockAccessRequirement(entityId, accessToken);
|
|
55
54
|
}, mutationKey: ['createLockAccessRequirement'], onSuccess: function (data, variables, ctx) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
@@ -57,14 +56,14 @@ function useCreateLockAccessRequirement(options) {
|
|
|
57
56
|
switch (_a.label) {
|
|
58
57
|
case 0:
|
|
59
58
|
// Invalidate all access requirement queries
|
|
60
|
-
return [4 /*yield*/, queryClient.invalidateQueries(
|
|
59
|
+
return [4 /*yield*/, queryClient.invalidateQueries(keyFactory.getAccessRequirementQueryKey())
|
|
61
60
|
// Invalidate all entity queries (not just the current entity because the new AR may apply to this entity's children)
|
|
62
61
|
];
|
|
63
62
|
case 1:
|
|
64
63
|
// Invalidate all access requirement queries
|
|
65
64
|
_a.sent();
|
|
66
65
|
// Invalidate all entity queries (not just the current entity because the new AR may apply to this entity's children)
|
|
67
|
-
return [4 /*yield*/, queryClient.invalidateQueries(
|
|
66
|
+
return [4 /*yield*/, queryClient.invalidateQueries(keyFactory.getAllEntityDataQueryKey())];
|
|
68
67
|
case 2:
|
|
69
68
|
// Invalidate all entity queries (not just the current entity because the new AR may apply to this entity's children)
|
|
70
69
|
_a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessRequirements.js","sourceRoot":"","sources":["../../../../../src/lib/utils/hooks/SynapseAPI/dataaccess/useAccessRequirements.ts"],"names":[],"mappings":";;;;AAAA,2CAQoB;AACpB,8BAAwC;AAExC,0DAA2D;
|
|
1
|
+
{"version":3,"file":"useAccessRequirements.js","sourceRoot":"","sources":["../../../../../src/lib/utils/hooks/SynapseAPI/dataaccess/useAccessRequirements.ts"],"names":[],"mappings":";;;;AAAA,2CAQoB;AACpB,8BAAwC;AAExC,0DAA2D;AAa3D,SAAgB,wBAAwB,CACtC,mBAAoC,EACpC,OAAgD;IAE1C,IAAA,KAA8B,IAAA,kCAAiB,GAAE,EAA/C,WAAW,iBAAA,EAAE,UAAU,gBAAwB,CAAA;IACvD,OAAO,IAAA,sBAAQ,EACb,UAAU,CAAC,4BAA4B,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,EACpE;QACE,OAAA,iBAAa,CAAC,wBAAwB,CACpC,WAAW,EACX,mBAAmB,CACpB;IAHD,CAGC,EACH,OAAO,CACR,CAAA;AACH,CAAC;AAdD,4DAcC;AAED,SAAgB,kCAAkC,CAChD,mBAA2B,EAC3B,OAA0D;IAEpD,IAAA,KAA8B,IAAA,kCAAiB,GAAE,EAA/C,WAAW,iBAAA,EAAE,UAAU,gBAAwB,CAAA;IACvD,OAAO,IAAA,sBAAQ,EACb,UAAU,CAAC,+BAA+B,CAAC,mB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