@hmcts/opal-frontend-common 0.0.37 → 0.0.39
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/components/govuk/govuk-text-area/index.d.ts +4 -2
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +15 -9
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +21 -21
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-guards-route-permissions.mjs.map +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-CEk8OxKG.mjs → hmcts-opal-frontend-common-pages-access-denied.component-hiZGRfTW.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-CEk8OxKG.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-hiZGRfTW.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-C3b4FPOI.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-DvotrIUM.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-C3b4FPOI.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-DvotrIUM.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DPtCip_V.mjs → hmcts-opal-frontend-common-pages-sign-in.component-Ck69JvR1.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DPtCip_V.mjs.map → hmcts-opal-frontend-common-pages-sign-in.component-Ck69JvR1.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages.mjs +2 -2
- package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-resolvers-user-state.mjs +2 -2
- package/fesm2022/hmcts-opal-frontend-common-resolvers-user-state.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-interfaces.mjs +4 -0
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-interfaces.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-mocks.mjs +164 -0
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service-mocks.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs +46 -0
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs.map +1 -0
- package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +4 -4
- package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service-constants.mjs +0 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service-constants.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service-mocks.mjs +1 -387
- package/fesm2022/hmcts-opal-frontend-common-services-session-service-mocks.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +8 -36
- package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-stores-global.mjs.map +1 -1
- package/package.json +16 -1
- package/resolvers/user-state/index.d.ts +2 -2
- package/services/opal-user-service/index.d.ts +41 -0
- package/services/opal-user-service/interfaces/index.d.ts +25 -0
- package/services/opal-user-service/mocks/index.d.ts +9 -0
- package/services/permissions-service/index.d.ts +4 -4
- package/services/session-service/index.d.ts +3 -16
- package/services/session-service/interfaces/index.d.ts +1 -18
- package/services/session-service/mocks/index.d.ts +2 -4
- package/stores/global/index.d.ts +5 -4
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
interface IOpalUserPermissions {
|
|
5
|
+
permission_id: number;
|
|
6
|
+
permission_name: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface IOpalUserBusinessUnitUser {
|
|
10
|
+
business_unit_user_id: string;
|
|
11
|
+
business_unit_id: number;
|
|
12
|
+
permissions: IOpalUserPermissions[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface IOpalUserState {
|
|
16
|
+
user_id: number;
|
|
17
|
+
username: string;
|
|
18
|
+
name: string;
|
|
19
|
+
status: string | null;
|
|
20
|
+
version: number | null;
|
|
21
|
+
business_unit_users: IOpalUserBusinessUnitUser[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class OpalUserService {
|
|
25
|
+
private readonly http;
|
|
26
|
+
private readonly globalStore;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the current logged-in user's state from the backend and updates the global store.
|
|
29
|
+
*
|
|
30
|
+
* This method first resets the user state in the global store to an empty object,
|
|
31
|
+
* then performs an HTTP GET request to fetch the latest user state.
|
|
32
|
+
* Upon receiving the response, it updates the global store with the fetched user state.
|
|
33
|
+
*
|
|
34
|
+
* @returns An Observable that emits the current {@link IOpalUserState}.
|
|
35
|
+
*/
|
|
36
|
+
getLoggedInUserState(): Observable<IOpalUserState>;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OpalUserService, never>;
|
|
38
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OpalUserService>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { OpalUserService };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface IOpalUserPermissions {
|
|
2
|
+
permission_id: number;
|
|
3
|
+
permission_name: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface IOpalUserBusinessUnitUser {
|
|
7
|
+
business_unit_user_id: string;
|
|
8
|
+
business_unit_id: number;
|
|
9
|
+
permissions: IOpalUserPermissions[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IOpalUserState {
|
|
13
|
+
user_id: number;
|
|
14
|
+
username: string;
|
|
15
|
+
name: string;
|
|
16
|
+
status: string | null;
|
|
17
|
+
version: number | null;
|
|
18
|
+
business_unit_users: IOpalUserBusinessUnitUser[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface IOpalUserPaths {
|
|
22
|
+
loggedInUserState: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { IOpalUserBusinessUnitUser, IOpalUserPaths, IOpalUserPermissions, IOpalUserState };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IOpalUserPermissions, IOpalUserBusinessUnitUser, IOpalUserState } from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';
|
|
2
|
+
|
|
3
|
+
declare const OPAL_USER_PERMISSIONS_MOCK: IOpalUserPermissions[];
|
|
4
|
+
|
|
5
|
+
declare const OPAL_USER_BUSINESS_UNIT_USER_MOCK: IOpalUserBusinessUnitUser[];
|
|
6
|
+
|
|
7
|
+
declare const OPAL_USER_STATE_MOCK: IOpalUserState;
|
|
8
|
+
|
|
9
|
+
export { OPAL_USER_BUSINESS_UNIT_USER_MOCK, OPAL_USER_PERMISSIONS_MOCK, OPAL_USER_STATE_MOCK };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IOpalUserState, IOpalUserBusinessUnitUser } from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
|
|
4
4
|
declare class PermissionsService {
|
|
@@ -8,7 +8,7 @@ declare class PermissionsService {
|
|
|
8
8
|
* If the unique permission IDs have not been stored yet, it calculates them based on the user's roles and permissions.
|
|
9
9
|
* @returns An array of unique permission IDs.
|
|
10
10
|
*/
|
|
11
|
-
getUniquePermissions(userState:
|
|
11
|
+
getUniquePermissions(userState: IOpalUserState | null): number[];
|
|
12
12
|
/**
|
|
13
13
|
* Determines whether the user has access to a specific permission based on their roles.
|
|
14
14
|
*
|
|
@@ -19,7 +19,7 @@ declare class PermissionsService {
|
|
|
19
19
|
* @returns `true` if the user has the specified permission in any of their roles,
|
|
20
20
|
* or if no roles are provided; otherwise, returns `false`.
|
|
21
21
|
*/
|
|
22
|
-
hasPermissionAccess(permissionId: number, roles:
|
|
22
|
+
hasPermissionAccess(permissionId: number, roles: IOpalUserBusinessUnitUser[]): boolean;
|
|
23
23
|
/**
|
|
24
24
|
* Checks if the user has access to a specific permission within a given business unit.
|
|
25
25
|
*
|
|
@@ -30,7 +30,7 @@ declare class PermissionsService {
|
|
|
30
30
|
* @param roles - An array of user roles, each containing permissions and associated business unit IDs.
|
|
31
31
|
* @returns `true` if the user has the specified permission for the business unit, or if no roles are provided; otherwise, `false`.
|
|
32
32
|
*/
|
|
33
|
-
hasBusinessUnitPermissionAccess(permissionId: number, businessUnitId: number, roles:
|
|
33
|
+
hasBusinessUnitPermissionAccess(permissionId: number, businessUnitId: number, roles: IOpalUserBusinessUnitUser[]): boolean;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<PermissionsService, never>;
|
|
35
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<PermissionsService>;
|
|
36
36
|
}
|
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { ISessionTokenExpiry } from '@hmcts/opal-frontend-common/services/session-service/interfaces';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
|
|
5
5
|
declare class SessionService {
|
|
6
6
|
private readonly http;
|
|
7
7
|
private readonly globalStore;
|
|
8
|
-
private userStateCache$;
|
|
9
8
|
private tokenExpiryCache$;
|
|
10
9
|
private readonly MAX_RETRIES;
|
|
11
10
|
private readonly RETRY_DELAY_MS;
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The user state is then stored in the state service for future use.
|
|
16
|
-
* The user state is cached using the `shareReplay` operator to avoid unnecessary HTTP requests.
|
|
17
|
-
* @returns An observable that emits the user state.
|
|
18
|
-
*/
|
|
19
|
-
getUserState(): Observable<ISessionUserState>;
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves the token expiry information from the server.
|
|
22
|
-
* If the token expiry information is already cached, it returns the cached value.
|
|
23
|
-
* Otherwise, it makes an HTTP GET request to fetch the token expiry information,
|
|
24
|
-
* retries the request up to a maximum number of times if it fails, and caches the result.
|
|
25
|
-
*
|
|
26
|
-
* @returns {Observable<ISessionTokenExpiry>} An observable that emits the token expiry information.
|
|
12
|
+
* Always fetch access-token expiry from the server (no in-memory caching).
|
|
13
|
+
* Adds cache-busting query param and no-cache headers.
|
|
27
14
|
*/
|
|
28
15
|
getTokenExpiry(): Observable<ISessionTokenExpiry>;
|
|
29
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SessionService, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
interface ISessionEndpoints {
|
|
2
|
-
userState: string;
|
|
3
2
|
expiry: string;
|
|
4
3
|
}
|
|
5
4
|
|
|
@@ -8,20 +7,4 @@ interface ISessionTokenExpiry {
|
|
|
8
7
|
warningThresholdInMilliseconds: number | null;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
permission_id: number;
|
|
13
|
-
permission_name: string;
|
|
14
|
-
}
|
|
15
|
-
interface ISessionUserStateRole {
|
|
16
|
-
business_unit_user_id: string;
|
|
17
|
-
business_unit_id: number;
|
|
18
|
-
permissions: ISessionUserStatePermission[];
|
|
19
|
-
}
|
|
20
|
-
interface ISessionUserState {
|
|
21
|
-
user_id: string;
|
|
22
|
-
user_name: string;
|
|
23
|
-
name: string;
|
|
24
|
-
business_unit_user: ISessionUserStateRole[];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type { ISessionEndpoints, ISessionTokenExpiry, ISessionUserState, ISessionUserStatePermission, ISessionUserStateRole };
|
|
10
|
+
export type { ISessionEndpoints, ISessionTokenExpiry };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ISessionTokenExpiry
|
|
1
|
+
import { ISessionTokenExpiry } from '@hmcts/opal-frontend-common/services/session-service/interfaces';
|
|
2
2
|
|
|
3
3
|
declare const SESSION_TOKEN_EXPIRY_MOCK: ISessionTokenExpiry;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export { SESSION_TOKEN_EXPIRY_MOCK, SESSION_USER_STATE_MOCK };
|
|
5
|
+
export { SESSION_TOKEN_EXPIRY_MOCK };
|
package/stores/global/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import * as _ngrx_signals from '@ngrx/signals';
|
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { LDFlagSet } from 'launchdarkly-js-client-sdk';
|
|
4
4
|
import { ITransferStateLaunchDarklyConfig, ITransferStateAppInsightsConfig } from '@hmcts/opal-frontend-common/services/transfer-state-service/interfaces';
|
|
5
|
-
import {
|
|
5
|
+
import { ISessionTokenExpiry } from '@hmcts/opal-frontend-common/services/session-service/interfaces';
|
|
6
6
|
import { IErrorState } from '@hmcts/opal-frontend-common/stores/global/interfaces';
|
|
7
|
+
import { IOpalUserState } from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';
|
|
7
8
|
|
|
8
9
|
declare const GlobalStore: _angular_core.Type<{
|
|
9
10
|
authenticated: _angular_core.Signal<boolean>;
|
|
@@ -12,7 +13,7 @@ declare const GlobalStore: _angular_core.Type<{
|
|
|
12
13
|
message: string;
|
|
13
14
|
}>;
|
|
14
15
|
featureFlags: _angular_core.Signal<LDFlagSet>;
|
|
15
|
-
userState: _ngrx_signals.DeepSignal<
|
|
16
|
+
userState: _ngrx_signals.DeepSignal<IOpalUserState>;
|
|
16
17
|
ssoEnabled: _angular_core.Signal<boolean>;
|
|
17
18
|
launchDarklyConfig: _ngrx_signals.DeepSignal<ITransferStateLaunchDarklyConfig>;
|
|
18
19
|
appInsightsConfig: _ngrx_signals.DeepSignal<ITransferStateAppInsightsConfig>;
|
|
@@ -20,7 +21,7 @@ declare const GlobalStore: _angular_core.Type<{
|
|
|
20
21
|
setAuthenticated: (authenticated: boolean) => void;
|
|
21
22
|
setError: (error: IErrorState) => void;
|
|
22
23
|
setFeatureFlags: (featureFlags: LDFlagSet) => void;
|
|
23
|
-
setUserState: (userState:
|
|
24
|
+
setUserState: (userState: IOpalUserState) => void;
|
|
24
25
|
setSsoEnabled: (ssoEnabled: boolean) => void;
|
|
25
26
|
setLaunchDarklyConfig: (config: ITransferStateLaunchDarklyConfig) => void;
|
|
26
27
|
setAppInsightsConfig: (config: ITransferStateAppInsightsConfig) => void;
|
|
@@ -32,7 +33,7 @@ declare const GlobalStore: _angular_core.Type<{
|
|
|
32
33
|
message: string;
|
|
33
34
|
};
|
|
34
35
|
featureFlags: LDFlagSet;
|
|
35
|
-
userState:
|
|
36
|
+
userState: IOpalUserState;
|
|
36
37
|
ssoEnabled: boolean;
|
|
37
38
|
launchDarklyConfig: ITransferStateLaunchDarklyConfig;
|
|
38
39
|
appInsightsConfig: ITransferStateAppInsightsConfig;
|