synapse-react-client 2.1.19 → 2.1.20

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.
@@ -25096,6 +25096,7 @@ var SRC = (() => {
25096
25096
  searchEntities: () => searchEntities,
25097
25097
  setAccessTokenCookie: () => setAccessTokenCookie,
25098
25098
  signOut: () => signOut,
25099
+ signSynapseTermsOfUse: () => signSynapseTermsOfUse,
25099
25100
  startMultipartUpload: () => startMultipartUpload,
25100
25101
  submitDataAccessRequest: () => submitDataAccessRequest,
25101
25102
  submitFormData: () => submitFormData,
@@ -29915,6 +29916,7 @@ var SRC = (() => {
29915
29916
  // src/lib/utils/APIConstants.ts
29916
29917
  var BACKEND_ENDPOINT = `${getEndpoint(BackendDestinationEnum.REPO_ENDPOINT)}`;
29917
29918
  var REPO = `/repo/v1`;
29919
+ var AUTH = `/auth/v1`;
29918
29920
  var ASYNC_START = "/async/start";
29919
29921
  var ASYNC_GET = "/async/get";
29920
29922
  var ENTITY = `${REPO}/entity`;
@@ -29943,6 +29945,7 @@ var SRC = (() => {
29943
29945
  var ALIAS_AVAILABLE = `${REPO}/principal/available`;
29944
29946
  var REGISTER_ACCOUNT_STEP_1 = (portalEndpoint) => `${REPO}/account/emailValidation?portalEndpoint=${portalEndpoint}`;
29945
29947
  var REGISTER_ACCOUNT_STEP_2 = `${REPO}/account2`;
29948
+ var SIGN_TERMS_OF_USE = `${AUTH}/termsOfUse2`;
29946
29949
  var ACCESS_REQUIREMENT_BY_ID = (id2) => `${REPO}/accessRequirement/${id2}`;
29947
29950
  var FAVORITES = `${REPO}/favorite`;
29948
29951
 
@@ -31125,8 +31128,12 @@ var SRC = (() => {
31125
31128
  var oAuthRegisterAccountStep2 = (userName, provider, authenticationCode, redirectUrl, endpoint = BackendDestinationEnum.REPO_ENDPOINT) => {
31126
31129
  return doPost("/auth/v1/oauth2/account2", { provider, authenticationCode, redirectUrl, userName }, void 0, void 0, endpoint);
31127
31130
  };
31128
- var bindOAuthProviderToAccount = (provider, authenticationCode, redirectUrl, endpoint = BackendDestinationEnum.REPO_ENDPOINT) => {
31129
- return doPost("/auth/v1/oauth2/alias", { provider, authenticationCode, redirectUrl }, void 0, void 0, endpoint);
31131
+ var bindOAuthProviderToAccount = (_0, _1, _2, ..._3) => __async(void 0, [_0, _1, _2, ..._3], function* (provider, authenticationCode, redirectUrl, endpoint = BackendDestinationEnum.REPO_ENDPOINT) {
31132
+ const accessToken = yield getAccessTokenFromCookie();
31133
+ return doPost("/auth/v1/oauth2/alias", { provider, authenticationCode, redirectUrl }, accessToken, void 0, endpoint);
31134
+ });
31135
+ var signSynapseTermsOfUse = (accessToken) => {
31136
+ return doPost(SIGN_TERMS_OF_USE, { accessToken }, void 0, void 0, BackendDestinationEnum.REPO_ENDPOINT);
31130
31137
  };
31131
31138
 
31132
31139
  // src/lib/containers/UserCardSmall.tsx