@abpjs/identity-pro 3.0.0 → 3.1.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/dist/index.d.mts CHANGED
@@ -5,11 +5,13 @@ import React, { ComponentType } from 'react';
5
5
  * Identity Policy Names
6
6
  * Policy names for permission checking in the Identity module.
7
7
  * @since 3.0.0
8
+ * @updated 3.1.0 - Added SecurityLogs
8
9
  */
9
10
  /**
10
11
  * Identity policy names enum.
11
12
  * Used for checking permissions in the identity management module.
12
13
  * @since 3.0.0
14
+ * @updated 3.1.0 - Added SecurityLogs
13
15
  */
14
16
  declare const eIdentityPolicyNames: {
15
17
  readonly IdentityManagement: "AbpIdentity.Roles || AbpIdentity.Users || AbpIdentity.ClaimTypes || AbpIdentity.OrganizationUnits";
@@ -17,6 +19,8 @@ declare const eIdentityPolicyNames: {
17
19
  readonly Users: "AbpIdentity.Users";
18
20
  readonly ClaimTypes: "AbpIdentity.ClaimTypes";
19
21
  readonly OrganizationUnits: "AbpIdentity.OrganizationUnits";
22
+ /** Security logs policy (v3.1.0) */
23
+ readonly SecurityLogs: "AbpIdentity.SecurityLogs";
20
24
  };
21
25
  /**
22
26
  * Type for identity policy name values
@@ -27,6 +31,7 @@ type IdentityPolicyNameKey = (typeof eIdentityPolicyNames)[keyof typeof eIdentit
27
31
  * Identity Route Names
28
32
  * Route names for the Identity module navigation.
29
33
  * @since 3.0.0
34
+ * @updated 3.1.0 - Added SecurityLogs
30
35
  */
31
36
  /**
32
37
  * Identity route names enum.
@@ -36,6 +41,7 @@ type IdentityPolicyNameKey = (typeof eIdentityPolicyNames)[keyof typeof eIdentit
36
41
  * Routes are now organized under IdentityManagement.
37
42
  *
38
43
  * @since 3.0.0
44
+ * @updated 3.1.0 - Added SecurityLogs
39
45
  */
40
46
  declare const eIdentityRouteNames: {
41
47
  readonly IdentityManagement: "AbpIdentity::Menu:IdentityManagement";
@@ -43,6 +49,8 @@ declare const eIdentityRouteNames: {
43
49
  readonly Users: "AbpIdentity::Users";
44
50
  readonly ClaimTypes: "AbpIdentity::ClaimTypes";
45
51
  readonly OrganizationUnits: "AbpIdentity::OrganizationUnits";
52
+ /** Security logs route name (v3.1.0) */
53
+ readonly SecurityLogs: "AbpIdentity::SecurityLogs";
46
54
  };
47
55
  /**
48
56
  * Type for identity route name values
@@ -245,9 +253,12 @@ declare function createOrganizationUnitWithDetailsDto(initialValues?: Partial<Or
245
253
  * - Claim type management
246
254
  * - User/Role claims management
247
255
  * - Organization unit management (v2.9.0)
256
+ * - Security logs (v3.1.0)
257
+ * - User lock functionality (v3.1.0)
248
258
  *
249
259
  * @since 0.7.2
250
260
  * @updated 2.9.0 - Added organization units support
261
+ * @updated 3.1.0 - Added UserLockDurationType enum
251
262
  */
252
263
  declare namespace Identity {
253
264
  /**
@@ -393,8 +404,103 @@ declare namespace Identity {
393
404
  Boolean = 2,
394
405
  DateTime = 3
395
406
  }
407
+ /**
408
+ * User lock duration type enumeration (values in seconds)
409
+ * Used for locking user accounts for a specified duration.
410
+ * @since 3.1.0
411
+ */
412
+ enum UserLockDurationType {
413
+ Second = 1,
414
+ Minute = 60,
415
+ Hour = 3600,
416
+ Day = 86400,
417
+ Month = 2592000,
418
+ Year = 31536000
419
+ }
396
420
  }
397
421
 
422
+ /**
423
+ * Identity Security Log Models
424
+ * Types for security log management in the Identity module.
425
+ * @since 3.1.0
426
+ */
427
+
428
+ /**
429
+ * Security log data transfer object.
430
+ * Represents a security event logged in the system.
431
+ * @since 3.1.0
432
+ */
433
+ interface IdentitySecurityLogDto {
434
+ /** Unique identifier for the log entry */
435
+ id: string;
436
+ /** Tenant ID if applicable */
437
+ tenantId?: string | null;
438
+ /** Application name */
439
+ applicationName?: string | null;
440
+ /** Identity of the user (e.g., username) */
441
+ identity?: string | null;
442
+ /** The action performed (e.g., LoginSucceeded, LoginFailed) */
443
+ action?: string | null;
444
+ /** User ID if logged in */
445
+ userId?: string | null;
446
+ /** Username if available */
447
+ userName?: string | null;
448
+ /** Client IP address */
449
+ clientIpAddress?: string | null;
450
+ /** Client ID for OAuth clients */
451
+ clientId?: string | null;
452
+ /** Correlation ID for request tracing */
453
+ correlationId?: string | null;
454
+ /** Browser information (user agent) */
455
+ browserInfo?: string | null;
456
+ /** When the event occurred */
457
+ creationTime: string;
458
+ /** Extra properties dictionary */
459
+ extraProperties?: Record<string, unknown>;
460
+ }
461
+ /**
462
+ * Input parameters for querying security logs.
463
+ * @since 3.1.0
464
+ */
465
+ interface IdentitySecurityLogGetListInput {
466
+ /** Filter term */
467
+ filter?: string;
468
+ /** Start date for date range filter */
469
+ startTime?: string;
470
+ /** End date for date range filter */
471
+ endTime?: string;
472
+ /** Application name filter */
473
+ applicationName?: string;
474
+ /** Identity filter */
475
+ identity?: string;
476
+ /** Action filter */
477
+ action?: string;
478
+ /** User ID filter */
479
+ userId?: string;
480
+ /** Username filter */
481
+ userName?: string;
482
+ /** Client ID filter */
483
+ clientId?: string;
484
+ /** Correlation ID filter */
485
+ correlationId?: string;
486
+ /** Sorting expression */
487
+ sorting?: string;
488
+ /** Number of items to skip */
489
+ skipCount?: number;
490
+ /** Maximum number of items to return */
491
+ maxResultCount?: number;
492
+ }
493
+ /**
494
+ * Paginated response for security logs.
495
+ * @since 3.1.0
496
+ */
497
+ type IdentitySecurityLogResponse = PagedResultDto<IdentitySecurityLogDto>;
498
+ /**
499
+ * Factory function to create a default IdentitySecurityLogGetListInput.
500
+ * @since 3.1.0
501
+ */
502
+ declare function createIdentitySecurityLogGetListInput(overrides?: Partial<IdentitySecurityLogGetListInput>): IdentitySecurityLogGetListInput;
503
+
398
504
  /**
399
505
  * Get Organization Unit Input
400
506
  * Translated from @volo/abp.ng.identity v2.9.0
@@ -542,7 +648,7 @@ declare function createOrganizationUnitUserInput(initialValues?: Partial<Organiz
542
648
 
543
649
  /**
544
650
  * Identity Pro Component Identifiers
545
- * Translated from @volo/abp.ng.identity v2.9.0
651
+ * Translated from @volo/abp.ng.identity v3.1.0
546
652
  */
547
653
  /**
548
654
  * Enum-like const object for identity component identifiers.
@@ -550,6 +656,7 @@ declare function createOrganizationUnitUserInput(initialValues?: Partial<Organiz
550
656
  * @since 2.4.0
551
657
  * @updated 2.7.0 - Changed from enum to const object
552
658
  * @updated 2.9.0 - Added OrganizationUnits, OrganizationMembers, OrganizationRoles
659
+ * @updated 3.1.0 - Added SecurityLogs
553
660
  */
554
661
  declare const eIdentityComponents: {
555
662
  readonly Claims: "Identity.ClaimsComponent";
@@ -558,6 +665,8 @@ declare const eIdentityComponents: {
558
665
  readonly OrganizationUnits: "Identity.OrganizationUnitsComponent";
559
666
  readonly OrganizationMembers: "Identity.OrganizationMembersComponent";
560
667
  readonly OrganizationRoles: "Identity.OrganizationRolesComponent";
668
+ /** Security logs component (v3.1.0) */
669
+ readonly SecurityLogs: "Identity.SecurityLogs";
561
670
  };
562
671
  /**
563
672
  * Type for identity component key values
@@ -616,9 +725,11 @@ declare class IdentityExtensionsGuard {
616
725
  * Pro features include:
617
726
  * - Claim type management
618
727
  * - User/Role claims management
728
+ * - User lock functionality (v3.1.0)
619
729
  *
620
730
  * Translated from @volo/abp.ng.identity IdentityService
621
731
  * @since 2.0.0
732
+ * @updated 3.1.0 - Added getUserAvailableOrganizationUnits, lockUser methods
622
733
  */
623
734
  declare class IdentityService {
624
735
  /**
@@ -730,6 +841,20 @@ declare class IdentityService {
730
841
  * @returns Promise with roles that can be assigned to users
731
842
  */
732
843
  getUserAssingableRoles(): Promise<Identity.RoleResponse>;
844
+ /**
845
+ * Get available organization units for user assignment
846
+ * @since 3.1.0
847
+ * @returns Promise with available organization units
848
+ */
849
+ getUserAvailableOrganizationUnits(): Promise<PagedResultDto<OrganizationUnitWithDetailsDto>>;
850
+ /**
851
+ * Lock a user for a specified duration
852
+ * @since 3.1.0
853
+ * @param id - The user ID to lock
854
+ * @param lockoutDurationInSeconds - Duration to lock the user (in seconds)
855
+ * @returns Promise resolving when complete
856
+ */
857
+ lockUser(id: string, lockoutDurationInSeconds: number): Promise<void>;
733
858
  /**
734
859
  * Get claim types available for roles
735
860
  * @since 3.0.0
@@ -969,6 +1094,57 @@ declare class IdentityStateService {
969
1094
  dispatchGetUserRoles(id: string): Promise<Identity.RoleItem[]>;
970
1095
  }
971
1096
 
1097
+ /**
1098
+ * Service for managing identity security log API operations.
1099
+ * Provides methods to query security logs for users in the identity module.
1100
+ *
1101
+ * Security logs track user authentication events such as:
1102
+ * - Login succeeded/failed
1103
+ * - Logout
1104
+ * - Password changes
1105
+ * - Two-factor authentication events
1106
+ *
1107
+ * Translated from @volo/abp.ng.identity IdentitySecurityLogService
1108
+ * @since 3.1.0
1109
+ */
1110
+ declare class IdentitySecurityLogService {
1111
+ /**
1112
+ * The API name used for REST requests.
1113
+ */
1114
+ apiName: string;
1115
+ private rest;
1116
+ constructor(rest: RestService);
1117
+ /**
1118
+ * Get security logs with filtering and pagination.
1119
+ * Requires AbpIdentity.SecurityLogs permission.
1120
+ * @param params - Query parameters for filtering and pagination
1121
+ * @returns Promise with paginated security logs
1122
+ */
1123
+ getListByInput(params?: Partial<IdentitySecurityLogGetListInput>): Promise<PagedResultDto<IdentitySecurityLogDto>>;
1124
+ /**
1125
+ * Get a single security log by ID.
1126
+ * Requires AbpIdentity.SecurityLogs permission.
1127
+ * @param id - The security log ID
1128
+ * @returns Promise with the security log details
1129
+ */
1130
+ getById(id: string): Promise<IdentitySecurityLogDto>;
1131
+ /**
1132
+ * Get security logs for the current user.
1133
+ * This method allows users to view their own security logs without
1134
+ * requiring the full AbpIdentity.SecurityLogs permission.
1135
+ * @param params - Query parameters for filtering and pagination
1136
+ * @returns Promise with paginated security logs for current user
1137
+ */
1138
+ getMyListByInput(params?: Partial<IdentitySecurityLogGetListInput>): Promise<PagedResultDto<IdentitySecurityLogDto>>;
1139
+ /**
1140
+ * Get a single security log by ID for the current user.
1141
+ * This method allows users to view details of their own security logs.
1142
+ * @param id - The security log ID
1143
+ * @returns Promise with the security log details
1144
+ */
1145
+ getMyById(id: string): Promise<IdentitySecurityLogDto>;
1146
+ }
1147
+
972
1148
  /**
973
1149
  * Service for managing organization unit operations.
974
1150
  * Handles CRUD operations for organization units hierarchy.
@@ -1608,6 +1784,7 @@ declare const IDENTITY_POLICIES: {
1608
1784
  * Identity Extension Tokens
1609
1785
  * Provides extension points for customizing identity components.
1610
1786
  * @since 3.0.0
1787
+ * @updated 3.1.0 - Added SecurityLogs extensions
1611
1788
  */
1612
1789
 
1613
1790
  /**
@@ -1696,6 +1873,12 @@ declare const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS: EntityAction<Identity
1696
1873
  * Default entity actions for Organization Roles component.
1697
1874
  */
1698
1875
  declare const DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS: EntityAction<Identity.RoleItem>[];
1876
+ /**
1877
+ * Default entity actions for Security Logs component.
1878
+ * Security logs are read-only, so no actions by default.
1879
+ * @since 3.1.0
1880
+ */
1881
+ declare const DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS: EntityAction<IdentitySecurityLogDto>[];
1699
1882
  /**
1700
1883
  * Combined default identity entity actions.
1701
1884
  */
@@ -1705,6 +1888,8 @@ declare const DEFAULT_IDENTITY_ENTITY_ACTIONS: {
1705
1888
  readonly 'Identity.UsersComponent': EntityAction<Identity.UserItem>[];
1706
1889
  readonly 'Identity.OrganizationMembersComponent': EntityAction<Identity.UserItem>[];
1707
1890
  readonly 'Identity.OrganizationRolesComponent': EntityAction<Identity.RoleItem>[];
1891
+ /** Security logs entity actions (v3.1.0) */
1892
+ readonly 'Identity.SecurityLogs': EntityAction<IdentitySecurityLogDto>[];
1708
1893
  };
1709
1894
  /**
1710
1895
  * Default toolbar actions for Claims component.
@@ -1722,6 +1907,12 @@ declare const DEFAULT_USERS_TOOLBAR_ACTIONS: ToolbarAction<Identity.UserItem[]>[
1722
1907
  * Default toolbar actions for Organization Units component.
1723
1908
  */
1724
1909
  declare const DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS: ToolbarAction<OrganizationUnitWithDetailsDto[]>[];
1910
+ /**
1911
+ * Default toolbar actions for Security Logs component.
1912
+ * Security logs are read-only, no create action by default.
1913
+ * @since 3.1.0
1914
+ */
1915
+ declare const DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS: ToolbarAction<IdentitySecurityLogDto[]>[];
1725
1916
  /**
1726
1917
  * Combined default identity toolbar actions.
1727
1918
  */
@@ -1730,6 +1921,8 @@ declare const DEFAULT_IDENTITY_TOOLBAR_ACTIONS: {
1730
1921
  readonly 'Identity.RolesComponent': ToolbarAction<Identity.RoleItem[]>[];
1731
1922
  readonly 'Identity.UsersComponent': ToolbarAction<Identity.UserItem[]>[];
1732
1923
  readonly 'Identity.OrganizationUnitsComponent': ToolbarAction<OrganizationUnitWithDetailsDto[]>[];
1924
+ /** Security logs toolbar actions (v3.1.0) */
1925
+ readonly 'Identity.SecurityLogs': ToolbarAction<IdentitySecurityLogDto[]>[];
1733
1926
  };
1734
1927
  /**
1735
1928
  * Default entity props for Claims component.
@@ -1751,6 +1944,11 @@ declare const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS: EntityProp<Identity.Use
1751
1944
  * Default entity props for Organization Roles component.
1752
1945
  */
1753
1946
  declare const DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS: EntityProp<Identity.RoleItem>[];
1947
+ /**
1948
+ * Default entity props for Security Logs component.
1949
+ * @since 3.1.0
1950
+ */
1951
+ declare const DEFAULT_SECURITY_LOGS_ENTITY_PROPS: EntityProp<IdentitySecurityLogDto>[];
1754
1952
  /**
1755
1953
  * Combined default identity entity props.
1756
1954
  */
@@ -1760,6 +1958,8 @@ declare const DEFAULT_IDENTITY_ENTITY_PROPS: {
1760
1958
  readonly 'Identity.UsersComponent': EntityProp<Identity.UserItem>[];
1761
1959
  readonly 'Identity.OrganizationMembersComponent': EntityProp<Identity.UserItem>[];
1762
1960
  readonly 'Identity.OrganizationRolesComponent': EntityProp<Identity.RoleItem>[];
1961
+ /** Security logs entity props (v3.1.0) */
1962
+ readonly 'Identity.SecurityLogs': EntityProp<IdentitySecurityLogDto>[];
1763
1963
  };
1764
1964
  /**
1765
1965
  * Default create form props for Claims component.
@@ -1803,6 +2003,7 @@ declare const DEFAULT_IDENTITY_EDIT_FORM_PROPS: {
1803
2003
  };
1804
2004
  /**
1805
2005
  * Entity action contributors type.
2006
+ * @updated 3.1.0 - Added SecurityLogs
1806
2007
  */
1807
2008
  type IdentityEntityActionContributors = Partial<{
1808
2009
  [eIdentityComponents.Claims]: EntityActionContributorCallback<Identity.ClaimType>[];
@@ -1810,18 +2011,22 @@ type IdentityEntityActionContributors = Partial<{
1810
2011
  [eIdentityComponents.Users]: EntityActionContributorCallback<Identity.UserItem>[];
1811
2012
  [eIdentityComponents.OrganizationMembers]: EntityActionContributorCallback<Identity.UserItem>[];
1812
2013
  [eIdentityComponents.OrganizationRoles]: EntityActionContributorCallback<Identity.RoleItem>[];
2014
+ [eIdentityComponents.SecurityLogs]: EntityActionContributorCallback<IdentitySecurityLogDto>[];
1813
2015
  }>;
1814
2016
  /**
1815
2017
  * Toolbar action contributors type.
2018
+ * @updated 3.1.0 - Added SecurityLogs
1816
2019
  */
1817
2020
  type IdentityToolbarActionContributors = Partial<{
1818
2021
  [eIdentityComponents.Claims]: ToolbarActionContributorCallback<Identity.ClaimType[]>[];
1819
2022
  [eIdentityComponents.Roles]: ToolbarActionContributorCallback<Identity.RoleItem[]>[];
1820
2023
  [eIdentityComponents.Users]: ToolbarActionContributorCallback<Identity.UserItem[]>[];
1821
2024
  [eIdentityComponents.OrganizationUnits]: ToolbarActionContributorCallback<OrganizationUnitWithDetailsDto[]>[];
2025
+ [eIdentityComponents.SecurityLogs]: ToolbarActionContributorCallback<IdentitySecurityLogDto[]>[];
1822
2026
  }>;
1823
2027
  /**
1824
2028
  * Entity prop contributors type.
2029
+ * @updated 3.1.0 - Added SecurityLogs
1825
2030
  */
1826
2031
  type IdentityEntityPropContributors = Partial<{
1827
2032
  [eIdentityComponents.Claims]: EntityPropContributorCallback<Identity.ClaimType>[];
@@ -1829,6 +2034,7 @@ type IdentityEntityPropContributors = Partial<{
1829
2034
  [eIdentityComponents.Users]: EntityPropContributorCallback<Identity.UserItem>[];
1830
2035
  [eIdentityComponents.OrganizationMembers]: EntityPropContributorCallback<Identity.UserItem>[];
1831
2036
  [eIdentityComponents.OrganizationRoles]: EntityPropContributorCallback<Identity.RoleItem>[];
2037
+ [eIdentityComponents.SecurityLogs]: EntityPropContributorCallback<IdentitySecurityLogDto>[];
1832
2038
  }>;
1833
2039
  /**
1834
2040
  * Create form prop contributors type.
@@ -2032,4 +2238,4 @@ declare class TreeAdapter<T extends BaseNode = BaseNode> {
2032
2238
  expandPathToNode(id: string): void;
2033
2239
  }
2034
2240
 
2035
- export { type BaseNode, ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, type CreateFormPropContributorCallback, DEFAULT_CLAIMS_CREATE_FORM_PROPS, DEFAULT_CLAIMS_EDIT_FORM_PROPS, DEFAULT_CLAIMS_ENTITY_ACTIONS, DEFAULT_CLAIMS_ENTITY_PROPS, DEFAULT_CLAIMS_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS, DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS, DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS, DEFAULT_ROLES_CREATE_FORM_PROPS, DEFAULT_ROLES_EDIT_FORM_PROPS, DEFAULT_ROLES_ENTITY_ACTIONS, DEFAULT_ROLES_ENTITY_PROPS, DEFAULT_ROLES_TOOLBAR_ACTIONS, DEFAULT_USERS_CREATE_FORM_PROPS, DEFAULT_USERS_EDIT_FORM_PROPS, DEFAULT_USERS_ENTITY_ACTIONS, DEFAULT_USERS_ENTITY_PROPS, DEFAULT_USERS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, type GetOrganizationUnitInput, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, IDENTITY_ROUTE_PROVIDERS, IDENTITY_SETTING_TAB_CONFIG, IDENTITY_SETTING_TAB_PROVIDERS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, Identity, type IdentityComponentKey, type IdentityCreateFormPropContributors, type IdentityEditFormPropContributors, type IdentityEntityActionContributors, type IdentityEntityPropContributors, IdentityExtensionsGuard, type IdentityPolicyNameKey, type IdentityRouteNameKey, IdentityService, type IdentitySettingTabConfig, type IdentitySettingTabNameKey, identitySettings as IdentitySettings, IdentityStateService, type IdentityToolbarActionContributors, type OrganizationUnitCreateDto, type OrganizationUnitCreateOrUpdateDtoBase, type OrganizationUnitMoveInput, type OrganizationUnitRoleInput, OrganizationUnitService, type OrganizationUnitUpdateDto, type OrganizationUnitUserInput, type OrganizationUnitWithDetailsDto, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type ToolbarAction, type ToolbarActionContributorCallback, TreeAdapter, type TreeNode, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, configureRoutes, configureSettingTabs, createGetOrganizationUnitInput, createOrganizationUnitCreateDto, createOrganizationUnitCreateOrUpdateDtoBase, createOrganizationUnitMoveInput, createOrganizationUnitRoleInput, createOrganizationUnitUpdateDto, createOrganizationUnitUserInput, createOrganizationUnitWithDetailsDto, createTreeNode, eIdentityComponents, eIdentityPolicyNames, eIdentityRouteNames, eIdentitySettingTabNames, identityExtensionsGuard, initializeIdentityRoutes, initializeIdentitySettingTabs, useClaims, useIdentity, useIdentityExtensionsGuard, useRoles, useUsers };
2241
+ export { type BaseNode, ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, type CreateFormPropContributorCallback, DEFAULT_CLAIMS_CREATE_FORM_PROPS, DEFAULT_CLAIMS_EDIT_FORM_PROPS, DEFAULT_CLAIMS_ENTITY_ACTIONS, DEFAULT_CLAIMS_ENTITY_PROPS, DEFAULT_CLAIMS_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS, DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS, DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS, DEFAULT_ROLES_CREATE_FORM_PROPS, DEFAULT_ROLES_EDIT_FORM_PROPS, DEFAULT_ROLES_ENTITY_ACTIONS, DEFAULT_ROLES_ENTITY_PROPS, DEFAULT_ROLES_TOOLBAR_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_PROPS, DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS, DEFAULT_USERS_CREATE_FORM_PROPS, DEFAULT_USERS_EDIT_FORM_PROPS, DEFAULT_USERS_ENTITY_ACTIONS, DEFAULT_USERS_ENTITY_PROPS, DEFAULT_USERS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, type GetOrganizationUnitInput, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, IDENTITY_ROUTE_PROVIDERS, IDENTITY_SETTING_TAB_CONFIG, IDENTITY_SETTING_TAB_PROVIDERS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, Identity, type IdentityComponentKey, type IdentityCreateFormPropContributors, type IdentityEditFormPropContributors, type IdentityEntityActionContributors, type IdentityEntityPropContributors, IdentityExtensionsGuard, type IdentityPolicyNameKey, type IdentityRouteNameKey, type IdentitySecurityLogDto, type IdentitySecurityLogGetListInput, type IdentitySecurityLogResponse, IdentitySecurityLogService, IdentityService, type IdentitySettingTabConfig, type IdentitySettingTabNameKey, identitySettings as IdentitySettings, IdentityStateService, type IdentityToolbarActionContributors, type OrganizationUnitCreateDto, type OrganizationUnitCreateOrUpdateDtoBase, type OrganizationUnitMoveInput, type OrganizationUnitRoleInput, OrganizationUnitService, type OrganizationUnitUpdateDto, type OrganizationUnitUserInput, type OrganizationUnitWithDetailsDto, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type ToolbarAction, type ToolbarActionContributorCallback, TreeAdapter, type TreeNode, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, configureRoutes, configureSettingTabs, createGetOrganizationUnitInput, createIdentitySecurityLogGetListInput, createOrganizationUnitCreateDto, createOrganizationUnitCreateOrUpdateDtoBase, createOrganizationUnitMoveInput, createOrganizationUnitRoleInput, createOrganizationUnitUpdateDto, createOrganizationUnitUserInput, createOrganizationUnitWithDetailsDto, createTreeNode, eIdentityComponents, eIdentityPolicyNames, eIdentityRouteNames, eIdentitySettingTabNames, identityExtensionsGuard, initializeIdentityRoutes, initializeIdentitySettingTabs, useClaims, useIdentity, useIdentityExtensionsGuard, useRoles, useUsers };
package/dist/index.d.ts CHANGED
@@ -5,11 +5,13 @@ import React, { ComponentType } from 'react';
5
5
  * Identity Policy Names
6
6
  * Policy names for permission checking in the Identity module.
7
7
  * @since 3.0.0
8
+ * @updated 3.1.0 - Added SecurityLogs
8
9
  */
9
10
  /**
10
11
  * Identity policy names enum.
11
12
  * Used for checking permissions in the identity management module.
12
13
  * @since 3.0.0
14
+ * @updated 3.1.0 - Added SecurityLogs
13
15
  */
14
16
  declare const eIdentityPolicyNames: {
15
17
  readonly IdentityManagement: "AbpIdentity.Roles || AbpIdentity.Users || AbpIdentity.ClaimTypes || AbpIdentity.OrganizationUnits";
@@ -17,6 +19,8 @@ declare const eIdentityPolicyNames: {
17
19
  readonly Users: "AbpIdentity.Users";
18
20
  readonly ClaimTypes: "AbpIdentity.ClaimTypes";
19
21
  readonly OrganizationUnits: "AbpIdentity.OrganizationUnits";
22
+ /** Security logs policy (v3.1.0) */
23
+ readonly SecurityLogs: "AbpIdentity.SecurityLogs";
20
24
  };
21
25
  /**
22
26
  * Type for identity policy name values
@@ -27,6 +31,7 @@ type IdentityPolicyNameKey = (typeof eIdentityPolicyNames)[keyof typeof eIdentit
27
31
  * Identity Route Names
28
32
  * Route names for the Identity module navigation.
29
33
  * @since 3.0.0
34
+ * @updated 3.1.0 - Added SecurityLogs
30
35
  */
31
36
  /**
32
37
  * Identity route names enum.
@@ -36,6 +41,7 @@ type IdentityPolicyNameKey = (typeof eIdentityPolicyNames)[keyof typeof eIdentit
36
41
  * Routes are now organized under IdentityManagement.
37
42
  *
38
43
  * @since 3.0.0
44
+ * @updated 3.1.0 - Added SecurityLogs
39
45
  */
40
46
  declare const eIdentityRouteNames: {
41
47
  readonly IdentityManagement: "AbpIdentity::Menu:IdentityManagement";
@@ -43,6 +49,8 @@ declare const eIdentityRouteNames: {
43
49
  readonly Users: "AbpIdentity::Users";
44
50
  readonly ClaimTypes: "AbpIdentity::ClaimTypes";
45
51
  readonly OrganizationUnits: "AbpIdentity::OrganizationUnits";
52
+ /** Security logs route name (v3.1.0) */
53
+ readonly SecurityLogs: "AbpIdentity::SecurityLogs";
46
54
  };
47
55
  /**
48
56
  * Type for identity route name values
@@ -245,9 +253,12 @@ declare function createOrganizationUnitWithDetailsDto(initialValues?: Partial<Or
245
253
  * - Claim type management
246
254
  * - User/Role claims management
247
255
  * - Organization unit management (v2.9.0)
256
+ * - Security logs (v3.1.0)
257
+ * - User lock functionality (v3.1.0)
248
258
  *
249
259
  * @since 0.7.2
250
260
  * @updated 2.9.0 - Added organization units support
261
+ * @updated 3.1.0 - Added UserLockDurationType enum
251
262
  */
252
263
  declare namespace Identity {
253
264
  /**
@@ -393,8 +404,103 @@ declare namespace Identity {
393
404
  Boolean = 2,
394
405
  DateTime = 3
395
406
  }
407
+ /**
408
+ * User lock duration type enumeration (values in seconds)
409
+ * Used for locking user accounts for a specified duration.
410
+ * @since 3.1.0
411
+ */
412
+ enum UserLockDurationType {
413
+ Second = 1,
414
+ Minute = 60,
415
+ Hour = 3600,
416
+ Day = 86400,
417
+ Month = 2592000,
418
+ Year = 31536000
419
+ }
396
420
  }
397
421
 
422
+ /**
423
+ * Identity Security Log Models
424
+ * Types for security log management in the Identity module.
425
+ * @since 3.1.0
426
+ */
427
+
428
+ /**
429
+ * Security log data transfer object.
430
+ * Represents a security event logged in the system.
431
+ * @since 3.1.0
432
+ */
433
+ interface IdentitySecurityLogDto {
434
+ /** Unique identifier for the log entry */
435
+ id: string;
436
+ /** Tenant ID if applicable */
437
+ tenantId?: string | null;
438
+ /** Application name */
439
+ applicationName?: string | null;
440
+ /** Identity of the user (e.g., username) */
441
+ identity?: string | null;
442
+ /** The action performed (e.g., LoginSucceeded, LoginFailed) */
443
+ action?: string | null;
444
+ /** User ID if logged in */
445
+ userId?: string | null;
446
+ /** Username if available */
447
+ userName?: string | null;
448
+ /** Client IP address */
449
+ clientIpAddress?: string | null;
450
+ /** Client ID for OAuth clients */
451
+ clientId?: string | null;
452
+ /** Correlation ID for request tracing */
453
+ correlationId?: string | null;
454
+ /** Browser information (user agent) */
455
+ browserInfo?: string | null;
456
+ /** When the event occurred */
457
+ creationTime: string;
458
+ /** Extra properties dictionary */
459
+ extraProperties?: Record<string, unknown>;
460
+ }
461
+ /**
462
+ * Input parameters for querying security logs.
463
+ * @since 3.1.0
464
+ */
465
+ interface IdentitySecurityLogGetListInput {
466
+ /** Filter term */
467
+ filter?: string;
468
+ /** Start date for date range filter */
469
+ startTime?: string;
470
+ /** End date for date range filter */
471
+ endTime?: string;
472
+ /** Application name filter */
473
+ applicationName?: string;
474
+ /** Identity filter */
475
+ identity?: string;
476
+ /** Action filter */
477
+ action?: string;
478
+ /** User ID filter */
479
+ userId?: string;
480
+ /** Username filter */
481
+ userName?: string;
482
+ /** Client ID filter */
483
+ clientId?: string;
484
+ /** Correlation ID filter */
485
+ correlationId?: string;
486
+ /** Sorting expression */
487
+ sorting?: string;
488
+ /** Number of items to skip */
489
+ skipCount?: number;
490
+ /** Maximum number of items to return */
491
+ maxResultCount?: number;
492
+ }
493
+ /**
494
+ * Paginated response for security logs.
495
+ * @since 3.1.0
496
+ */
497
+ type IdentitySecurityLogResponse = PagedResultDto<IdentitySecurityLogDto>;
498
+ /**
499
+ * Factory function to create a default IdentitySecurityLogGetListInput.
500
+ * @since 3.1.0
501
+ */
502
+ declare function createIdentitySecurityLogGetListInput(overrides?: Partial<IdentitySecurityLogGetListInput>): IdentitySecurityLogGetListInput;
503
+
398
504
  /**
399
505
  * Get Organization Unit Input
400
506
  * Translated from @volo/abp.ng.identity v2.9.0
@@ -542,7 +648,7 @@ declare function createOrganizationUnitUserInput(initialValues?: Partial<Organiz
542
648
 
543
649
  /**
544
650
  * Identity Pro Component Identifiers
545
- * Translated from @volo/abp.ng.identity v2.9.0
651
+ * Translated from @volo/abp.ng.identity v3.1.0
546
652
  */
547
653
  /**
548
654
  * Enum-like const object for identity component identifiers.
@@ -550,6 +656,7 @@ declare function createOrganizationUnitUserInput(initialValues?: Partial<Organiz
550
656
  * @since 2.4.0
551
657
  * @updated 2.7.0 - Changed from enum to const object
552
658
  * @updated 2.9.0 - Added OrganizationUnits, OrganizationMembers, OrganizationRoles
659
+ * @updated 3.1.0 - Added SecurityLogs
553
660
  */
554
661
  declare const eIdentityComponents: {
555
662
  readonly Claims: "Identity.ClaimsComponent";
@@ -558,6 +665,8 @@ declare const eIdentityComponents: {
558
665
  readonly OrganizationUnits: "Identity.OrganizationUnitsComponent";
559
666
  readonly OrganizationMembers: "Identity.OrganizationMembersComponent";
560
667
  readonly OrganizationRoles: "Identity.OrganizationRolesComponent";
668
+ /** Security logs component (v3.1.0) */
669
+ readonly SecurityLogs: "Identity.SecurityLogs";
561
670
  };
562
671
  /**
563
672
  * Type for identity component key values
@@ -616,9 +725,11 @@ declare class IdentityExtensionsGuard {
616
725
  * Pro features include:
617
726
  * - Claim type management
618
727
  * - User/Role claims management
728
+ * - User lock functionality (v3.1.0)
619
729
  *
620
730
  * Translated from @volo/abp.ng.identity IdentityService
621
731
  * @since 2.0.0
732
+ * @updated 3.1.0 - Added getUserAvailableOrganizationUnits, lockUser methods
622
733
  */
623
734
  declare class IdentityService {
624
735
  /**
@@ -730,6 +841,20 @@ declare class IdentityService {
730
841
  * @returns Promise with roles that can be assigned to users
731
842
  */
732
843
  getUserAssingableRoles(): Promise<Identity.RoleResponse>;
844
+ /**
845
+ * Get available organization units for user assignment
846
+ * @since 3.1.0
847
+ * @returns Promise with available organization units
848
+ */
849
+ getUserAvailableOrganizationUnits(): Promise<PagedResultDto<OrganizationUnitWithDetailsDto>>;
850
+ /**
851
+ * Lock a user for a specified duration
852
+ * @since 3.1.0
853
+ * @param id - The user ID to lock
854
+ * @param lockoutDurationInSeconds - Duration to lock the user (in seconds)
855
+ * @returns Promise resolving when complete
856
+ */
857
+ lockUser(id: string, lockoutDurationInSeconds: number): Promise<void>;
733
858
  /**
734
859
  * Get claim types available for roles
735
860
  * @since 3.0.0
@@ -969,6 +1094,57 @@ declare class IdentityStateService {
969
1094
  dispatchGetUserRoles(id: string): Promise<Identity.RoleItem[]>;
970
1095
  }
971
1096
 
1097
+ /**
1098
+ * Service for managing identity security log API operations.
1099
+ * Provides methods to query security logs for users in the identity module.
1100
+ *
1101
+ * Security logs track user authentication events such as:
1102
+ * - Login succeeded/failed
1103
+ * - Logout
1104
+ * - Password changes
1105
+ * - Two-factor authentication events
1106
+ *
1107
+ * Translated from @volo/abp.ng.identity IdentitySecurityLogService
1108
+ * @since 3.1.0
1109
+ */
1110
+ declare class IdentitySecurityLogService {
1111
+ /**
1112
+ * The API name used for REST requests.
1113
+ */
1114
+ apiName: string;
1115
+ private rest;
1116
+ constructor(rest: RestService);
1117
+ /**
1118
+ * Get security logs with filtering and pagination.
1119
+ * Requires AbpIdentity.SecurityLogs permission.
1120
+ * @param params - Query parameters for filtering and pagination
1121
+ * @returns Promise with paginated security logs
1122
+ */
1123
+ getListByInput(params?: Partial<IdentitySecurityLogGetListInput>): Promise<PagedResultDto<IdentitySecurityLogDto>>;
1124
+ /**
1125
+ * Get a single security log by ID.
1126
+ * Requires AbpIdentity.SecurityLogs permission.
1127
+ * @param id - The security log ID
1128
+ * @returns Promise with the security log details
1129
+ */
1130
+ getById(id: string): Promise<IdentitySecurityLogDto>;
1131
+ /**
1132
+ * Get security logs for the current user.
1133
+ * This method allows users to view their own security logs without
1134
+ * requiring the full AbpIdentity.SecurityLogs permission.
1135
+ * @param params - Query parameters for filtering and pagination
1136
+ * @returns Promise with paginated security logs for current user
1137
+ */
1138
+ getMyListByInput(params?: Partial<IdentitySecurityLogGetListInput>): Promise<PagedResultDto<IdentitySecurityLogDto>>;
1139
+ /**
1140
+ * Get a single security log by ID for the current user.
1141
+ * This method allows users to view details of their own security logs.
1142
+ * @param id - The security log ID
1143
+ * @returns Promise with the security log details
1144
+ */
1145
+ getMyById(id: string): Promise<IdentitySecurityLogDto>;
1146
+ }
1147
+
972
1148
  /**
973
1149
  * Service for managing organization unit operations.
974
1150
  * Handles CRUD operations for organization units hierarchy.
@@ -1608,6 +1784,7 @@ declare const IDENTITY_POLICIES: {
1608
1784
  * Identity Extension Tokens
1609
1785
  * Provides extension points for customizing identity components.
1610
1786
  * @since 3.0.0
1787
+ * @updated 3.1.0 - Added SecurityLogs extensions
1611
1788
  */
1612
1789
 
1613
1790
  /**
@@ -1696,6 +1873,12 @@ declare const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS: EntityAction<Identity
1696
1873
  * Default entity actions for Organization Roles component.
1697
1874
  */
1698
1875
  declare const DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS: EntityAction<Identity.RoleItem>[];
1876
+ /**
1877
+ * Default entity actions for Security Logs component.
1878
+ * Security logs are read-only, so no actions by default.
1879
+ * @since 3.1.0
1880
+ */
1881
+ declare const DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS: EntityAction<IdentitySecurityLogDto>[];
1699
1882
  /**
1700
1883
  * Combined default identity entity actions.
1701
1884
  */
@@ -1705,6 +1888,8 @@ declare const DEFAULT_IDENTITY_ENTITY_ACTIONS: {
1705
1888
  readonly 'Identity.UsersComponent': EntityAction<Identity.UserItem>[];
1706
1889
  readonly 'Identity.OrganizationMembersComponent': EntityAction<Identity.UserItem>[];
1707
1890
  readonly 'Identity.OrganizationRolesComponent': EntityAction<Identity.RoleItem>[];
1891
+ /** Security logs entity actions (v3.1.0) */
1892
+ readonly 'Identity.SecurityLogs': EntityAction<IdentitySecurityLogDto>[];
1708
1893
  };
1709
1894
  /**
1710
1895
  * Default toolbar actions for Claims component.
@@ -1722,6 +1907,12 @@ declare const DEFAULT_USERS_TOOLBAR_ACTIONS: ToolbarAction<Identity.UserItem[]>[
1722
1907
  * Default toolbar actions for Organization Units component.
1723
1908
  */
1724
1909
  declare const DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS: ToolbarAction<OrganizationUnitWithDetailsDto[]>[];
1910
+ /**
1911
+ * Default toolbar actions for Security Logs component.
1912
+ * Security logs are read-only, no create action by default.
1913
+ * @since 3.1.0
1914
+ */
1915
+ declare const DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS: ToolbarAction<IdentitySecurityLogDto[]>[];
1725
1916
  /**
1726
1917
  * Combined default identity toolbar actions.
1727
1918
  */
@@ -1730,6 +1921,8 @@ declare const DEFAULT_IDENTITY_TOOLBAR_ACTIONS: {
1730
1921
  readonly 'Identity.RolesComponent': ToolbarAction<Identity.RoleItem[]>[];
1731
1922
  readonly 'Identity.UsersComponent': ToolbarAction<Identity.UserItem[]>[];
1732
1923
  readonly 'Identity.OrganizationUnitsComponent': ToolbarAction<OrganizationUnitWithDetailsDto[]>[];
1924
+ /** Security logs toolbar actions (v3.1.0) */
1925
+ readonly 'Identity.SecurityLogs': ToolbarAction<IdentitySecurityLogDto[]>[];
1733
1926
  };
1734
1927
  /**
1735
1928
  * Default entity props for Claims component.
@@ -1751,6 +1944,11 @@ declare const DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS: EntityProp<Identity.Use
1751
1944
  * Default entity props for Organization Roles component.
1752
1945
  */
1753
1946
  declare const DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS: EntityProp<Identity.RoleItem>[];
1947
+ /**
1948
+ * Default entity props for Security Logs component.
1949
+ * @since 3.1.0
1950
+ */
1951
+ declare const DEFAULT_SECURITY_LOGS_ENTITY_PROPS: EntityProp<IdentitySecurityLogDto>[];
1754
1952
  /**
1755
1953
  * Combined default identity entity props.
1756
1954
  */
@@ -1760,6 +1958,8 @@ declare const DEFAULT_IDENTITY_ENTITY_PROPS: {
1760
1958
  readonly 'Identity.UsersComponent': EntityProp<Identity.UserItem>[];
1761
1959
  readonly 'Identity.OrganizationMembersComponent': EntityProp<Identity.UserItem>[];
1762
1960
  readonly 'Identity.OrganizationRolesComponent': EntityProp<Identity.RoleItem>[];
1961
+ /** Security logs entity props (v3.1.0) */
1962
+ readonly 'Identity.SecurityLogs': EntityProp<IdentitySecurityLogDto>[];
1763
1963
  };
1764
1964
  /**
1765
1965
  * Default create form props for Claims component.
@@ -1803,6 +2003,7 @@ declare const DEFAULT_IDENTITY_EDIT_FORM_PROPS: {
1803
2003
  };
1804
2004
  /**
1805
2005
  * Entity action contributors type.
2006
+ * @updated 3.1.0 - Added SecurityLogs
1806
2007
  */
1807
2008
  type IdentityEntityActionContributors = Partial<{
1808
2009
  [eIdentityComponents.Claims]: EntityActionContributorCallback<Identity.ClaimType>[];
@@ -1810,18 +2011,22 @@ type IdentityEntityActionContributors = Partial<{
1810
2011
  [eIdentityComponents.Users]: EntityActionContributorCallback<Identity.UserItem>[];
1811
2012
  [eIdentityComponents.OrganizationMembers]: EntityActionContributorCallback<Identity.UserItem>[];
1812
2013
  [eIdentityComponents.OrganizationRoles]: EntityActionContributorCallback<Identity.RoleItem>[];
2014
+ [eIdentityComponents.SecurityLogs]: EntityActionContributorCallback<IdentitySecurityLogDto>[];
1813
2015
  }>;
1814
2016
  /**
1815
2017
  * Toolbar action contributors type.
2018
+ * @updated 3.1.0 - Added SecurityLogs
1816
2019
  */
1817
2020
  type IdentityToolbarActionContributors = Partial<{
1818
2021
  [eIdentityComponents.Claims]: ToolbarActionContributorCallback<Identity.ClaimType[]>[];
1819
2022
  [eIdentityComponents.Roles]: ToolbarActionContributorCallback<Identity.RoleItem[]>[];
1820
2023
  [eIdentityComponents.Users]: ToolbarActionContributorCallback<Identity.UserItem[]>[];
1821
2024
  [eIdentityComponents.OrganizationUnits]: ToolbarActionContributorCallback<OrganizationUnitWithDetailsDto[]>[];
2025
+ [eIdentityComponents.SecurityLogs]: ToolbarActionContributorCallback<IdentitySecurityLogDto[]>[];
1822
2026
  }>;
1823
2027
  /**
1824
2028
  * Entity prop contributors type.
2029
+ * @updated 3.1.0 - Added SecurityLogs
1825
2030
  */
1826
2031
  type IdentityEntityPropContributors = Partial<{
1827
2032
  [eIdentityComponents.Claims]: EntityPropContributorCallback<Identity.ClaimType>[];
@@ -1829,6 +2034,7 @@ type IdentityEntityPropContributors = Partial<{
1829
2034
  [eIdentityComponents.Users]: EntityPropContributorCallback<Identity.UserItem>[];
1830
2035
  [eIdentityComponents.OrganizationMembers]: EntityPropContributorCallback<Identity.UserItem>[];
1831
2036
  [eIdentityComponents.OrganizationRoles]: EntityPropContributorCallback<Identity.RoleItem>[];
2037
+ [eIdentityComponents.SecurityLogs]: EntityPropContributorCallback<IdentitySecurityLogDto>[];
1832
2038
  }>;
1833
2039
  /**
1834
2040
  * Create form prop contributors type.
@@ -2032,4 +2238,4 @@ declare class TreeAdapter<T extends BaseNode = BaseNode> {
2032
2238
  expandPathToNode(id: string): void;
2033
2239
  }
2034
2240
 
2035
- export { type BaseNode, ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, type CreateFormPropContributorCallback, DEFAULT_CLAIMS_CREATE_FORM_PROPS, DEFAULT_CLAIMS_EDIT_FORM_PROPS, DEFAULT_CLAIMS_ENTITY_ACTIONS, DEFAULT_CLAIMS_ENTITY_PROPS, DEFAULT_CLAIMS_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS, DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS, DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS, DEFAULT_ROLES_CREATE_FORM_PROPS, DEFAULT_ROLES_EDIT_FORM_PROPS, DEFAULT_ROLES_ENTITY_ACTIONS, DEFAULT_ROLES_ENTITY_PROPS, DEFAULT_ROLES_TOOLBAR_ACTIONS, DEFAULT_USERS_CREATE_FORM_PROPS, DEFAULT_USERS_EDIT_FORM_PROPS, DEFAULT_USERS_ENTITY_ACTIONS, DEFAULT_USERS_ENTITY_PROPS, DEFAULT_USERS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, type GetOrganizationUnitInput, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, IDENTITY_ROUTE_PROVIDERS, IDENTITY_SETTING_TAB_CONFIG, IDENTITY_SETTING_TAB_PROVIDERS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, Identity, type IdentityComponentKey, type IdentityCreateFormPropContributors, type IdentityEditFormPropContributors, type IdentityEntityActionContributors, type IdentityEntityPropContributors, IdentityExtensionsGuard, type IdentityPolicyNameKey, type IdentityRouteNameKey, IdentityService, type IdentitySettingTabConfig, type IdentitySettingTabNameKey, identitySettings as IdentitySettings, IdentityStateService, type IdentityToolbarActionContributors, type OrganizationUnitCreateDto, type OrganizationUnitCreateOrUpdateDtoBase, type OrganizationUnitMoveInput, type OrganizationUnitRoleInput, OrganizationUnitService, type OrganizationUnitUpdateDto, type OrganizationUnitUserInput, type OrganizationUnitWithDetailsDto, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type ToolbarAction, type ToolbarActionContributorCallback, TreeAdapter, type TreeNode, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, configureRoutes, configureSettingTabs, createGetOrganizationUnitInput, createOrganizationUnitCreateDto, createOrganizationUnitCreateOrUpdateDtoBase, createOrganizationUnitMoveInput, createOrganizationUnitRoleInput, createOrganizationUnitUpdateDto, createOrganizationUnitUserInput, createOrganizationUnitWithDetailsDto, createTreeNode, eIdentityComponents, eIdentityPolicyNames, eIdentityRouteNames, eIdentitySettingTabNames, identityExtensionsGuard, initializeIdentityRoutes, initializeIdentitySettingTabs, useClaims, useIdentity, useIdentityExtensionsGuard, useRoles, useUsers };
2241
+ export { type BaseNode, ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, type CreateFormPropContributorCallback, DEFAULT_CLAIMS_CREATE_FORM_PROPS, DEFAULT_CLAIMS_EDIT_FORM_PROPS, DEFAULT_CLAIMS_ENTITY_ACTIONS, DEFAULT_CLAIMS_ENTITY_PROPS, DEFAULT_CLAIMS_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS, DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS, DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS, DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS, DEFAULT_ROLES_CREATE_FORM_PROPS, DEFAULT_ROLES_EDIT_FORM_PROPS, DEFAULT_ROLES_ENTITY_ACTIONS, DEFAULT_ROLES_ENTITY_PROPS, DEFAULT_ROLES_TOOLBAR_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS, DEFAULT_SECURITY_LOGS_ENTITY_PROPS, DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS, DEFAULT_USERS_CREATE_FORM_PROPS, DEFAULT_USERS_EDIT_FORM_PROPS, DEFAULT_USERS_ENTITY_ACTIONS, DEFAULT_USERS_ENTITY_PROPS, DEFAULT_USERS_TOOLBAR_ACTIONS, type EditFormPropContributorCallback, type EntityAction, type EntityActionContributorCallback, type EntityProp, type EntityPropContributorCallback, type FormProp, type GetOrganizationUnitInput, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, IDENTITY_ROUTE_PROVIDERS, IDENTITY_SETTING_TAB_CONFIG, IDENTITY_SETTING_TAB_PROVIDERS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, Identity, type IdentityComponentKey, type IdentityCreateFormPropContributors, type IdentityEditFormPropContributors, type IdentityEntityActionContributors, type IdentityEntityPropContributors, IdentityExtensionsGuard, type IdentityPolicyNameKey, type IdentityRouteNameKey, type IdentitySecurityLogDto, type IdentitySecurityLogGetListInput, type IdentitySecurityLogResponse, IdentitySecurityLogService, IdentityService, type IdentitySettingTabConfig, type IdentitySettingTabNameKey, identitySettings as IdentitySettings, IdentityStateService, type IdentityToolbarActionContributors, type OrganizationUnitCreateDto, type OrganizationUnitCreateOrUpdateDtoBase, type OrganizationUnitMoveInput, type OrganizationUnitRoleInput, OrganizationUnitService, type OrganizationUnitUpdateDto, type OrganizationUnitUserInput, type OrganizationUnitWithDetailsDto, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type ToolbarAction, type ToolbarActionContributorCallback, TreeAdapter, type TreeNode, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, configureRoutes, configureSettingTabs, createGetOrganizationUnitInput, createIdentitySecurityLogGetListInput, createOrganizationUnitCreateDto, createOrganizationUnitCreateOrUpdateDtoBase, createOrganizationUnitMoveInput, createOrganizationUnitRoleInput, createOrganizationUnitUpdateDto, createOrganizationUnitUserInput, createOrganizationUnitWithDetailsDto, createTreeNode, eIdentityComponents, eIdentityPolicyNames, eIdentityRouteNames, eIdentitySettingTabNames, identityExtensionsGuard, initializeIdentityRoutes, initializeIdentitySettingTabs, useClaims, useIdentity, useIdentityExtensionsGuard, useRoles, useUsers };
package/dist/index.js CHANGED
@@ -42,6 +42,9 @@ __export(index_exports, {
42
42
  DEFAULT_ROLES_ENTITY_ACTIONS: () => DEFAULT_ROLES_ENTITY_ACTIONS,
43
43
  DEFAULT_ROLES_ENTITY_PROPS: () => DEFAULT_ROLES_ENTITY_PROPS,
44
44
  DEFAULT_ROLES_TOOLBAR_ACTIONS: () => DEFAULT_ROLES_TOOLBAR_ACTIONS,
45
+ DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS: () => DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS,
46
+ DEFAULT_SECURITY_LOGS_ENTITY_PROPS: () => DEFAULT_SECURITY_LOGS_ENTITY_PROPS,
47
+ DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS: () => DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS,
45
48
  DEFAULT_USERS_CREATE_FORM_PROPS: () => DEFAULT_USERS_CREATE_FORM_PROPS,
46
49
  DEFAULT_USERS_EDIT_FORM_PROPS: () => DEFAULT_USERS_EDIT_FORM_PROPS,
47
50
  DEFAULT_USERS_ENTITY_ACTIONS: () => DEFAULT_USERS_ENTITY_ACTIONS,
@@ -60,6 +63,7 @@ __export(index_exports, {
60
63
  IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS: () => IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
61
64
  Identity: () => Identity,
62
65
  IdentityExtensionsGuard: () => IdentityExtensionsGuard,
66
+ IdentitySecurityLogService: () => IdentitySecurityLogService,
63
67
  IdentityService: () => IdentityService,
64
68
  IdentityStateService: () => IdentityStateService,
65
69
  OrganizationUnitService: () => OrganizationUnitService,
@@ -69,6 +73,7 @@ __export(index_exports, {
69
73
  configureRoutes: () => configureRoutes,
70
74
  configureSettingTabs: () => configureSettingTabs,
71
75
  createGetOrganizationUnitInput: () => createGetOrganizationUnitInput,
76
+ createIdentitySecurityLogGetListInput: () => createIdentitySecurityLogGetListInput,
72
77
  createOrganizationUnitCreateDto: () => createOrganizationUnitCreateDto,
73
78
  createOrganizationUnitCreateOrUpdateDtoBase: () => createOrganizationUnitCreateOrUpdateDtoBase,
74
79
  createOrganizationUnitMoveInput: () => createOrganizationUnitMoveInput,
@@ -98,7 +103,9 @@ var eIdentityPolicyNames = {
98
103
  Roles: "AbpIdentity.Roles",
99
104
  Users: "AbpIdentity.Users",
100
105
  ClaimTypes: "AbpIdentity.ClaimTypes",
101
- OrganizationUnits: "AbpIdentity.OrganizationUnits"
106
+ OrganizationUnits: "AbpIdentity.OrganizationUnits",
107
+ /** Security logs policy (v3.1.0) */
108
+ SecurityLogs: "AbpIdentity.SecurityLogs"
102
109
  };
103
110
 
104
111
  // src/config/enums/route-names.ts
@@ -107,7 +114,9 @@ var eIdentityRouteNames = {
107
114
  Roles: "AbpIdentity::Roles",
108
115
  Users: "AbpIdentity::Users",
109
116
  ClaimTypes: "AbpIdentity::ClaimTypes",
110
- OrganizationUnits: "AbpIdentity::OrganizationUnits"
117
+ OrganizationUnits: "AbpIdentity::OrganizationUnits",
118
+ /** Security logs route name (v3.1.0) */
119
+ SecurityLogs: "AbpIdentity::SecurityLogs"
111
120
  };
112
121
 
113
122
  // src/config/enums/setting-tab-names.ts
@@ -203,8 +212,26 @@ var Identity;
203
212
  ClaimValueType2[ClaimValueType2["Boolean"] = 2] = "Boolean";
204
213
  ClaimValueType2[ClaimValueType2["DateTime"] = 3] = "DateTime";
205
214
  })(ClaimValueType = Identity2.ClaimValueType || (Identity2.ClaimValueType = {}));
215
+ let UserLockDurationType;
216
+ ((UserLockDurationType2) => {
217
+ UserLockDurationType2[UserLockDurationType2["Second"] = 1] = "Second";
218
+ UserLockDurationType2[UserLockDurationType2["Minute"] = 60] = "Minute";
219
+ UserLockDurationType2[UserLockDurationType2["Hour"] = 3600] = "Hour";
220
+ UserLockDurationType2[UserLockDurationType2["Day"] = 86400] = "Day";
221
+ UserLockDurationType2[UserLockDurationType2["Month"] = 2592e3] = "Month";
222
+ UserLockDurationType2[UserLockDurationType2["Year"] = 31536e3] = "Year";
223
+ })(UserLockDurationType = Identity2.UserLockDurationType || (Identity2.UserLockDurationType = {}));
206
224
  })(Identity || (Identity = {}));
207
225
 
226
+ // src/models/identity-security-log.ts
227
+ function createIdentitySecurityLogGetListInput(overrides = {}) {
228
+ return {
229
+ skipCount: 0,
230
+ maxResultCount: 10,
231
+ ...overrides
232
+ };
233
+ }
234
+
208
235
  // src/models/get-organization-unit-input.ts
209
236
  function createGetOrganizationUnitInput(initialValues) {
210
237
  return {
@@ -294,7 +321,9 @@ var eIdentityComponents = {
294
321
  Users: "Identity.UsersComponent",
295
322
  OrganizationUnits: "Identity.OrganizationUnitsComponent",
296
323
  OrganizationMembers: "Identity.OrganizationMembersComponent",
297
- OrganizationRoles: "Identity.OrganizationRolesComponent"
324
+ OrganizationRoles: "Identity.OrganizationRolesComponent",
325
+ /** Security logs component (v3.1.0) */
326
+ SecurityLogs: "Identity.SecurityLogs"
298
327
  };
299
328
 
300
329
  // src/guards/extensions.guard.ts
@@ -518,6 +547,31 @@ var IdentityService = class {
518
547
  url: "/api/identity/users/assignable-roles"
519
548
  });
520
549
  }
550
+ /**
551
+ * Get available organization units for user assignment
552
+ * @since 3.1.0
553
+ * @returns Promise with available organization units
554
+ */
555
+ getUserAvailableOrganizationUnits() {
556
+ return this.rest.request({
557
+ method: "GET",
558
+ url: "/api/identity/users/available-organization-units"
559
+ });
560
+ }
561
+ /**
562
+ * Lock a user for a specified duration
563
+ * @since 3.1.0
564
+ * @param id - The user ID to lock
565
+ * @param lockoutDurationInSeconds - Duration to lock the user (in seconds)
566
+ * @returns Promise resolving when complete
567
+ */
568
+ lockUser(id, lockoutDurationInSeconds) {
569
+ return this.rest.request({
570
+ method: "PUT",
571
+ url: `/api/identity/users/${id}/lock`,
572
+ body: { lockoutDurationInSeconds }
573
+ });
574
+ }
521
575
  // ========================
522
576
  // Pro: Claim Type Operations
523
577
  // ========================
@@ -870,6 +924,68 @@ var IdentityStateService = class {
870
924
  }
871
925
  };
872
926
 
927
+ // src/services/identity-security-log.service.ts
928
+ var IdentitySecurityLogService = class {
929
+ constructor(rest) {
930
+ /**
931
+ * The API name used for REST requests.
932
+ */
933
+ this.apiName = "default";
934
+ this.rest = rest;
935
+ }
936
+ /**
937
+ * Get security logs with filtering and pagination.
938
+ * Requires AbpIdentity.SecurityLogs permission.
939
+ * @param params - Query parameters for filtering and pagination
940
+ * @returns Promise with paginated security logs
941
+ */
942
+ getListByInput(params = {}) {
943
+ return this.rest.request({
944
+ method: "GET",
945
+ url: "/api/identity/security-logs",
946
+ params
947
+ });
948
+ }
949
+ /**
950
+ * Get a single security log by ID.
951
+ * Requires AbpIdentity.SecurityLogs permission.
952
+ * @param id - The security log ID
953
+ * @returns Promise with the security log details
954
+ */
955
+ getById(id) {
956
+ return this.rest.request({
957
+ method: "GET",
958
+ url: `/api/identity/security-logs/${id}`
959
+ });
960
+ }
961
+ /**
962
+ * Get security logs for the current user.
963
+ * This method allows users to view their own security logs without
964
+ * requiring the full AbpIdentity.SecurityLogs permission.
965
+ * @param params - Query parameters for filtering and pagination
966
+ * @returns Promise with paginated security logs for current user
967
+ */
968
+ getMyListByInput(params = {}) {
969
+ return this.rest.request({
970
+ method: "GET",
971
+ url: "/api/identity/security-logs/my",
972
+ params
973
+ });
974
+ }
975
+ /**
976
+ * Get a single security log by ID for the current user.
977
+ * This method allows users to view details of their own security logs.
978
+ * @param id - The security log ID
979
+ * @returns Promise with the security log details
980
+ */
981
+ getMyById(id) {
982
+ return this.rest.request({
983
+ method: "GET",
984
+ url: `/api/identity/security-logs/my/${id}`
985
+ });
986
+ }
987
+ };
988
+
873
989
  // src/services/organization-unit.service.ts
874
990
  var OrganizationUnitService = class {
875
991
  constructor(rest) {
@@ -2785,12 +2901,15 @@ var DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS = [
2785
2901
  icon: "fa fa-trash"
2786
2902
  }
2787
2903
  ];
2904
+ var DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS = [];
2788
2905
  var DEFAULT_IDENTITY_ENTITY_ACTIONS = {
2789
2906
  "Identity.ClaimsComponent": DEFAULT_CLAIMS_ENTITY_ACTIONS,
2790
2907
  "Identity.RolesComponent": DEFAULT_ROLES_ENTITY_ACTIONS,
2791
2908
  "Identity.UsersComponent": DEFAULT_USERS_ENTITY_ACTIONS,
2792
2909
  "Identity.OrganizationMembersComponent": DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS,
2793
- "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS
2910
+ "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS,
2911
+ /** Security logs entity actions (v3.1.0) */
2912
+ "Identity.SecurityLogs": DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS
2794
2913
  };
2795
2914
  var DEFAULT_CLAIMS_TOOLBAR_ACTIONS = [
2796
2915
  {
@@ -2820,11 +2939,14 @@ var DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS = [
2820
2939
  icon: "fa fa-plus"
2821
2940
  }
2822
2941
  ];
2942
+ var DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS = [];
2823
2943
  var DEFAULT_IDENTITY_TOOLBAR_ACTIONS = {
2824
2944
  "Identity.ClaimsComponent": DEFAULT_CLAIMS_TOOLBAR_ACTIONS,
2825
2945
  "Identity.RolesComponent": DEFAULT_ROLES_TOOLBAR_ACTIONS,
2826
2946
  "Identity.UsersComponent": DEFAULT_USERS_TOOLBAR_ACTIONS,
2827
- "Identity.OrganizationUnitsComponent": DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS
2947
+ "Identity.OrganizationUnitsComponent": DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS,
2948
+ /** Security logs toolbar actions (v3.1.0) */
2949
+ "Identity.SecurityLogs": DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS
2828
2950
  };
2829
2951
  var DEFAULT_CLAIMS_ENTITY_PROPS = [
2830
2952
  { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:ClaimName", sortable: true },
@@ -2847,12 +2969,22 @@ var DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS = [
2847
2969
  var DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS = [
2848
2970
  { type: "string", name: "name", displayName: "AbpIdentity::RoleName", sortable: true }
2849
2971
  ];
2972
+ var DEFAULT_SECURITY_LOGS_ENTITY_PROPS = [
2973
+ { type: "date", name: "creationTime", displayName: "AbpIdentity::CreationTime", sortable: true },
2974
+ { type: "string", name: "action", displayName: "AbpIdentity::Action", sortable: true },
2975
+ { type: "string", name: "userName", displayName: "AbpIdentity::UserName", sortable: true },
2976
+ { type: "string", name: "applicationName", displayName: "AbpIdentity::ApplicationName", sortable: true },
2977
+ { type: "string", name: "identity", displayName: "AbpIdentity::Identity", sortable: false },
2978
+ { type: "string", name: "clientIpAddress", displayName: "AbpIdentity::ClientIpAddress", sortable: false }
2979
+ ];
2850
2980
  var DEFAULT_IDENTITY_ENTITY_PROPS = {
2851
2981
  "Identity.ClaimsComponent": DEFAULT_CLAIMS_ENTITY_PROPS,
2852
2982
  "Identity.RolesComponent": DEFAULT_ROLES_ENTITY_PROPS,
2853
2983
  "Identity.UsersComponent": DEFAULT_USERS_ENTITY_PROPS,
2854
2984
  "Identity.OrganizationMembersComponent": DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS,
2855
- "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS
2985
+ "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS,
2986
+ /** Security logs entity props (v3.1.0) */
2987
+ "Identity.SecurityLogs": DEFAULT_SECURITY_LOGS_ENTITY_PROPS
2856
2988
  };
2857
2989
  var DEFAULT_CLAIMS_CREATE_FORM_PROPS = [
2858
2990
  { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:ClaimName" },
@@ -3110,6 +3242,9 @@ var TreeAdapter = class {
3110
3242
  DEFAULT_ROLES_ENTITY_ACTIONS,
3111
3243
  DEFAULT_ROLES_ENTITY_PROPS,
3112
3244
  DEFAULT_ROLES_TOOLBAR_ACTIONS,
3245
+ DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS,
3246
+ DEFAULT_SECURITY_LOGS_ENTITY_PROPS,
3247
+ DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS,
3113
3248
  DEFAULT_USERS_CREATE_FORM_PROPS,
3114
3249
  DEFAULT_USERS_EDIT_FORM_PROPS,
3115
3250
  DEFAULT_USERS_ENTITY_ACTIONS,
@@ -3128,6 +3263,7 @@ var TreeAdapter = class {
3128
3263
  IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
3129
3264
  Identity,
3130
3265
  IdentityExtensionsGuard,
3266
+ IdentitySecurityLogService,
3131
3267
  IdentityService,
3132
3268
  IdentityStateService,
3133
3269
  OrganizationUnitService,
@@ -3137,6 +3273,7 @@ var TreeAdapter = class {
3137
3273
  configureRoutes,
3138
3274
  configureSettingTabs,
3139
3275
  createGetOrganizationUnitInput,
3276
+ createIdentitySecurityLogGetListInput,
3140
3277
  createOrganizationUnitCreateDto,
3141
3278
  createOrganizationUnitCreateOrUpdateDtoBase,
3142
3279
  createOrganizationUnitMoveInput,
package/dist/index.mjs CHANGED
@@ -4,7 +4,9 @@ var eIdentityPolicyNames = {
4
4
  Roles: "AbpIdentity.Roles",
5
5
  Users: "AbpIdentity.Users",
6
6
  ClaimTypes: "AbpIdentity.ClaimTypes",
7
- OrganizationUnits: "AbpIdentity.OrganizationUnits"
7
+ OrganizationUnits: "AbpIdentity.OrganizationUnits",
8
+ /** Security logs policy (v3.1.0) */
9
+ SecurityLogs: "AbpIdentity.SecurityLogs"
8
10
  };
9
11
 
10
12
  // src/config/enums/route-names.ts
@@ -13,7 +15,9 @@ var eIdentityRouteNames = {
13
15
  Roles: "AbpIdentity::Roles",
14
16
  Users: "AbpIdentity::Users",
15
17
  ClaimTypes: "AbpIdentity::ClaimTypes",
16
- OrganizationUnits: "AbpIdentity::OrganizationUnits"
18
+ OrganizationUnits: "AbpIdentity::OrganizationUnits",
19
+ /** Security logs route name (v3.1.0) */
20
+ SecurityLogs: "AbpIdentity::SecurityLogs"
17
21
  };
18
22
 
19
23
  // src/config/enums/setting-tab-names.ts
@@ -109,8 +113,26 @@ var Identity;
109
113
  ClaimValueType2[ClaimValueType2["Boolean"] = 2] = "Boolean";
110
114
  ClaimValueType2[ClaimValueType2["DateTime"] = 3] = "DateTime";
111
115
  })(ClaimValueType = Identity2.ClaimValueType || (Identity2.ClaimValueType = {}));
116
+ let UserLockDurationType;
117
+ ((UserLockDurationType2) => {
118
+ UserLockDurationType2[UserLockDurationType2["Second"] = 1] = "Second";
119
+ UserLockDurationType2[UserLockDurationType2["Minute"] = 60] = "Minute";
120
+ UserLockDurationType2[UserLockDurationType2["Hour"] = 3600] = "Hour";
121
+ UserLockDurationType2[UserLockDurationType2["Day"] = 86400] = "Day";
122
+ UserLockDurationType2[UserLockDurationType2["Month"] = 2592e3] = "Month";
123
+ UserLockDurationType2[UserLockDurationType2["Year"] = 31536e3] = "Year";
124
+ })(UserLockDurationType = Identity2.UserLockDurationType || (Identity2.UserLockDurationType = {}));
112
125
  })(Identity || (Identity = {}));
113
126
 
127
+ // src/models/identity-security-log.ts
128
+ function createIdentitySecurityLogGetListInput(overrides = {}) {
129
+ return {
130
+ skipCount: 0,
131
+ maxResultCount: 10,
132
+ ...overrides
133
+ };
134
+ }
135
+
114
136
  // src/models/get-organization-unit-input.ts
115
137
  function createGetOrganizationUnitInput(initialValues) {
116
138
  return {
@@ -200,7 +222,9 @@ var eIdentityComponents = {
200
222
  Users: "Identity.UsersComponent",
201
223
  OrganizationUnits: "Identity.OrganizationUnitsComponent",
202
224
  OrganizationMembers: "Identity.OrganizationMembersComponent",
203
- OrganizationRoles: "Identity.OrganizationRolesComponent"
225
+ OrganizationRoles: "Identity.OrganizationRolesComponent",
226
+ /** Security logs component (v3.1.0) */
227
+ SecurityLogs: "Identity.SecurityLogs"
204
228
  };
205
229
 
206
230
  // src/guards/extensions.guard.ts
@@ -424,6 +448,31 @@ var IdentityService = class {
424
448
  url: "/api/identity/users/assignable-roles"
425
449
  });
426
450
  }
451
+ /**
452
+ * Get available organization units for user assignment
453
+ * @since 3.1.0
454
+ * @returns Promise with available organization units
455
+ */
456
+ getUserAvailableOrganizationUnits() {
457
+ return this.rest.request({
458
+ method: "GET",
459
+ url: "/api/identity/users/available-organization-units"
460
+ });
461
+ }
462
+ /**
463
+ * Lock a user for a specified duration
464
+ * @since 3.1.0
465
+ * @param id - The user ID to lock
466
+ * @param lockoutDurationInSeconds - Duration to lock the user (in seconds)
467
+ * @returns Promise resolving when complete
468
+ */
469
+ lockUser(id, lockoutDurationInSeconds) {
470
+ return this.rest.request({
471
+ method: "PUT",
472
+ url: `/api/identity/users/${id}/lock`,
473
+ body: { lockoutDurationInSeconds }
474
+ });
475
+ }
427
476
  // ========================
428
477
  // Pro: Claim Type Operations
429
478
  // ========================
@@ -776,6 +825,68 @@ var IdentityStateService = class {
776
825
  }
777
826
  };
778
827
 
828
+ // src/services/identity-security-log.service.ts
829
+ var IdentitySecurityLogService = class {
830
+ constructor(rest) {
831
+ /**
832
+ * The API name used for REST requests.
833
+ */
834
+ this.apiName = "default";
835
+ this.rest = rest;
836
+ }
837
+ /**
838
+ * Get security logs with filtering and pagination.
839
+ * Requires AbpIdentity.SecurityLogs permission.
840
+ * @param params - Query parameters for filtering and pagination
841
+ * @returns Promise with paginated security logs
842
+ */
843
+ getListByInput(params = {}) {
844
+ return this.rest.request({
845
+ method: "GET",
846
+ url: "/api/identity/security-logs",
847
+ params
848
+ });
849
+ }
850
+ /**
851
+ * Get a single security log by ID.
852
+ * Requires AbpIdentity.SecurityLogs permission.
853
+ * @param id - The security log ID
854
+ * @returns Promise with the security log details
855
+ */
856
+ getById(id) {
857
+ return this.rest.request({
858
+ method: "GET",
859
+ url: `/api/identity/security-logs/${id}`
860
+ });
861
+ }
862
+ /**
863
+ * Get security logs for the current user.
864
+ * This method allows users to view their own security logs without
865
+ * requiring the full AbpIdentity.SecurityLogs permission.
866
+ * @param params - Query parameters for filtering and pagination
867
+ * @returns Promise with paginated security logs for current user
868
+ */
869
+ getMyListByInput(params = {}) {
870
+ return this.rest.request({
871
+ method: "GET",
872
+ url: "/api/identity/security-logs/my",
873
+ params
874
+ });
875
+ }
876
+ /**
877
+ * Get a single security log by ID for the current user.
878
+ * This method allows users to view details of their own security logs.
879
+ * @param id - The security log ID
880
+ * @returns Promise with the security log details
881
+ */
882
+ getMyById(id) {
883
+ return this.rest.request({
884
+ method: "GET",
885
+ url: `/api/identity/security-logs/my/${id}`
886
+ });
887
+ }
888
+ };
889
+
779
890
  // src/services/organization-unit.service.ts
780
891
  var OrganizationUnitService = class {
781
892
  constructor(rest) {
@@ -2729,12 +2840,15 @@ var DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS = [
2729
2840
  icon: "fa fa-trash"
2730
2841
  }
2731
2842
  ];
2843
+ var DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS = [];
2732
2844
  var DEFAULT_IDENTITY_ENTITY_ACTIONS = {
2733
2845
  "Identity.ClaimsComponent": DEFAULT_CLAIMS_ENTITY_ACTIONS,
2734
2846
  "Identity.RolesComponent": DEFAULT_ROLES_ENTITY_ACTIONS,
2735
2847
  "Identity.UsersComponent": DEFAULT_USERS_ENTITY_ACTIONS,
2736
2848
  "Identity.OrganizationMembersComponent": DEFAULT_ORGANIZATION_MEMBERS_ENTITY_ACTIONS,
2737
- "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS
2849
+ "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_ACTIONS,
2850
+ /** Security logs entity actions (v3.1.0) */
2851
+ "Identity.SecurityLogs": DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS
2738
2852
  };
2739
2853
  var DEFAULT_CLAIMS_TOOLBAR_ACTIONS = [
2740
2854
  {
@@ -2764,11 +2878,14 @@ var DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS = [
2764
2878
  icon: "fa fa-plus"
2765
2879
  }
2766
2880
  ];
2881
+ var DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS = [];
2767
2882
  var DEFAULT_IDENTITY_TOOLBAR_ACTIONS = {
2768
2883
  "Identity.ClaimsComponent": DEFAULT_CLAIMS_TOOLBAR_ACTIONS,
2769
2884
  "Identity.RolesComponent": DEFAULT_ROLES_TOOLBAR_ACTIONS,
2770
2885
  "Identity.UsersComponent": DEFAULT_USERS_TOOLBAR_ACTIONS,
2771
- "Identity.OrganizationUnitsComponent": DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS
2886
+ "Identity.OrganizationUnitsComponent": DEFAULT_ORGANIZATION_UNITS_TOOLBAR_ACTIONS,
2887
+ /** Security logs toolbar actions (v3.1.0) */
2888
+ "Identity.SecurityLogs": DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS
2772
2889
  };
2773
2890
  var DEFAULT_CLAIMS_ENTITY_PROPS = [
2774
2891
  { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:ClaimName", sortable: true },
@@ -2791,12 +2908,22 @@ var DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS = [
2791
2908
  var DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS = [
2792
2909
  { type: "string", name: "name", displayName: "AbpIdentity::RoleName", sortable: true }
2793
2910
  ];
2911
+ var DEFAULT_SECURITY_LOGS_ENTITY_PROPS = [
2912
+ { type: "date", name: "creationTime", displayName: "AbpIdentity::CreationTime", sortable: true },
2913
+ { type: "string", name: "action", displayName: "AbpIdentity::Action", sortable: true },
2914
+ { type: "string", name: "userName", displayName: "AbpIdentity::UserName", sortable: true },
2915
+ { type: "string", name: "applicationName", displayName: "AbpIdentity::ApplicationName", sortable: true },
2916
+ { type: "string", name: "identity", displayName: "AbpIdentity::Identity", sortable: false },
2917
+ { type: "string", name: "clientIpAddress", displayName: "AbpIdentity::ClientIpAddress", sortable: false }
2918
+ ];
2794
2919
  var DEFAULT_IDENTITY_ENTITY_PROPS = {
2795
2920
  "Identity.ClaimsComponent": DEFAULT_CLAIMS_ENTITY_PROPS,
2796
2921
  "Identity.RolesComponent": DEFAULT_ROLES_ENTITY_PROPS,
2797
2922
  "Identity.UsersComponent": DEFAULT_USERS_ENTITY_PROPS,
2798
2923
  "Identity.OrganizationMembersComponent": DEFAULT_ORGANIZATION_MEMBERS_ENTITY_PROPS,
2799
- "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS
2924
+ "Identity.OrganizationRolesComponent": DEFAULT_ORGANIZATION_ROLES_ENTITY_PROPS,
2925
+ /** Security logs entity props (v3.1.0) */
2926
+ "Identity.SecurityLogs": DEFAULT_SECURITY_LOGS_ENTITY_PROPS
2800
2927
  };
2801
2928
  var DEFAULT_CLAIMS_CREATE_FORM_PROPS = [
2802
2929
  { type: "string", name: "name", displayName: "AbpIdentity::DisplayName:ClaimName" },
@@ -3053,6 +3180,9 @@ export {
3053
3180
  DEFAULT_ROLES_ENTITY_ACTIONS,
3054
3181
  DEFAULT_ROLES_ENTITY_PROPS,
3055
3182
  DEFAULT_ROLES_TOOLBAR_ACTIONS,
3183
+ DEFAULT_SECURITY_LOGS_ENTITY_ACTIONS,
3184
+ DEFAULT_SECURITY_LOGS_ENTITY_PROPS,
3185
+ DEFAULT_SECURITY_LOGS_TOOLBAR_ACTIONS,
3056
3186
  DEFAULT_USERS_CREATE_FORM_PROPS,
3057
3187
  DEFAULT_USERS_EDIT_FORM_PROPS,
3058
3188
  DEFAULT_USERS_ENTITY_ACTIONS,
@@ -3071,6 +3201,7 @@ export {
3071
3201
  IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
3072
3202
  Identity,
3073
3203
  IdentityExtensionsGuard,
3204
+ IdentitySecurityLogService,
3074
3205
  IdentityService,
3075
3206
  IdentityStateService,
3076
3207
  OrganizationUnitService,
@@ -3080,6 +3211,7 @@ export {
3080
3211
  configureRoutes,
3081
3212
  configureSettingTabs,
3082
3213
  createGetOrganizationUnitInput,
3214
+ createIdentitySecurityLogGetListInput,
3083
3215
  createOrganizationUnitCreateDto,
3084
3216
  createOrganizationUnitCreateOrUpdateDtoBase,
3085
3217
  createOrganizationUnitMoveInput,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abpjs/identity-pro",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "ABP Framework identity pro components for React - translated from @volo/abp.ng.identity",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -27,12 +27,12 @@
27
27
  "@chakra-ui/react": "^3.2.0",
28
28
  "@emotion/react": "^11.11.0",
29
29
  "react-icons": "^5.3.0",
30
- "@abpjs/core": "3.0.0",
31
- "@abpjs/theme-shared": "3.0.0",
32
- "@abpjs/permission-management": "3.0.0"
30
+ "@abpjs/permission-management": "3.1.0",
31
+ "@abpjs/core": "3.1.0",
32
+ "@abpjs/theme-shared": "3.1.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@volo/abp.ng.identity": "3.0.0",
35
+ "@volo/abp.ng.identity": "3.1.0",
36
36
  "@testing-library/jest-dom": "^6.9.1",
37
37
  "@testing-library/react": "^14.0.0",
38
38
  "@testing-library/user-event": "^14.6.1",