@backstage/plugin-catalog-backend-module-msgraph 0.10.3 → 0.10.4-next.0

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @backstage/plugin-catalog-backend-module-msgraph
2
2
 
3
+ ## 0.10.4-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@1.9.3-next.0
9
+ - @backstage/plugin-catalog-node@2.2.3-next.0
10
+
3
11
  ## 0.10.3
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,641 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "catalog": {
6
+ "type": "object",
7
+ "properties": {
8
+ "processors": {
9
+ "type": "object",
10
+ "properties": {
11
+ "microsoftGraphOrg": {
12
+ "type": "object",
13
+ "properties": {
14
+ "providers": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "properties": {
19
+ "target": {
20
+ "type": "string",
21
+ "description": "The prefix of the target that this matches on, e.g. \"https://graph.microsoft.com/v1.0\", with no trailing slash."
22
+ },
23
+ "authority": {
24
+ "type": "string",
25
+ "description": "The auth authority used.\n\nDefault value \"https://login.microsoftonline.com\""
26
+ },
27
+ "tenantId": {
28
+ "type": "string",
29
+ "description": "The tenant whose org data we are interested in."
30
+ },
31
+ "clientId": {
32
+ "type": "string",
33
+ "description": "The OAuth client ID to use for authenticating requests."
34
+ },
35
+ "clientSecret": {
36
+ "type": "string",
37
+ "description": "The OAuth client secret to use for authenticating requests.",
38
+ "visibility": "secret"
39
+ },
40
+ "userFilter": {
41
+ "type": "string",
42
+ "description": "The filter to apply to extract users. Disabled users (`accountEnabled === false`) are always filtered out client-side regardless of this setting.\n\nE.g. \"userType eq 'member'\""
43
+ },
44
+ "groupFilter": {
45
+ "type": "string",
46
+ "description": "The filter to apply to extract groups.\n\nE.g. \"securityEnabled eq false and mailEnabled eq true\""
47
+ },
48
+ "userSelect": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ },
53
+ "description": "The fields to be fetched on query.\n\nE.g. [\"id\", \"displayName\", \"description\"]"
54
+ },
55
+ "groupSearch": {
56
+ "type": "string",
57
+ "description": "The search criteria to apply to extract users by groups memberships.\n\nE.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'"
58
+ },
59
+ "groupSelect": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "string"
63
+ },
64
+ "description": "The fields to be fetched on query.\n\nE.g. [\"id\", \"displayName\", \"description\"]"
65
+ },
66
+ "userGroupMemberFilter": {
67
+ "type": "string",
68
+ "description": "The filter to apply to extract users by groups memberships.\n\nE.g. \"displayName eq 'Backstage Users'\""
69
+ },
70
+ "userGroupMemberSearch": {
71
+ "type": "string",
72
+ "description": "The search criteria to apply to extract groups.\n\nE.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'"
73
+ }
74
+ },
75
+ "required": [
76
+ "target",
77
+ "tenantId"
78
+ ]
79
+ },
80
+ "description": "The configuration parameters for each single Microsoft Graph provider."
81
+ }
82
+ },
83
+ "required": [
84
+ "providers"
85
+ ],
86
+ "description": "MicrosoftGraphOrgReaderProcessor configuration",
87
+ "deprecated": "Use `catalog.providers.microsoftGraphOrg` instead."
88
+ }
89
+ }
90
+ },
91
+ "providers": {
92
+ "type": "object",
93
+ "properties": {
94
+ "microsoftGraphOrg": {
95
+ "anyOf": [
96
+ {
97
+ "type": "object",
98
+ "properties": {
99
+ "target": {
100
+ "type": "string",
101
+ "description": "The prefix of the target that this matches on, e.g. \"https://graph.microsoft.com/v1.0\", with no trailing slash."
102
+ },
103
+ "authority": {
104
+ "type": "string",
105
+ "description": "The auth authority used.\n\nDefault value \"https://login.microsoftonline.com\""
106
+ },
107
+ "tenantId": {
108
+ "type": "string",
109
+ "description": "The tenant whose org data we are interested in."
110
+ },
111
+ "clientId": {
112
+ "type": "string",
113
+ "description": "The OAuth client ID to use for authenticating requests."
114
+ },
115
+ "clientSecret": {
116
+ "type": "string",
117
+ "description": "The OAuth client secret to use for authenticating requests.",
118
+ "visibility": "secret"
119
+ },
120
+ "queryMode": {
121
+ "type": "string",
122
+ "description": "By default, the Microsoft Graph API only provides the basic feature set for querying. Certain features are limited to advanced query capabilities (see https://docs.microsoft.com/en-us/graph/aad-advanced-queries) and need to be enabled.\n\nSome features like `$expand` are not available for advanced queries, though."
123
+ },
124
+ "user": {
125
+ "type": "object",
126
+ "properties": {
127
+ "path": {
128
+ "type": "string",
129
+ "description": "The url path to fetch groups, defaults to `/users`.\n\nE.g. \"groups/{id}/transitiveMembers/microsoft.graph.user/\"."
130
+ },
131
+ "expand": {
132
+ "type": "string",
133
+ "description": "The \"expand\" argument to apply to users.\n\nE.g. \"manager\"."
134
+ },
135
+ "filter": {
136
+ "type": "string",
137
+ "description": "The filter to apply to extract users. Disabled users (`accountEnabled === false`) are always filtered out client-side regardless of this setting.\n\nE.g. \"userType eq 'member'\""
138
+ },
139
+ "loadPhotos": {
140
+ "type": "boolean",
141
+ "description": "Set to false to not load user photos. This can be useful for huge organizations."
142
+ },
143
+ "select": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "string"
147
+ },
148
+ "description": "The fields to be fetched on query.\n\nE.g. [\"id\", \"displayName\", \"description\"]"
149
+ }
150
+ }
151
+ },
152
+ "group": {
153
+ "type": "object",
154
+ "properties": {
155
+ "path": {
156
+ "type": "string",
157
+ "description": "The url path to fetch groups, defaults to `/groups`.\n\nE.g. \"groups/{id}/transitiveMembers/microsoft.graph.group/\"."
158
+ },
159
+ "expand": {
160
+ "type": "string",
161
+ "description": "The \"expand\" argument to apply to groups.\n\nE.g. \"member\"."
162
+ },
163
+ "filter": {
164
+ "type": "string",
165
+ "description": "The filter to apply to extract groups.\n\nE.g. \"securityEnabled eq false and mailEnabled eq true\""
166
+ },
167
+ "search": {
168
+ "type": "string",
169
+ "description": "The search criteria to apply to extract users by groups memberships.\n\nE.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'"
170
+ },
171
+ "select": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "string"
175
+ },
176
+ "description": "The fields to be fetched on query.\n\nE.g. [\"id\", \"displayName\", \"description\"]"
177
+ },
178
+ "includeSubGroups": {
179
+ "type": "boolean",
180
+ "description": "Whether to ingest groups that are members of the found/filtered/searched groups. Default value is `false`."
181
+ }
182
+ }
183
+ },
184
+ "userGroupMember": {
185
+ "type": "object",
186
+ "properties": {
187
+ "path": {
188
+ "type": "string",
189
+ "description": "The url path to fetch groups, defaults to `/groups`.\n\nE.g. \"groups/{id}/transitiveMembers/microsoft.graph.group/\"."
190
+ },
191
+ "filter": {
192
+ "type": "string",
193
+ "description": "The filter to apply to extract users by groups memberships.\n\nE.g. \"displayName eq 'Backstage Users'\""
194
+ },
195
+ "search": {
196
+ "type": "string",
197
+ "description": "The search criteria to apply to extract groups.\n\nE.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'"
198
+ }
199
+ }
200
+ },
201
+ "schedule": {
202
+ "type": "object",
203
+ "properties": {
204
+ "frequency": {
205
+ "anyOf": [
206
+ {
207
+ "type": "object",
208
+ "properties": {
209
+ "cron": {
210
+ "type": "string",
211
+ "description": "A crontab style string."
212
+ }
213
+ },
214
+ "required": [
215
+ "cron"
216
+ ]
217
+ },
218
+ {
219
+ "type": "string"
220
+ },
221
+ {
222
+ "type": "object",
223
+ "properties": {
224
+ "years": {
225
+ "type": "number"
226
+ },
227
+ "months": {
228
+ "type": "number"
229
+ },
230
+ "weeks": {
231
+ "type": "number"
232
+ },
233
+ "days": {
234
+ "type": "number"
235
+ },
236
+ "hours": {
237
+ "type": "number"
238
+ },
239
+ "minutes": {
240
+ "type": "number"
241
+ },
242
+ "seconds": {
243
+ "type": "number"
244
+ },
245
+ "milliseconds": {
246
+ "type": "number"
247
+ }
248
+ },
249
+ "description": "Human friendly durations object."
250
+ },
251
+ {
252
+ "type": "object",
253
+ "properties": {
254
+ "trigger": {
255
+ "type": "string",
256
+ "const": "manual"
257
+ }
258
+ },
259
+ "required": [
260
+ "trigger"
261
+ ]
262
+ }
263
+ ],
264
+ "description": "How often you want the task to run. The system does its best to avoid overlapping invocations."
265
+ },
266
+ "timeout": {
267
+ "anyOf": [
268
+ {
269
+ "type": "string"
270
+ },
271
+ {
272
+ "type": "object",
273
+ "properties": {
274
+ "years": {
275
+ "type": "number"
276
+ },
277
+ "months": {
278
+ "type": "number"
279
+ },
280
+ "weeks": {
281
+ "type": "number"
282
+ },
283
+ "days": {
284
+ "type": "number"
285
+ },
286
+ "hours": {
287
+ "type": "number"
288
+ },
289
+ "minutes": {
290
+ "type": "number"
291
+ },
292
+ "seconds": {
293
+ "type": "number"
294
+ },
295
+ "milliseconds": {
296
+ "type": "number"
297
+ }
298
+ },
299
+ "description": "Human friendly durations object."
300
+ }
301
+ ],
302
+ "description": "The maximum amount of time that a single task invocation can take, before it's considered timed out and gets \"released\" such that a new invocation is permitted to take place (possibly, then, on a different worker)."
303
+ },
304
+ "initialDelay": {
305
+ "anyOf": [
306
+ {
307
+ "type": "string"
308
+ },
309
+ {
310
+ "type": "object",
311
+ "properties": {
312
+ "years": {
313
+ "type": "number"
314
+ },
315
+ "months": {
316
+ "type": "number"
317
+ },
318
+ "weeks": {
319
+ "type": "number"
320
+ },
321
+ "days": {
322
+ "type": "number"
323
+ },
324
+ "hours": {
325
+ "type": "number"
326
+ },
327
+ "minutes": {
328
+ "type": "number"
329
+ },
330
+ "seconds": {
331
+ "type": "number"
332
+ },
333
+ "milliseconds": {
334
+ "type": "number"
335
+ }
336
+ },
337
+ "description": "Human friendly durations object."
338
+ }
339
+ ],
340
+ "description": "The amount of time that should pass before the first invocation happens."
341
+ },
342
+ "scope": {
343
+ "type": "string",
344
+ "enum": [
345
+ "global",
346
+ "local"
347
+ ],
348
+ "description": "Sets the scope of concurrency control / locking to apply for invocations of this task."
349
+ }
350
+ },
351
+ "required": [
352
+ "frequency",
353
+ "timeout"
354
+ ],
355
+ "description": "(Optional) TaskScheduleDefinition for the refresh."
356
+ }
357
+ },
358
+ "required": [
359
+ "tenantId"
360
+ ]
361
+ },
362
+ {
363
+ "type": "object",
364
+ "additionalProperties": {
365
+ "type": "object",
366
+ "properties": {
367
+ "target": {
368
+ "type": "string",
369
+ "description": "The prefix of the target that this matches on, e.g. \"https://graph.microsoft.com/v1.0\", with no trailing slash."
370
+ },
371
+ "authority": {
372
+ "type": "string",
373
+ "description": "The auth authority used.\n\nDefault value \"https://login.microsoftonline.com\""
374
+ },
375
+ "tenantId": {
376
+ "type": "string",
377
+ "description": "The tenant whose org data we are interested in."
378
+ },
379
+ "clientId": {
380
+ "type": "string",
381
+ "description": "The OAuth client ID to use for authenticating requests."
382
+ },
383
+ "clientSecret": {
384
+ "type": "string",
385
+ "description": "The OAuth client secret to use for authenticating requests.",
386
+ "visibility": "secret"
387
+ },
388
+ "queryMode": {
389
+ "type": "string",
390
+ "description": "By default, the Microsoft Graph API only provides the basic feature set for querying. Certain features are limited to advanced query capabilities (see https://docs.microsoft.com/en-us/graph/aad-advanced-queries) and need to be enabled.\n\nSome features like `$expand` are not available for advanced queries, though."
391
+ },
392
+ "user": {
393
+ "type": "object",
394
+ "properties": {
395
+ "path": {
396
+ "type": "string",
397
+ "description": "The url path to fetch groups, defaults to `/groups`.\n\nE.g. \"groups/{id}/transitiveMembers/microsoft.graph.group/\"."
398
+ },
399
+ "expand": {
400
+ "type": "string",
401
+ "description": "The \"expand\" argument to apply to users.\n\nE.g. \"manager\"."
402
+ },
403
+ "filter": {
404
+ "type": "string",
405
+ "description": "The filter to apply to extract users. Disabled users (`accountEnabled === false`) are always filtered out client-side regardless of this setting.\n\nE.g. \"userType eq 'member'\""
406
+ },
407
+ "loadPhotos": {
408
+ "type": "boolean",
409
+ "description": "Set to false to not load user photos. This can be useful for huge organizations."
410
+ },
411
+ "select": {
412
+ "type": "array",
413
+ "items": {
414
+ "type": "string"
415
+ },
416
+ "description": "The fields to be fetched on query.\n\nE.g. [\"id\", \"displayName\", \"description\"]"
417
+ }
418
+ }
419
+ },
420
+ "group": {
421
+ "type": "object",
422
+ "properties": {
423
+ "path": {
424
+ "type": "string",
425
+ "description": "The url path to fetch groups, defaults to `/groups`.\n\nE.g. \"groups/{id}/transitiveMembers/microsoft.graph.group/\"."
426
+ },
427
+ "expand": {
428
+ "type": "string",
429
+ "description": "The \"expand\" argument to apply to groups.\n\nE.g. \"member\"."
430
+ },
431
+ "filter": {
432
+ "type": "string",
433
+ "description": "The filter to apply to extract groups.\n\nE.g. \"securityEnabled eq false and mailEnabled eq true\""
434
+ },
435
+ "search": {
436
+ "type": "string",
437
+ "description": "The search criteria to apply to extract users by groups memberships.\n\nE.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'"
438
+ },
439
+ "select": {
440
+ "type": "array",
441
+ "items": {
442
+ "type": "string"
443
+ },
444
+ "description": "The fields to be fetched on query.\n\nE.g. [\"id\", \"displayName\", \"description\"]"
445
+ },
446
+ "includeSubGroups": {
447
+ "type": "boolean",
448
+ "description": "Whether to ingest groups that are members of the found/filtered/searched groups. Default value is `false`."
449
+ }
450
+ }
451
+ },
452
+ "userGroupMember": {
453
+ "type": "object",
454
+ "properties": {
455
+ "path": {
456
+ "type": "string",
457
+ "description": "The url path to fetch groups, defaults to `/groups`.\n\nE.g. \"groups/{id}/transitiveMembers/microsoft.graph.group/\"."
458
+ },
459
+ "filter": {
460
+ "type": "string",
461
+ "description": "The filter to apply to extract users by groups memberships.\n\nE.g. \"displayName eq 'Backstage Users'\""
462
+ },
463
+ "search": {
464
+ "type": "string",
465
+ "description": "The search criteria to apply to extract groups.\n\nE.g. \"\\\"displayName:-team\\\"\" would only match groups which contain '-team'"
466
+ }
467
+ }
468
+ },
469
+ "schedule": {
470
+ "type": "object",
471
+ "properties": {
472
+ "frequency": {
473
+ "anyOf": [
474
+ {
475
+ "type": "object",
476
+ "properties": {
477
+ "cron": {
478
+ "type": "string",
479
+ "description": "A crontab style string."
480
+ }
481
+ },
482
+ "required": [
483
+ "cron"
484
+ ]
485
+ },
486
+ {
487
+ "type": "string"
488
+ },
489
+ {
490
+ "type": "object",
491
+ "properties": {
492
+ "years": {
493
+ "type": "number"
494
+ },
495
+ "months": {
496
+ "type": "number"
497
+ },
498
+ "weeks": {
499
+ "type": "number"
500
+ },
501
+ "days": {
502
+ "type": "number"
503
+ },
504
+ "hours": {
505
+ "type": "number"
506
+ },
507
+ "minutes": {
508
+ "type": "number"
509
+ },
510
+ "seconds": {
511
+ "type": "number"
512
+ },
513
+ "milliseconds": {
514
+ "type": "number"
515
+ }
516
+ },
517
+ "description": "Human friendly durations object."
518
+ },
519
+ {
520
+ "type": "object",
521
+ "properties": {
522
+ "trigger": {
523
+ "type": "string",
524
+ "const": "manual"
525
+ }
526
+ },
527
+ "required": [
528
+ "trigger"
529
+ ]
530
+ }
531
+ ],
532
+ "description": "How often you want the task to run. The system does its best to avoid overlapping invocations."
533
+ },
534
+ "timeout": {
535
+ "anyOf": [
536
+ {
537
+ "type": "string"
538
+ },
539
+ {
540
+ "type": "object",
541
+ "properties": {
542
+ "years": {
543
+ "type": "number"
544
+ },
545
+ "months": {
546
+ "type": "number"
547
+ },
548
+ "weeks": {
549
+ "type": "number"
550
+ },
551
+ "days": {
552
+ "type": "number"
553
+ },
554
+ "hours": {
555
+ "type": "number"
556
+ },
557
+ "minutes": {
558
+ "type": "number"
559
+ },
560
+ "seconds": {
561
+ "type": "number"
562
+ },
563
+ "milliseconds": {
564
+ "type": "number"
565
+ }
566
+ },
567
+ "description": "Human friendly durations object."
568
+ }
569
+ ],
570
+ "description": "The maximum amount of time that a single task invocation can take, before it's considered timed out and gets \"released\" such that a new invocation is permitted to take place (possibly, then, on a different worker)."
571
+ },
572
+ "initialDelay": {
573
+ "anyOf": [
574
+ {
575
+ "type": "string"
576
+ },
577
+ {
578
+ "type": "object",
579
+ "properties": {
580
+ "years": {
581
+ "type": "number"
582
+ },
583
+ "months": {
584
+ "type": "number"
585
+ },
586
+ "weeks": {
587
+ "type": "number"
588
+ },
589
+ "days": {
590
+ "type": "number"
591
+ },
592
+ "hours": {
593
+ "type": "number"
594
+ },
595
+ "minutes": {
596
+ "type": "number"
597
+ },
598
+ "seconds": {
599
+ "type": "number"
600
+ },
601
+ "milliseconds": {
602
+ "type": "number"
603
+ }
604
+ },
605
+ "description": "Human friendly durations object."
606
+ }
607
+ ],
608
+ "description": "The amount of time that should pass before the first invocation happens."
609
+ },
610
+ "scope": {
611
+ "type": "string",
612
+ "enum": [
613
+ "global",
614
+ "local"
615
+ ],
616
+ "description": "Sets the scope of concurrency control / locking to apply for invocations of this task."
617
+ }
618
+ },
619
+ "required": [
620
+ "frequency",
621
+ "timeout"
622
+ ],
623
+ "description": "(Optional) TaskScheduleDefinition for the refresh."
624
+ }
625
+ },
626
+ "required": [
627
+ "tenantId",
628
+ "clientId",
629
+ "clientSecret"
630
+ ]
631
+ }
632
+ }
633
+ ],
634
+ "description": "MicrosoftGraphOrgEntityProvider configuration."
635
+ }
636
+ }
637
+ }
638
+ }
639
+ }
640
+ }
641
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend-module-msgraph",
3
- "version": "0.10.3",
3
+ "version": "0.10.4-next.0",
4
4
  "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "files": [
