synapse-react-client 3.3.5 → 3.3.7
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/index.cjs +24 -21
- package/dist/index.d.ts +79 -2
- package/dist/index.js +10865 -9985
- package/dist/style/components/_all.scss +11 -10
- package/dist/style/components/_carousel.scss +45 -0
- package/dist/style/components/_synapse-homepage.scss +360 -0
- package/dist/umd/synapse-react-client.development.css +358 -1
- package/dist/umd/synapse-react-client.development.js +4991 -943
- package/dist/umd/synapse-react-client.production.min.css +2 -2
- package/dist/umd/synapse-react-client.production.min.js +235 -201
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -276,6 +276,7 @@ import { UserGroupHeaderResponse } from '@sage-bionetworks/synapse-types';
|
|
|
276
276
|
import { UserGroupHeaderResponsePage } from '@sage-bionetworks/synapse-types';
|
|
277
277
|
import { UserProfile } from '@sage-bionetworks/synapse-types';
|
|
278
278
|
import { UseStorageValueResult } from '@react-hookz/web/cjs/useStorageValue';
|
|
279
|
+
import { UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
279
280
|
import { ValidateDefiningSqlResponse } from '@sage-bionetworks/synapse-types';
|
|
280
281
|
import { ValidationResults } from '@sage-bionetworks/synapse-types';
|
|
281
282
|
import { VerificationSubmission } from '@sage-bionetworks/synapse-types';
|
|
@@ -832,6 +833,20 @@ declare function createColumnModels(accessToken: string, columnModels: SetOption
|
|
|
832
833
|
*/
|
|
833
834
|
declare const createEntity: <T extends Entity>(entity: T, accessToken: string | undefined) => Promise<T>;
|
|
834
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Create a new Access Control List (ACL), overriding inheritance.
|
|
838
|
+
*
|
|
839
|
+
* By default, Entities such as FileEntity and Folder inherit their permission from their containing Project. For such
|
|
840
|
+
* Entities the Project is the Entity's 'benefactor'. This permission inheritance can be overridden by creating an ACL
|
|
841
|
+
* for the Entity. When this occurs the Entity becomes its own benefactor and all permission are determined by its own ACL.
|
|
842
|
+
*
|
|
843
|
+
* If the ACL of an Entity is deleted, then its benefactor will automatically be set to its parent's benefactor.
|
|
844
|
+
*
|
|
845
|
+
* Note: The caller must be granted ACCESS_TYPE.CHANGE_PERMISSIONS on the Entity to call this method.
|
|
846
|
+
* https://rest-docs.synapse.org/rest/POST/entity/id/acl.html
|
|
847
|
+
*/
|
|
848
|
+
declare const createEntityACL: (acl: AccessControlList, accessToken?: string | undefined) => Promise<AccessControlList>;
|
|
849
|
+
|
|
835
850
|
/**
|
|
836
851
|
* Create an evaluation queue
|
|
837
852
|
* https://rest-docs.synapse.org/rest/POST/evaluation.html
|
|
@@ -1076,6 +1091,21 @@ declare const deleteEmail: (accessToken: string | undefined, email: string) => P
|
|
|
1076
1091
|
|
|
1077
1092
|
declare const deleteEntity: (accessToken: string | undefined, entityId: string | number) => Promise<void>;
|
|
1078
1093
|
|
|
1094
|
+
/**
|
|
1095
|
+
* Delete the Access Control List (ACL) for a given Entity.
|
|
1096
|
+
*
|
|
1097
|
+
* By default, Entities such as FileEntity and Folder inherit their permission from their containing Project. For such
|
|
1098
|
+
* Entities the Project is the Entity's 'benefactor'. This permission inheritance can be overridden by creating an ACL
|
|
1099
|
+
* for the Entity. When this occurs the Entity becomes its own benefactor and all permission are determined by its own ACL.
|
|
1100
|
+
*
|
|
1101
|
+
* If the ACL of an Entity is deleted, then its benefactor will automatically be set to its parent's benefactor. The ACL
|
|
1102
|
+
* for a Project cannot be deleted.
|
|
1103
|
+
*
|
|
1104
|
+
* Note: The caller must be granted ACCESS_TYPE.CHANGE_PERMISSIONS on the Entity to call this method.
|
|
1105
|
+
* https://rest-docs.synapse.org/rest/PUT/entity/id/acl.html
|
|
1106
|
+
*/
|
|
1107
|
+
declare const deleteEntityACL: (id: string, accessToken?: string | undefined) => Promise<void>;
|
|
1108
|
+
|
|
1079
1109
|
/**
|
|
1080
1110
|
* Delete an existing evaluation queue
|
|
1081
1111
|
* https://rest-docs.synapse.org/rest/PUT/evaluation/evalId.html
|
|
@@ -2727,6 +2757,8 @@ declare type ImmutableTableQueryResult = {
|
|
|
2727
2757
|
currentQueryRequest: ReadonlyDeep<QueryBundleRequest>;
|
|
2728
2758
|
/** The next (uncommitted) query request. This will become the current query request when commitChanges is called, or the configured debounced timer elapses. */
|
|
2729
2759
|
nextQueryRequest: ReadonlyDeep<QueryBundleRequest>;
|
|
2760
|
+
/** Resets the debounce timer to delay committing changes in `nextQueryRequest` */
|
|
2761
|
+
resetDebounceTimer: () => void;
|
|
2730
2762
|
/** Update the currentQueryRequest to be the nextQueryRequest */
|
|
2731
2763
|
commitChanges: () => void;
|
|
2732
2764
|
getInitQueryRequest: () => QueryBundleRequest;
|
|
@@ -3573,6 +3605,17 @@ declare const PROJECT: string;
|
|
|
3573
3605
|
|
|
3574
3606
|
export declare const ProjectIcon: () => default_2.JSX.Element;
|
|
3575
3607
|
|
|
3608
|
+
/**
|
|
3609
|
+
* Display a carousel of projects using a Project View. Driven by the following annotations/column names:
|
|
3610
|
+
* projectDisplayName, projectDescription, projectImageFileName. The projectImageFileName must
|
|
3611
|
+
* be an attachment on the project's root wiki page.
|
|
3612
|
+
*/
|
|
3613
|
+
export declare const ProjectViewCarousel: default_2.FunctionComponent<ProjectViewCarouselProps>;
|
|
3614
|
+
|
|
3615
|
+
export declare type ProjectViewCarouselProps = {
|
|
3616
|
+
entityId: string;
|
|
3617
|
+
};
|
|
3618
|
+
|
|
3576
3619
|
export declare const ProvenanceGraph: (props: ProvenanceProps) => default_2.JSX.Element;
|
|
3577
3620
|
|
|
3578
3621
|
export declare type ProvenanceProps = {
|
|
@@ -3656,6 +3699,7 @@ export declare type QueryContextType<TIncludedFields extends OptionalQueryBundle
|
|
|
3656
3699
|
executeQueryRequest: ImmutableTableQueryResult['setQuery'];
|
|
3657
3700
|
/** Resets the query to its initial state, clearing all filters added by the user */
|
|
3658
3701
|
resetQuery: ImmutableTableQueryResult['resetQuery'];
|
|
3702
|
+
resetDebounceTimer: ImmutableTableQueryResult['resetDebounceTimer'];
|
|
3659
3703
|
addValueToSelectedFacet: ImmutableTableQueryResult['addValueToSelectedFacet'];
|
|
3660
3704
|
setRangeFacetValue: ImmutableTableQueryResult['setRangeFacetValue'];
|
|
3661
3705
|
removeSelectedFacet: ImmutableTableQueryResult['removeSelectedFacet'];
|
|
@@ -4402,7 +4446,9 @@ declare namespace SynapseClient {
|
|
|
4402
4446
|
getEntityHeaders,
|
|
4403
4447
|
getEntityAlias,
|
|
4404
4448
|
getEntityHeader,
|
|
4449
|
+
createEntityACL,
|
|
4405
4450
|
updateEntityACL,
|
|
4451
|
+
deleteEntityACL,
|
|
4406
4452
|
updateEntity,
|
|
4407
4453
|
deleteEntity,
|
|
4408
4454
|
getEntityBundleV2,
|
|
@@ -4739,6 +4785,8 @@ declare namespace SynapseComponents {
|
|
|
4739
4785
|
SynapsePlotProps,
|
|
4740
4786
|
ClickCallbackParams,
|
|
4741
4787
|
GraphItem,
|
|
4788
|
+
ProjectViewCarousel,
|
|
4789
|
+
ProjectViewCarouselProps,
|
|
4742
4790
|
Programs,
|
|
4743
4791
|
ProgramsProps,
|
|
4744
4792
|
ProgrammaticTableDownload,
|
|
@@ -5267,11 +5315,16 @@ declare namespace SynapseQueries {
|
|
|
5267
5315
|
useGetEntityAlias,
|
|
5268
5316
|
useGetEntityEvaluations,
|
|
5269
5317
|
useGetEntityPermissions,
|
|
5318
|
+
useCreateEntityACL,
|
|
5270
5319
|
useUpdateEntityACL,
|
|
5320
|
+
useDeleteEntityACL,
|
|
5321
|
+
useSuspenseGetEntityBenefactorACL,
|
|
5271
5322
|
useUpdateTableColumns,
|
|
5272
5323
|
useGetSchemaBinding,
|
|
5273
5324
|
useGetValidationResults,
|
|
5325
|
+
useGetEntityBundleQueryOptions,
|
|
5274
5326
|
useGetEntityBundle,
|
|
5327
|
+
useSuspenseGetEntityBundle,
|
|
5275
5328
|
useGetEntityActionsRequired,
|
|
5276
5329
|
useGetEntityChallenge,
|
|
5277
5330
|
useGetEntityChildren,
|
|
@@ -5329,6 +5382,7 @@ declare namespace SynapseQueries {
|
|
|
5329
5382
|
useGetProjectsInfinite,
|
|
5330
5383
|
useGetNotificationEmail,
|
|
5331
5384
|
useGetCurrentUserProfile,
|
|
5385
|
+
useSuspenseGetCurrentUserProfile,
|
|
5332
5386
|
useGetUserBundle,
|
|
5333
5387
|
useGetCurrentUserBundle,
|
|
5334
5388
|
useGetUserProfile,
|
|
@@ -5799,6 +5853,8 @@ declare function useCreateAccessRequirementACL(options?: UseMutationOptions<Acce
|
|
|
5799
5853
|
|
|
5800
5854
|
declare function useCreateEntity(options?: UseMutationOptions<Entity, SynapseClientError, Pick<Entity, 'name' | 'description' | 'parentId' | 'concreteType'>>): UseMutationResult<Entity, SynapseClientError, Pick<Entity, "name" | "description" | "concreteType" | "parentId">, unknown>;
|
|
5801
5855
|
|
|
5856
|
+
declare function useCreateEntityACL(options?: Partial<UseMutationOptions<AccessControlList, SynapseClientError, AccessControlList>>): UseMutationResult<AccessControlList, SynapseClientError, AccessControlList, unknown>;
|
|
5857
|
+
|
|
5802
5858
|
declare function useCreateLockAccessRequirement(options?: Partial<UseMutationOptions<AccessRequirement, SynapseClientError, string>>): UseMutationResult<AccessRequirement, SynapseClientError, string, unknown>;
|
|
5803
5859
|
|
|
5804
5860
|
declare function useCreateOAuthClient(options?: Partial<UseMutationOptions<OAuthClient, SynapseClientError, OAuthClient>>): UseMutationResult<OAuthClient, SynapseClientError, OAuthClient, unknown>;
|
|
@@ -5826,6 +5882,8 @@ declare function useDeleteAccessRequirementACL(options?: UseMutationOptions<void
|
|
|
5826
5882
|
|
|
5827
5883
|
declare function useDeleteEntity(options?: Partial<UseMutationOptions<void, SynapseClientError, string>>): UseMutationResult<void, SynapseClientError, string, unknown>;
|
|
5828
5884
|
|
|
5885
|
+
declare function useDeleteEntityACL(options?: Partial<UseMutationOptions<void, SynapseClientError, string>>): UseMutationResult<void, SynapseClientError, string, unknown>;
|
|
5886
|
+
|
|
5829
5887
|
declare function useDeleteOAuthClient(options?: Partial<UseMutationOptions<void, SynapseClientError, string>>): UseMutationResult<void, SynapseClientError, string, unknown>;
|
|
5830
5888
|
|
|
5831
5889
|
declare function useDeleteTeamMembership(options?: Partial<UseMutationOptions<void, SynapseClientError, TeamMembershipParam>>): UseMutationResult<void, SynapseClientError, TeamMembershipParam, unknown>;
|
|
@@ -5905,7 +5963,12 @@ declare function useGetEntityActionsRequired(entityId: string, options?: Partial
|
|
|
5905
5963
|
|
|
5906
5964
|
declare function useGetEntityAlias(alias: string, options?: Partial<UseQueryOptions<EntityId | null, SynapseClientError>>): UseQueryResult<EntityId | null, SynapseClientError>;
|
|
5907
5965
|
|
|
5908
|
-
declare function useGetEntityBundle<T extends EntityBundleRequest = typeof ALL_ENTITY_BUNDLE_FIELDS
|
|
5966
|
+
declare function useGetEntityBundle<T extends EntityBundleRequest = typeof ALL_ENTITY_BUNDLE_FIELDS, TSelect = EntityBundle<T>>(entityId: string, version?: number, bundleRequest?: T, options?: Partial<UseQueryOptions<EntityBundle<T>, SynapseClientError, TSelect>>): UseQueryResult<TSelect, SynapseClientError>;
|
|
5967
|
+
|
|
5968
|
+
declare function useGetEntityBundleQueryOptions<T extends EntityBundleRequest = typeof ALL_ENTITY_BUNDLE_FIELDS>(entityId: string, version?: number, bundleRequest?: T): {
|
|
5969
|
+
queryKey: QueryKey;
|
|
5970
|
+
queryFn: () => Promise<EntityBundle<T>>;
|
|
5971
|
+
};
|
|
5909
5972
|
|
|
5910
5973
|
declare function useGetEntityChallenge(entityId: string, options?: Partial<UseQueryOptions<Challenge, SynapseClientError>>): UseQueryResult<Challenge, SynapseClientError>;
|
|
5911
5974
|
|
|
@@ -6036,7 +6099,7 @@ declare function useGetUserGroupHeader(principalId: string, options?: Partial<Us
|
|
|
6036
6099
|
/**
|
|
6037
6100
|
* Get an array of UserGroupHeaders, utilizing a react-query cache. This is always an unauthenticated call
|
|
6038
6101
|
* (the users current email addresses will never be returned in the result).
|
|
6039
|
-
* @param
|
|
6102
|
+
* @param principalIds
|
|
6040
6103
|
* @param options
|
|
6041
6104
|
* @returns
|
|
6042
6105
|
*/
|
|
@@ -6392,6 +6455,20 @@ request: CreateSubmissionRequest;
|
|
|
6392
6455
|
accessRequirementId: string;
|
|
6393
6456
|
}, unknown>;
|
|
6394
6457
|
|
|
6458
|
+
declare function useSuspenseGetCurrentUserProfile(options?: Partial<UseQueryOptions<UserProfile, SynapseClientError>>): UseSuspenseQueryResult<UserProfile, SynapseClientError>;
|
|
6459
|
+
|
|
6460
|
+
/**
|
|
6461
|
+
* Retrieve the ACL of an entity. This call will succeed even for entities where the caller
|
|
6462
|
+
* does not have READ permission.
|
|
6463
|
+
* @param entityId
|
|
6464
|
+
* @param options
|
|
6465
|
+
*/
|
|
6466
|
+
declare function useSuspenseGetEntityBenefactorACL(entityId: string, options?: Partial<UseQueryOptions<EntityBundle<{
|
|
6467
|
+
includeBenefactorACL: true;
|
|
6468
|
+
}>, SynapseClientError, AccessControlList>>): UseSuspenseQueryResult<AccessControlList, SynapseClientError>;
|
|
6469
|
+
|
|
6470
|
+
declare function useSuspenseGetEntityBundle<T extends EntityBundleRequest = typeof ALL_ENTITY_BUNDLE_FIELDS>(entityId: string, version?: number, bundleRequest?: T, options?: Partial<UseQueryOptions<EntityBundle<T>, SynapseClientError>>): UseSuspenseQueryResult<EntityBundle<T>, SynapseClientError>;
|
|
6471
|
+
|
|
6395
6472
|
export declare function useSynapseContext(): SynapseContextType;
|
|
6396
6473
|
|
|
6397
6474
|
declare function useUpdateAccessRequirement<T extends AccessRequirement>(options?: UseMutationOptions<T, SynapseClientError, T>): UseMutationResult<T, SynapseClientError, T, unknown>;
|