@backstage/plugin-catalog-backend-module-msgraph 0.6.3-next.0 → 0.6.3
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/CHANGELOG.md +24 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +3 -79
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +3 -43
- package/dist/index.cjs.js +28 -99
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +47 -3
- package/dist/microsoftGraph/client.cjs.js +290 -0
- package/dist/microsoftGraph/client.cjs.js.map +1 -0
- package/dist/microsoftGraph/config.cjs.js +168 -0
- package/dist/microsoftGraph/config.cjs.js.map +1 -0
- package/dist/microsoftGraph/constants.cjs.js +12 -0
- package/dist/microsoftGraph/constants.cjs.js.map +1 -0
- package/dist/microsoftGraph/defaultTransformers.cjs.js +108 -0
- package/dist/microsoftGraph/defaultTransformers.cjs.js.map +1 -0
- package/dist/microsoftGraph/helper.cjs.js +15 -0
- package/dist/microsoftGraph/helper.cjs.js.map +1 -0
- package/dist/microsoftGraph/org.cjs.js +52 -0
- package/dist/microsoftGraph/org.cjs.js.map +1 -0
- package/dist/microsoftGraph/read.cjs.js +335 -0
- package/dist/microsoftGraph/read.cjs.js.map +1 -0
- package/dist/module/catalogModuleMicrosoftGraphOrgEntityProvider.cjs.js +83 -0
- package/dist/module/catalogModuleMicrosoftGraphOrgEntityProvider.cjs.js.map +1 -0
- package/dist/processors/MicrosoftGraphOrgEntityProvider.cjs.js +232 -0
- package/dist/processors/MicrosoftGraphOrgEntityProvider.cjs.js.map +1 -0
- package/dist/processors/MicrosoftGraphOrgReaderProcessor.cjs.js +85 -0
- package/dist/processors/MicrosoftGraphOrgReaderProcessor.cjs.js.map +1 -0
- package/package.json +6 -5
- package/dist/cjs/MicrosoftGraphOrgEntityProvider-COL3N3sC.cjs.js +0 -1164
- package/dist/cjs/MicrosoftGraphOrgEntityProvider-COL3N3sC.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend-module-msgraph
|
|
2
2
|
|
|
3
|
+
## 0.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4b60e0c: Remove extension points from `/alpha` export, they're available from the main package already
|
|
8
|
+
- 3109c24: The export for the new backend system at the `/alpha` export is now also available via the main entry point, which means that you can remove the `/alpha` suffix from the import.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/plugin-catalog-node@1.13.1
|
|
11
|
+
- @backstage/backend-plugin-api@1.0.1
|
|
12
|
+
- @backstage/catalog-model@1.7.0
|
|
13
|
+
- @backstage/config@1.2.0
|
|
14
|
+
- @backstage/plugin-catalog-common@1.1.0
|
|
15
|
+
|
|
16
|
+
## 0.6.3-next.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/plugin-catalog-node@1.13.1-next.1
|
|
22
|
+
- @backstage/backend-plugin-api@1.0.1-next.1
|
|
23
|
+
- @backstage/catalog-model@1.7.0
|
|
24
|
+
- @backstage/config@1.2.0
|
|
25
|
+
- @backstage/plugin-catalog-common@1.1.0
|
|
26
|
+
|
|
3
27
|
## 0.6.3-next.0
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -2,85 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
7
|
-
var MicrosoftGraphOrgEntityProvider = require('./cjs/MicrosoftGraphOrgEntityProvider-COL3N3sC.cjs.js');
|
|
8
|
-
require('@backstage/plugin-catalog-node');
|
|
9
|
-
require('@azure/identity');
|
|
10
|
-
require('node-fetch');
|
|
11
|
-
require('qs');
|
|
12
|
-
require('lodash');
|
|
13
|
-
require('@backstage/catalog-model');
|
|
14
|
-
require('p-limit');
|
|
15
|
-
require('uuid');
|
|
5
|
+
var catalogModuleMicrosoftGraphOrgEntityProvider = require('./module/catalogModuleMicrosoftGraphOrgEntityProvider.cjs.js');
|
|
16
6
|
|
|
17
|
-
const
|
|
18
|
-
{
|
|
19
|
-
id: "catalog.microsoftGraphOrgEntityProvider.transforms"
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
const catalogModuleMicrosoftGraphOrgEntityProvider = backendPluginApi.createBackendModule(
|
|
23
|
-
{
|
|
24
|
-
pluginId: "catalog",
|
|
25
|
-
moduleId: "microsoftGraphOrgEntityProvider",
|
|
26
|
-
register(env) {
|
|
27
|
-
let userTransformer;
|
|
28
|
-
let groupTransformer;
|
|
29
|
-
let organizationTransformer;
|
|
30
|
-
let providerConfigTransformer;
|
|
31
|
-
env.registerExtensionPoint(
|
|
32
|
-
microsoftGraphOrgEntityProviderTransformExtensionPoint,
|
|
33
|
-
{
|
|
34
|
-
setUserTransformer(transformer) {
|
|
35
|
-
if (userTransformer) {
|
|
36
|
-
throw new Error("User transformer may only be set once");
|
|
37
|
-
}
|
|
38
|
-
userTransformer = transformer;
|
|
39
|
-
},
|
|
40
|
-
setGroupTransformer(transformer) {
|
|
41
|
-
if (groupTransformer) {
|
|
42
|
-
throw new Error("Group transformer may only be set once");
|
|
43
|
-
}
|
|
44
|
-
groupTransformer = transformer;
|
|
45
|
-
},
|
|
46
|
-
setOrganizationTransformer(transformer) {
|
|
47
|
-
if (organizationTransformer) {
|
|
48
|
-
throw new Error("Organization transformer may only be set once");
|
|
49
|
-
}
|
|
50
|
-
organizationTransformer = transformer;
|
|
51
|
-
},
|
|
52
|
-
setProviderConfigTransformer(transformer) {
|
|
53
|
-
if (providerConfigTransformer) {
|
|
54
|
-
throw new Error("Provider transformer may only be set once");
|
|
55
|
-
}
|
|
56
|
-
providerConfigTransformer = transformer;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
env.registerInit({
|
|
61
|
-
deps: {
|
|
62
|
-
catalog: alpha.catalogProcessingExtensionPoint,
|
|
63
|
-
config: backendPluginApi.coreServices.rootConfig,
|
|
64
|
-
logger: backendPluginApi.coreServices.logger,
|
|
65
|
-
scheduler: backendPluginApi.coreServices.scheduler
|
|
66
|
-
},
|
|
67
|
-
async init({ catalog, config, logger, scheduler }) {
|
|
68
|
-
catalog.addEntityProvider(
|
|
69
|
-
MicrosoftGraphOrgEntityProvider.MicrosoftGraphOrgEntityProvider.fromConfig(config, {
|
|
70
|
-
logger,
|
|
71
|
-
scheduler,
|
|
72
|
-
userTransformer,
|
|
73
|
-
groupTransformer,
|
|
74
|
-
organizationTransformer,
|
|
75
|
-
providerConfigTransformer
|
|
76
|
-
})
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
);
|
|
7
|
+
const _feature = catalogModuleMicrosoftGraphOrgEntityProvider.catalogModuleMicrosoftGraphOrgEntityProvider;
|
|
83
8
|
|
|
84
|
-
exports.default =
|
|
85
|
-
exports.microsoftGraphOrgEntityProviderTransformExtensionPoint = microsoftGraphOrgEntityProviderTransformExtensionPoint;
|
|
9
|
+
exports.default = _feature;
|
|
86
10
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { default as feature } from './module';\n\n/** @alpha */\nconst _feature = feature;\nexport default _feature;\n"],"names":["feature"],"mappings":";;;;;;AAmBA,MAAM,QAAW,GAAAA;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,46 +1,6 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import { UserTransformer, GroupTransformer, OrganizationTransformer, ProviderConfigTransformer } from '@backstage/plugin-catalog-backend-module-msgraph';
|
|
3
2
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @alpha
|
|
8
|
-
*/
|
|
9
|
-
interface MicrosoftGraphOrgEntityProviderTransformsExtensionPoint {
|
|
10
|
-
/**
|
|
11
|
-
* Set the function that transforms a user entry in msgraph to an entity.
|
|
12
|
-
* Optionally, you can pass separate transformers per provider ID.
|
|
13
|
-
*/
|
|
14
|
-
setUserTransformer(transformer: UserTransformer | Record<string, UserTransformer>): void;
|
|
15
|
-
/**
|
|
16
|
-
* Set the function that transforms a group entry in msgraph to an entity.
|
|
17
|
-
* Optionally, you can pass separate transformers per provider ID.
|
|
18
|
-
*/
|
|
19
|
-
setGroupTransformer(transformer: GroupTransformer | Record<string, GroupTransformer>): void;
|
|
20
|
-
/**
|
|
21
|
-
* Set the function that transforms an organization entry in msgraph to an entity.
|
|
22
|
-
* Optionally, you can pass separate transformers per provider ID.
|
|
23
|
-
*/
|
|
24
|
-
setOrganizationTransformer(transformer: OrganizationTransformer | Record<string, OrganizationTransformer>): void;
|
|
25
|
-
/**
|
|
26
|
-
* Set the function that transforms provider config dynamically.
|
|
27
|
-
* Optionally, you can pass separate transformers per provider ID.
|
|
28
|
-
* Note: adjusting fields that are not used on each scheduled ingestion
|
|
29
|
-
* (e.g., id, schedule) will have no effect.
|
|
30
|
-
*/
|
|
31
|
-
setProviderConfigTransformer(transformer: ProviderConfigTransformer | Record<string, ProviderConfigTransformer>): void;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Extension point used to customize the transforms used by the module.
|
|
35
|
-
*
|
|
36
|
-
* @alpha
|
|
37
|
-
*/
|
|
38
|
-
declare const microsoftGraphOrgEntityProviderTransformExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<MicrosoftGraphOrgEntityProviderTransformsExtensionPoint>;
|
|
39
|
-
/**
|
|
40
|
-
* Registers the MicrosoftGraphOrgEntityProvider with the catalog processing extension point.
|
|
41
|
-
*
|
|
42
|
-
* @alpha
|
|
43
|
-
*/
|
|
44
|
-
declare const catalogModuleMicrosoftGraphOrgEntityProvider: _backstage_backend_plugin_api.BackendFeature;
|
|
3
|
+
/** @alpha */
|
|
4
|
+
declare const _feature: _backstage_backend_plugin_api.BackendFeature;
|
|
45
5
|
|
|
46
|
-
export {
|
|
6
|
+
export { _feature as default };
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,105 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var pluginCatalogNode = require('@backstage/plugin-catalog-node');
|
|
5
|
-
require('@backstage/catalog-model');
|
|
6
|
-
require('lodash');
|
|
7
|
-
require('uuid');
|
|
8
|
-
require('@azure/identity');
|
|
9
|
-
require('node-fetch');
|
|
10
|
-
require('qs');
|
|
11
|
-
require('@backstage/backend-plugin-api');
|
|
12
|
-
require('p-limit');
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
13
4
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
...options,
|
|
24
|
-
providers: c ? MicrosoftGraphOrgEntityProvider.readMicrosoftGraphConfig(c) : []
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
constructor(options) {
|
|
28
|
-
options.logger.warn(
|
|
29
|
-
"MicrosoftGraphOrgReaderProcessor is deprecated. Please use MicrosoftGraphOrgEntityProvider instead. More info at https://github.com/backstage/backstage/blob/master/plugins/catalog-backend-module-msgraph/CHANGELOG.md#040-next1"
|
|
30
|
-
);
|
|
31
|
-
this.providers = options.providers;
|
|
32
|
-
this.logger = options.logger;
|
|
33
|
-
this.userTransformer = options.userTransformer;
|
|
34
|
-
this.groupTransformer = options.groupTransformer;
|
|
35
|
-
this.organizationTransformer = options.organizationTransformer;
|
|
36
|
-
}
|
|
37
|
-
getProcessorName() {
|
|
38
|
-
return "MicrosoftGraphOrgReaderProcessor";
|
|
39
|
-
}
|
|
40
|
-
async readLocation(location, _optional, emit) {
|
|
41
|
-
if (location.type !== "microsoft-graph-org") {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
const provider = this.providers.find(
|
|
45
|
-
(p) => location.target.startsWith(p.target)
|
|
46
|
-
);
|
|
47
|
-
if (!provider) {
|
|
48
|
-
throw new Error(
|
|
49
|
-
`There is no Microsoft Graph Org provider that matches ${location.target}. Please add a configuration entry for it under catalog.processors.microsoftGraphOrg.providers.`
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
const startTimestamp = Date.now();
|
|
53
|
-
this.logger.info("Reading Microsoft Graph users and groups");
|
|
54
|
-
const client = MicrosoftGraphOrgEntityProvider.MicrosoftGraphClient.create(provider);
|
|
55
|
-
const { users, groups } = await MicrosoftGraphOrgEntityProvider.readMicrosoftGraphOrg(
|
|
56
|
-
client,
|
|
57
|
-
provider.tenantId,
|
|
58
|
-
{
|
|
59
|
-
userExpand: provider.userExpand,
|
|
60
|
-
userFilter: provider.userFilter,
|
|
61
|
-
userSelect: provider.userSelect,
|
|
62
|
-
loadUserPhotos: provider.loadUserPhotos,
|
|
63
|
-
userGroupMemberFilter: provider.userGroupMemberFilter,
|
|
64
|
-
userGroupMemberSearch: provider.userGroupMemberSearch,
|
|
65
|
-
groupExpand: provider.groupExpand,
|
|
66
|
-
groupFilter: provider.groupFilter,
|
|
67
|
-
groupSearch: provider.groupSearch,
|
|
68
|
-
groupSelect: provider.groupSelect,
|
|
69
|
-
queryMode: provider.queryMode,
|
|
70
|
-
userTransformer: this.userTransformer,
|
|
71
|
-
groupTransformer: this.groupTransformer,
|
|
72
|
-
organizationTransformer: this.organizationTransformer,
|
|
73
|
-
logger: this.logger
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
const duration = ((Date.now() - startTimestamp) / 1e3).toFixed(1);
|
|
77
|
-
this.logger.debug(
|
|
78
|
-
`Read ${users.length} users and ${groups.length} groups from Microsoft Graph in ${duration} seconds`
|
|
79
|
-
);
|
|
80
|
-
for (const group of groups) {
|
|
81
|
-
emit(pluginCatalogNode.processingResult.entity(location, group));
|
|
82
|
-
}
|
|
83
|
-
for (const user of users) {
|
|
84
|
-
emit(pluginCatalogNode.processingResult.entity(location, user));
|
|
85
|
-
}
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
5
|
+
var catalogModuleMicrosoftGraphOrgEntityProvider = require('./module/catalogModuleMicrosoftGraphOrgEntityProvider.cjs.js');
|
|
6
|
+
var client = require('./microsoftGraph/client.cjs.js');
|
|
7
|
+
var config = require('./microsoftGraph/config.cjs.js');
|
|
8
|
+
var constants = require('./microsoftGraph/constants.cjs.js');
|
|
9
|
+
var helper = require('./microsoftGraph/helper.cjs.js');
|
|
10
|
+
var defaultTransformers = require('./microsoftGraph/defaultTransformers.cjs.js');
|
|
11
|
+
var read = require('./microsoftGraph/read.cjs.js');
|
|
12
|
+
var MicrosoftGraphOrgEntityProvider = require('./processors/MicrosoftGraphOrgEntityProvider.cjs.js');
|
|
13
|
+
var MicrosoftGraphOrgReaderProcessor = require('./processors/MicrosoftGraphOrgReaderProcessor.cjs.js');
|
|
89
14
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.MicrosoftGraphClient =
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.default = catalogModuleMicrosoftGraphOrgEntityProvider.catalogModuleMicrosoftGraphOrgEntityProvider;
|
|
18
|
+
exports.microsoftGraphOrgEntityProviderTransformExtensionPoint = catalogModuleMicrosoftGraphOrgEntityProvider.microsoftGraphOrgEntityProviderTransformExtensionPoint;
|
|
19
|
+
exports.MicrosoftGraphClient = client.MicrosoftGraphClient;
|
|
20
|
+
exports.readMicrosoftGraphConfig = config.readMicrosoftGraphConfig;
|
|
21
|
+
exports.readProviderConfig = config.readProviderConfig;
|
|
22
|
+
exports.readProviderConfigs = config.readProviderConfigs;
|
|
23
|
+
exports.MICROSOFT_EMAIL_ANNOTATION = constants.MICROSOFT_EMAIL_ANNOTATION;
|
|
24
|
+
exports.MICROSOFT_GRAPH_GROUP_ID_ANNOTATION = constants.MICROSOFT_GRAPH_GROUP_ID_ANNOTATION;
|
|
25
|
+
exports.MICROSOFT_GRAPH_TENANT_ID_ANNOTATION = constants.MICROSOFT_GRAPH_TENANT_ID_ANNOTATION;
|
|
26
|
+
exports.MICROSOFT_GRAPH_USER_ID_ANNOTATION = constants.MICROSOFT_GRAPH_USER_ID_ANNOTATION;
|
|
27
|
+
exports.normalizeEntityName = helper.normalizeEntityName;
|
|
28
|
+
exports.defaultGroupTransformer = defaultTransformers.defaultGroupTransformer;
|
|
29
|
+
exports.defaultOrganizationTransformer = defaultTransformers.defaultOrganizationTransformer;
|
|
30
|
+
exports.defaultUserTransformer = defaultTransformers.defaultUserTransformer;
|
|
31
|
+
exports.readMicrosoftGraphOrg = read.readMicrosoftGraphOrg;
|
|
95
32
|
exports.MicrosoftGraphOrgEntityProvider = MicrosoftGraphOrgEntityProvider.MicrosoftGraphOrgEntityProvider;
|
|
96
|
-
exports.
|
|
97
|
-
exports.defaultOrganizationTransformer = MicrosoftGraphOrgEntityProvider.defaultOrganizationTransformer;
|
|
98
|
-
exports.defaultUserTransformer = MicrosoftGraphOrgEntityProvider.defaultUserTransformer;
|
|
99
|
-
exports.normalizeEntityName = MicrosoftGraphOrgEntityProvider.normalizeEntityName;
|
|
100
|
-
exports.readMicrosoftGraphConfig = MicrosoftGraphOrgEntityProvider.readMicrosoftGraphConfig;
|
|
101
|
-
exports.readMicrosoftGraphOrg = MicrosoftGraphOrgEntityProvider.readMicrosoftGraphOrg;
|
|
102
|
-
exports.readProviderConfig = MicrosoftGraphOrgEntityProvider.readProviderConfig;
|
|
103
|
-
exports.readProviderConfigs = MicrosoftGraphOrgEntityProvider.readProviderConfigs;
|
|
104
|
-
exports.MicrosoftGraphOrgReaderProcessor = MicrosoftGraphOrgReaderProcessor;
|
|
33
|
+
exports.MicrosoftGraphOrgReaderProcessor = MicrosoftGraphOrgReaderProcessor.MicrosoftGraphOrgReaderProcessor;
|
|
105
34
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,56 @@
|
|
|
1
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
import { SchedulerServiceTaskScheduleDefinition, LoggerService, SchedulerServiceTaskRunner, SchedulerService } from '@backstage/backend-plugin-api';
|
|
3
|
+
import { UserTransformer as UserTransformer$1, GroupTransformer as GroupTransformer$1, OrganizationTransformer as OrganizationTransformer$1, ProviderConfigTransformer as ProviderConfigTransformer$1 } from '@backstage/plugin-catalog-backend-module-msgraph';
|
|
1
4
|
import { TokenCredential } from '@azure/identity';
|
|
2
5
|
import * as MicrosoftGraph from '@microsoft/microsoft-graph-types';
|
|
3
6
|
import { Response } from 'node-fetch';
|
|
4
|
-
import { SchedulerServiceTaskScheduleDefinition, LoggerService, SchedulerServiceTaskRunner, SchedulerService } from '@backstage/backend-plugin-api';
|
|
5
7
|
import { Config } from '@backstage/config';
|
|
6
8
|
import { GroupEntity, UserEntity } from '@backstage/catalog-model';
|
|
7
9
|
import { EntityProvider, EntityProviderConnection, CatalogProcessor, CatalogProcessorEmit } from '@backstage/plugin-catalog-node';
|
|
8
10
|
import { LocationSpec } from '@backstage/plugin-catalog-common';
|
|
9
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Interface for {@link microsoftGraphOrgEntityProviderTransformExtensionPoint}.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
interface MicrosoftGraphOrgEntityProviderTransformsExtensionPoint {
|
|
18
|
+
/**
|
|
19
|
+
* Set the function that transforms a user entry in msgraph to an entity.
|
|
20
|
+
* Optionally, you can pass separate transformers per provider ID.
|
|
21
|
+
*/
|
|
22
|
+
setUserTransformer(transformer: UserTransformer$1 | Record<string, UserTransformer$1>): void;
|
|
23
|
+
/**
|
|
24
|
+
* Set the function that transforms a group entry in msgraph to an entity.
|
|
25
|
+
* Optionally, you can pass separate transformers per provider ID.
|
|
26
|
+
*/
|
|
27
|
+
setGroupTransformer(transformer: GroupTransformer$1 | Record<string, GroupTransformer$1>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Set the function that transforms an organization entry in msgraph to an entity.
|
|
30
|
+
* Optionally, you can pass separate transformers per provider ID.
|
|
31
|
+
*/
|
|
32
|
+
setOrganizationTransformer(transformer: OrganizationTransformer$1 | Record<string, OrganizationTransformer$1>): void;
|
|
33
|
+
/**
|
|
34
|
+
* Set the function that transforms provider config dynamically.
|
|
35
|
+
* Optionally, you can pass separate transformers per provider ID.
|
|
36
|
+
* Note: adjusting fields that are not used on each scheduled ingestion
|
|
37
|
+
* (e.g., id, schedule) will have no effect.
|
|
38
|
+
*/
|
|
39
|
+
setProviderConfigTransformer(transformer: ProviderConfigTransformer$1 | Record<string, ProviderConfigTransformer$1>): void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Extension point used to customize the transforms used by the module.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
declare const microsoftGraphOrgEntityProviderTransformExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<MicrosoftGraphOrgEntityProviderTransformsExtensionPoint>;
|
|
47
|
+
/**
|
|
48
|
+
* Registers the MicrosoftGraphOrgEntityProvider with the catalog processing extension point.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
declare const catalogModuleMicrosoftGraphOrgEntityProvider: _backstage_backend_plugin_api.BackendFeature;
|
|
53
|
+
|
|
10
54
|
/**
|
|
11
55
|
* The configuration parameters for a single Microsoft Graph provider.
|
|
12
56
|
*
|
|
@@ -314,7 +358,7 @@ declare class MicrosoftGraphClient {
|
|
|
314
358
|
* from Graph API
|
|
315
359
|
*
|
|
316
360
|
* @param entityName - type of parent resource, either `User` or `Group`
|
|
317
|
-
* @param id - The unique identifier for the
|
|
361
|
+
* @param id - The unique identifier for the `entityName` resource
|
|
318
362
|
* @param maxSize - Maximum pixel height of the photo
|
|
319
363
|
*
|
|
320
364
|
*/
|
|
@@ -602,4 +646,4 @@ declare class MicrosoftGraphOrgReaderProcessor implements CatalogProcessor {
|
|
|
602
646
|
readLocation(location: LocationSpec, _optional: boolean, emit: CatalogProcessorEmit): Promise<boolean>;
|
|
603
647
|
}
|
|
604
648
|
|
|
605
|
-
export { type GroupMember, type GroupTransformer, MICROSOFT_EMAIL_ANNOTATION, MICROSOFT_GRAPH_GROUP_ID_ANNOTATION, MICROSOFT_GRAPH_TENANT_ID_ANNOTATION, MICROSOFT_GRAPH_USER_ID_ANNOTATION, MicrosoftGraphClient, MicrosoftGraphOrgEntityProvider, type MicrosoftGraphOrgEntityProviderLegacyOptions, type MicrosoftGraphOrgEntityProviderOptions, MicrosoftGraphOrgReaderProcessor, type MicrosoftGraphProviderConfig, type ODataQuery, type OrganizationTransformer, type ProviderConfigTransformer, type UserTransformer, defaultGroupTransformer, defaultOrganizationTransformer, defaultUserTransformer, normalizeEntityName, readMicrosoftGraphConfig, readMicrosoftGraphOrg, readProviderConfig, readProviderConfigs };
|
|
649
|
+
export { type GroupMember, type GroupTransformer, MICROSOFT_EMAIL_ANNOTATION, MICROSOFT_GRAPH_GROUP_ID_ANNOTATION, MICROSOFT_GRAPH_TENANT_ID_ANNOTATION, MICROSOFT_GRAPH_USER_ID_ANNOTATION, MicrosoftGraphClient, MicrosoftGraphOrgEntityProvider, type MicrosoftGraphOrgEntityProviderLegacyOptions, type MicrosoftGraphOrgEntityProviderOptions, type MicrosoftGraphOrgEntityProviderTransformsExtensionPoint, MicrosoftGraphOrgReaderProcessor, type MicrosoftGraphProviderConfig, type ODataQuery, type OrganizationTransformer, type ProviderConfigTransformer, type UserTransformer, catalogModuleMicrosoftGraphOrgEntityProvider as default, defaultGroupTransformer, defaultOrganizationTransformer, defaultUserTransformer, microsoftGraphOrgEntityProviderTransformExtensionPoint, normalizeEntityName, readMicrosoftGraphConfig, readMicrosoftGraphOrg, readProviderConfig, readProviderConfigs };
|