synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
801 lines (800 loc) • 88.6 kB
TypeScript
import { OAuth2State } from '@/utils';
import { BackendDestinationEnum } from '@/utils/functions';
import { DoiAssociation, EntityType, ViewEntityType } from '@sage-bionetworks/synapse-client';
import { TwoFactorAuthErrorResponse } from '@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse';
import { ACCESS_TYPE, AccessApproval, AccessApprovalSearchRequest, AccessApprovalSearchResponse, AccessCodeResponse, AccessControlList, AccessRequirement, AccessRequirementSearchRequest, AccessRequirementSearchResponse, AccessRequirementStatus, AccessToken, AccessTokenGenerationRequest, AccessTokenGenerationResponse, AccessTokenRecordList, AccountSetupInfo, ActionRequiredCount, ActionRequiredList, ActionRequiredRequest, ActionRequiredResponse, Activity, ACTSubmissionStatus, AddBatchOfFilesToDownloadListResponse, AddToDownloadListRequest, AddToDownloadListResponse, AgentChatRequest, AgentChatResponse, AgentSession, AliasCheckRequest, AliasCheckResponse, AsynchronousJobStatus, AuthenticatedOn, AvailableFilesRequest, AvailableFilesResponse, BatchFileRequest, BatchFileResult, BulkFileDownloadRequest, BulkFileDownloadResponse, Challenge, ChallengePagedResults, ChallengeTeam, ChallengeTeamPagedResults, ChangePasswordWithCurrentPassword, ChangePasswordWithToken, ChangePasswordWithTwoFactorAuthToken, ColumnModel, CreateAccessApprovalRequest, CreateAgentSessionRequest, CreateChallengeTeamRequest, CreateDiscussionReply, CreateDiscussionThread, CreateMembershipInvitationRequest, CreateMembershipRequestRequest, CreateSubmissionRequest, CreateTeamRequest, Direction, DiscussionFilter, DiscussionReplyBundle, DiscussionReplyOrder, DiscussionSearchRequest, DiscussionSearchResponse, DiscussionThreadBundle, DiscussionThreadOrder, DockerCommit, Doi, DownloadFromTableRequest, DownloadFromTableResult, DownloadList, DownloadListPackageResponse, DownloadOrder, DownloadPFBRequest, DownloadPFBResult, EmailValidationSignedToken, Entity, EntityBundle, EntityBundleRequest, EntityChildrenRequest, EntityChildrenResponse, EntityHeader, EntityId, EntityJson, EntityLookupRequest, EntityPath, Evaluation, EvaluationRound, EvaluationRoundListRequest, EvaluationRoundListResponse, EvaluationSubmission as EvaluationSubmission, FavoriteSortBy, FavoriteSortDirection, FeatureFlags, FileEntity, FileHandle, FileHandleAssociateType, FileHandleAssociation, FileHandleResults, FileResult, FilesStatisticsResponse, FileUploadComplete, FormData, FormGroup, Forum, GetEvaluationParameters, GetProjectsParameters, HasAccessResponse, InviteeVerificationSignedToken, JoinTeamSignedToken, JsonSchemaObjectBinding, ListAgentSessionsRequest, ListAgentSessionsResponse, ListRequest, ListResponse, ListWrapper, LoginResponse, ManagedACTAccessRequirementStatus, MembershipInvitation, MembershipInvtnSignedToken, MembershipRequest, MessageToUser, MessageURL, MultipartUploadRequest, MultipartUploadStatus, NewUser, NotificationEmail, OAuthClient, OAuthClientIdAndSecret, OAuthClientList, OAuthClientPublic, OAuthClientVerificationPrecheckResult, OAuthConsentGrantedResponse, ObjectType, OIDCAuthorizationRequest, OIDCAuthorizationRequestDescription, PaginatedIds, PaginatedResults, PassingRecord, PrincipalAliasRequest, PrincipalAliasResponse, ProjectFilesStatisticsRequest, ProjectFilesStatisticsResponse, ProjectHeaderList, ProjectStorageUsage, QueryBundleRequest, QueryResultBundle, QueryTableResults, Quiz, QuizResponse, ReferenceList, RemoveBatchOfFilesFromDownloadListRequest, RemoveBatchOfFilesFromDownloadListResponse, Renewal, Request, ResearchProject, ResponseMessage, RestrictableObjectDescriptor, RestrictionInformationBatchRequest, RestrictionInformationBatchResponse, RestrictionInformationRequest, RestrictionInformationResponse, SearchQuery, SearchResults, SessionHistoryRequest, SessionHistoryResponse, SortBy, Submission as DataAccessSubmission, SubmissionInfoPage, SubmissionInfoPageRequest, SubmissionSearchRequest, SubmissionSearchResponse, SubmissionStateChangeRequest, SubscriberPagedResults, Subscription, SubscriptionPagedResults, SubscriptionQuery, SubscriptionRequest, SynapseVersion, TableUpdateTransactionRequest, Team, TeamMember, TeamMembershipStatus, TeamSubmissionEligibility, TermsOfServiceInfo, TermsOfServiceStatus, Topic, TotpSecret, TotpSecretActivationRequest, TraceEventsRequest, TraceEventsResponse, TrashedEntity, TwoFactorAuthDisableRequest, TwoFactorAuthLoginRequest, TwoFactorAuthRecoveryCodes, TwoFactorAuthResetRequest, TwoFactorAuthStatus, TYPE_FILTER, UpdateAgentSessionRequest, UpdateDiscussionReply, UpdateThreadMessageRequest, UpdateThreadTitleRequest, UploadDestination, UserBundle, UserEntityPermissions, UserEvaluationPermissions, UserGroupHeaderResponse, UserGroupHeaderResponsePage, UserProfile, ValidateDefiningSqlResponse, ValidationResults, VerificationState, VerificationSubmission, VersionInfo, ViewColumnModelRequest, WikiPage, WikiPageKey } from '@sage-bionetworks/synapse-types';
import { JSONSchema7 } from 'json-schema';
import { SetOptional } from 'type-fest';
export declare const SYNAPSE_STORAGE_LOCATION_ID = 1;
export declare function getRootURL(): string;
export declare const getVersion: () => Promise<SynapseVersion>;
export declare function validateDefiningSql(definingSql: string, entityType: EntityType, accessToken?: string): Promise<ValidateDefiningSqlResponse>;
/**
* https://rest-docs.synapse.org/rest/POST/entity/id/table/download/csv/async/start.html
*/
export declare const createTableCsvForDownload: (request: DownloadFromTableRequest, accessToken?: string | undefined) => Promise<DownloadFromTableResult>;
/**
* https://rest-docs.synapse.org/rest/POST/entity/id/table/download/csv/async/start.html
*/
export declare const createTablePfbForDownload: (request: DownloadPFBRequest, accessToken?: string | undefined) => Promise<DownloadPFBResult>;
/**
* https://rest-docs.synapse.org/rest/GET/fileHandle/handleId.html
* Get a FileHandle using its ID.
* Note: Only the user that created the FileHandle can access it directly.
* @return FileHandle
**/
export declare const getFileHandleById: (handleId: string, accessToken?: string | undefined) => Promise<FileHandle>;
/**
* http://rest-docs.synapse.org/rest/GET/file/id.html
* Get the actual URL of the file from with an associated object .
* @return a short lived presignedURL to be redirected with
**/
export declare const getActualFileHandleByIdURL: (handleId: string, accessToken: string | undefined, fileAssociateType: FileHandleAssociateType, fileAssociateId: string, redirect?: boolean) => Promise<string>;
/**
* https://rest-docs.synapse.org/rest/GET/fileHandle/handleId/url.html
* Note: Only the user that created the FileHandle can use this method for download.
* @return a short lived presignedURL to be redirected with
**/
export declare const getFileHandleByIdURL: (handleId: string, accessToken?: string | undefined) => Promise<string>;
/**
* Get a completed asynchronous job. Will refetch every 500ms until COMPLETE or FAILED.
* @param asyncJobId
* @param responseBodyEndpoint
* @param accessToken
* @param setCurrentAsyncStatus - optional function that will receive the AsynchronousJobStatus object every time
* it's fetched, including while it is in the "PROCESSING" state.
* @returns
*/
export declare const getAsyncResultFromJobId: <TRequest, TResponse>(asyncJobId: string, responseBodyEndpoint: string, accessToken?: string, setCurrentAsyncStatus?: (result: AsynchronousJobStatus<TRequest, TResponse>) => void) => Promise<AsynchronousJobStatus<TRequest, TResponse>>;
/**
* Get the response body for an asynchronous job, or throw an error if the job failed.
* @param asyncJobId
* @param responseBodyEndpoint
* @param accessToken
* @returns
*/
export declare const getAsyncResultBodyFromJobId: <TResponse>(asyncJobId: string, responseBodyEndpoint: string, accessToken?: string) => Promise<TResponse>;
/**
* https://rest-docs.synapse.org/rest/POST/entity/id/table/query/nextPage/async/start.html
* @param {*} queryBundleRequest
* @param {*} accessToken
*/
export declare const getQueryTableAsyncJobResults: (queryBundleRequest: QueryBundleRequest, accessToken?: string, setCurrentAsyncStatus?: (result: AsynchronousJobStatus<QueryBundleRequest, QueryResultBundle>) => void) => Promise<AsynchronousJobStatus<QueryBundleRequest, QueryResultBundle>>;
/**
* https://rest-docs.synapse.org/rest/POST/entity/id/table/query/nextPage/async/start.html
* @param {*} queryBundleRequest
* @param {*} accessToken
* @param {*} signal
*/
export declare const getQueryTableResults: (queryBundleRequest: QueryBundleRequest, accessToken?: string, signal?: AbortSignal) => Promise<QueryResultBundle>;
/**
* Run and return results from queryBundleRequest, queryBundle request must be of the
* form:
* {
* concreteType: String,
* query: {
* sql: String,
* partMask: Number
* }
* }
* @param {*} queryBundleRequest
* @param {*} [accessToken=undefined]
* @returns Full dataset from synapse table query
*/
export declare const getFullQueryTableResults: (queryBundleRequest: QueryBundleRequest, accessToken?: string | undefined, signal?: AbortSignal) => Promise<QueryResultBundle>;
/**
* Log-in using the given username and password. Will return a access token that must be used in
* authenticated requests.
* https://rest-docs.synapse.org/rest/POST/login2.html
*/
export declare function login(username: string, password: string, authenticationReceipt: string | null, endpoint?: BackendDestinationEnum): Promise<LoginResponse | TwoFactorAuthErrorResponse>;
/**
* Performs authentication using 2FA, the body of the request needs to include the twoFaToken received as part of the
* error when authenticating and the totp code shown by the authenticator application.
*
* https://rest-docs.synapse.org/rest/POST/2fa/token.html
*/
export declare function loginWith2fa(request: TwoFactorAuthLoginRequest, endpoint?: BackendDestinationEnum): Promise<LoginResponse>;
/**
* Get redirect url
* https://rest-docs.synapse.org/rest/POST/oauth2/authurl.html
* @param {*} provider
* @param {*} redirectUrl
* @param {*} endpoint
*/
export declare const oAuthUrlRequest: (provider: string, redirectUrl: string, state?: OAuth2State, endpoint?: BackendDestinationEnum) => Promise<{
authorizationUrl: string;
}>;
/**
* Get access token from SSO
* https://rest-docs.synapse.org/rest/POST/oauth2/session2.html
* @param {*} provider
* @param {*} authenticationCode
* @param {*} redirectUrl
* @param {*} endpoint
*/
export declare const oAuthSessionRequest: (provider: string, authenticationCode: string | number, redirectUrl: string, endpoint?: BackendDestinationEnum) => Promise<LoginResponse | TwoFactorAuthErrorResponse>;
/**
* Fetch the current 2FA status for the user.
* https://rest-docs.synapse.org/rest/GET/2fa.html
*/
export declare function getCurrentUserTwoFactorEnrollmentStatus(accessToken?: string): Promise<TwoFactorAuthStatus>;
/**
* Disable 2FA for the user.
* https://rest-docs.synapse.org/rest/DELETE/2fa.html
*/
export declare function disableTwoFactorAuthForCurrentUser(accessToken?: string): Promise<void>;
/**
* https://rest-docs.synapse.org/rest/POST/2fa/enroll.html
*/
export declare function start2FAEnrollment(accessToken?: string): Promise<TotpSecret>;
/**
* https://rest-docs.synapse.org/rest/POST/2fa.html
*/
export declare function complete2FAEnrollment(request: TotpSecretActivationRequest, accessToken?: string): Promise<TwoFactorAuthStatus>;
/**
* Generates a new set of single use recovery codes that are associated with the two factor authentication of the user.
* The recovery codes are single use and can be used to login with 2FA in place of an TOTP. In order to use a recovery
* code the body of the login request should specify as the otpType RECOVERY_CODE and the otpCode should match one of
* the generated recovery codes.
*
* Note that invoking this endpoint will replace existing recovery codes.
*
* https://rest-docs.synapse.org/rest/POST/2fa/recoveryCodes.html
*/
export declare function createRecoveryCodes(accessToken?: string): Promise<TwoFactorAuthRecoveryCodes>;
/**
* Initiates the reset of two-factor authentication, sending a notification to the user with a signed token. The request
* can be performed using the twoFaToken received from an authentication request that requires two-factor authentication.
*/
export declare function resetTwoFactorAuth(request: TwoFactorAuthResetRequest): Promise<void>;
/**
* Disables two-factor authentication for the user encoded in the signed token received by email following a call to the
* POST /2fa/reset endpoint. The request should include the signed token and a twoFaToken received from an authentication
* request that requires two-factor authentication.
*/
export declare function disableTwoFactorAuth(request: TwoFactorAuthDisableRequest): Promise<void>;
/**
* Create an entity (Project, Folder, File, Table, View)
* https://rest-docs.synapse.org/rest/POST/entity.html
*/
export declare const createEntity: <T extends Entity>(entity: T, accessToken: string | undefined) => Promise<T>;
/**
* Create a project with the given name.
* https://rest-docs.synapse.org/rest/POST/entity.html
*/
export declare const createProject: (name: string, accessToken: string | undefined) => Promise<Entity>;
/**
* Return this user's UserProfile
* https://rest-docs.synapse.org/rest/GET/userProfile.html
*/
export declare const getUserProfile: (accessToken: string | undefined) => Promise<UserProfile>;
/**
* Return any user's UserProfile
* https://rest-docs.synapse.org/rest/GET/userProfile.html
*/
export declare const getUserProfileById: (ownerId: string, accessToken?: string) => Promise<UserProfile>;
/**
* Return this user's profile bundle
* https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserBundle.html
*/
export declare const getUserBundle: (id: string, mask: number, accessToken: string | undefined) => Promise<UserBundle>;
/**
* Return the current user's bundle
* http://rest-docs.synapse.org/rest/GET/user/bundle.html
*/
export declare const getMyUserBundle: (mask: number, accessToken: string | undefined) => Promise<UserBundle>;
/**
* Update your own profile
* @param profile
* @param accessToken
* @returns
*/
export declare const updateMyUserProfile: (profile: UserProfile, accessToken?: string | undefined) => Promise<UserProfile>;
/**
* Get Users and Groups that match the given prefix.
* http://rest-docs.synapse.org/rest/GET/userGroupHeaders.html
*/
export declare const getUserGroupHeaders: (prefix?: string, typeFilter?: TYPE_FILTER, offset?: number, limit?: number, accessToken?: string) => Promise<UserGroupHeaderResponsePage>;
/**
* Get Users and Groups that match the given list of aliases.
* https://repo-prod.prod.sagebase.org/repo/v1/userGroupHeaders/aliases
*/
export declare const postUserGroupHeadersWithAlias: (aliases: string[], accessToken?: string) => Promise<UserGroupHeaderResponse>;
/**
* Return batch of user group headers
* https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserGroupHeaderResponsePage.html
*/
export declare const getGroupHeadersBatch: (ids: string[], accessToken?: string) => Promise<UserGroupHeaderResponsePage>;
/**
* Return a batch of Evaluation queues
* https://rest-docs.synapse.org/rest/GET/evaluation.html
*/
export declare const getEvaluations: (params?: GetEvaluationParameters, accessToken?: string) => Promise<PaginatedResults<Evaluation>>;
export type UserProfileList = {
list: UserProfile[];
};
/**
* Return the User Profiles for the given list of user IDs
* https://rest-docs.synapse.org/rest/POST/userProfile.html
*/
export declare const getUserProfiles: (list: string[], accessToken?: string | undefined) => Promise<UserProfileList>;
/**
* Return the children (Files/Folders) of the given entity (Project or Folder).
* https://rest-docs.synapse.org/rest/POST/entity/children.html
*/
export declare const getEntityChildren: (request: EntityChildrenRequest, accessToken?: string | undefined, signal?: AbortSignal) => Promise<EntityChildrenResponse>;
/**
* Retrieve an entityId for a given parent ID and entity name.
* https://rest-docs.synapse.org/rest/POST/entity/child.html
*/
export declare const lookupChildEntity: (request: EntityLookupRequest, accessToken?: string | undefined) => Promise<EntityId>;
/**
* Get a batch of pre-signed URLs and/or FileHandles for the given list of FileHandleAssociations.
* https://rest-docs.synapse.org/rest/POST/fileHandle/batch.html
*/
export declare const getFiles: (request: BatchFileRequest, accessToken?: string | undefined) => Promise<BatchFileResult>;
/**
* Get a batch of pre-signed URLs and/or FileHandles for the given list of FileHandleAssociations.
* https://rest-docs.synapse.org/rest/POST/fileHandle/batch.html
*/
export declare const getBulkFiles: (bulkFileDownloadRequest: BulkFileDownloadRequest, accessToken?: string | undefined) => Promise<BulkFileDownloadResponse>;
/**
* Bundled access to Entity and related data components.
* An EntityBundle can be used to create, fetch, or update an Entity and associated
* objects with a single web service request.
* See SynapseClient.test.js for an example partsMask.
* https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Entity.html
*/
export declare const getEntity: <T extends Entity>(accessToken: string | undefined, entityId: string, versionNumber?: string | number) => Promise<T>;
export declare const getEntityHeadersByIds: (entityIds: string[], accessToken?: string) => Promise<PaginatedResults<EntityHeader>>;
/**
* Get the EntityHeader for a list of references with a POST.
* If any item in the batch fails (e.g., with a 404) it will be EXCLUDED in the result set.
* https://rest-docs.synapse.org/rest/POST/entity/header.html
*/
export declare const getEntityHeaders: (references: ReferenceList, accessToken?: string) => Promise<PaginatedResults<EntityHeader>>;
/**
* Lookup an Entity ID using an alias.
* https://rest-docs.synapse.org/rest/GET/entity/alias/alias.html
*/
export declare const getEntityAlias: (alias: string, accessToken?: string) => Promise<EntityId | null>;
/**
* Get the EntityHeader for a single entity.
*
* Note that this will not throw an error if not found or unauthorized.
* See https://sagebionetworks.jira.com/browse/PLFM-7989
*/
export declare const getEntityHeader: (entityId: string, versionNumber?: number, accessToken?: string) => Promise<EntityHeader | undefined>;
/**
* Create a new Access Control List (ACL), overriding inheritance.
*
* By default, Entities such as FileEntity and Folder inherit their permission from their containing Project. For such
* Entities the Project is the Entity's 'benefactor'. This permission inheritance can be overridden by creating an ACL
* for the Entity. When this occurs the Entity becomes its own benefactor and all permission are determined by its own ACL.
*
* If the ACL of an Entity is deleted, then its benefactor will automatically be set to its parent's benefactor.
*
* Note: The caller must be granted ACCESS_TYPE.CHANGE_PERMISSIONS on the Entity to call this method.
* https://rest-docs.synapse.org/rest/POST/entity/id/acl.html
*/
export declare const createEntityACL: (acl: AccessControlList, accessToken?: string | undefined) => Promise<AccessControlList>;
/**
* Update an Entity's ACL
* Note: The caller must be granted ACCESS_TYPE.CHANGE_PERMISSIONS on the Entity to call this method.
* https://rest-docs.synapse.org/rest/PUT/entity/id/acl.html
*/
export declare const updateEntityACL: (acl: AccessControlList, accessToken?: string | undefined) => Promise<AccessControlList>;
/**
* Delete the Access Control List (ACL) for a given Entity.
*
* By default, Entities such as FileEntity and Folder inherit their permission from their containing Project. For such
* Entities the Project is the Entity's 'benefactor'. This permission inheritance can be overridden by creating an ACL
* for the Entity. When this occurs the Entity becomes its own benefactor and all permission are determined by its own ACL.
*
* If the ACL of an Entity is deleted, then its benefactor will automatically be set to its parent's benefactor. The ACL
* for a Project cannot be deleted.
*
* Note: The caller must be granted ACCESS_TYPE.CHANGE_PERMISSIONS on the Entity to call this method.
* https://rest-docs.synapse.org/rest/PUT/entity/id/acl.html
*/
export declare const deleteEntityACL: (id: string, accessToken?: string | undefined) => Promise<void>;
export declare const updateEntity: <T extends Entity>(entity: T, accessToken?: string | undefined, newVersion?: boolean) => Promise<T>;
export declare const deleteEntity: (accessToken: string | undefined, entityId: string | number) => Promise<void>;
export declare const getEntityBundleV2: <T extends EntityBundleRequest>(entityId: string | number, requestObject: T, version?: number, accessToken?: string) => Promise<EntityBundle<T>>;
/**
* Get Wiki page contents, call is of the form:
* https://rest-docs.synapse.org/rest/GET/entity/ownerId/wiki.html
*/
export declare const getEntityWiki: (accessToken: string | undefined, ownerId: string | undefined, wikiId?: string | undefined, objectType?: ObjectType) => Promise<WikiPage>;
/**
* Returns synapse user favorites list given their access token
* https://rest-docs.synapse.org/rest/GET/favorite.html
*/
export declare function getUserFavorites(accessToken: string | undefined, offset?: number, limit?: number, sort?: FavoriteSortBy, sortDirection?: FavoriteSortDirection): Promise<PaginatedResults<EntityHeader>>;
export declare function getAllUserFavorites(accessToken: string | undefined, sort?: FavoriteSortBy, sortDirection?: FavoriteSortDirection): Promise<EntityHeader[]>;
/**
* Add an Entity as a Favorite of the caller.
* http://rest-docs.synapse.org/rest/POST/favorite/id.html
*/
export declare function addUserFavorite(entityId: string, accessToken: string | undefined): Promise<EntityHeader>;
/**
* Remove a favorite
* http://rest-docs.synapse.org/rest/DELETE/favorite/id.html
*/
export declare const removeUserFavorite: (entityId: string, accessToken: string | undefined) => Promise<void>;
/**
* Get a list of challenges for which the given user is registered.
* see http://rest-docs.synapse.org/rest/GET/challenge.html
*/
export declare const getUserChallenges: (accessToken: string | undefined, userId: string | number, offset?: string | number, limit?: string | number) => Promise<ChallengePagedResults>;
/**
* Get a user's certification quiz passing record
* see https://rest-docs.synapse.org/rest/GET/user/id/certifiedUserPassingRecord.html
*/
export declare const getPassingRecord: (userId: string | number, accessToken: string | undefined) => Promise<PassingRecord | null>;
/**
* Revokes the certification for the user. Only an ACT member can perform this operation.
* https://rest-docs.synapse.org/rest/PUT/user/id/revokeCertification.html
*/
export declare const revokeCertification: (userId: string, accessToken: string) => Promise<PassingRecord>;
/**
* Get a list of teams registered to the given challenge.
* see http://rest-docs.synapse.org/rest/GET/challenge.html
*/
export declare const getChallengeTeams: (accessToken: string | undefined, challengeId: string | number, offset?: string | number, limit?: string | number) => Promise<ChallengeTeamPagedResults>;
/**
* Get a list of all teams registered to the given challenge.
* see http://rest-docs.synapse.org/rest/GET/challenge.html
*/
export declare const getAllChallengeTeams: (accessToken: string | undefined, challengeId: string | number) => Promise<ChallengeTeam[]>;
/**
* List the Teams under which the given submitter may submit to the Challenge,
* i.e. the Teams on which the user is a member and which are registered for the Challenge.
* see https://rest-docs.synapse.org/rest/GET/challenge/challengeId/submissionTeams.html
*/
export declare const getSubmissionTeams: (accessToken: string | undefined, challengeId: string | number, offset?: string | number, limit?: string | number) => Promise<PaginatedIds>;
/**
* Find out whether a Team and its members are eligible to submit to a given Evaluation queue (at the current time).
* see https://rest-docs.synapse.org/rest/GET/evaluation/evalId/team/id/submissionEligibility.html
*/
export declare const getSubmissionEligibility: (evaluationId: string, teamId: string, accessToken?: string) => Promise<TeamSubmissionEligibility>;
/**
* Register a Team with a Challenge.
* see https://rest-docs.synapse.org/rest/POST/challenge/challengeId/challengeTeam.html
*/
export declare const registerChallengeTeam: (challengeTeam: CreateChallengeTeamRequest, accessToken: string | undefined) => Promise<ChallengeTeam>;
/**
* Get the Challenge associated to a particular Project entity
* https://rest-docs.synapse.org/rest/GET/entity/id/challenge.html
*/
export declare const getEntityChallenge: (entityId: string | number, accessToken: string | undefined) => Promise<Challenge>;
/**
* Create a new Team
* https://rest-docs.synapse.org/rest/POST/team.html
*/
export declare function createTeam(team: CreateTeamRequest, accessToken: string | undefined): Promise<Team>;
/**
* Get the user's list of teams they are on
*
* @param {*} id ownerID of the synapse user see - https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/UserProfile.html
*/
export declare const getUserTeamList: (accessToken: string | undefined, userId: string | number, offset?: string | number, limit?: string | number) => Promise<PaginatedResults<Team>>;
/**
* Get the access requirements associated with a team
*
* @param {(string | undefined)} accessToken token of user
* @param {*} teamId teamId of the synapse team - https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/Team.html
* @param {*} offset (optional) the starting index of the returned results (default 0)
* @param {*} limit (optional) the maximum number of access requirements to return (default 50)
* @returns {Promise<Array<AccessRequirement>>}
*/
export declare const getTeamAccessRequirements: (accessToken: string | undefined, teamId: string) => Promise<AccessRequirement[]>;
/**
* Get a list of members for a team
*
* @param {*} id ownerID of the synapse user see -https://rest-docs.synapse.org/rest/GET/teamMembers/id.html
* @param {*} fragment (optional) a prefix of the user's first or last name or email address (optional)
* @param {*} limit (optional) the maximum number of members to return (default 10, max limit 50)
* @param {*} offset (optional) the starting index of the returned results (default 0)
*
*/
export declare const getTeamMembers: (accessToken: string | undefined, teamId: string | number, fragment?: string, limit?: number, offset?: number) => Promise<PaginatedResults<TeamMember>>;
/**
* Add a member to the Team
* https://rest-docs.synapse.org/rest/PUT/teamMember.html
*/
export declare const addTeamMemberWithToken: (joinTeamSignedToken: JoinTeamSignedToken) => Promise<ResponseMessage>;
/**
* Add member to the Team
* https://rest-docs.synapse.org/rest/PUT/team/id/member/principalId.html
*/
export declare const addTeamMemberAsAuthenticatedUserOrAdmin: (teamId: string, memberId: string, accessToken: string) => Promise<void>;
/**
* Retrieve the open membership invitations for a user
* https://rest-docs.synapse.org/rest/GET/user/id/openInvitation.html
*/
export declare function getOpenMembershipInvitationsForUser(userId: string, accessToken: string): Promise<PaginatedResults<MembershipInvitation>>;
/**
* Retrieve all open membership invitations for a user.
*/
export declare function getAllOpenMembershipInvitationsForUser(userId: string, accessToken: string): Promise<MembershipInvitation[]>;
/**
* Create a membership invitation and send an email notification to the invitee.
* https://rest-docs.synapse.org/rest/POST/membershipInvitation.html
*/
export declare function createMembershipInvitation(membershipInvitation: CreateMembershipInvitationRequest, accessToken: string | undefined): Promise<MembershipInvitation>;
export declare const getMembershipInvitation: (membershipInvitationSignedToken: MembershipInvtnSignedToken) => Promise<MembershipInvitation>;
export declare const getInviteeVerificationSignedToken: (membershipInvitationId: string, accessToken: string) => Promise<InviteeVerificationSignedToken>;
export declare const bindInvitationToAuthenticatedUser: (inviteeVerificationSignedToken: InviteeVerificationSignedToken, membershipInvitationId: string, accessToken: string) => Promise<unknown>;
/**
* Checks if a user is a member of a specific team.
*
* @returns a TeamMember if the user is a member of the team, or null if the user is not.
*/
export declare const getIsUserMemberOfTeam: (teamId: string, userId: string, accessToken?: string) => Promise<TeamMember | null>;
/**
* Retrieve the Team Membership Status bundle for a team and user.
* https://rest-docs.synapse.org/rest/GET/team/id/member/principalId/membershipStatus.html
*/
export declare const getMembershipStatus: (teamId: string | number, userId: string | number, accessToken?: string) => Promise<TeamMembershipStatus>;
/**
* Create a membership request and send an email notification to the administrators of the team. The Team must be specified. Optionally, the creator may include a message and/or expiration date for the request. If no expiration date is specified then the request never expires.
*
* https://rest-docs.synapse.org/rest/POST/membershipRequest.html
*/
export declare const createMembershipRequest: (membershipRequest: CreateMembershipRequestRequest, accessToken?: string) => Promise<MembershipRequest>;
/**
* Remove the given member from the specified Team. Note: The client must either be a Team administrator or the member being removed.
* https://rest-docs.synapse.org/rest/DELETE/team/id/member/principalId.html
*/
export declare const deleteMemberFromTeam: (teamId: string, userId: string, accessToken: string | undefined) => Promise<void>;
/**
* Get Team that matches the given ID.
* https://rest-docs.synapse.org/rest/GET/team/id.html
*/
export declare const getTeam: (id: string | number, accessToken?: string) => Promise<Team>;
/**
* Get Teams that match the given list of IDs.
* https://rest-docs.synapse.org/rest/POST/teamList.html
*/
export declare const getTeamList: (ids: string[] | number[], accessToken?: string) => Promise<ListWrapper<Team>>;
/**
* https://rest-docs.synapse.org/rest/GET/entity/ownerId/wikikey.html
* Get the root WikiPageKey for an Entity.
* Note: The caller must be granted the ACCESS_TYPE.READ permission on the owner.
* @return WikiPageKey
**/
export declare const getWikiPageKeyForEntity: (accessToken: string | undefined, ownerId: string | number) => Promise<WikiPageKey>;
/**
* https://rest-docs.synapse.org/rest/GET/access_requirement/ownerId/wikikey.html
* Get the root WikiPageKey for an Access Requirement.
* Note: The caller must be granted the ACCESS_TYPE.READ permission on the owner.
* @return WikiPageKey
**/
export declare const getWikiPageKeyForAccessRequirement: (accessToken: string | undefined, ownerId: string | number) => Promise<WikiPageKey>;
/**
* Get the root WikiPageKey for the following ObjectTypes:
* - ENTITY: https://rest-docs.synapse.org/rest/GET/entity/ownerId/wikikey.html
* - EVALUATION: https://rest-docs.synapse.org/rest/GET/evaluation/ownerId/wikikey.html
* - ACCESS_REQUIREMENT: https://rest-docs.synapse.org/rest/GET/access_requirement/ownerId/wikikey.html
*
* Note: The caller must be granted the ACCESS_TYPE.READ permission on the owner.
*
* @returns a WikiPageKey if the ownerObject has a root WikiPageKey, or null if the ownerObject does not.
*/
export declare const getRootWikiPageKey: (accessToken: string | undefined, ownerObjectType: ObjectType, ownerObjectId: string) => Promise<WikiPageKey | null>;
export declare const getWikiAttachmentsFromEntity: (accessToken: string | undefined, id: string | number, wikiId: string | number, objectType?: ObjectType) => Promise<FileHandleResults>;
export declare const getWikiAttachmentsFromEvaluation: (accessToken: string | undefined, id: string | number, wikiId: string | number) => Promise<unknown>;
export declare const getPresignedUrlForWikiAttachment: (accessToken: string | undefined, id: string | number, wikiId: string | number, fileName: string, objectType?: ObjectType) => Promise<string>;
/**
* Get specific WikiPage for the following ObjectTypes:
* - ENTITY: https://rest-docs.synapse.org/rest/GET/entity/ownerId/wiki/wikiId.html
* - EVALUATION: https://rest-docs.synapse.org/rest/GET/evaluation/ownerId/wiki/wikiId.html
* - ACCESS_REQUIREMENT: https://rest-docs.synapse.org/rest/GET/access_requirement/ownerId/wiki/wikiId.html
*
* Note: The caller must be granted the ACCESS_TYPE.READ permission on the owner.
*/
export declare const getWikiPage: (accessToken: string | undefined, wikiPageKey: WikiPageKey) => Promise<WikiPage>;
/**
* Create a WikiPage with the following ObjectTypes as an owner:
* - ENTITY: https://rest-docs.synapse.org/rest/POST/entity/ownerId/wiki.html
* - EVALUATION: https://rest-docs.synapse.org/rest/POST/evaluation/ownerId/wiki.html
* - ACCESS_REQUIREMENT: https://rest-docs.synapse.org/rest/POST/access_requirement/ownerId/wiki.html
*
* Note: The caller must be granted the ACCESS_TYPE.CREATE permission on the owner.
* If the passed WikiPage is a root (parentWikiId = null) and the owner already has a root WikiPage, an error will be returned.
*/
export declare const createWikiPage: (accessToken: string | undefined, ownerObjectType: ObjectType, ownerObjectId: string, wikiPage: Omit<WikiPage, "id" | "etag" | "createdOn" | "createdBy" | "modifiedOn" | "modifiedBy">) => Promise<WikiPage>;
/**
* Update a specific WikiPage for the following ObjectTypes:
* - ENTITY: https://rest-docs.synapse.org/rest/PUT/entity/ownerId/wiki/wikiId.html
* - EVALUATION: https://rest-docs.synapse.org/rest/PUT/evaluation/ownerId/wiki/wikiId.html
* - ACCESS_REQUIREMENT: https://rest-docs.synapse.org/rest/PUT/access_requirement/ownerId/wiki/wikiId.html
*
* Synapse employs an Optimistic Concurrency Control (OCC) scheme to handle concurrent updates.
* Each time a WikiPage is updated a new etag will be issued to the WikiPage. When an update is request,
* Synapse will compare the etag of the passed WikiPage with the current etag of the WikiPage.
* If the etags do not match, then the update will be rejected with a PRECONDITION_FAILED (412) response.
* When this occurs the caller should get the latest copy of the WikiPage and re-apply any changes to the object,
* then re-attempt the update. This ensures the caller has all changes applied by other users before applying their own changes.
*
* Note: The caller must be granted the ACCESS_TYPE.UPDATE permission on the owner.
*/
export declare const updateWikiPage: (accessToken: string | undefined, ownerObjectType: ObjectType, ownerObjectId: string, wikiPage: WikiPage) => Promise<WikiPage>;
export declare const isInSynapseExperimentalMode: () => boolean;
/**
* Set the access token cookie. Note that this will only succeed if your app is running on
* a .synapse.org subdomain.
*
* @param {*} token Access token. If undefined, then call should instruct the browser to delete the cookie.
*/
export declare const setAccessTokenCookie: (token: string | undefined) => Promise<void>;
/**
* Get the current access token from a cookie. Note that this will only succeed if your app is running on
* a .synapse.org subdomain.
*
* @throws SynapseClientError if the token is expired or not found by the servlet
*/
export declare const getAccessTokenFromCookie: () => Promise<string | undefined>;
export declare const getUseUtcTimeFromCookie: () => boolean;
export declare const getPrincipalAliasRequest: (accessToken: string | undefined, request: PrincipalAliasRequest) => Promise<PrincipalAliasResponse>;
export declare function deleteSessionAccessToken(accessToken: string): Promise<void>;
export declare function deleteAllSessionAccessTokens(accessToken: string): Promise<void>;
/**
* Sign out of the current session by replacing the current token with a fresh anonymous token in the specified realm.
* @returns the new anonymous access token that was set in the cookie
* @deprecated - Use `clearSession` provided by context, which will provide the correct default realm for the current application.
*/
export declare const signOut: (realm?: string) => Promise<string>;
export type ProgressCallback = {
value: number;
total: number;
};
/**
* Upload file to Synapse, creating a FileHandle
* @param accessToken
* @param file
* @param endpoint
*/
export declare const uploadFile: (accessToken: string | undefined, filename: string, file: Blob, storageLocationId?: number, contentType?: string, progressCallback?: (progress: ProgressCallback) => void, getIsCancelled?: () => boolean, onMd5Computed?: () => void, abortController?: AbortController) => Promise<FileUploadComplete>;
/**
* Calculate the MD5 of the data in a Blob. This function is memoized, so if the same {@link Blob} object is
* passed after the MD5 is computed, no computation will occur.
*/
export declare const calculateMd5: (blob: Blob) => Promise<string>;
export declare const checkUploadComplete: (status: MultipartUploadStatus, clientSidePartsState: boolean[], fileHandleName: string, accessToken: string | undefined, fileUploadResolve: (fileUpload: FileUploadComplete) => void, fileUploadReject: (reason: any) => void) => void;
export declare const startMultipartUpload: (accessToken: string | undefined, fileName: string, file: Blob, request: MultipartUploadRequest, fileUploadResolve: (fileUpload: FileUploadComplete) => void, fileUploadReject: (reason: any) => void, progressCallback?: (progress: ProgressCallback) => void, getIsCancelled?: () => boolean, abortController?: AbortController) => void;
export declare const getFileHandleContentFromID: (fileHandleId: string, accessToken: string) => Promise<string>;
export declare const getFileHandleContent: (fileHandle: FileHandle, presignedUrl: string, maxFileSizeBytes?: number) => Promise<string>;
/**
* Return the FileHandle of the file associated to the given FileEntity.
* * @param fileEntity: FileEntity
* @param accessToken
* @param endpoint
*/
export declare const getFileResult: (fileEntity: FileEntity, accessToken?: string, includeFileHandles?: boolean, includePreSignedURLs?: boolean, includePreviewPreSignedURLs?: boolean) => Promise<FileResult>;
/**
* Add a batch of files to the user's download list.
* Uses http://rest-docs.synapse.org/rest/POST/download/list/add.html
* @param batchToAdd
*/
export declare const addFileBatchToDownloadListV2: (batchToAdd: {
fileEntityId: string;
versionNumber?: number;
}[], accessToken?: string) => Promise<AddBatchOfFilesToDownloadListResponse>;
/**
* Add a file to the user's download list.
* Uses http://rest-docs.synapse.org/rest/POST/download/list/add.html
* @param fileEntityId
* @param versionNumber
*/
export declare const addFileToDownloadListV2: (fileEntityId: string, versionNumber?: number, accessToken?: string) => Promise<AddBatchOfFilesToDownloadListResponse>;
/**
* http://rest-docs.synapse.org/rest/POST/download/list/package/async/start.html
*/
export declare const createPackageFromDownloadListV2: (zipFileName?: string, accessToken?: string) => Promise<DownloadListPackageResponse>;
/**
* http://rest-docs.synapse.org/rest/POST/download/list/package/async/start.html
*/
export declare const createManifestFromDownloadListV2: (accessToken?: string | undefined) => Promise<unknown>;
/**
* http://rest-docs.synapse.org/rest/POST/download/list/add/async/start.html
* Start an asynchronous job to add files to a user's download list from either a view query or a folder. Use GET /download/list/add/async/get/{asyncToken} to get both the job status and job results.
*/
export declare const addFilesToDownloadListV2: (request: AddToDownloadListRequest, accessToken?: string | undefined) => Promise<AddToDownloadListResponse>;
/**
* Create an ACL
* https://rest-docs.synapse.org/rest/POST/entity/id/acl.html
*/
export declare const createACL: (entityId: string, acl: AccessControlList, accessToken: string | undefined) => Promise<unknown>;
/**
* Submit an entity to an evaluation queue
* https://rest-docs.synapse.org/rest/POST/evaluation/submission.html
*/
export declare const submitToEvaluation: (accessToken: string | undefined, submission: EvaluationSubmission, etag: string, submissionEligibilityHash?: number) => Promise<unknown>;
export declare const getEvaluationPermissions: (evalId: string, accessToken: string | undefined) => Promise<UserEvaluationPermissions>;
/**
* Get an evaluation queue
* https://rest-docs.synapse.org/rest/GET/evaluation/evalId.html
*/
export declare const getEvaluation: (evalId: string, accessToken: string | undefined) => Promise<Evaluation>;
/**
* Update an existing evaluation queue
* https://rest-docs.synapse.org/rest/PUT/evaluation/evalId.html
*/
export declare const updateEvaluation: (evaluation: Evaluation, accessToken: string | undefined) => Promise<Evaluation>;
/**
* Create an evaluation queue
* https://rest-docs.synapse.org/rest/POST/evaluation.html
*/
export declare const createEvaluation: (evaluation: Evaluation, accessToken: string | undefined) => Promise<Evaluation>;
/**
* Delete an existing evaluation queue
* https://rest-docs.synapse.org/rest/PUT/evaluation/evalId.html
*/
export declare const deleteEvaluation: (evalId: string, accessToken: string | undefined) => Promise<void>;
/**
* Get an evaluation round
* https://rest-docs.synapse.org/rest/GET/evaluation/evalId/round/evalRoundId.html
*/
export declare const getEvaluationRound: (evalId: string, evalRoundId: string, accessToken: string | undefined) => Promise<EvaluationRound>;
/**
* Get all evaluation rounds
* https://rest-docs.synapse.org/rest/GET/evaluation/evalId/round/list.html
*/
export declare const getEvaluationRoundsList: (evalId: string, evaluationRoundListRequest: EvaluationRoundListRequest | undefined, accessToken: string | undefined) => Promise<EvaluationRoundListResponse>;
/**
* Create an evaluation round
* https://rest-docs.synapse.org/rest/POST/evaluation/evalId/round/evalRoundId.html
*/
export declare const createEvaluationRound: (evaluationRound: EvaluationRound, accessToken: string | undefined) => Promise<EvaluationRound>;
/**
* Update an evaluation round
* https://rest-docs.synapse.org/rest/PUT/evaluation/evalId/round/evalRoundId.html
*/
export declare const updateEvaluationRound: (evaluationRound: EvaluationRound, accessToken: string | undefined) => Promise<EvaluationRound>;
/**
* Delete an evaluation round
* https://rest-docs.synapse.org/rest/DELETE/evaluation/evalId/round/evalRoundId.html
*/
export declare const deleteEvaluationRound: (evalId: string, evalRoundId: string, accessToken: string | undefined) => Promise<void>;
/**
* Executes a user-defined query over the Submissions of a specific Evaluation.
* https://rest-docs.synapse.org/rest/GET/evaluation/submission/query.html
*/
export declare const getEvaluationSubmissions: (query: string, accessToken: string | undefined) => Promise<QueryTableResults>;
/**
* Get user-friendly OAuth2 request information (to present to the user so they can choose if they want to give consent).
* http://rest-docs.synapse.org/rest/POST/oauth2/description.html
*/
export declare const getOAuth2RequestDescription: (oidcAuthRequest: OIDCAuthorizationRequest) => Promise<OIDCAuthorizationRequestDescription>;
/**
* Check whether user has already granted consent for the given OAuth client, scope, and claims.
* Consent persists for one year.
*/
export declare const hasUserAuthorizedOAuthClient: (oidcAuthRequest: OIDCAuthorizationRequest, accessToken: string) => Promise<OAuthConsentGrantedResponse>;
/**
* Get OAuth2 Client information (available to the public)
*/
export declare const getOAuth2Client: (clientId: string) => Promise<OAuthClientPublic>;
/**
List the OAuth 2.0 clients created by the current user.
*/
export declare const getOAuth2: (accessToken: string, nextPageToken?: string) => Promise<OAuthClientList>;
/**
Create an OAuth 2.0 client.
Note: The client name must be unique.
Note: After creating the client one must also set the client secret and have their client verified
https://rest-docs.synapse.org/rest/POST/oauth2/client.html
*/
export declare const createOAuthClient: (request: OAuthClient, accessToken: string) => Promise<OAuthClient>;
/**
Delete OAuth 2.0 client
https://rest-docs.synapse.org/rest/DELETE/oauth2/client/id.html
*/
export declare const deleteOAuthClient: (id: string, accessToken: string) => Promise<void>;
/**
Update the metadata for an existing OAuth 2.0 client.
Note: Only the creator of a client can update it.
Note: Changing the redirect URIs will revert the 'verified' status of the client, necessitating re-verification.
https://repo-prod.prod.sagebase.org/auth/v1/oauth2/client/{id}
*/
export declare const updateOAuthClient: (request: OAuthClient, accessToken: string) => Promise<OAuthClient>;
/**
Note: Only the creator of a client can update it.
https://rest-docs.synapse.org/rest/PUT/oauth2/client/id/verificationPrecheck.html
*/
export declare const isOAuthClientReverificationRequired: (request: OAuthClient, accessToken: string) => Promise<OAuthClientVerificationPrecheckResult>;
/**
Get a secret credential to use when requesting an access token.
Synapse supports 'client_secret_basic' and 'client_secret_post'.
NOTE: This request will invalidate any previously issued secrets.
https://rest-docs.synapse.org/rest/POST/oauth2/client/secret/id.html
*/
export declare const createOAuthClientSecret: (accessToken: string, id: string) => Promise<OAuthClientIdAndSecret>;
/**
* Get OAuth2 Client information (available to the public)
*/
export declare const getAuthenticatedOn: (accessToken: string) => Promise<AuthenticatedOn>;
/**
* User consents to the given OIDCAuthorizationRequest (after being presented with all information returned by getOAuth2RequestDescription())
* @param oidcAuthRequest
* @param accessToken
* @param endpoint
*/
export declare const consentToOAuth2Request: (oidcAuthRequest: OIDCAuthorizationRequest, accessToken: string | undefined) => Promise<AccessCodeResponse>;
/***********************
* FORM SERVICES
* https://rest-docs.synapse.org/rest/#org.sagebionetworks.repo.web.controller.FormController
*************************/
/**
* Create a FormGroup
* https://rest-docs.synapse.org/rest/POST/form/group.html
* @param name
* @param accessToken
* @param endpoint
*/
export declare const createFormGroup: (name: string, accessToken: string) => Promise<FormGroup>;
/**
* Get FormGroup ACL
* https://rest-docs.synapse.org/rest/GET/form/group/id/acl.html
*/
export declare const getFormACL: (formGroupId: string, accessToken: string | undefined) => Promise<AccessControlList>;
/**
* Update FormGroup ACL
* https://rest-docs.synapse.org/rest/PUT/form/group/id/acl.html
*/
export declare const updateFormACL: (formGroupId: string, newAcl: AccessControlList, accessToken: string | undefined) => Promise<AccessControlList>;
/**
* Create a new FormData object
* https://rest-docs.synapse.org/rest/POST/form/data.html
* @param formGroupId
* @param name
* @param accessToken
* @param endpoint
*/
export declare const createFormData: (formGroupId: string, name: string, dataFileHandleId: string, accessToken: string) => Promise<FormData>;
/**
* Update FormData object
* https://rest-docs.synapse.org/rest/PUT/form/data.html
*/
export declare const updateFormData: (formDataId: string, name: string, dataFileHandleId: string, accessToken: string) => Promise<FormData>;
/**
* Delete FormData object
* https://rest-docs.synapse.org/rest/DELETE/form/data.html
*/
export declare const deleteFormData: (formDataId: string, accessToken: string | undefined) => Promise<void>;
/**
* Submit the identified FormData for review.
* https://rest-docs.synapse.org/rest/POST/form/data/id/submit.html
*/
export declare const submitFormData: (formDataId: string, accessToken: string | undefined) => Promise<FormData>;
/**
* List FormData objects and their associated status that match the filters of the provided request that are
* owned by the caller. Note: Only objects owned by the caller will be returned.
* https://rest-docs.synapse.org/rest/POST/form/data/list.html
*/
export declare const listFormData: (request: ListRequest, accessToken: string | undefined) => Promise<ListResponse>;
/**
* List FormData objects and their associated status that match the filters of the provided request for the entire
* group. This is used by service accounts to process submissions.
* https://rest-docs.synapse.org/rest/POST/form/data/list/reviewer.html
*/
export declare const listFormDataAsFormAdmin: (request: ListRequest, accessToken: string | undefined) => Promise<ListResponse>;
/**
* Called by the form processing service to accept a submitted data.
* https://rest-docs.synapse.org/rest/PUT/form/data/id/accept.html
*/
export declare const acceptFormData: (formDataId: string, accessToken: string | undefined) => Promise<FormData>;
/**
* Called by the form processing service to reject a submitted data.
* https://rest-docs.synapse.org/rest/PUT/form/data/id/reject.html
*/
export declare const rejectFormData: (formDataId: string, reason: string, accessToken: string | undefined) => Promise<FormData>;
/**
* Get Statistics
* https://rest-docs.synapse.org/rest/POST/statistics.html
* Generic endpoint to retrieve statistics about objects. The user should have VIEW_STATISTICS access on the object referenced by the objectId in the request.
*/
export declare const getProjectStatistics: (request: ProjectFilesStatisticsRequest, accessToken: string | undefined) => Promis