oip-common 0.9.0 → 0.10.0

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/index.d.ts CHANGED
@@ -6,10 +6,10 @@ import { MessageService, ToastMessageOptions, ConfirmationService, MenuItem, Fil
6
6
  import { Router, ActivatedRoute, QueryParamsHandling, IsActiveMatchOptions, Params, CanActivateChildFn, UrlTree, CanActivateFn, Routes, Route } from '@angular/router';
7
7
  import { TranslationObject, InterpolationParameters, Translation, TranslateService } from '@ngx-translate/core';
8
8
  import { ContextMenu } from 'primeng/contextmenu';
9
+ import { Table } from 'primeng/table';
9
10
  import { PaletteDesignToken, Preset } from '@primeuix/themes/types';
10
11
  import { PrimeNG } from 'primeng/config';
11
12
  import { PaginatorState } from 'primeng/paginator';
12
- import { Table } from 'primeng/table';
13
13
  import { HttpInterceptorFn } from '@angular/common/http';
14
14
 
15
15
  interface TopBarDto {
@@ -743,6 +743,19 @@ interface AuthCsrfTokenResponse {
743
743
  token?: string | null;
744
744
  headerName?: string | null;
745
745
  }
746
+ interface AuthSessionDto {
747
+ sessionId: string | null;
748
+ userId?: string | null;
749
+ userName?: string | null;
750
+ displayName?: string | null;
751
+ email?: string | null;
752
+ createdUtc?: Date | null;
753
+ lastActivityUtc?: Date | null;
754
+ expiresUtc?: Date | null;
755
+ ipAddress?: string | null;
756
+ userAgent?: string | null;
757
+ isCurrent?: boolean;
758
+ }
746
759
  interface AuthSessionResponse {
747
760
  isAuthenticated?: boolean;
748
761
  userName?: string | null;
@@ -761,6 +774,9 @@ interface DefaultSecretsReportResponse {
761
774
  showBanner?: boolean;
762
775
  findings?: DefaultSecretFindingResponse[] | null;
763
776
  }
777
+ interface DeleteAuthSessionsResponse {
778
+ deletedCount?: number;
779
+ }
764
780
  interface EditModuleInstanceDto {
765
781
  moduleInstanceId?: number;
766
782
  label?: string | null;
@@ -800,6 +816,15 @@ interface ModuleInstanceDto {
800
816
  separator?: boolean;
801
817
  isStart?: boolean;
802
818
  }
819
+ interface GetAuthSessionsParams {
820
+ userId?: string;
821
+ }
822
+ interface DeleteAuthSessionParams {
823
+ sessionId: string;
824
+ }
825
+ interface DeleteAuthSessionsByUserParams {
826
+ userId: string;
827
+ }
803
828
  interface SetStartModuleParams {
804
829
  id: number;
805
830
  }
@@ -1124,9 +1149,14 @@ interface MigrationDto {
1124
1149
  }
1125
1150
  declare class DbMigrationComponent extends BaseModuleComponent<NoSettingsDto, NoSettingsDto> implements OnInit, OnDestroy {
1126
1151
  private readonly translations;
1152
+ dt: Table;
1127
1153
  data: MigrationDto[];
1154
+ protected loading: boolean;
1155
+ protected globalFilter: string;
1128
1156
  ngOnInit(): Promise<void>;
1129
1157
  refreshAction(): Promise<void>;
1158
+ protected get hasActiveFilters(): boolean;
1159
+ clearFilter(): void;
1130
1160
  getData(): Promise<MigrationDto[]>;
1131
1161
  applyMigration(rowData: MigrationDto): Promise<unknown>;
1132
1162
  static ɵfac: i0.ɵɵFactoryDeclaration<DbMigrationComponent, never>;
@@ -1135,6 +1165,8 @@ declare class DbMigrationComponent extends BaseModuleComponent<NoSettingsDto, No
1135
1165
 
1136
1166
  declare class AppModulesComponent implements OnInit {
1137
1167
  protected modules: ExistModuleDto[];
1168
+ protected moduleFilter: string;
1169
+ protected loading: boolean;
1138
1170
  protected msgService: MsgService;
1139
1171
  protected confirmationService: ConfirmationService;
1140
1172
  protected l10nService: L10nService;
@@ -1146,6 +1178,7 @@ declare class AppModulesComponent implements OnInit {
1146
1178
  private translationsReady;
1147
1179
  constructor();
1148
1180
  ngOnInit(): Promise<void>;
1181
+ protected get filteredModules(): ExistModuleDto[];
1149
1182
  refreshAction(): Promise<void>;
1150
1183
  protected get canRegisterExternalModule(): boolean;
1151
1184
  registerExternalModule(): Promise<void>;
@@ -1155,6 +1188,34 @@ declare class AppModulesComponent implements OnInit {
1155
1188
  static ɵcmp: i0.ɵɵComponentDeclaration<AppModulesComponent, "app-modules", never, {}, {}, never, never, true, never>;
1156
1189
  }
1157
1190
 
1191
+ /**
1192
+ * Administrator page listing active authentication sessions with the ability to terminate them.
1193
+ */
1194
+ declare class AuthSessionsComponent implements OnInit {
1195
+ protected sessions: AuthSessionDto[];
1196
+ protected userFilter: string;
1197
+ protected loading: boolean;
1198
+ protected msgService: MsgService;
1199
+ protected confirmationService: ConfirmationService;
1200
+ protected l10nService: L10nService;
1201
+ protected titleService: AppTitleService;
1202
+ protected layoutService: LayoutService;
1203
+ private authSessionsApi;
1204
+ private readonly translationsReady;
1205
+ constructor();
1206
+ ngOnInit(): Promise<void>;
1207
+ protected get filteredSessions(): AuthSessionDto[];
1208
+ refreshAction(): Promise<void>;
1209
+ protected get hasOtherSessionsThanCurrent(): boolean;
1210
+ terminateAllSessions(): Promise<void>;
1211
+ protected hasOtherSessions(session: AuthSessionDto): boolean;
1212
+ terminateSession(session: AuthSessionDto): Promise<void>;
1213
+ terminateUserSessions(session: AuthSessionDto): Promise<void>;
1214
+ t(key: string): any;
1215
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthSessionsComponent, never>;
1216
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuthSessionsComponent, "app-auth-sessions", never, {}, {}, never, never, true, never>;
1217
+ }
1218
+
1158
1219
  declare enum ServiceType {
1159
1220
  Service = "Service",
1160
1221
  Application = "Application"
@@ -1975,6 +2036,15 @@ declare class SecurityApi<SecurityDataType = unknown> extends HttpClient<Securit
1975
2036
  static ɵprov: i0.ɵɵInjectableDeclaration<SecurityApi<any>>;
1976
2037
  }
1977
2038
 
2039
+ declare class AuthSessionsApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2040
+ getAuthSessions: (query: GetAuthSessionsParams, params?: RequestParams) => Promise<AuthSessionDto[]>;
2041
+ deleteAuthSession: ({ sessionId, ...query }: DeleteAuthSessionParams, params?: RequestParams) => Promise<void>;
2042
+ deleteAuthSessionsByUser: ({ userId, ...query }: DeleteAuthSessionsByUserParams, params?: RequestParams) => Promise<DeleteAuthSessionsResponse>;
2043
+ deleteAllAuthSessions: (params?: RequestParams) => Promise<DeleteAuthSessionsResponse>;
2044
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthSessionsApi<any>, never>;
2045
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthSessionsApi<any>>;
2046
+ }
2047
+
1978
2048
  declare class ApplicationsApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1979
2049
  getApplicationRegistryItems: (params?: RequestParams) => Promise<ApplicationRegistryItemDto[]>;
1980
2050
  getApplicationRegistryItemByCode: ({ code, ...query }: GetApplicationRegistryItemByCodeParams, params?: RequestParams) => Promise<any>;
@@ -2109,6 +2179,8 @@ declare function oipConfigRoute(path?: string): Route;
2109
2179
  declare function oipApplicationsRoute(path?: string): Route;
2110
2180
  /** Module registry, administrators only. */
2111
2181
  declare function oipModulesRoute(path?: string): Route;
2182
+ /** Active authentication sessions, administrators only. */
2183
+ declare function oipSessionsRoute(path?: string): Route;
2112
2184
  /** Discussion module. The path must keep an `:id` segment. */
2113
2185
  declare function oipDiscussionRoute(path?: string): Route;
2114
2186
  /** Database migration module. The path must keep an `:id` segment. */
@@ -2142,6 +2214,8 @@ interface OipRouteFeatures {
2142
2214
  applications?: OipRouteToggle;
2143
2215
  /** Module registry, administrators only. Default path: `modules`. */
2144
2216
  modules?: OipRouteToggle;
2217
+ /** Active authentication sessions, administrators only. Default path: `sessions`. */
2218
+ sessions?: OipRouteToggle;
2145
2219
  /** Discussion module. Default path: `discussion/:id`. */
2146
2220
  discussion?: OipRouteToggle;
2147
2221
  /** Database migration module. Default path: `db-migration/:id`. */
@@ -2205,5 +2279,5 @@ interface OipRoutesOptions {
2205
2279
  */
2206
2280
  declare function provideOipRoutes(options?: OipRoutesOptions): Routes;
2207
2281
 
2208
- export { APP_INFO_TOKEN, APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AccessComponent, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppInfoService, AppLayoutComponent, AppModulesComponent, AppTopbar, AppTopbarApplicationSwitcherComponent, ApplicationRegistryService, ApplicationsApi, ApplicationsComponent, AuthGuardService, BaseModuleComponent, BffSecurityService, BlockLoaderComponent, ConfigComponent, ContentType, CustomElementExtensionModuleHostComponent, DbMigrationComponent, DefaultSecretsBannerComponent, DiscussionComponent, ErrorComponent, ExtensionLoaderService, ExtensionModuleHostComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, ModuleInstanceRightsService, ModuleLoadingService, MsgService, NoModulesComponent, NotfoundComponent, NotificationApi, NotificationService, OIP_EXTENSION_EVENTS, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, StartPageService, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserProfileComponent, UserService, convertToPrimeNgDateFormat, defaultTheme, emitOipContextChange, emitOipError, emitOipNavigate, emitOipNotify, emitOipSettingsChange, emitOipTitleChange, langIntercept, mergeWithDefaults, moduleAccessGuard, oipAccessRoute, oipApplicationsRoute, oipAuthGuard, oipConfigRoute, oipDbMigrationRoute, oipDiscussionRoute, oipErrorRoute, oipExtensionsRoute, oipIframeModuleRoute, oipModulesRoute, oipNoModulesRoute, oipProfileRoute, oipStartRedirectGuard, oipStartRoute, provideAppInfo, provideAppThemes, provideLogoComponent, provideOip, provideOipRoutes, provideTranslations, replaceDefaults };
2282
+ export { APP_INFO_TOKEN, APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AccessComponent, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppInfoService, AppLayoutComponent, AppModulesComponent, AppTopbar, AppTopbarApplicationSwitcherComponent, ApplicationRegistryService, ApplicationsApi, ApplicationsComponent, AuthGuardService, AuthSessionsApi, AuthSessionsComponent, BaseModuleComponent, BffSecurityService, BlockLoaderComponent, ConfigComponent, ContentType, CustomElementExtensionModuleHostComponent, DbMigrationComponent, DefaultSecretsBannerComponent, DiscussionComponent, ErrorComponent, ExtensionLoaderService, ExtensionModuleHostComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, ModuleInstanceRightsService, ModuleLoadingService, MsgService, NoModulesComponent, NotfoundComponent, NotificationApi, NotificationService, OIP_EXTENSION_EVENTS, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, StartPageService, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserProfileComponent, UserService, convertToPrimeNgDateFormat, defaultTheme, emitOipContextChange, emitOipError, emitOipNavigate, emitOipNotify, emitOipSettingsChange, emitOipTitleChange, langIntercept, mergeWithDefaults, moduleAccessGuard, oipAccessRoute, oipApplicationsRoute, oipAuthGuard, oipConfigRoute, oipDbMigrationRoute, oipDiscussionRoute, oipErrorRoute, oipExtensionsRoute, oipIframeModuleRoute, oipModulesRoute, oipNoModulesRoute, oipProfileRoute, oipSessionsRoute, oipStartRedirectGuard, oipStartRoute, provideAppInfo, provideAppThemes, provideLogoComponent, provideOip, provideOipRoutes, provideTranslations, replaceDefaults };
2209
2283
  export type { AppConfig, AppInfo, AppInfoValue, AppThemePreset, AppThemePresetLoader, AppThemePresetMergeMode, AuthCsrfToken, LanguageDto, MenuChangeEvent, ModuleAccessRouteData, NoSettingsDto, OipExtensionHostContext, OipExtensionLoadType, OipExtensionManifest, OipExtensionModuleMetadata, OipExtensionNavigateEvent, OipExtensionNotifyEvent, OipRouteFeatures, OipRouteToggle, OipRoutesOptions, PutSecurityDto, RequestParams, SecurityDto, StartRouteData, TopBarDto };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oip-common",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "A template for cross-platform web applications based on sakai-ng and primeNG",
5
5
  "main": "index.js",
6
6
  "keywords": [