Merge pull request #20958 from mrooding/expose-reading-msgraph-provider-config

Expose reading msgraph provider config
This commit is contained in:
Fredrik Adelöw
2023-11-06 23:37:02 +01:00
committed by GitHub
4 changed files with 36 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
export the function to read ms graph provider config
@@ -261,6 +261,17 @@ export function readMicrosoftGraphOrg(
groups: GroupEntity[];
}>;
// @public
export function readProviderConfig(
id: string,
config: Config,
): MicrosoftGraphProviderConfig;
// @public
export function readProviderConfigs(
config: Config,
): MicrosoftGraphProviderConfig[];
// @public
export type UserTransformer = (
user: MicrosoftGraph.User,
@@ -226,6 +226,13 @@ export function readMicrosoftGraphConfig(
return providers;
}
/**
* Parses all configured providers.
*
* @param config - The root of the msgraph config hierarchy
*
* @public
*/
export function readProviderConfigs(
config: Config,
): MicrosoftGraphProviderConfig[] {
@@ -248,6 +255,14 @@ export function readProviderConfigs(
});
}
/**
* Parses a single configured provider by id.
*
* @param id - the id of the provider to parse
* @param config - The root of the msgraph config hierarchy
*
* @public
*/
export function readProviderConfig(
id: string,
config: Config,
@@ -16,7 +16,11 @@
export { MicrosoftGraphClient } from './client';
export type { GroupMember, ODataQuery } from './client';
export { readMicrosoftGraphConfig } from './config';
export {
readMicrosoftGraphConfig,
readProviderConfigs,
readProviderConfig,
} from './config';
export type { MicrosoftGraphProviderConfig } from './config';
export {
MICROSOFT_EMAIL_ANNOTATION,