@abpjs/identity-pro 2.4.0 → 2.7.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
@@ -82,6 +82,14 @@ declare namespace Identity {
82
82
  password: string;
83
83
  roleNames: string[];
84
84
  }
85
+ /**
86
+ * Request payload for changing a user's password (admin action)
87
+ * @since 2.7.0
88
+ */
89
+ interface ChangePasswordRequest {
90
+ /** The new password to set */
91
+ newPassword: string;
92
+ }
85
93
  /**
86
94
  * Simple claim type name for dropdowns
87
95
  * Pro feature since 0.7.2
@@ -146,18 +154,44 @@ declare namespace Identity {
146
154
 
147
155
  /**
148
156
  * Identity Pro Component Identifiers
149
- * Translated from @volo/abp.ng.identity v2.4.0
157
+ * Translated from @volo/abp.ng.identity v2.7.0
150
158
  */
151
159
  /**
152
- * Enum for identity component identifiers.
160
+ * Enum-like const object for identity component identifiers.
153
161
  * Used for component registration and identification.
154
162
  * @since 2.4.0
163
+ * @updated 2.7.0 - Changed from enum to const object
155
164
  */
156
- declare enum eIdentityComponents {
157
- Claims = "Identity.ClaimsComponent",
158
- Roles = "Identity.RolesComponent",
159
- Users = "Identity.UsersComponent"
160
- }
165
+ declare const eIdentityComponents: {
166
+ readonly Claims: "Identity.ClaimsComponent";
167
+ readonly Roles: "Identity.RolesComponent";
168
+ readonly Users: "Identity.UsersComponent";
169
+ };
170
+ /**
171
+ * Type for identity component key values
172
+ */
173
+ type IdentityComponentKey = (typeof eIdentityComponents)[keyof typeof eIdentityComponents];
174
+
175
+ /**
176
+ * Identity Pro Route Names
177
+ * Translated from @volo/abp.ng.identity v2.7.0
178
+ */
179
+ /**
180
+ * Enum-like const object for identity route names.
181
+ * Used for localization and navigation configuration.
182
+ * @since 2.7.0
183
+ */
184
+ declare const eIdentityRouteNames: {
185
+ readonly Administration: "AbpUiNavigation::Menu:Administration";
186
+ readonly IdentityManagement: "AbpIdentity::Menu:IdentityManagement";
187
+ readonly Roles: "AbpIdentity::Roles";
188
+ readonly Users: "AbpIdentity::Users";
189
+ readonly ClaimTypes: "AbpIdentity::ClaimTypes";
190
+ };
191
+ /**
192
+ * Type for identity route name values
193
+ */
194
+ type IdentityRouteNameKey = (typeof eIdentityRouteNames)[keyof typeof eIdentityRouteNames];
161
195
 
162
196
  /**
163
197
  * Service for managing identity-related API operations.
@@ -233,6 +267,14 @@ declare class IdentityService {
233
267
  * @returns Promise with the user's roles
234
268
  */
235
269
  getUserRoles(id: string): Promise<Identity.RoleResponse>;
270
+ /**
271
+ * Change a user's password (admin action)
272
+ * @since 2.7.0
273
+ * @param id - The user ID
274
+ * @param body - The password change request (newPassword required)
275
+ * @returns Promise resolving when complete
276
+ */
277
+ changePassword(id: string, body: Identity.ChangePasswordRequest): Promise<void>;
236
278
  /**
237
279
  * Delete a user
238
280
  * @param id - The user ID to delete
@@ -1031,4 +1073,4 @@ declare const IDENTITY_POLICIES: {
1031
1073
  readonly ROLES_DELETE: "AbpIdentity.Roles.Delete";
1032
1074
  };
1033
1075
 
1034
- export { ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, Identity, IdentityService, IdentityStateService, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, eIdentityComponents, useClaims, useIdentity, useRoles, useUsers };
1076
+ export { ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, Identity, type IdentityComponentKey, type IdentityRouteNameKey, IdentityService, IdentityStateService, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, eIdentityComponents, eIdentityRouteNames, useClaims, useIdentity, useRoles, useUsers };
package/dist/index.d.ts CHANGED
@@ -82,6 +82,14 @@ declare namespace Identity {
82
82
  password: string;
83
83
  roleNames: string[];
84
84
  }
85
+ /**
86
+ * Request payload for changing a user's password (admin action)
87
+ * @since 2.7.0
88
+ */
89
+ interface ChangePasswordRequest {
90
+ /** The new password to set */
91
+ newPassword: string;
92
+ }
85
93
  /**
86
94
  * Simple claim type name for dropdowns
87
95
  * Pro feature since 0.7.2
@@ -146,18 +154,44 @@ declare namespace Identity {
146
154
 
147
155
  /**
148
156
  * Identity Pro Component Identifiers
149
- * Translated from @volo/abp.ng.identity v2.4.0
157
+ * Translated from @volo/abp.ng.identity v2.7.0
150
158
  */