55
- "config.d.ts",
55
+ "config.schema.json",
56
56
  "dist"
57
57
  ],
58
58
  "scripts": {
@@ -66,21 +66,21 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@azure/identity": "^4.0.0",
69
- "@backstage/backend-plugin-api": "^1.9.2",
70
- "@backstage/catalog-model": "^1.9.0",
71
- "@backstage/config": "^1.3.8",
72
- "@backstage/plugin-catalog-common": "^1.1.10",
73
- "@backstage/plugin-catalog-node": "^2.2.2",
69
+ "@backstage/backend-plugin-api": "1.9.3-next.0",
70
+ "@backstage/catalog-model": "1.9.0",
71
+ "@backstage/config": "1.3.8",
72
+ "@backstage/plugin-catalog-common": "1.1.10",
73
+ "@backstage/plugin-catalog-node": "2.2.3-next.0",
74
74
  "@microsoft/microsoft-graph-types": "^2.6.0",
75
75
  "lodash": "^4.17.21",
76
76
  "p-limit": "^3.0.2",
77
77
  "qs": "^6.15.2"
78
78
  },
79
79
  "devDependencies": {
80
- "@backstage/backend-test-utils": "^1.11.4",
81
- "@backstage/cli": "^0.36.3",
80
+ "@backstage/backend-test-utils": "1.11.5-next.0",
81
+ "@backstage/cli": "0.36.4-next.0",
82
82
  "@types/lodash": "^4.14.151",
83
83
  "msw": "^1.0.0"
84
84
  },
