Expose missing types used by the ldap transformers
Signed-off-by: Mathias Åhsberg <mathias.ahsberg@resurs.se>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-ldap': patch
|
||||
---
|
||||
|
||||
Expose missing types used by the custom transformers
|
||||
@@ -22,6 +22,26 @@ export function defaultGroupTransformer(vendor: LdapVendor, config: GroupConfig,
|
||||
// @public (undocumented)
|
||||
export function defaultUserTransformer(vendor: LdapVendor, config: UserConfig, entry: SearchEntry): Promise<UserEntity | undefined>;
|
||||
|
||||
// @public
|
||||
export type GroupConfig = {
|
||||
dn: string;
|
||||
options: SearchOptions;
|
||||
set?: {
|
||||
[path: string]: JsonValue;
|
||||
};
|
||||
map: {
|
||||
rdn: string;
|
||||
name: string;
|
||||
description: string;
|
||||
type: string;
|
||||
displayName: string;
|
||||
email?: string;
|
||||
picture?: string;
|
||||
memberOf: string;
|
||||
members: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export type GroupTransformer = (vendor: LdapVendor, config: GroupConfig, group: SearchEntry) => Promise<GroupEntity | undefined>;
|
||||
|
||||
@@ -70,6 +90,13 @@ export type LdapProviderConfig = {
|
||||
groups: GroupConfig;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type LdapVendor = {
|
||||
dnAttributeName: string;
|
||||
uuidAttributeName: string;
|
||||
decodeStringAttribute: (entry: SearchEntry, name: string) => string[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export function mapStringAttr(entry: SearchEntry, vendor: LdapVendor, attributeName: string | undefined, setter: (value: string) => void): void;
|
||||
|
||||
@@ -86,6 +113,24 @@ export function readLdapOrg(client: LdapClient, userConfig: UserConfig, groupCon
|
||||
groups: GroupEntity[];
|
||||
}>;
|
||||
|
||||
// @public
|
||||
export type UserConfig = {
|
||||
dn: string;
|
||||
options: SearchOptions;
|
||||
set?: {
|
||||
[path: string]: JsonValue;
|
||||
};
|
||||
map: {
|
||||
rdn: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
displayName: string;
|
||||
email: string;
|
||||
picture?: string;
|
||||
memberOf: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export type UserTransformer = (vendor: LdapVendor, config: UserConfig, user: SearchEntry) => Promise<UserEntity | undefined>;
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
export { LdapClient } from './client';
|
||||
export { mapStringAttr } from './util';
|
||||
export { readLdapConfig } from './config';
|
||||
export type { LdapProviderConfig } from './config';
|
||||
export type { LdapProviderConfig, GroupConfig, UserConfig } from './config';
|
||||
export type { LdapVendor } from './vendors';
|
||||
export {
|
||||
LDAP_DN_ANNOTATION,
|
||||
LDAP_RDN_ANNOTATION,
|
||||
|
||||
Reference in New Issue
Block a user