151
159
  /**
152
- * Enum for identity component identifiers.
160
+ * Enum-like const object for identity component identifiers.
153
161
  * Used for component registration and identification.
154
162
  * @since 2.4.0
163
+ * @updated 2.7.0 - Changed from enum to const object
155
164
  */
156
- declare enum eIdentityComponents {
157
- Claims = "Identity.ClaimsComponent",
158
- Roles = "Identity.RolesComponent",
159
- Users = "Identity.UsersComponent"
160
- }
165
+ declare const eIdentityComponents: {
166
+ readonly Claims: "Identity.ClaimsComponent";
167
+ readonly Roles: "Identity.RolesComponent";
168
+ readonly Users: "Identity.UsersComponent";
169
+ };
170
+ /**
171
+ * Type for identity component key values
172
+ */
173
+ type IdentityComponentKey = (typeof eIdentityComponents)[keyof typeof eIdentityComponents];
174
+
175
+ /**
176
+ * Identity Pro Route Names
177
+ * Translated from @volo/abp.ng.identity v2.7.0
178
+ */
179
+ /**
180
+ * Enum-like const object for identity route names.
181
+ * Used for localization and navigation configuration.
182
+ * @since 2.7.0
183
+ */
184
+ declare const eIdentityRouteNames: {
185
+ readonly Administration: "AbpUiNavigation::Menu:Administration";
186
+ readonly IdentityManagement: "AbpIdentity::Menu:IdentityManagement";
187
+ readonly Roles: "AbpIdentity::Roles";
188
+ readonly Users: "AbpIdentity::Users";
189
+ readonly ClaimTypes: "AbpIdentity::ClaimTypes";
190
+ };
191
+ /**
192
+ * Type for identity route name values
193
+ */
194
+ type IdentityRouteNameKey = (typeof eIdentityRouteNames)[keyof typeof eIdentityRouteNames];
161
195
 
162
196
  /**
163
197
  * Service for managing identity-related API operations.
@@ -233,6 +267,14 @@ declare class IdentityService {
233
267
  * @returns Promise with the user's roles
234
268
  */
235
269
  getUserRoles(id: string): Promise<Identity.RoleResponse>;
270
+ /**
271
+ * Change a user's password (admin action)
272
+ * @since 2.7.0
273
+ * @param id - The user ID
274
+ * @param body - The password change request (newPassword required)
275
+ * @returns Promise resolving when complete
276
+ */
277
+ changePassword(id: string, body: Identity.ChangePasswordRequest): Promise<void>;
236
278
  /**
237
279
  * Delete a user
238
280
  * @param id - The user ID to delete
@@ -1031,4 +1073,4 @@ declare const IDENTITY_POLICIES: {
1031
1073
  readonly ROLES_DELETE: "AbpIdentity.Roles.Delete";
1032
1074
  };
1033
1075
 
1034
- export { ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, Identity, IdentityService, IdentityStateService, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, eIdentityComponents, useClaims, useIdentity, useRoles, useUsers };
1076
+ export { ClaimModal, type ClaimModalProps, type ClaimOperationResult, ClaimsComponent, type ClaimsComponentProps, IDENTITY_POLICIES, IDENTITY_ROUTES, IDENTITY_ROUTE_PATHS, Identity, type IdentityComponentKey, type IdentityRouteNameKey, IdentityService, IdentityStateService, type RoleOperationResult, RolesComponent, type RolesComponentProps, type SortOrder, type UseClaimsReturn, type UseIdentityReturn, type UseRolesReturn, type UseUsersReturn, type UserOperationResult, UsersComponent, type UsersComponentProps, eIdentityComponents, eIdentityRouteNames, useClaims, useIdentity, useRoles, useUsers };
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ __export(index_exports, {
31
31
  RolesComponent: () => RolesComponent,
32
32
  UsersComponent: () => UsersComponent,
33
33
  eIdentityComponents: () => eIdentityComponents,
34
+ eIdentityRouteNames: () => eIdentityRouteNames,
34
35
  useClaims: () => useClaims,
35
36
  useIdentity: () => useIdentity,
36
37
  useRoles: () => useRoles,
@@ -51,12 +52,20 @@ var Identity;
51
52
  })(Identity || (Identity = {}));
52
53
 
53
54
  // src/enums/components.ts
54
- var eIdentityComponents = /* @__PURE__ */ ((eIdentityComponents2) => {
55
- eIdentityComponents2["Claims"] = "Identity.ClaimsComponent";
56
- eIdentityComponents2["Roles"] = "Identity.RolesComponent";
57
- eIdentityComponents2["Users"] = "Identity.UsersComponent";
58
- return eIdentityComponents2;
59
- })(eIdentityComponents || {});
55
+ var eIdentityComponents = {
56
+ Claims: "Identity.ClaimsComponent",
57
+ Roles: "Identity.RolesComponent",
58
+ Users: "Identity.UsersComponent"
59
+ };
60
+
61
+ // src/enums/route-names.ts
62
+ var eIdentityRouteNames = {
63
+ Administration: "AbpUiNavigation::Menu:Administration",
64
+ IdentityManagement: "AbpIdentity::Menu:IdentityManagement",
65
+ Roles: "AbpIdentity::Roles",
66
+ Users: "AbpIdentity::Users",
67
+ ClaimTypes: "AbpIdentity::ClaimTypes"
68
+ };
60
69
 
