@rafads/plugin-openapi 1.5.38
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/README.md +83 -0
- package/dist/AddOpenApiIntegration-JPAEXE56.js +512 -0
- package/dist/AddOpenApiIntegration-JPAEXE56.js.map +1 -0
- package/dist/OpenApiAccountsPanel-GZFDSTAU.js +106 -0
- package/dist/OpenApiAccountsPanel-GZFDSTAU.js.map +1 -0
- package/dist/UpdateSpecSection-KUSNI44Q.js +106 -0
- package/dist/UpdateSpecSection-KUSNI44Q.js.map +1 -0
- package/dist/api/group.d.ts +239 -0
- package/dist/api/handlers.d.ts +7 -0
- package/dist/api/index.d.ts +237 -0
- package/dist/chunk-6V45G2XQ.js +199 -0
- package/dist/chunk-6V45G2XQ.js.map +1 -0
- package/dist/chunk-CURJJXB3.js +132 -0
- package/dist/chunk-CURJJXB3.js.map +1 -0
- package/dist/chunk-CXFO6TLJ.js +39 -0
- package/dist/chunk-CXFO6TLJ.js.map +1 -0
- package/dist/chunk-HTHEUUJA.js +2873 -0
- package/dist/chunk-HTHEUUJA.js.map +1 -0
- package/dist/chunk-IG6QTTZB.js +79 -0
- package/dist/chunk-IG6QTTZB.js.map +1 -0
- package/dist/chunk-O2LMSZ2Z.js +120 -0
- package/dist/chunk-O2LMSZ2Z.js.map +1 -0
- package/dist/chunk-OR27BCXQ.js +956 -0
- package/dist/chunk-OR27BCXQ.js.map +1 -0
- package/dist/chunk-R7TVM3XD.js +275 -0
- package/dist/chunk-R7TVM3XD.js.map +1 -0
- package/dist/client.js +38 -0
- package/dist/client.js.map +1 -0
- package/dist/core.js +331 -0
- package/dist/core.js.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/google/config.d.ts +34 -0
- package/dist/providers/google/discovery.d.ts +49 -0
- package/dist/providers/google/discovery.test.d.ts +1 -0
- package/dist/providers/google/index.d.ts +5 -0
- package/dist/providers/google/oauth-scopes.d.ts +3 -0
- package/dist/providers/google/oauth-scopes.test.d.ts +1 -0
- package/dist/providers/google/openapi-ownership-migration.d.ts +7 -0
- package/dist/providers/google/openapi-ownership-migration.test.d.ts +1 -0
- package/dist/providers/google/presets.d.ts +31 -0
- package/dist/providers/google/presets.test.d.ts +1 -0
- package/dist/providers/google/spec-format-adapter.d.ts +3 -0
- package/dist/providers/google/spec-format-adapter.test.d.ts +1 -0
- package/dist/providers/google.js +1446 -0
- package/dist/providers/google.js.map +1 -0
- package/dist/providers/microsoft/graph.d.ts +76 -0
- package/dist/providers/microsoft/graph.test.d.ts +1 -0
- package/dist/providers/microsoft/index.d.ts +3 -0
- package/dist/providers/microsoft/presets.d.ts +46 -0
- package/dist/providers/microsoft/presets.test.d.ts +1 -0
- package/dist/providers/microsoft/spec-format-adapter.d.ts +2 -0
- package/dist/providers/microsoft/spec-format-adapter.test.d.ts +1 -0
- package/dist/providers/microsoft.js +1056 -0
- package/dist/providers/microsoft.js.map +1 -0
- package/dist/react/AddOpenApiIntegration.d.ts +22 -0
- package/dist/react/AddOpenApiIntegration.test.d.ts +1 -0
- package/dist/react/OpenApiAccountsPanel.d.ts +6 -0
- package/dist/react/OpenApiIntegrationDetailsFields.d.ts +25 -0
- package/dist/react/UpdateSpecSection.d.ts +2 -0
- package/dist/react/atoms.d.ts +317 -0
- package/dist/react/auth-method-config.d.ts +18 -0
- package/dist/react/auth-method-config.test.d.ts +1 -0
- package/dist/react/client.d.ts +233 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/integration-plugin.d.ts +6 -0
- package/dist/react/plugin-client.d.ts +2 -0
- package/dist/sdk/backing.d.ts +188 -0
- package/dist/sdk/client-credentials-oauth.test.d.ts +1 -0
- package/dist/sdk/compiled-spec-cache.test.d.ts +1 -0
- package/dist/sdk/config.d.ts +81 -0
- package/dist/sdk/configure.test.d.ts +1 -0
- package/dist/sdk/definitions.d.ts +57 -0
- package/dist/sdk/derive-auth.d.ts +11 -0
- package/dist/sdk/describe-auth-methods.test.d.ts +1 -0
- package/dist/sdk/errors.d.ts +45 -0
- package/dist/sdk/extract.d.ts +157 -0
- package/dist/sdk/extract.test.d.ts +1 -0
- package/dist/sdk/form-urlencoded-body.test.d.ts +1 -0
- package/dist/sdk/index.d.ts +19 -0
- package/dist/sdk/index.test.d.ts +1 -0
- package/dist/sdk/invoke.d.ts +150 -0
- package/dist/sdk/migrate-config.d.ts +4 -0
- package/dist/sdk/migrate-config.test.d.ts +1 -0
- package/dist/sdk/multi-scope-bearer.test.d.ts +1 -0
- package/dist/sdk/multi-scope-oauth.test.d.ts +1 -0
- package/dist/sdk/ndjson-output-migration.d.ts +13 -0
- package/dist/sdk/ndjson-output-migration.test.d.ts +1 -0
- package/dist/sdk/non-json-body.test.d.ts +1 -0
- package/dist/sdk/oauth-refresh.test.d.ts +1 -0
- package/dist/sdk/openapi-utils.d.ts +65 -0
- package/dist/sdk/output-schema-migration.d.ts +21 -0
- package/dist/sdk/output-schema-migration.test.d.ts +1 -0
- package/dist/sdk/parse.d.ts +33 -0
- package/dist/sdk/parse.test.d.ts +1 -0
- package/dist/sdk/plugin.d.ts +109 -0
- package/dist/sdk/plugin.test.d.ts +1 -0
- package/dist/sdk/presets.d.ts +15 -0
- package/dist/sdk/preview-oauth2.test.d.ts +1 -0
- package/dist/sdk/preview.d.ts +514 -0
- package/dist/sdk/query-serialization.test.d.ts +1 -0
- package/dist/sdk/real-specs.test.d.ts +1 -0
- package/dist/sdk/request-user-agent.test.d.ts +1 -0
- package/dist/sdk/response-headers-timeout.test.d.ts +1 -0
- package/dist/sdk/server-url-resolution.test.d.ts +1 -0
- package/dist/sdk/spec-blob-migration.d.ts +7 -0
- package/dist/sdk/spec-blob.test.d.ts +1 -0
- package/dist/sdk/spec-format.d.ts +36 -0
- package/dist/sdk/spec-format.test.d.ts +1 -0
- package/dist/sdk/split.d.ts +84 -0
- package/dist/sdk/store.d.ts +49 -0
- package/dist/sdk/store.test.d.ts +1 -0
- package/dist/sdk/streaming-response.test.d.ts +1 -0
- package/dist/sdk/tool-row-projection.test.d.ts +1 -0
- package/dist/sdk/types.d.ts +352 -0
- package/dist/sdk/upstream-failures.test.d.ts +1 -0
- package/dist/sdk/usage-scope-isolation.test.d.ts +1 -0
- package/dist/testing/index.d.ts +177 -0
- package/dist/testing.js +454 -0
- package/dist/testing.js.map +1 -0
- package/dist/testing.test.d.ts +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1,1056 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthenticationSchema,
|
|
3
|
+
parseEntry,
|
|
4
|
+
parseHead,
|
|
5
|
+
parseSmallComponents,
|
|
6
|
+
structuralSplit
|
|
7
|
+
} from "../chunk-R7TVM3XD.js";
|
|
8
|
+
import {
|
|
9
|
+
OpenApiParseError
|
|
10
|
+
} from "../chunk-CXFO6TLJ.js";
|
|
11
|
+
|
|
12
|
+
// src/providers/microsoft/presets.ts
|
|
13
|
+
var svglIcon = (name) => `https://svgl.app/library/${name}.svg`;
|
|
14
|
+
var MICROSOFT_GRAPH_OPENAPI_URL = "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml";
|
|
15
|
+
var MICROSOFT_GRAPH_PERMISSIONS_REFERENCE_URL = "https://raw.githubusercontent.com/microsoftgraph/microsoft-graph-docs-contrib/main/concepts/permissions-reference.md";
|
|
16
|
+
var MICROSOFT_GRAPH_BASE_URL = "https://graph.microsoft.com/v1.0";
|
|
17
|
+
var MICROSOFT_AUTHORIZATION_URL = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
|
18
|
+
var MICROSOFT_TOKEN_URL = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
|
19
|
+
var MICROSOFT_AUTH_TEMPLATE_SLUG = "azureAdDelegated";
|
|
20
|
+
var MICROSOFT_CLIENT_CREDENTIALS_AUTH_TEMPLATE_SLUG = "azureAdClientCredentials";
|
|
21
|
+
var MICROSOFT_GRAPH_BASE_SCOPES = ["offline_access"];
|
|
22
|
+
var MICROSOFT_GRAPH_IDENTITY_SCOPE = "User.Read";
|
|
23
|
+
var MICROSOFT_GRAPH_DEFAULT_SCOPE = "https://graph.microsoft.com/.default";
|
|
24
|
+
var MICROSOFT_GRAPH_DELEGATED_DEFAULT_SCOPES = [
|
|
25
|
+
...MICROSOFT_GRAPH_BASE_SCOPES,
|
|
26
|
+
MICROSOFT_GRAPH_IDENTITY_SCOPE,
|
|
27
|
+
MICROSOFT_GRAPH_DEFAULT_SCOPE
|
|
28
|
+
];
|
|
29
|
+
var MICROSOFT_GRAPH_CLIENT_CREDENTIALS_SCOPES = [
|
|
30
|
+
MICROSOFT_GRAPH_DEFAULT_SCOPE
|
|
31
|
+
];
|
|
32
|
+
var MICROSOFT_GRAPH_PRESET_ID = "microsoft";
|
|
33
|
+
var microsoftGraphPreset = {
|
|
34
|
+
id: MICROSOFT_GRAPH_PRESET_ID,
|
|
35
|
+
name: "Microsoft Graph",
|
|
36
|
+
summary: "Bundle Microsoft 365 workloads into one Graph integration and one OAuth consent.",
|
|
37
|
+
featured: true
|
|
38
|
+
};
|
|
39
|
+
var microsoftGraphScopePresets = [
|
|
40
|
+
{
|
|
41
|
+
id: "profile",
|
|
42
|
+
name: "Profile",
|
|
43
|
+
summary: "Signed-in user profile and photo.",
|
|
44
|
+
icon: svglIcon("microsoft"),
|
|
45
|
+
scopes: ["User.Read"],
|
|
46
|
+
exactPaths: ["/me", "/me/photo", "/me/photo/$value"],
|
|
47
|
+
featured: true,
|
|
48
|
+
audience: "productivity"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "me-surface",
|
|
52
|
+
name: "My Graph Operations",
|
|
53
|
+
summary: "All operation groups rooted under /me.",
|
|
54
|
+
icon: svglIcon("microsoft"),
|
|
55
|
+
scopes: ["User.Read"],
|
|
56
|
+
pathPrefixes: ["/me"],
|
|
57
|
+
audience: "productivity"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "mail",
|
|
61
|
+
name: "Outlook Mail",
|
|
62
|
+
summary: "Messages, folders, attachments, settings, and send mail.",
|
|
63
|
+
icon: svglIcon("microsoft-outlook"),
|
|
64
|
+
scopes: ["Mail.ReadWrite", "Mail.Send", "MailboxSettings.ReadWrite"],
|
|
65
|
+
pathPrefixes: [
|
|
66
|
+
"/me/messages",
|
|
67
|
+
"/me/mailFolders",
|
|
68
|
+
"/me/sendMail",
|
|
69
|
+
"/me/getMailTips",
|
|
70
|
+
"/me/inferenceClassification",
|
|
71
|
+
"/me/mailboxSettings",
|
|
72
|
+
"/me/outlook",
|
|
73
|
+
"/users/{user-id}/messages",
|
|
74
|
+
"/users/{user-id}/mailFolders",
|
|
75
|
+
"/users/{user-id}/sendMail",
|
|
76
|
+
"/users/{user-id}/outlook"
|
|
77
|
+
],
|
|
78
|
+
featured: true,
|
|
79
|
+
audience: "productivity"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "calendar",
|
|
83
|
+
name: "Outlook Calendar",
|
|
84
|
+
summary: "Calendars, events, and scheduling.",
|
|
85
|
+
icon: svglIcon("microsoft-outlook"),
|
|
86
|
+
scopes: ["Calendars.ReadWrite"],
|
|
87
|
+
pathPrefixes: [
|
|
88
|
+
"/me/calendar",
|
|
89
|
+
"/me/calendars",
|
|
90
|
+
"/me/calendarGroups",
|
|
91
|
+
"/me/calendarView",
|
|
92
|
+
"/me/events",
|
|
93
|
+
"/me/findMeetingTimes",
|
|
94
|
+
"/me/reminderView",
|
|
95
|
+
"/users/{user-id}/calendar",
|
|
96
|
+
"/users/{user-id}/calendars",
|
|
97
|
+
"/users/{user-id}/calendarGroups",
|
|
98
|
+
"/users/{user-id}/calendarView",
|
|
99
|
+
"/users/{user-id}/events",
|
|
100
|
+
"/users/{user-id}/findMeetingTimes",
|
|
101
|
+
"/users/{user-id}/reminderView"
|
|
102
|
+
],
|
|
103
|
+
featured: true,
|
|
104
|
+
audience: "productivity"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "contacts",
|
|
108
|
+
name: "Outlook Contacts",
|
|
109
|
+
summary: "Contacts, contact folders, and people suggestions.",
|
|
110
|
+
icon: svglIcon("microsoft-outlook"),
|
|
111
|
+
scopes: ["Contacts.ReadWrite", "People.Read.All"],
|
|
112
|
+
pathPrefixes: [
|
|
113
|
+
"/me/contacts",
|
|
114
|
+
"/me/contactFolders",
|
|
115
|
+
"/me/people",
|
|
116
|
+
"/users/{user-id}/contacts",
|
|
117
|
+
"/users/{user-id}/contactFolders",
|
|
118
|
+
"/users/{user-id}/people"
|
|
119
|
+
],
|
|
120
|
+
audience: "productivity"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "tasks",
|
|
124
|
+
name: "To Do Tasks",
|
|
125
|
+
summary: "Task lists, tasks, and checklist items.",
|
|
126
|
+
icon: svglIcon("microsoft-todo"),
|
|
127
|
+
scopes: ["Tasks.ReadWrite"],
|
|
128
|
+
pathPrefixes: ["/me/todo", "/users/{user-id}/todo"],
|
|
129
|
+
audience: "productivity"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "planner",
|
|
133
|
+
name: "Planner",
|
|
134
|
+
summary: "Plans, buckets, tasks, assignments, and Planner user data.",
|
|
135
|
+
icon: svglIcon("microsoft"),
|
|
136
|
+
scopes: ["Tasks.ReadWrite"],
|
|
137
|
+
pathPrefixes: [
|
|
138
|
+
"/planner",
|
|
139
|
+
"/me/planner",
|
|
140
|
+
"/users/{user-id}/planner",
|
|
141
|
+
"/groups/{group-id}/planner"
|
|
142
|
+
],
|
|
143
|
+
audience: "productivity"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "files",
|
|
147
|
+
name: "OneDrive Files",
|
|
148
|
+
summary: "Drives, files, folders, sharing links, and permissions.",
|
|
149
|
+
icon: svglIcon("microsoft-onedrive"),
|
|
150
|
+
scopes: ["Files.ReadWrite.All", "Sites.ReadWrite.All"],
|
|
151
|
+
pathPrefixes: [
|
|
152
|
+
"/me/drive",
|
|
153
|
+
"/me/drives",
|
|
154
|
+
"/me/followedSites",
|
|
155
|
+
"/users/{user-id}/drive",
|
|
156
|
+
"/users/{user-id}/drives",
|
|
157
|
+
"/groups/{group-id}/drive",
|
|
158
|
+
"/groups/{group-id}/drives",
|
|
159
|
+
"/drives",
|
|
160
|
+
"/shares"
|
|
161
|
+
],
|
|
162
|
+
featured: true,
|
|
163
|
+
audience: "files-content"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: "excel",
|
|
167
|
+
name: "Excel Workbooks",
|
|
168
|
+
summary: "Workbook tables, worksheets, ranges, charts, and sessions.",
|
|
169
|
+
icon: svglIcon("microsoft-excel"),
|
|
170
|
+
scopes: ["Files.ReadWrite.All"],
|
|
171
|
+
pathPrefixes: [
|
|
172
|
+
"/me/drive/items/{driveItem-id}/workbook",
|
|
173
|
+
"/users/{user-id}/drive/items/{driveItem-id}/workbook",
|
|
174
|
+
"/groups/{group-id}/drive/items/{driveItem-id}/workbook",
|
|
175
|
+
"/drives/{drive-id}/items/{driveItem-id}/workbook"
|
|
176
|
+
],
|
|
177
|
+
audience: "files-content"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "sites",
|
|
181
|
+
name: "SharePoint Sites",
|
|
182
|
+
summary: "Sites, lists, pages, columns, content types, and stores.",
|
|
183
|
+
icon: svglIcon("microsoft-sharepoint"),
|
|
184
|
+
scopes: ["Sites.ReadWrite.All"],
|
|
185
|
+
pathPrefixes: ["/sites"],
|
|
186
|
+
featured: true,
|
|
187
|
+
audience: "files-content"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: "onenote",
|
|
191
|
+
name: "OneNote",
|
|
192
|
+
summary: "Notebooks, sections, pages, and page content.",
|
|
193
|
+
icon: svglIcon("microsoft-onenote"),
|
|
194
|
+
scopes: ["Notes.ReadWrite"],
|
|
195
|
+
pathPrefixes: [
|
|
196
|
+
"/me/onenote",
|
|
197
|
+
"/users/{user-id}/onenote",
|
|
198
|
+
"/groups/{group-id}/onenote",
|
|
199
|
+
"/sites/{site-id}/onenote"
|
|
200
|
+
],
|
|
201
|
+
audience: "files-content"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: "teams-chat",
|
|
205
|
+
name: "Teams Chats",
|
|
206
|
+
summary: "Chats, chat messages, installed apps, and members.",
|
|
207
|
+
icon: svglIcon("microsoft-teams"),
|
|
208
|
+
scopes: ["Chat.ReadWrite"],
|
|
209
|
+
pathPrefixes: ["/me/chats", "/chats"],
|
|
210
|
+
audience: "collaboration"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: "teams-channels",
|
|
214
|
+
name: "Teams Channels",
|
|
215
|
+
summary: "Teams, channels, channel messages, replies, and joined teams.",
|
|
216
|
+
icon: svglIcon("microsoft-teams"),
|
|
217
|
+
scopes: [
|
|
218
|
+
"Team.ReadBasic.All",
|
|
219
|
+
"Channel.ReadBasic.All",
|
|
220
|
+
"ChannelMessage.Read.All",
|
|
221
|
+
"ChannelMessage.Send"
|
|
222
|
+
],
|
|
223
|
+
pathPrefixes: [
|
|
224
|
+
"/me/joinedTeams",
|
|
225
|
+
"/groups/{group-id}/team",
|
|
226
|
+
"/teams",
|
|
227
|
+
"/teamwork",
|
|
228
|
+
"/teamsTemplates"
|
|
229
|
+
],
|
|
230
|
+
audience: "collaboration"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: "meetings-calls",
|
|
234
|
+
name: "Meetings and Calls",
|
|
235
|
+
summary: "Online meetings, calls, call records, and communications APIs.",
|
|
236
|
+
icon: svglIcon("microsoft-teams"),
|
|
237
|
+
scopes: ["OnlineMeetings.ReadWrite"],
|
|
238
|
+
pathPrefixes: ["/communications", "/me/onlineMeetings", "/users/{user-id}/onlineMeetings"],
|
|
239
|
+
audience: "collaboration"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
id: "users",
|
|
243
|
+
name: "Users",
|
|
244
|
+
summary: "User objects plus user-scoped Graph operations.",
|
|
245
|
+
icon: svglIcon("microsoft"),
|
|
246
|
+
scopes: ["User.ReadWrite.All", "Directory.Read.All"],
|
|
247
|
+
pathPrefixes: ["/users", "/users(userPrincipalName='{userPrincipalName}')"],
|
|
248
|
+
featured: true,
|
|
249
|
+
audience: "directory-identity"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: "groups",
|
|
253
|
+
name: "Groups",
|
|
254
|
+
summary: "Groups, settings, lifecycle policies, and group-scoped operations.",
|
|
255
|
+
icon: svglIcon("microsoft"),
|
|
256
|
+
scopes: ["Group.ReadWrite.All", "Directory.Read.All"],
|
|
257
|
+
pathPrefixes: [
|
|
258
|
+
"/groups",
|
|
259
|
+
"/groups(uniqueName='{uniqueName}')",
|
|
260
|
+
"/groupSettings",
|
|
261
|
+
"/groupSettingTemplates",
|
|
262
|
+
"/groupLifecyclePolicies"
|
|
263
|
+
],
|
|
264
|
+
audience: "directory-identity"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: "directory",
|
|
268
|
+
name: "Directory",
|
|
269
|
+
summary: "Directory roles, objects, contacts, contracts, and invitations.",
|
|
270
|
+
icon: svglIcon("microsoft"),
|
|
271
|
+
scopes: ["Directory.Read.All"],
|
|
272
|
+
pathPrefixes: [
|
|
273
|
+
"/contacts",
|
|
274
|
+
"/contracts",
|
|
275
|
+
"/directory",
|
|
276
|
+
"/directoryObjects",
|
|
277
|
+
"/directoryRoles",
|
|
278
|
+
"/directoryRoles(roleTemplateId='{roleTemplateId}')",
|
|
279
|
+
"/directoryRoleTemplates",
|
|
280
|
+
"/invitations",
|
|
281
|
+
"/scopedRoleMemberships"
|
|
282
|
+
],
|
|
283
|
+
audience: "directory-identity"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: "applications",
|
|
287
|
+
name: "Applications",
|
|
288
|
+
summary: "Applications, service principals, app templates, catalogs, and grants.",
|
|
289
|
+
icon: svglIcon("microsoft"),
|
|
290
|
+
scopes: ["Application.ReadWrite.All", "AppRoleAssignment.ReadWrite.All"],
|
|
291
|
+
pathPrefixes: [
|
|
292
|
+
"/applications",
|
|
293
|
+
"/applications(appId='{appId}')",
|
|
294
|
+
"/applications(uniqueName='{uniqueName}')",
|
|
295
|
+
"/applicationTemplates",
|
|
296
|
+
"/appCatalogs",
|
|
297
|
+
"/oauth2PermissionGrants",
|
|
298
|
+
"/permissionGrants",
|
|
299
|
+
"/servicePrincipals",
|
|
300
|
+
"/servicePrincipals(appId='{appId}')"
|
|
301
|
+
],
|
|
302
|
+
audience: "directory-identity"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: "identity",
|
|
306
|
+
name: "Identity and Governance",
|
|
307
|
+
summary: "Identity, governance, policies, access reviews, roles, and providers.",
|
|
308
|
+
icon: svglIcon("microsoft"),
|
|
309
|
+
scopes: ["Policy.ReadWrite.ConditionalAccess", "RoleManagement.Read.Directory"],
|
|
310
|
+
pathPrefixes: [
|
|
311
|
+
"/agreementAcceptances",
|
|
312
|
+
"/agreements",
|
|
313
|
+
"/authenticationMethodConfigurations",
|
|
314
|
+
"/authenticationMethodsPolicy",
|
|
315
|
+
"/certificateBasedAuthConfiguration",
|
|
316
|
+
"/identity",
|
|
317
|
+
"/identityGovernance",
|
|
318
|
+
"/identityProviders",
|
|
319
|
+
"/identityProtection",
|
|
320
|
+
"/policies",
|
|
321
|
+
"/roleManagement"
|
|
322
|
+
],
|
|
323
|
+
audience: "directory-identity"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
id: "admin-reports",
|
|
327
|
+
name: "Admin and Reports",
|
|
328
|
+
summary: "Admin centers, audit logs, domains, reports, organization, and tenants.",
|
|
329
|
+
icon: svglIcon("microsoft"),
|
|
330
|
+
scopes: ["AuditLog.Read.All", "Reports.Read.All"],
|
|
331
|
+
pathPrefixes: [
|
|
332
|
+
"/admin",
|
|
333
|
+
"/auditLogs",
|
|
334
|
+
"/domains",
|
|
335
|
+
"/domainDnsRecords",
|
|
336
|
+
"/organization",
|
|
337
|
+
"/reports",
|
|
338
|
+
"/subscribedSkus",
|
|
339
|
+
"/tenantRelationships"
|
|
340
|
+
],
|
|
341
|
+
audience: "admin-security"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
id: "security-compliance",
|
|
345
|
+
name: "Security and Compliance",
|
|
346
|
+
summary: "Security, compliance, privacy, information protection, and data policy.",
|
|
347
|
+
icon: svglIcon("microsoft"),
|
|
348
|
+
scopes: ["SecurityEvents.Read.All"],
|
|
349
|
+
pathPrefixes: [
|
|
350
|
+
"/compliance",
|
|
351
|
+
"/dataPolicyOperations",
|
|
352
|
+
"/informationProtection",
|
|
353
|
+
"/privacy",
|
|
354
|
+
"/security"
|
|
355
|
+
],
|
|
356
|
+
audience: "admin-security"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: "devices",
|
|
360
|
+
name: "Devices and Intune",
|
|
361
|
+
summary: "Devices, device management, Intune apps, managed devices, and policies.",
|
|
362
|
+
icon: svglIcon("microsoft"),
|
|
363
|
+
scopes: ["DeviceManagementApps.ReadWrite.All", "DeviceManagementManagedDevices.ReadWrite.All"],
|
|
364
|
+
pathPrefixes: [
|
|
365
|
+
"/devices",
|
|
366
|
+
"/devices(deviceId='{deviceId}')",
|
|
367
|
+
"/deviceAppManagement",
|
|
368
|
+
"/deviceManagement"
|
|
369
|
+
],
|
|
370
|
+
audience: "admin-security"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
id: "education",
|
|
374
|
+
name: "Education",
|
|
375
|
+
summary: "Classes, schools, education users, assignments, and reports.",
|
|
376
|
+
icon: svglIcon("microsoft"),
|
|
377
|
+
scopes: [],
|
|
378
|
+
pathPrefixes: ["/education"],
|
|
379
|
+
audience: "admin-security"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
id: "search",
|
|
383
|
+
name: "Microsoft Search",
|
|
384
|
+
summary: "Search across Microsoft Graph content connectors.",
|
|
385
|
+
icon: svglIcon("microsoft"),
|
|
386
|
+
scopes: ["ExternalItem.Read.All", "Acronym.Read.All", "Bookmark.Read.All", "QnA.Read.All"],
|
|
387
|
+
pathPrefixes: ["/search"],
|
|
388
|
+
audience: "platform-business"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
id: "external-connections",
|
|
392
|
+
name: "External Connections",
|
|
393
|
+
summary: "External connections, schemas, items, and content connectors.",
|
|
394
|
+
icon: svglIcon("microsoft"),
|
|
395
|
+
scopes: ["ExternalConnection.ReadWrite.OwnedBy", "ExternalItem.ReadWrite.OwnedBy"],
|
|
396
|
+
pathPrefixes: ["/connections", "/external"],
|
|
397
|
+
audience: "platform-business"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
id: "solutions",
|
|
401
|
+
name: "Solutions and Employee Experience",
|
|
402
|
+
summary: "Bookings, virtual events, backup, employee experience, and Copilot.",
|
|
403
|
+
icon: svglIcon("microsoft"),
|
|
404
|
+
scopes: [],
|
|
405
|
+
pathPrefixes: ["/copilot", "/employeeExperience", "/solutions"],
|
|
406
|
+
audience: "platform-business"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
id: "platform-services",
|
|
410
|
+
name: "Platform Services",
|
|
411
|
+
summary: "Places, print, storage, subscriptions, functions, filters, and extensions.",
|
|
412
|
+
icon: svglIcon("microsoft"),
|
|
413
|
+
scopes: ["Place.Read.All", "Printer.ReadWrite.All"],
|
|
414
|
+
pathPrefixes: [
|
|
415
|
+
"/filterOperators",
|
|
416
|
+
"/functions",
|
|
417
|
+
"/places",
|
|
418
|
+
"/print",
|
|
419
|
+
"/schemaExtensions",
|
|
420
|
+
"/storage",
|
|
421
|
+
"/subscriptions"
|
|
422
|
+
],
|
|
423
|
+
audience: "platform-business"
|
|
424
|
+
}
|
|
425
|
+
];
|
|
426
|
+
var MICROSOFT_GRAPH_DEFAULT_PRESET_IDS = [
|
|
427
|
+
"profile",
|
|
428
|
+
"mail",
|
|
429
|
+
"calendar",
|
|
430
|
+
"contacts",
|
|
431
|
+
"tasks",
|
|
432
|
+
"files",
|
|
433
|
+
"excel",
|
|
434
|
+
"sites",
|
|
435
|
+
"onenote",
|
|
436
|
+
"teams-chat",
|
|
437
|
+
"teams-channels",
|
|
438
|
+
"meetings-calls"
|
|
439
|
+
];
|
|
440
|
+
var MICROSOFT_GRAPH_ALL_PRESET_IDS = microsoftGraphScopePresets.map(
|
|
441
|
+
(preset) => preset.id
|
|
442
|
+
);
|
|
443
|
+
var orderedUnique = (values) => {
|
|
444
|
+
const seen = /* @__PURE__ */ new Set();
|
|
445
|
+
const result = [];
|
|
446
|
+
for (const value of values) {
|
|
447
|
+
const trimmed = value.trim();
|
|
448
|
+
if (!trimmed || seen.has(trimmed)) continue;
|
|
449
|
+
seen.add(trimmed);
|
|
450
|
+
result.push(trimmed);
|
|
451
|
+
}
|
|
452
|
+
return result;
|
|
453
|
+
};
|
|
454
|
+
var microsoftGraphPresetForId = (presetId) => microsoftGraphScopePresets.find((preset) => preset.id === presetId);
|
|
455
|
+
var microsoftGraphPresetIdsCoverFullGraph = (presetIds) => {
|
|
456
|
+
const selected = /* @__PURE__ */ new Set([...presetIds]);
|
|
457
|
+
return microsoftGraphScopePresets.every((preset) => selected.has(preset.id));
|
|
458
|
+
};
|
|
459
|
+
var microsoftGraphScopesForPresetIds = (presetIds, customScopes = []) => orderedUnique([
|
|
460
|
+
...MICROSOFT_GRAPH_BASE_SCOPES,
|
|
461
|
+
MICROSOFT_GRAPH_IDENTITY_SCOPE,
|
|
462
|
+
...[...presetIds].flatMap((presetId) => microsoftGraphPresetForId(presetId)?.scopes ?? []),
|
|
463
|
+
...customScopes
|
|
464
|
+
]);
|
|
465
|
+
var microsoftGraphExactPathsForPresetIds = (presetIds) => orderedUnique(
|
|
466
|
+
[...presetIds].flatMap((presetId) => microsoftGraphPresetForId(presetId)?.exactPaths ?? [])
|
|
467
|
+
);
|
|
468
|
+
var microsoftGraphPathPrefixesForPresetIds = (presetIds) => orderedUnique(
|
|
469
|
+
[...presetIds].flatMap((presetId) => microsoftGraphPresetForId(presetId)?.pathPrefixes ?? [])
|
|
470
|
+
);
|
|
471
|
+
var microsoftGraphTagPrefixesForPresetIds = (presetIds) => orderedUnique(
|
|
472
|
+
[...presetIds].flatMap((presetId) => microsoftGraphPresetForId(presetId)?.tagPrefixes ?? [])
|
|
473
|
+
);
|
|
474
|
+
var microsoftServiceSlug = (presetId) => `microsoft_${presetId.replaceAll("-", "_")}`;
|
|
475
|
+
var microsoftGraphCatalogUrl = (presetId) => `${MICROSOFT_GRAPH_OPENAPI_URL}#preset=${encodeURIComponent(presetId)}`;
|
|
476
|
+
var microsoftGraphCatalogAuthTemplate = (preset) => [
|
|
477
|
+
{
|
|
478
|
+
slug: MICROSOFT_AUTH_TEMPLATE_SLUG,
|
|
479
|
+
kind: "oauth2",
|
|
480
|
+
authorizationUrl: MICROSOFT_AUTHORIZATION_URL,
|
|
481
|
+
tokenUrl: MICROSOFT_TOKEN_URL,
|
|
482
|
+
scopes: microsoftGraphScopesForPresetIds([preset.id])
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
slug: MICROSOFT_CLIENT_CREDENTIALS_AUTH_TEMPLATE_SLUG,
|
|
486
|
+
kind: "oauth2",
|
|
487
|
+
authorizationUrl: MICROSOFT_AUTHORIZATION_URL,
|
|
488
|
+
tokenUrl: MICROSOFT_TOKEN_URL,
|
|
489
|
+
scopes: [...MICROSOFT_GRAPH_CLIENT_CREDENTIALS_SCOPES]
|
|
490
|
+
}
|
|
491
|
+
];
|
|
492
|
+
var microsoftCatalog = microsoftGraphScopePresets.map(
|
|
493
|
+
(preset) => ({
|
|
494
|
+
id: `microsoft-${preset.id}`,
|
|
495
|
+
name: preset.name,
|
|
496
|
+
summary: preset.summary,
|
|
497
|
+
url: microsoftGraphCatalogUrl(preset.id),
|
|
498
|
+
...preset.icon ? { icon: preset.icon } : {},
|
|
499
|
+
...preset.featured ? { featured: preset.featured } : {},
|
|
500
|
+
family: "microsoft",
|
|
501
|
+
specFormat: "microsoft-graph",
|
|
502
|
+
defaultSlug: microsoftServiceSlug(preset.id),
|
|
503
|
+
authTemplate: microsoftGraphCatalogAuthTemplate(preset),
|
|
504
|
+
...preset.id === "profile" ? { healthCheck: { operation: "me.GetUser" } } : {}
|
|
505
|
+
})
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
// src/providers/microsoft/graph.ts
|
|
509
|
+
import { Effect, Option, Schema } from "effect";
|
|
510
|
+
import { HttpClient, HttpClientRequest } from "effect/unstable/http";
|
|
511
|
+
import { AuthTemplateSlug } from "@rafads/sdk/core";
|
|
512
|
+
var MicrosoftGraphIntegrationConfigSchema = Schema.Struct({
|
|
513
|
+
specHash: Schema.optional(Schema.String),
|
|
514
|
+
specUrl: Schema.optional(Schema.String),
|
|
515
|
+
baseUrl: Schema.optional(Schema.String),
|
|
516
|
+
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
517
|
+
queryParams: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
518
|
+
authenticationTemplate: Schema.optional(Schema.Array(AuthenticationSchema)),
|
|
519
|
+
microsoftGraphPresetIds: Schema.optional(Schema.Array(Schema.String)),
|
|
520
|
+
microsoftGraphCustomScopes: Schema.optional(Schema.Array(Schema.String)),
|
|
521
|
+
microsoftGraphScopes: Schema.optional(Schema.Array(Schema.String)),
|
|
522
|
+
microsoftGraphExactPaths: Schema.optional(Schema.Array(Schema.String)),
|
|
523
|
+
microsoftGraphPathPrefixes: Schema.optional(Schema.Array(Schema.String)),
|
|
524
|
+
microsoftGraphTagPrefixes: Schema.optional(Schema.Array(Schema.String)),
|
|
525
|
+
microsoftGraphCoversFullGraph: Schema.optional(Schema.Boolean),
|
|
526
|
+
microsoftGraphAuthorizationUrl: Schema.optional(Schema.String),
|
|
527
|
+
microsoftGraphTokenUrl: Schema.optional(Schema.String),
|
|
528
|
+
microsoftGraphClientCredentialsTokenUrl: Schema.optional(Schema.String)
|
|
529
|
+
});
|
|
530
|
+
var decodeMicrosoftConfig = Schema.decodeUnknownOption(MicrosoftGraphIntegrationConfigSchema);
|
|
531
|
+
var decodeMicrosoftGraphIntegrationConfig = (value) => Option.getOrNull(decodeMicrosoftConfig(value));
|
|
532
|
+
var uniqueStrings = (values) => {
|
|
533
|
+
const seen = /* @__PURE__ */ new Set();
|
|
534
|
+
const result = [];
|
|
535
|
+
for (const value of values) {
|
|
536
|
+
const trimmed = value.trim();
|
|
537
|
+
if (!trimmed || seen.has(trimmed)) continue;
|
|
538
|
+
seen.add(trimmed);
|
|
539
|
+
result.push(trimmed);
|
|
540
|
+
}
|
|
541
|
+
return result;
|
|
542
|
+
};
|
|
543
|
+
var normalizeSelection = (input) => {
|
|
544
|
+
const presetIds = uniqueStrings(
|
|
545
|
+
input.presetIds && input.presetIds.length > 0 ? input.presetIds : MICROSOFT_GRAPH_DEFAULT_PRESET_IDS
|
|
546
|
+
);
|
|
547
|
+
const customScopes = uniqueStrings(input.customScopes ?? []);
|
|
548
|
+
const scopes = microsoftGraphScopesForPresetIds(presetIds, customScopes);
|
|
549
|
+
const exactPaths = microsoftGraphExactPathsForPresetIds(presetIds);
|
|
550
|
+
const pathPrefixes = microsoftGraphPathPrefixesForPresetIds(presetIds);
|
|
551
|
+
const tagPrefixes = microsoftGraphTagPrefixesForPresetIds(presetIds);
|
|
552
|
+
const coversFullGraph = microsoftGraphPresetIdsCoverFullGraph(presetIds);
|
|
553
|
+
const specUrl = input.specUrl?.trim() || MICROSOFT_GRAPH_OPENAPI_URL;
|
|
554
|
+
const baseUrl = input.baseUrl?.trim() || void 0;
|
|
555
|
+
const authorizationUrl = input.authorizationUrl?.trim() || void 0;
|
|
556
|
+
const tokenUrl = input.tokenUrl?.trim() || void 0;
|
|
557
|
+
const clientCredentialsTokenUrl = input.clientCredentialsTokenUrl?.trim() || void 0;
|
|
558
|
+
return {
|
|
559
|
+
presetIds,
|
|
560
|
+
customScopes,
|
|
561
|
+
scopes,
|
|
562
|
+
exactPaths,
|
|
563
|
+
pathPrefixes,
|
|
564
|
+
tagPrefixes,
|
|
565
|
+
coversFullGraph,
|
|
566
|
+
specUrl,
|
|
567
|
+
baseUrl,
|
|
568
|
+
authorizationUrl,
|
|
569
|
+
tokenUrl,
|
|
570
|
+
clientCredentialsTokenUrl
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
var microsoftOAuthTemplate = (scopes, endpoints) => [
|
|
574
|
+
{
|
|
575
|
+
slug: AuthTemplateSlug.make(MICROSOFT_AUTH_TEMPLATE_SLUG),
|
|
576
|
+
kind: "oauth2",
|
|
577
|
+
authorizationUrl: endpoints.authorizationUrl,
|
|
578
|
+
tokenUrl: endpoints.tokenUrl,
|
|
579
|
+
scopes
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
slug: AuthTemplateSlug.make(MICROSOFT_CLIENT_CREDENTIALS_AUTH_TEMPLATE_SLUG),
|
|
583
|
+
kind: "oauth2",
|
|
584
|
+
authorizationUrl: endpoints.authorizationUrl,
|
|
585
|
+
tokenUrl: endpoints.clientCredentialsTokenUrl,
|
|
586
|
+
scopes: [...MICROSOFT_GRAPH_CLIENT_CREDENTIALS_SCOPES]
|
|
587
|
+
}
|
|
588
|
+
];
|
|
589
|
+
var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
590
|
+
var HTTP_METHODS = /* @__PURE__ */ new Set(["delete", "get", "patch", "post", "put"]);
|
|
591
|
+
var REQUEST_BASE_SCOPES = /* @__PURE__ */ new Set(["offline_access", "openid", "profile", "email"]);
|
|
592
|
+
var PATH_SCOPE_IGNORED_SCOPES = /* @__PURE__ */ new Set([
|
|
593
|
+
"offline_access",
|
|
594
|
+
"openid",
|
|
595
|
+
"profile",
|
|
596
|
+
"email",
|
|
597
|
+
MICROSOFT_GRAPH_IDENTITY_SCOPE
|
|
598
|
+
]);
|
|
599
|
+
var firstString = (values) => values.find((value) => typeof value === "string" && value.trim().length > 0);
|
|
600
|
+
var parseTrustedHttpsUrl = (value) => {
|
|
601
|
+
if (!URL.canParse(value)) return null;
|
|
602
|
+
const parsed = new URL(value);
|
|
603
|
+
if (parsed.protocol !== "https:" || parsed.username || parsed.password || parsed.hash) {
|
|
604
|
+
return null;
|
|
605
|
+
}
|
|
606
|
+
return parsed;
|
|
607
|
+
};
|
|
608
|
+
var isLoopbackHostname = (hostname) => {
|
|
609
|
+
const lower = hostname.toLowerCase();
|
|
610
|
+
return lower === "localhost" || lower === "127.0.0.1" || lower === "::1" || lower === "[::1]";
|
|
611
|
+
};
|
|
612
|
+
var parseTrustedLoopbackHttpUrl = (value) => {
|
|
613
|
+
if (!URL.canParse(value)) return null;
|
|
614
|
+
const parsed = new URL(value);
|
|
615
|
+
if (parsed.protocol !== "http:" || parsed.username || parsed.password || parsed.hash) {
|
|
616
|
+
return null;
|
|
617
|
+
}
|
|
618
|
+
return isLoopbackHostname(parsed.hostname) ? parsed : null;
|
|
619
|
+
};
|
|
620
|
+
var allowUnsafeUrl = (value, policy) => {
|
|
621
|
+
if (!value) return void 0;
|
|
622
|
+
if (policy?.allowUnsafeUrlOverrides !== true) return null;
|
|
623
|
+
return parseTrustedHttpsUrl(value) || parseTrustedLoopbackHttpUrl(value) ? value : null;
|
|
624
|
+
};
|
|
625
|
+
var normalizeMicrosoftGraphSpecUrl = (value, policy) => {
|
|
626
|
+
if (value === MICROSOFT_GRAPH_OPENAPI_URL) return value;
|
|
627
|
+
return allowUnsafeUrl(value, policy) ?? null;
|
|
628
|
+
};
|
|
629
|
+
var MICROSOFT_GRAPH_HOSTS = /* @__PURE__ */ new Set([
|
|
630
|
+
"graph.microsoft.com",
|
|
631
|
+
"graph.microsoft.us",
|
|
632
|
+
"dod-graph.microsoft.us",
|
|
633
|
+
"microsoftgraph.chinacloudapi.cn"
|
|
634
|
+
]);
|
|
635
|
+
var normalizeMicrosoftGraphBaseUrl = (value, policy) => {
|
|
636
|
+
const unsafe = allowUnsafeUrl(value, policy);
|
|
637
|
+
if (unsafe !== null) return unsafe;
|
|
638
|
+
if (!value) return void 0;
|
|
639
|
+
const parsed = parseTrustedHttpsUrl(value);
|
|
640
|
+
if (!parsed || !MICROSOFT_GRAPH_HOSTS.has(parsed.hostname.toLowerCase())) return null;
|
|
641
|
+
if (!/^\/(?:v1\.0|beta)(?:\/)?$/.test(parsed.pathname)) return null;
|
|
642
|
+
if (parsed.search) return null;
|
|
643
|
+
return parsed.toString().replace(/\/$/, "");
|
|
644
|
+
};
|
|
645
|
+
var MICROSOFT_IDENTITY_HOSTS = /* @__PURE__ */ new Set([
|
|
646
|
+
"login.microsoftonline.com",
|
|
647
|
+
"login.microsoftonline.us",
|
|
648
|
+
"login.partner.microsoftonline.cn"
|
|
649
|
+
]);
|
|
650
|
+
var normalizeMicrosoftOAuthEndpointUrl = (value, endpoint, policy) => {
|
|
651
|
+
const unsafe = allowUnsafeUrl(value, policy);
|
|
652
|
+
if (unsafe !== null) return unsafe ?? null;
|
|
653
|
+
const parsed = parseTrustedHttpsUrl(value);
|
|
654
|
+
if (!parsed || !MICROSOFT_IDENTITY_HOSTS.has(parsed.hostname.toLowerCase())) return null;
|
|
655
|
+
if (parsed.search) return null;
|
|
656
|
+
const suffix = endpoint === "authorize" ? "authorize" : "token";
|
|
657
|
+
return /^\/[^/]+\/oauth2\/v2\.0\/(?:authorize|token)$/.test(parsed.pathname) && parsed.pathname.endsWith(`/${suffix}`) ? parsed.toString() : null;
|
|
658
|
+
};
|
|
659
|
+
var validateSelectionUrls = (selection, policy) => Effect.gen(function* () {
|
|
660
|
+
const specUrl = normalizeMicrosoftGraphSpecUrl(selection.specUrl, policy);
|
|
661
|
+
if (!specUrl) {
|
|
662
|
+
return yield* new OpenApiParseError({
|
|
663
|
+
message: "Microsoft Graph specUrl must point to the trusted Microsoft Graph OpenAPI spec"
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
const baseUrl = normalizeMicrosoftGraphBaseUrl(selection.baseUrl, policy);
|
|
667
|
+
if (baseUrl === null) {
|
|
668
|
+
return yield* new OpenApiParseError({
|
|
669
|
+
message: "Microsoft Graph baseUrl must point to a supported Microsoft Graph endpoint"
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
const authorizationUrl = selection.authorizationUrl ? normalizeMicrosoftOAuthEndpointUrl(selection.authorizationUrl, "authorize", policy) : void 0;
|
|
673
|
+
if (selection.authorizationUrl && !authorizationUrl) {
|
|
674
|
+
return yield* new OpenApiParseError({
|
|
675
|
+
message: "Microsoft authorizationUrl must point to a supported Microsoft identity endpoint"
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
const tokenUrl = selection.tokenUrl ? normalizeMicrosoftOAuthEndpointUrl(selection.tokenUrl, "token", policy) : void 0;
|
|
679
|
+
if (selection.tokenUrl && !tokenUrl) {
|
|
680
|
+
return yield* new OpenApiParseError({
|
|
681
|
+
message: "Microsoft tokenUrl must point to a supported Microsoft identity endpoint"
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
const clientCredentialsTokenUrl = selection.clientCredentialsTokenUrl ? normalizeMicrosoftOAuthEndpointUrl(selection.clientCredentialsTokenUrl, "token", policy) : void 0;
|
|
685
|
+
if (selection.clientCredentialsTokenUrl && !clientCredentialsTokenUrl) {
|
|
686
|
+
return yield* new OpenApiParseError({
|
|
687
|
+
message: "Microsoft clientCredentialsTokenUrl must point to a supported Microsoft identity endpoint"
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
return {
|
|
691
|
+
...selection,
|
|
692
|
+
specUrl,
|
|
693
|
+
...baseUrl ? { baseUrl } : { baseUrl: void 0 },
|
|
694
|
+
...authorizationUrl ? { authorizationUrl } : { authorizationUrl: void 0 },
|
|
695
|
+
...tokenUrl ? { tokenUrl } : { tokenUrl: void 0 },
|
|
696
|
+
...clientCredentialsTokenUrl ? { clientCredentialsTokenUrl } : { clientCredentialsTokenUrl: void 0 }
|
|
697
|
+
};
|
|
698
|
+
});
|
|
699
|
+
var validateResolvedOAuthEndpoints = (endpoints, policy) => Effect.gen(function* () {
|
|
700
|
+
const authorizationUrl = normalizeMicrosoftOAuthEndpointUrl(
|
|
701
|
+
endpoints.authorizationUrl,
|
|
702
|
+
"authorize",
|
|
703
|
+
policy
|
|
704
|
+
);
|
|
705
|
+
const tokenUrl = normalizeMicrosoftOAuthEndpointUrl(endpoints.tokenUrl, "token", policy);
|
|
706
|
+
const clientCredentialsTokenUrl = normalizeMicrosoftOAuthEndpointUrl(
|
|
707
|
+
endpoints.clientCredentialsTokenUrl,
|
|
708
|
+
"token",
|
|
709
|
+
policy
|
|
710
|
+
);
|
|
711
|
+
if (!authorizationUrl || !tokenUrl || !clientCredentialsTokenUrl) {
|
|
712
|
+
return yield* new OpenApiParseError({
|
|
713
|
+
message: "Microsoft OAuth endpoints must point to supported Microsoft identity endpoints"
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
return { authorizationUrl, tokenUrl, clientCredentialsTokenUrl };
|
|
717
|
+
});
|
|
718
|
+
var recordValues = (value) => isRecord(value) ? Object.values(value) : [];
|
|
719
|
+
var firstOAuthFlows = (parsed) => {
|
|
720
|
+
const components = isRecord(parsed.components) ? parsed.components : {};
|
|
721
|
+
const securitySchemes = isRecord(components.securitySchemes) ? components.securitySchemes : {};
|
|
722
|
+
return recordValues(securitySchemes).filter(isRecord).filter((scheme) => scheme.type === "oauth2").flatMap((scheme) => recordValues(scheme.flows).filter(isRecord));
|
|
723
|
+
};
|
|
724
|
+
var resolveOAuthEndpoints = (parsed, overrides) => {
|
|
725
|
+
const flows = firstOAuthFlows(parsed);
|
|
726
|
+
const authorizationCode = flows.find((flow) => flow.authorizationUrl !== void 0);
|
|
727
|
+
const clientCredentials = flows.find(
|
|
728
|
+
(flow) => flow.tokenUrl !== void 0 && flow.authorizationUrl === void 0
|
|
729
|
+
);
|
|
730
|
+
const authorizationUrl = overrides.authorizationUrl ?? (isRecord(authorizationCode) ? firstString([authorizationCode.authorizationUrl]) : void 0) ?? MICROSOFT_AUTHORIZATION_URL;
|
|
731
|
+
const tokenUrl = overrides.tokenUrl ?? (isRecord(authorizationCode) ? firstString([authorizationCode.tokenUrl]) : void 0) ?? firstString(flows.map((flow) => flow.tokenUrl)) ?? MICROSOFT_TOKEN_URL;
|
|
732
|
+
const clientCredentialsTokenUrl = overrides.clientCredentialsTokenUrl ?? (isRecord(clientCredentials) ? firstString([clientCredentials.tokenUrl]) : void 0) ?? tokenUrl;
|
|
733
|
+
return { authorizationUrl, tokenUrl, clientCredentialsTokenUrl };
|
|
734
|
+
};
|
|
735
|
+
var graphPathMatchVariants = (path) => {
|
|
736
|
+
const withoutVersion = path.replace(/^\/(?:v1\.0|beta)(?=\/)/, "");
|
|
737
|
+
return withoutVersion === path ? [path, `/v1.0${path}`] : [path, withoutVersion];
|
|
738
|
+
};
|
|
739
|
+
var matchesGraphPath = (path, exactPaths, pathPrefixes) => {
|
|
740
|
+
const variants = graphPathMatchVariants(path);
|
|
741
|
+
if (variants.some((variant) => exactPaths.has(variant))) return true;
|
|
742
|
+
return variants.some(
|
|
743
|
+
(variant) => pathPrefixes.some(
|
|
744
|
+
(prefix) => variant === prefix || variant.startsWith(`${prefix}/`) || variant.startsWith(`${prefix}(`)
|
|
745
|
+
)
|
|
746
|
+
);
|
|
747
|
+
};
|
|
748
|
+
var isIdentityHealthPath = (path) => graphPathMatchVariants(path).some((variant) => variant === "/me");
|
|
749
|
+
var operationTags = (operation) => Array.isArray(operation.tags) ? operation.tags.filter((tag) => typeof tag === "string") : [];
|
|
750
|
+
var operationMatchesTagPrefix = (operation, tagPrefixes) => tagPrefixes.length > 0 && operationTags(operation).some(
|
|
751
|
+
(tag) => tagPrefixes.some((prefix) => tag === prefix || tag.startsWith(prefix))
|
|
752
|
+
);
|
|
753
|
+
var isGraphPermissionScope = (value) => value.startsWith("https://graph.microsoft.com/") || /^[A-Z][A-Za-z0-9]*(?:\.[A-Za-z0-9]+)+(?:\.All)?$/.test(value);
|
|
754
|
+
var parseMicrosoftGraphDelegatedScopes = (permissionsReference) => uniqueStrings(
|
|
755
|
+
permissionsReference.split(/\n(?=###\s+)/).flatMap((section) => {
|
|
756
|
+
const scope = section.match(/^###\s+([^\n]+)$/m)?.[1]?.trim();
|
|
757
|
+
if (!scope || !isGraphPermissionScope(scope)) return [];
|
|
758
|
+
const identifierRow = section.match(/^\|\s*Identifier\s*\|\s*([^|]*)\|\s*([^|]*)\|/m);
|
|
759
|
+
const delegatedIdentifier = identifierRow?.[2]?.trim();
|
|
760
|
+
return delegatedIdentifier && delegatedIdentifier !== "-" ? [scope] : [];
|
|
761
|
+
})
|
|
762
|
+
);
|
|
763
|
+
var collectScopeStrings = (value) => {
|
|
764
|
+
if (typeof value === "string") return isGraphPermissionScope(value) ? [value] : [];
|
|
765
|
+
if (Array.isArray(value)) return value.flatMap(collectScopeStrings);
|
|
766
|
+
if (!isRecord(value)) return [];
|
|
767
|
+
return Object.values(value).flatMap(collectScopeStrings);
|
|
768
|
+
};
|
|
769
|
+
var securityScopes = (value, options) => {
|
|
770
|
+
if (!Array.isArray(value)) return [];
|
|
771
|
+
return value.flatMap((entry) => {
|
|
772
|
+
if (!isRecord(entry)) return [];
|
|
773
|
+
return Object.entries(entry).flatMap(([scheme, scopes]) => {
|
|
774
|
+
const lowerScheme = scheme.toLowerCase();
|
|
775
|
+
if (options?.delegatedOnly && lowerScheme.includes("app")) return [];
|
|
776
|
+
if (options?.delegatedOnly && lowerScheme.includes("application")) return [];
|
|
777
|
+
return Array.isArray(scopes) ? scopes.filter((scope) => typeof scope === "string") : [];
|
|
778
|
+
});
|
|
779
|
+
});
|
|
780
|
+
};
|
|
781
|
+
var permissionScopes = (operation, options) => {
|
|
782
|
+
const xMsPermissions = isRecord(operation["x-ms-permissions"]) ? operation["x-ms-permissions"] : {};
|
|
783
|
+
const delegatedScopes = options?.delegatedOnly ? collectScopeStrings({
|
|
784
|
+
delegated: xMsPermissions.delegated,
|
|
785
|
+
leastPrivilegedDelegated: xMsPermissions.leastPrivilegedDelegated
|
|
786
|
+
}) : collectScopeStrings(xMsPermissions);
|
|
787
|
+
return uniqueStrings([...securityScopes(operation.security, options), ...delegatedScopes]);
|
|
788
|
+
};
|
|
789
|
+
var operationMatchesScope = (operation, selectedScopes) => permissionScopes(operation).some(
|
|
790
|
+
(scope) => selectedScopes.has(scope) && !PATH_SCOPE_IGNORED_SCOPES.has(scope)
|
|
791
|
+
);
|
|
792
|
+
var filterPathItem = (path, pathItem, options) => {
|
|
793
|
+
const pathMatchesSelection = matchesGraphPath(path, options.exactPaths, options.pathPrefixes);
|
|
794
|
+
const identityHealthGetOnly = !pathMatchesSelection && isIdentityHealthPath(path);
|
|
795
|
+
const kept = {};
|
|
796
|
+
let hasOperation = false;
|
|
797
|
+
for (const [key, value] of Object.entries(pathItem)) {
|
|
798
|
+
const lowerKey = key.toLowerCase();
|
|
799
|
+
if (!HTTP_METHODS.has(lowerKey)) continue;
|
|
800
|
+
if (!isRecord(value)) continue;
|
|
801
|
+
if (identityHealthGetOnly && lowerKey !== "get") continue;
|
|
802
|
+
if (pathMatchesSelection || identityHealthGetOnly || operationMatchesTagPrefix(value, options.tagPrefixes) || operationMatchesScope(value, options.selectedScopes)) {
|
|
803
|
+
kept[key] = value;
|
|
804
|
+
hasOperation = true;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
if (!hasOperation) return null;
|
|
808
|
+
for (const [key, value] of Object.entries(pathItem)) {
|
|
809
|
+
if (!HTTP_METHODS.has(key.toLowerCase())) kept[key] = value;
|
|
810
|
+
}
|
|
811
|
+
return kept;
|
|
812
|
+
};
|
|
813
|
+
var normalizedMediaType = (mediaType) => mediaType.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
814
|
+
var isBinaryStringSchema = (schema) => isRecord(schema) && (schema.type === "string" || Array.isArray(schema.type) && schema.type.includes("string")) && (schema.format === "binary" || schema.format === "byte");
|
|
815
|
+
var isSuccessStatusKey = (status) => /^2\d\d$/.test(status) || /^2xx$/i.test(status);
|
|
816
|
+
var normalizeMicrosoftGraphContentPathItem = (pathItem) => {
|
|
817
|
+
let changed = false;
|
|
818
|
+
const next = { ...pathItem };
|
|
819
|
+
for (const [key, operation] of Object.entries(pathItem)) {
|
|
820
|
+
if (!HTTP_METHODS.has(key.toLowerCase()) || !isRecord(operation)) continue;
|
|
821
|
+
const responses = isRecord(operation.responses) ? operation.responses : void 0;
|
|
822
|
+
if (!responses) continue;
|
|
823
|
+
let responsesChanged = false;
|
|
824
|
+
const nextResponses = { ...responses };
|
|
825
|
+
for (const [status, response] of Object.entries(responses)) {
|
|
826
|
+
if (!isSuccessStatusKey(status) || !isRecord(response)) continue;
|
|
827
|
+
const content = isRecord(response.content) ? response.content : void 0;
|
|
828
|
+
if (!content) continue;
|
|
829
|
+
let contentChanged = false;
|
|
830
|
+
const nextContent = { ...content };
|
|
831
|
+
for (const [mediaType, media] of Object.entries(content)) {
|
|
832
|
+
if (normalizedMediaType(mediaType) !== "application/octet-stream") continue;
|
|
833
|
+
const schema = isRecord(media) ? media.schema : void 0;
|
|
834
|
+
if (isBinaryStringSchema(schema)) continue;
|
|
835
|
+
nextContent[mediaType] = {
|
|
836
|
+
...isRecord(media) ? media : {},
|
|
837
|
+
schema: { type: "string", format: "binary" }
|
|
838
|
+
};
|
|
839
|
+
contentChanged = true;
|
|
840
|
+
}
|
|
841
|
+
if (contentChanged) {
|
|
842
|
+
nextResponses[status] = { ...response, content: nextContent };
|
|
843
|
+
responsesChanged = true;
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
if (responsesChanged) {
|
|
847
|
+
next[key] = { ...operation, responses: nextResponses };
|
|
848
|
+
changed = true;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return changed ? next : pathItem;
|
|
852
|
+
};
|
|
853
|
+
var fetchMicrosoftGraphOpenApiSpec = Effect.fn("Microsoft.fetchGraphOpenApiSpec")(
|
|
854
|
+
function* (specUrl) {
|
|
855
|
+
const client = yield* HttpClient.HttpClient;
|
|
856
|
+
const response = yield* client.execute(
|
|
857
|
+
HttpClientRequest.get(specUrl).pipe(
|
|
858
|
+
HttpClientRequest.setHeader("Accept", "application/yaml, text/yaml, */*")
|
|
859
|
+
)
|
|
860
|
+
).pipe(
|
|
861
|
+
Effect.mapError(
|
|
862
|
+
() => new OpenApiParseError({
|
|
863
|
+
message: "Failed to fetch Microsoft Graph OpenAPI document"
|
|
864
|
+
})
|
|
865
|
+
)
|
|
866
|
+
);
|
|
867
|
+
if (response.status < 200 || response.status >= 300) {
|
|
868
|
+
return yield* new OpenApiParseError({
|
|
869
|
+
message: `Failed to fetch Microsoft Graph OpenAPI document: HTTP ${response.status}`
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
return yield* response.text.pipe(
|
|
873
|
+
Effect.mapError(
|
|
874
|
+
() => new OpenApiParseError({
|
|
875
|
+
message: "Failed to read Microsoft Graph OpenAPI document body"
|
|
876
|
+
})
|
|
877
|
+
)
|
|
878
|
+
);
|
|
879
|
+
}
|
|
880
|
+
);
|
|
881
|
+
var fetchMicrosoftGraphPermissionsReference = Effect.fn(
|
|
882
|
+
"Microsoft.fetchGraphPermissionsReference"
|
|
883
|
+
)(function* () {
|
|
884
|
+
const client = yield* HttpClient.HttpClient;
|
|
885
|
+
const response = yield* client.execute(
|
|
886
|
+
HttpClientRequest.get(MICROSOFT_GRAPH_PERMISSIONS_REFERENCE_URL).pipe(
|
|
887
|
+
HttpClientRequest.setHeader("Accept", "text/markdown, text/plain, */*")
|
|
888
|
+
)
|
|
889
|
+
).pipe(
|
|
890
|
+
Effect.mapError(
|
|
891
|
+
() => new OpenApiParseError({
|
|
892
|
+
message: "Failed to fetch Microsoft Graph permissions reference"
|
|
893
|
+
})
|
|
894
|
+
)
|
|
895
|
+
);
|
|
896
|
+
if (response.status < 200 || response.status >= 300) {
|
|
897
|
+
return yield* new OpenApiParseError({
|
|
898
|
+
message: `Failed to fetch Microsoft Graph permissions reference: HTTP ${response.status}`
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
return yield* response.text.pipe(
|
|
902
|
+
Effect.mapError(
|
|
903
|
+
() => new OpenApiParseError({
|
|
904
|
+
message: "Failed to read Microsoft Graph permissions reference body"
|
|
905
|
+
})
|
|
906
|
+
)
|
|
907
|
+
);
|
|
908
|
+
});
|
|
909
|
+
var microsoftGraphKeepPathItem = (selection) => {
|
|
910
|
+
const exactPaths = new Set(selection.exactPaths);
|
|
911
|
+
const selectedScopes = new Set(
|
|
912
|
+
microsoftGraphScopesForPresetIds(selection.presetIds, selection.customScopes)
|
|
913
|
+
);
|
|
914
|
+
return (path, pathItem) => {
|
|
915
|
+
const kept = selection.coversFullGraph ? pathItem : filterPathItem(path, pathItem, {
|
|
916
|
+
exactPaths,
|
|
917
|
+
pathPrefixes: selection.pathPrefixes,
|
|
918
|
+
tagPrefixes: selection.tagPrefixes,
|
|
919
|
+
selectedScopes
|
|
920
|
+
});
|
|
921
|
+
return kept ? normalizeMicrosoftGraphContentPathItem(kept) : null;
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
var streamSelectedScopes = (structure, requestedScopes, fullGraphScopes, keepPathItem) => {
|
|
925
|
+
const collected = [
|
|
926
|
+
...MICROSOFT_GRAPH_BASE_SCOPES,
|
|
927
|
+
...fullGraphScopes,
|
|
928
|
+
...requestedScopes.filter((scope) => !REQUEST_BASE_SCOPES.has(scope))
|
|
929
|
+
];
|
|
930
|
+
for (const range of structure.pathItems) {
|
|
931
|
+
const entry = parseEntry(structure.text, range, 2);
|
|
932
|
+
if (!entry) continue;
|
|
933
|
+
const [path, rawItem] = entry;
|
|
934
|
+
if (!isRecord(rawItem)) continue;
|
|
935
|
+
const pathItem = keepPathItem ? keepPathItem(path, rawItem) : rawItem;
|
|
936
|
+
if (!pathItem) continue;
|
|
937
|
+
for (const [method, operation] of Object.entries(pathItem)) {
|
|
938
|
+
if (HTTP_METHODS.has(method.toLowerCase()) && isRecord(operation)) {
|
|
939
|
+
collected.push(...permissionScopes(operation, { delegatedOnly: true }));
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
return uniqueStrings(collected);
|
|
944
|
+
};
|
|
945
|
+
var buildMicrosoftGraphOpenApiSpec = (input, httpClientLayer, urlPolicy) => Effect.gen(function* () {
|
|
946
|
+
const selection = yield* validateSelectionUrls(normalizeSelection(input), urlPolicy);
|
|
947
|
+
const sourceText = yield* fetchMicrosoftGraphOpenApiSpec(selection.specUrl).pipe(
|
|
948
|
+
Effect.provide(httpClientLayer)
|
|
949
|
+
);
|
|
950
|
+
const structure = structuralSplit(sourceText);
|
|
951
|
+
if (!structure) {
|
|
952
|
+
return yield* new OpenApiParseError({
|
|
953
|
+
message: "Microsoft Graph OpenAPI document is not in the streamable block-YAML profile; cannot compile it in-band on Workers."
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
const headDoc = { ...parseHead(structure), components: parseSmallComponents(structure) };
|
|
957
|
+
const endpoints = yield* validateResolvedOAuthEndpoints(
|
|
958
|
+
resolveOAuthEndpoints(headDoc, selection),
|
|
959
|
+
urlPolicy
|
|
960
|
+
);
|
|
961
|
+
const permissionsReference = selection.coversFullGraph === true ? yield* fetchMicrosoftGraphPermissionsReference().pipe(Effect.provide(httpClientLayer)) : void 0;
|
|
962
|
+
const fullGraphScopes = permissionsReference ? parseMicrosoftGraphDelegatedScopes(permissionsReference) : [];
|
|
963
|
+
const keepPathItem = microsoftGraphKeepPathItem(selection);
|
|
964
|
+
const scopes = selection.coversFullGraph === true && selection.customScopes.length === 0 ? [...MICROSOFT_GRAPH_DELEGATED_DEFAULT_SCOPES] : streamSelectedScopes(
|
|
965
|
+
structure,
|
|
966
|
+
selection.coversFullGraph === true ? uniqueStrings([...MICROSOFT_GRAPH_BASE_SCOPES, ...selection.customScopes]) : selection.scopes,
|
|
967
|
+
fullGraphScopes,
|
|
968
|
+
keepPathItem
|
|
969
|
+
);
|
|
970
|
+
return {
|
|
971
|
+
...selection,
|
|
972
|
+
specText: sourceText,
|
|
973
|
+
scopes,
|
|
974
|
+
authorizationUrl: endpoints.authorizationUrl,
|
|
975
|
+
tokenUrl: endpoints.tokenUrl,
|
|
976
|
+
clientCredentialsTokenUrl: endpoints.clientCredentialsTokenUrl,
|
|
977
|
+
authenticationTemplate: microsoftOAuthTemplate(scopes, endpoints)
|
|
978
|
+
};
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
// src/providers/microsoft/spec-format-adapter.ts
|
|
982
|
+
import { Effect as Effect2 } from "effect";
|
|
983
|
+
var graphCatalogSelection = (rawUrl) => {
|
|
984
|
+
if (!rawUrl || !URL.canParse(rawUrl)) return rawUrl ? { specUrl: rawUrl } : {};
|
|
985
|
+
const parsed = new URL(rawUrl);
|
|
986
|
+
const preset = parsed.hash.startsWith("#preset=") ? decodeURIComponent(parsed.hash.slice("#preset=".length)) : "";
|
|
987
|
+
parsed.hash = "";
|
|
988
|
+
return {
|
|
989
|
+
specUrl: parsed.toString(),
|
|
990
|
+
...preset.length > 0 ? { presetIds: [preset] } : {}
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
var microsoftGraphAdapter = {
|
|
994
|
+
id: "microsoft-graph",
|
|
995
|
+
fetch: (input) => buildMicrosoftGraphOpenApiSpec(
|
|
996
|
+
graphCatalogSelection(input.urls[0]),
|
|
997
|
+
input.httpClientLayer
|
|
998
|
+
).pipe(
|
|
999
|
+
Effect2.map((graphSpec) => ({
|
|
1000
|
+
specText: graphSpec.specText,
|
|
1001
|
+
specUrl: graphSpec.specUrl,
|
|
1002
|
+
baseUrl: graphSpec.baseUrl,
|
|
1003
|
+
authenticationTemplate: graphSpec.authenticationTemplate,
|
|
1004
|
+
// Stream the full Graph source straight to persisted bindings. This is
|
|
1005
|
+
// the measured Workers contention/OOM path from the Microsoft plugin:
|
|
1006
|
+
// structural split stays serial and avoids materializing the 37MB tree.
|
|
1007
|
+
keepPathItem: microsoftGraphKeepPathItem(graphSpec),
|
|
1008
|
+
config: {
|
|
1009
|
+
microsoftGraphPresetIds: graphSpec.presetIds,
|
|
1010
|
+
microsoftGraphCustomScopes: graphSpec.customScopes,
|
|
1011
|
+
microsoftGraphScopes: graphSpec.scopes,
|
|
1012
|
+
microsoftGraphExactPaths: graphSpec.exactPaths,
|
|
1013
|
+
microsoftGraphPathPrefixes: graphSpec.pathPrefixes,
|
|
1014
|
+
microsoftGraphTagPrefixes: graphSpec.tagPrefixes,
|
|
1015
|
+
microsoftGraphCoversFullGraph: graphSpec.coversFullGraph,
|
|
1016
|
+
microsoftGraphAuthorizationUrl: graphSpec.authorizationUrl,
|
|
1017
|
+
microsoftGraphTokenUrl: graphSpec.tokenUrl,
|
|
1018
|
+
microsoftGraphClientCredentialsTokenUrl: graphSpec.clientCredentialsTokenUrl
|
|
1019
|
+
}
|
|
1020
|
+
}))
|
|
1021
|
+
)
|
|
1022
|
+
};
|
|
1023
|
+
export {
|
|
1024
|
+
MICROSOFT_AUTHORIZATION_URL,
|
|
1025
|
+
MICROSOFT_AUTH_TEMPLATE_SLUG,
|
|
1026
|
+
MICROSOFT_CLIENT_CREDENTIALS_AUTH_TEMPLATE_SLUG,
|
|
1027
|
+
MICROSOFT_GRAPH_ALL_PRESET_IDS,
|
|
1028
|
+
MICROSOFT_GRAPH_BASE_SCOPES,
|
|
1029
|
+
MICROSOFT_GRAPH_BASE_URL,
|
|
1030
|
+
MICROSOFT_GRAPH_CLIENT_CREDENTIALS_SCOPES,
|
|
1031
|
+
MICROSOFT_GRAPH_DEFAULT_PRESET_IDS,
|
|
1032
|
+
MICROSOFT_GRAPH_DEFAULT_SCOPE,
|
|
1033
|
+
MICROSOFT_GRAPH_DELEGATED_DEFAULT_SCOPES,
|
|
1034
|
+
MICROSOFT_GRAPH_OPENAPI_URL,
|
|
1035
|
+
MICROSOFT_GRAPH_PERMISSIONS_REFERENCE_URL,
|
|
1036
|
+
MICROSOFT_GRAPH_PRESET_ID,
|
|
1037
|
+
MICROSOFT_TOKEN_URL,
|
|
1038
|
+
buildMicrosoftGraphOpenApiSpec,
|
|
1039
|
+
decodeMicrosoftGraphIntegrationConfig,
|
|
1040
|
+
fetchMicrosoftGraphOpenApiSpec,
|
|
1041
|
+
fetchMicrosoftGraphPermissionsReference,
|
|
1042
|
+
microsoftCatalog,
|
|
1043
|
+
microsoftGraphAdapter,
|
|
1044
|
+
microsoftGraphExactPathsForPresetIds,
|
|
1045
|
+
microsoftGraphKeepPathItem,
|
|
1046
|
+
microsoftGraphPathPrefixesForPresetIds,
|
|
1047
|
+
microsoftGraphPreset,
|
|
1048
|
+
microsoftGraphPresetForId,
|
|
1049
|
+
microsoftGraphPresetIdsCoverFullGraph,
|
|
1050
|
+
microsoftGraphScopePresets,
|
|
1051
|
+
microsoftGraphScopesForPresetIds,
|
|
1052
|
+
microsoftGraphTagPrefixesForPresetIds,
|
|
1053
|
+
microsoftServiceSlug,
|
|
1054
|
+
parseMicrosoftGraphDelegatedScopes
|
|
1055
|
+
};
|
|
1056
|
+
//# sourceMappingURL=microsoft.js.map
|