85
- "configSchema": "config.d.ts"
85
+ "configSchema": "config.schema.json"
86
86
  }
package/config.d.ts DELETED
@@ -1,388 +0,0 @@
1
- /*
2
- * Copyright 2020 The Backstage Authors
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { SchedulerServiceTaskScheduleDefinitionConfig } from '@backstage/backend-plugin-api';
18
-
19
- export interface Config {
20
- catalog?: {
21
- processors?: {
22
- /**
23
- * MicrosoftGraphOrgReaderProcessor configuration
24
- * @deprecated Use `catalog.providers.microsoftGraphOrg` instead.
25
- */
26
- microsoftGraphOrg?: {
27
- /**
28
- * The configuration parameters for each single Microsoft Graph provider.
29
- */
30
- providers: Array<{
31
- /**
32
- * The prefix of the target that this matches on, e.g.
33
- * "https://graph.microsoft.com/v1.0", with no trailing slash.
34
- */
35
- target: string;
36
- /**
37
- * The auth authority used.
38
- *
39
- * Default value "https://login.microsoftonline.com"
40
- */
41
- authority?: string;
42
- /**
43
- * The tenant whose org data we are interested in.
44
- */
45
- tenantId: string;
46
- /**
47
- * The OAuth client ID to use for authenticating requests.
48
- */
49
- clientId?: string;
50
- /**
51
- * The OAuth client secret to use for authenticating requests.
52
- *
53
- * @visibility secret
54
- */
55
- clientSecret?: string;
56
-
57
- // TODO: Consider not making these config options and pass them in the
58
- // constructor instead. They are probably not environment specific, so
59
- // they could also be configured "in code".
60
-
61
- /**
62
- * The filter to apply to extract users. Disabled users
63
- * (`accountEnabled === false`) are always filtered out
64
- * client-side regardless of this setting.
65
- *
66
- * E.g. "userType eq 'member'"
67
- */
68
- userFilter?: string;
69
- /**
70
- * The filter to apply to extract groups.
71
- *
72
- * E.g. "securityEnabled eq false and mailEnabled eq true"
73
- */
74
- groupFilter?: string;
75
- /**
76
- * The fields to be fetched on query.
77
- *
78
- * E.g. ["id", "displayName", "description"]
79
- */
80
- userSelect?: string[];
81
- /**
82
- * The search criteria to apply to extract users by groups memberships.
83
- *
84
- * E.g. "\"displayName:-team\"" would only match groups which contain '-team'
85
- */
86
- groupSearch?: string;
87
-
88
- /**
89
- * The fields to be fetched on query.
90
- *
91
- * E.g. ["id", "displayName", "description"]
92
- */
93
- groupSelect?: string[];
94
-
95
- /**
96
- * The filter to apply to extract users by groups memberships.
97
- *
98
- * E.g. "displayName eq 'Backstage Users'"
99
- */
100
- userGroupMemberFilter?: string;
101
- /**
102
- * The search criteria to apply to extract groups.
103
- *
104
- * E.g. "\"displayName:-team\"" would only match groups which contain '-team'
105
- */
106
- userGroupMemberSearch?: string;
107
- }>;
108
- };
109
- };
110
-
111
- providers?: {
112
- /**
113
- * MicrosoftGraphOrgEntityProvider configuration.
114
- */
115
- microsoftGraphOrg?:
116
- | {
117
- /**
118
- * The prefix of the target that this matches on, e.g.
119
- * "https://graph.microsoft.com/v1.0", with no trailing slash.
120
- */
121
- target?: string;
122
- /**
123
- * The auth authority used.
124
- *
125
- * Default value "https://login.microsoftonline.com"
126
- */
127
- authority?: string;
128
- /**
129
- * The tenant whose org data we are interested in.
130
- */
131
- tenantId: string;
132
- /**
133
- * The OAuth client ID to use for authenticating requests.
134
- */
135
- clientId?: string;
136
- /**
137
- * The OAuth client secret to use for authenticating requests.
138
- *
139
- * @visibility secret
140
- */
141
- clientSecret?: string;
142
-
143
- /**
144
- * By default, the Microsoft Graph API only provides the basic feature set
145
- * for querying. Certain features are limited to advanced query capabilities
146
- * (see https://docs.microsoft.com/en-us/graph/aad-advanced-queries)
147
- * and need to be enabled.
148
- *
149
- * Some features like `$expand` are not available for advanced queries, though.
150
- */
151
- queryMode?: string;
152
- user?: {
153
- /**
154
- * The url path to fetch groups, defaults to `/users`.
155
- *
156
- * E.g. "groups/{id}/transitiveMembers/microsoft.graph.user/".
157
- */
158
- path?: string;
159
- /**
160
- * The "expand" argument to apply to users.
161
- *
162
- * E.g. "manager".
163
- */
164
- expand?: string;
165
- /**
166
- * The filter to apply to extract users.
167
- * Disabled users (`accountEnabled === false`) are always
168
- * filtered out client-side regardless of this setting.
169
- *
170
- * E.g. "userType eq 'member'"
171
- */
172
- filter?: string;
173
- /**
174
- * Set to false to not load user photos.
175
- * This can be useful for huge organizations.
176
- */
177
- loadPhotos?: boolean;
178
- /**
179
- * The fields to be fetched on query.
180
- *
181
- * E.g. ["id", "displayName", "description"]
182
- */
183
- select?: string[];
184
- };
185
-
186
- group?: {
187
- /**
188
- * The url path to fetch groups, defaults to `/groups`.
189
- *
190
- * E.g. "groups/{id}/transitiveMembers/microsoft.graph.group/".
191
- */
192
- path?: string;
193
- /**
194
- * The "expand" argument to apply to groups.
195
- *
196
- * E.g. "member".
197
- */
198
- expand?: string;
199
- /**
200
- * The filter to apply to extract groups.
201
- *
202
- * E.g. "securityEnabled eq false and mailEnabled eq true"
203
- */
204
- filter?: string;
205
- /**
206
- * The search criteria to apply to extract users by groups memberships.
207
- *
208
- * E.g. "\"displayName:-team\"" would only match groups which contain '-team'
209
- */
210
- search?: string;
211
- /**
212
- * The fields to be fetched on query.
213
- *
214
- * E.g. ["id", "displayName", "description"]
215
- */
216
- select?: string[];
217
- /**
218
- * Whether to ingest groups that are members of the found/filtered/searched groups.
219
- * Default value is `false`.
220
- */
221
- includeSubGroups?: boolean;
222
- };
223
-
224
- userGroupMember?: {
225
- /**
226
- * The url path to fetch groups, defaults to `/groups`.
227
- *
228
- * E.g. "groups/{id}/transitiveMembers/microsoft.graph.group/".
229
- */
230
- path?: string;
231
- /**
232
- * The filter to apply to extract users by groups memberships.
233
- *
234
- * E.g. "displayName eq 'Backstage Users'"
235
- */
236
- filter?: string;
237
- /**
238
- * The search criteria to apply to extract groups.
239
- *
240
- * E.g. "\"displayName:-team\"" would only match groups which contain '-team'
241
- */
242
- search?: string;
243
- };
244
-
245
- /**
246
- * (Optional) TaskScheduleDefinition for the refresh.
247
- */
248
- schedule?: SchedulerServiceTaskScheduleDefinitionConfig;
249
- }
250
- | {
251
- [name: string]: {
252
- /**
253
- * The prefix of the target that this matches on, e.g.
254
- * "https://graph.microsoft.com/v1.0", with no trailing slash.
255
- */
256
- target?: string;
257
- /**
258
- * The auth authority used.
259
- *
260
- * Default value "https://login.microsoftonline.com"
261
- */
262
- authority?: string;
263
- /**
264
- * The tenant whose org data we are interested in.
265
- */
266
- tenantId: string;
267
- /**
268
- * The OAuth client ID to use for authenticating requests.
269
- */
270
- clientId: string;
271
- /**
272
- * The OAuth client secret to use for authenticating requests.
273
- *
274
- * @visibility secret
275
- */
276
- clientSecret: string;
277
-
278
- /**
279
- * By default, the Microsoft Graph API only provides the basic feature set
280
- * for querying. Certain features are limited to advanced query capabilities
281
- * (see https://docs.microsoft.com/en-us/graph/aad-advanced-queries)
282
- * and need to be enabled.
283
- *
284
- * Some features like `$expand` are not available for advanced queries, though.
285
- */
286
- queryMode?: string;
287
- user?: {
288
- /**
289
- * The url path to fetch groups, defaults to `/groups`.
290
- *
291
- * E.g. "groups/{id}/transitiveMembers/microsoft.graph.group/".
292
- */
293
- path?: string;
294
- /**
295
- * The "expand" argument to apply to users.
296
- *
297
- * E.g. "manager".
298
- */
299
- expand?: string;
300
- /**
301
- * The filter to apply to extract users.
302
- * Disabled users (`accountEnabled === false`) are always
303
- * filtered out client-side regardless of this setting.
304
- *
305
- * E.g. "userType eq 'member'"
306
- */
307
- filter?: string;
308
- /**
309
- * Set to false to not load user photos.
310
- * This can be useful for huge organizations.
311
- */
312
- loadPhotos?: boolean;
313
- /**
314
- * The fields to be fetched on query.
315
- *
316
- * E.g. ["id", "displayName", "description"]
317
- */
318
- select?: string[];
319
- };
320
-
321
- group?: {
322
- /**
323
- * The url path to fetch groups, defaults to `/groups`.
324
- *
325
- * E.g. "groups/{id}/transitiveMembers/microsoft.graph.group/".
326
- */
327
- path?: string;
328
- /**
329
- * The "expand" argument to apply to groups.
330
- *
331
- * E.g. "member".
332
- */
333
- expand?: string;
334
- /**
335
- * The filter to apply to extract groups.
336
- *
337
- * E.g. "securityEnabled eq false and mailEnabled eq true"
338
- */
339
- filter?: string;
340
- /**
341
- * The search criteria to apply to extract users by groups memberships.
342
- *
343
- * E.g. "\"displayName:-team\"" would only match groups which contain '-team'
344
- */
345
- search?: string;
346
- /**
347
- * The fields to be fetched on query.
348
- *
349
- * E.g. ["id", "displayName", "description"]
350
- */
351
- select?: string[];
352
- /**
353
- * Whether to ingest groups that are members of the found/filtered/searched groups.
354
- * Default value is `false`.
355
- */
356
- includeSubGroups?: boolean;
357
- };
358
-
359
- userGroupMember?: {
360
- /**
361
- * The url path to fetch groups, defaults to `/groups`.
362
- *
363
- * E.g. "groups/{id}/transitiveMembers/microsoft.graph.group/".
364
- */
365
- path?: string;
366
- /**
367
- * The filter to apply to extract users by groups memberships.
368
- *
369
- * E.g. "displayName eq 'Backstage Users'"
370
- */
371
- filter?: string;
372
- /**
373
- * The search criteria to apply to extract groups.
374
- *
375
- * E.g. "\"displayName:-team\"" would only match groups which contain '-team'
376
- */
377
- search?: string;
378
- };
379
-
380
- /**
381
- * (Optional) TaskScheduleDefinition for the refresh.
382
- */
383
- schedule?: SchedulerServiceTaskScheduleDefinitionConfig;
384
- };
385
- };
386
- };
387
- };
388
- }