@influenzanet/case-web-app-core 2.7.5-staging.1 → 2.7.5-staging.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.7.5 - staging
4
+
5
+ ## Changed
6
+
7
+ - SurveyList component rework
8
+ - profiles are no longer subscribed to default studies inside this component
9
+ - active surveys are now saved in the redux store so it's easy to re render the component
10
+ from your application in case the user is assigned new surveys or studies
11
+
12
+ ## 2.7.4 - 2023-11-20
13
+
14
+ ### Changed
15
+
16
+ - on logout, the local storage is emptied and the persistState flag is set to false, preventing the app to save
17
+ an empty state. This fixed an incorrect behavior during the sign up process for users that previously unsubscribed
18
+ from the platform
19
+
3
20
  ## 2.7.3 - 2023-10-25
4
21
 
5
22
  ### Changed
@@ -229,7 +246,7 @@
229
246
  ### Changed
230
247
 
231
248
  - [BREAKING-CHANGE]: updated dependencies - react markdown renderer needs new format. See documentation here:
232
- <https://github.com/coneno/case-web-ui/blob/master/CHANGELOG.md#breaking-changes>
249
+ <https://github.com/coneno/case-web-ui/blob/master/CHANGELOG.md#breaking-changes>
233
250
 
234
251
  ## [1.0.19]
235
252
 
@@ -253,7 +270,7 @@
253
270
 
254
271
  ### Changed
255
272
 
256
- - *BREAKING*: at signup request sent to the backend, it will send the instanceID as http header. This requires a participant-api (api-gateway) with v0.13.0 or later. This header field was included for providing the instanceID for reCaptcha validation.
273
+ - _BREAKING_: at signup request sent to the backend, it will send the instanceID as http header. This requires a participant-api (api-gateway) with v0.13.0 or later. This header field was included for providing the instanceID for reCaptcha validation.
257
274
  - Updating project dependencies (case-web-ui), with minor improvements.
258
275
 
259
276
  ## [1.0.16]
@@ -1,4 +1,4 @@
1
- import { SignupMsg, LoginMsg, TokenResponse, LoginResponse, AutoTokenValidationResponse } from './types/authAPI';
1
+ import { SignupMsg, LoginMsg, TokenResponse, LoginResponse, AutoTokenValidationResponse } from "./types/authAPI";
2
2
  export declare const signupWithEmailRequest: (creds: SignupMsg, recaptchaToken?: string | undefined) => Promise<import("axios").AxiosResponse<TokenResponse, any>>;
3
3
  export declare const loginWithEmailRequest: (creds: LoginMsg) => Promise<import("axios").AxiosResponse<LoginResponse, any>>;
4
4
  export declare const resend2FAVerificationCodeRequest: (creds: LoginMsg) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -1,4 +1,7 @@
1
+ import { TokenResponse } from "../types/authAPI";
1
2
  declare const authApiInstance: import("axios").AxiosInstance;
3
+ export declare const renewTokenURL = "/v1/auth/renew-token";
4
+ export declare const renewTokenReq: (refreshToken: string) => Promise<import("axios").AxiosResponse<TokenResponse, any>>;
2
5
  export declare const renewToken: () => Promise<string>;
3
6
  export declare const setDefaultAccessTokenHeader: (token: string) => void;
4
7
  export declare const resetApiAuth: () => void;
@@ -28,12 +28,17 @@ export interface Profile {
28
28
  /**
29
29
  * The following fields were added here for convenience since
30
30
  * the types defined in this file are also used as type for
31
- * the redux store object.
31
+ * the redux store object. This practice of using the same type
32
+ * for different domains only because they superficially share a set
33
+ * of common properties is huge mistake that we
34
+ * cannot correct right now because it would involve a large
35
+ * refactoring
32
36
  *
33
- * This is a huge mistake but we cannot refactor everything now.
37
+ * When adding properties here make sure you remove them
38
+ * when posting the profile in ../userAPI.ts
34
39
  */
35
40
  studies: string[];
36
- assignedSurveys: AssignedSurvey[];
41
+ activeSurveys: AssignedSurvey[];
37
42
  }
38
43
  export interface ContactPreferences {
39
44
  subscribedToNewsletter: boolean;
@@ -1,6 +1,6 @@
1
- import { PasswordResetInfos } from './types/authAPI';
2
- import { ServiceStatus } from './types/general';
3
- import { User, Profile, ContactPreferences, ContactInfo } from './types/user';
1
+ import { PasswordResetInfos } from "./types/authAPI";
2
+ import { ServiceStatus } from "./types/general";
3
+ import { User, Profile, ContactPreferences, ContactInfo } from "./types/user";
4
4
  export declare const initiatePasswordResetReq: (instanceId: string, accountId: string) => Promise<import("axios").AxiosResponse<ServiceStatus, any>>;
5
5
  export declare const getInfosForPasswordResetReq: (token: string) => Promise<import("axios").AxiosResponse<PasswordResetInfos, any>>;
6
6
  export declare const resetPasswordReq: (token: string, newPassword: string) => Promise<import("axios").AxiosResponse<ServiceStatus, any>>;
@@ -1,5 +1,3 @@
1
1
  import React from "react";
2
- interface ManageProfilesProps {
3
- }
4
- declare const ManageProfiles: React.FC<ManageProfilesProps>;
2
+ declare const ManageProfiles: React.FC;
5
3
  export default ManageProfiles;
package/build/index.d.ts CHANGED
@@ -71,19 +71,13 @@ declare const coreReduxActions: {
71
71
  payload: string;
72
72
  type: string;
73
73
  }) => void;
74
- initializeActiveSurveys: (state: import("immer/dist/internal").WritableDraft<import("./store/userSlice").UserState>, action: {
75
- payload: import("./thunks/studiesThunks").ProfilesSurveysMap;
76
- type: string;
77
- }) => void;
78
74
  }>;
79
75
  signupActions: {
80
76
  contactVerified: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
81
77
  };
82
- fetchStudiesForUserPending: import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkPendingActionCreator<void, {}>;
83
- fetchStudiesForUserFulfilled: import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkFulfilledActionCreator<import("./thunks/userThunks").ProfileStudiesMap, void, {}>;
84
- fetchStudiesForUserRejected: import("@reduxjs/toolkit/dist/createAsyncThunk").AsyncThunkRejectedActionCreator<void, {}>;
78
+ studiesActions: import("@reduxjs/toolkit").CaseReducerActions<{}>;
85
79
  };
86
80
  declare const coreReduxThunks: {
87
- enterStudy: import("@reduxjs/toolkit").AsyncThunk<import("./thunks/studiesThunks").EnterStudyPayload, import("./thunks/studiesThunks").EnterStudyRequest, {}>;
81
+ enterStudyThunk: import("@reduxjs/toolkit").AsyncThunk<import("./store/actions/studiesActions").EnterStudyPayload, import("./store/thunks/studiesThunks").EnterStudyRequest, {}>;
88
82
  };
89
83
  export { AppCore, initI18n, store, reducersManager, localStorageManager, studyAPI, userAPI, coreReduxActions, coreReduxThunks, useAuthTokenCheck, PreventAccidentalNavigationPrompt, InternalNavigator, };