61
70
  // src/services/identity.service.ts
62
71
  var IdentityService = class {
@@ -178,6 +187,20 @@ var IdentityService = class {
178
187
  url: `/api/identity/users/${id}/roles`
179
188
  });
180
189
  }
190
+ /**
191
+ * Change a user's password (admin action)
192
+ * @since 2.7.0
193
+ * @param id - The user ID
194
+ * @param body - The password change request (newPassword required)
195
+ * @returns Promise resolving when complete
196
+ */
197
+ changePassword(id, body) {
198
+ return this.rest.request({
199
+ method: "PUT",
200
+ url: `/api/identity/users/${id}/change-password`,
201
+ body
202
+ });
203
+ }
181
204
  /**
182
205
  * Delete a user
183
206
  * @param id - The user ID to delete
@@ -2248,6 +2271,7 @@ var IDENTITY_POLICIES = {
2248
2271
  RolesComponent,
2249
2272
  UsersComponent,
2250
2273
  eIdentityComponents,
2274
+ eIdentityRouteNames,
2251
2275
  useClaims,
2252
2276
  useIdentity,
2253
2277
  useRoles,
package/dist/index.mjs CHANGED
@@ -11,12 +11,20 @@ var Identity;
11
11
  })(Identity || (Identity = {}));
12
12
 
13
13
  // src/enums/components.ts
14
- var eIdentityComponents = /* @__PURE__ */ ((eIdentityComponents2) => {
15
- eIdentityComponents2["Claims"] = "Identity.ClaimsComponent";
16
- eIdentityComponents2["Roles"] = "Identity.RolesComponent";
17
- eIdentityComponents2["Users"] = "Identity.UsersComponent";
18
- return eIdentityComponents2;
19
- })(eIdentityComponents || {});
14
+ var eIdentityComponents = {
15
+ Claims: "Identity.ClaimsComponent",
16
+ Roles: "Identity.RolesComponent",
17
+ Users: "Identity.UsersComponent"
18
+ };
19
+
20
+ // src/enums/route-names.ts
21
+ var eIdentityRouteNames = {
22
+ Administration: "AbpUiNavigation::Menu:Administration",
23
+ IdentityManagement: "AbpIdentity::Menu:IdentityManagement",
24
+ Roles: "AbpIdentity::Roles",
25
+ Users: "AbpIdentity::Users",
26
+ ClaimTypes: "AbpIdentity::ClaimTypes"
27
+ };
20
28
 
21
29
  // src/services/identity.service.ts
22
30
  var IdentityService = class {
@@ -138,6 +146,20 @@ var IdentityService = class {
138
146
  url: `/api/identity/users/${id}/roles`
139
147
  });
140
148
  }
149
+ /**
150
+ * Change a user's password (admin action)
151
+ * @since 2.7.0
152
+ * @param id - The user ID
153
+ * @param body - The password change request (newPassword required)
154
+ * @returns Promise resolving when complete
155
+ */
156
+ changePassword(id, body) {
157
+ return this.rest.request({
158
+ method: "PUT",
159
+ url: `/api/identity/users/${id}/change-password`,
160
+ body
161
+ });
162
+ }
141
163
  /**
142
164
  * Delete a user
143
165
  * @param id - The user ID to delete
@@ -2245,6 +2267,7 @@ export {
2245
2267
  RolesComponent,
2246
2268
  UsersComponent,
2247
2269
  eIdentityComponents,
2270
+ eIdentityRouteNames,
2248
2271
  useClaims,
2249
2272
  useIdentity,
2250
2273
  useRoles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abpjs/identity-pro",
3
- "version": "2.4.0",
3
+ "version": "2.7.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": "2.4.0",
31
- "@abpjs/theme-shared": "2.4.0",
32
- "@abpjs/permission-management": "2.4.0"
30
+ "@abpjs/theme-shared": "2.7.0",
31
+ "@abpjs/core": "2.7.0",
32
+ "@abpjs/permission-management": "2.7.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@volo/abp.ng.identity": "2.4.0",
35
+ "@volo/abp.ng.identity": "2.7.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",