@enonic-types/lib-auth 8.0.0-A2 → 8.0.0-B1

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.
Files changed (2) hide show
  1. package/auth.d.ts +5 -3
  2. package/package.json +2 -2
package/auth.d.ts CHANGED
@@ -11,8 +11,8 @@ declare global {
11
11
  '/lib/xp/auth': typeof import('./auth');
12
12
  }
13
13
  }
14
- import type { Group, GroupKey, Principal, PrincipalKey, Role, RoleKey, User, UserKey } from '@enonic-types/core';
15
- export type { PrincipalKey, UserKey, GroupKey, RoleKey, Principal, ScriptValue, User, Group, Role } from '@enonic-types/core';
14
+ import type { Group, GroupKey, Principal, PrincipalKey, PrincipalType, Role, RoleKey, User, UserKey } from '@enonic-types/core';
15
+ export type { PrincipalKey, PrincipalType, UserKey, GroupKey, RoleKey, Principal, ScriptValue, User, Group, Role } from '@enonic-types/core';
16
16
  export type LoginScopeType = 'SESSION' | 'REQUEST' | 'NONE';
17
17
  export interface UserWithProfile<Profile extends Record<string, unknown> = Record<string, unknown>> extends User {
18
18
  profile?: Profile;
@@ -100,6 +100,7 @@ export declare function changePassword(params: ChangePasswordParams): void;
100
100
  export declare function getPrincipal(userKey: UserKey): User | null;
101
101
  export declare function getPrincipal(groupKey: GroupKey): Group | null;
102
102
  export declare function getPrincipal(roleKey: RoleKey): Role | null;
103
+ export declare function getPrincipal(principalKey: PrincipalKey): Principal | null;
103
104
  /**
104
105
  * Returns a list of principals the specified principal is a member of.
105
106
  *
@@ -204,7 +205,7 @@ export declare function addMembers(principalKey: GroupKey | RoleKey, members: (U
204
205
  */
205
206
  export declare function removeMembers(principalKey: GroupKey | RoleKey, members: (UserKey | GroupKey)[]): void;
206
207
  export interface FindPrincipalsParams {
207
- type?: Principal['type'];
208
+ type?: PrincipalType;
208
209
  idProvider?: string;
209
210
  start?: number;
210
211
  count?: number;
@@ -294,6 +295,7 @@ export declare function findUsers(params: FindUsersParams & {
294
295
  export declare function findUsers<Profile extends Record<string, unknown> = Record<string, unknown>>(params: FindUsersParams & {
295
296
  includeProfile: true;
296
297
  }): FindPrincipalsResult<UserWithProfile<Profile>>;
298
+ export declare function findUsers(params: FindUsersParams): FindPrincipalsResult<User | UserWithProfile>;
297
299
  export interface CreateRoleParams {
298
300
  name: string;
299
301
  displayName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-auth",
3
- "version": "8.0.0-A2",
3
+ "version": "8.0.0-B1",
4
4
  "description": "Type definitions for lib-auth.",
5
5
  "types": "auth.d.ts",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/enonic/xp/tree/master#readme",
29
29
  "dependencies": {
30
- "@enonic-types/core": "8.0.0-A2"
30
+ "@enonic-types/core": "8.0.0-B1"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"