diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index 4ff766e5e2..78b2a9b75f 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -149,6 +149,7 @@ Mkdocs monorepo Monorepo monorepos +msgraph msw mysql namespace diff --git a/plugins/catalog-backend-module-msgraph/api-report.md b/plugins/catalog-backend-module-msgraph/api-report.md new file mode 100644 index 0000000000..702601b469 --- /dev/null +++ b/plugins/catalog-backend-module-msgraph/api-report.md @@ -0,0 +1,121 @@ +## API Report File for "@backstage/plugin-catalog-backend-module-msgraph" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CatalogProcessor } from '@backstage/plugin-catalog-backend'; +import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend'; +import { Config } from '@backstage/config'; +import { GroupEntity } from '@backstage/catalog-model'; +import { LocationSpec } from '@backstage/catalog-model'; +import { Logger } from 'winston'; +import * as MicrosoftGraph from '@microsoft/microsoft-graph-types'; +import * as msal from '@azure/msal-node'; +import { UserEntity } from '@backstage/catalog-model'; + +// @public (undocumented) +export function defaultGroupTransformer(group: MicrosoftGraph.Group, groupPhoto?: string): Promise; + +// @public (undocumented) +export function defaultOrganizationTransformer(organization: MicrosoftGraph.Organization): Promise; + +// @public (undocumented) +export function defaultUserTransformer(user: MicrosoftGraph.User, userPhoto?: string): Promise; + +// @public (undocumented) +export type GroupTransformer = (group: MicrosoftGraph.Group, groupPhoto?: string) => Promise; + +// @public +export const MICROSOFT_GRAPH_GROUP_ID_ANNOTATION = "graph.microsoft.com/group-id"; + +// @public +export const MICROSOFT_GRAPH_TENANT_ID_ANNOTATION = "graph.microsoft.com/tenant-id"; + +// @public +export const MICROSOFT_GRAPH_USER_ID_ANNOTATION = "graph.microsoft.com/user-id"; + +// @public (undocumented) +export class MicrosoftGraphClient { + constructor(baseUrl: string, pca: msal.ConfidentialClientApplication); + // (undocumented) + static create(config: MicrosoftGraphProviderConfig): MicrosoftGraphClient; + // (undocumented) + getGroupMembers(groupId: string): AsyncIterable; + // (undocumented) + getGroupPhoto(groupId: string, sizeId?: string): Promise; + // (undocumented) + getGroupPhotoWithSizeLimit(groupId: string, maxSize: number): Promise; + // (undocumented) + getGroups(query?: ODataQuery): AsyncIterable; + // (undocumented) + getOrganization(tenantId: string): Promise; + // (undocumented) + getUserPhoto(userId: string, sizeId?: string): Promise; + // (undocumented) + getUserPhotoWithSizeLimit(userId: string, maxSize: number): Promise; + // (undocumented) + getUserProfile(userId: string): Promise; + // (undocumented) + getUsers(query?: ODataQuery): AsyncIterable; + // (undocumented) + requestApi(path: string, query?: ODataQuery): Promise; + // (undocumented) + requestCollection(path: string, query?: ODataQuery): AsyncIterable; + // (undocumented) + requestRaw(url: string): Promise; +} + +// @public +export class MicrosoftGraphOrgReaderProcessor implements CatalogProcessor { + constructor(options: { + providers: MicrosoftGraphProviderConfig[]; + logger: Logger; + groupTransformer?: GroupTransformer; + }); + // (undocumented) + static fromConfig(config: Config, options: { + logger: Logger; + groupTransformer?: GroupTransformer; + }): MicrosoftGraphOrgReaderProcessor; + // (undocumented) + readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise; +} + +// @public +export type MicrosoftGraphProviderConfig = { + target: string; + authority?: string; + tenantId: string; + clientId: string; + clientSecret: string; + userFilter?: string; + groupFilter?: string; +}; + +// @public (undocumented) +export function normalizeEntityName(name: string): string; + +// @public (undocumented) +export type OrganizationTransformer = (organization: MicrosoftGraph.Organization) => Promise; + +// @public (undocumented) +export function readMicrosoftGraphConfig(config: Config): MicrosoftGraphProviderConfig[]; + +// @public (undocumented) +export function readMicrosoftGraphOrg(client: MicrosoftGraphClient, tenantId: string, options?: { + userFilter?: string; + groupFilter?: string; + groupTransformer?: GroupTransformer; +}): Promise<{ + users: UserEntity[]; + groups: GroupEntity[]; +}>; + +// @public (undocumented) +export type UserTransformer = (user: MicrosoftGraph.User, userPhoto?: string) => Promise; + + +// (No @packageDocumentation comment for this package) + +```