| @@ -12,6 +12,7 @@ export interface MicrosoftGraphScopePreset { · 11 unmodified lines |
| 12 | readonly id: string; | 12 | readonly id: string; |
| 13 | readonly name: string; | 13 | readonly name: string; |
| 14 | readonly summary: string; | 14 | readonly summary: string; |
| | 15 | readonly icon?: string; |
| 15 | readonly scopes: readonly string[]; | 16 | readonly scopes: readonly string[]; |
| 16 | readonly exactPaths?: readonly string[]; | 17 | readonly exactPaths?: readonly string[]; |
| 17 | readonly pathPrefixes?: readonly string[]; | 18 | readonly pathPrefixes?: readonly string[]; |
| @@ -20,6 +21,7 @@ export interface MicrosoftGraphScopePreset { · 2 unmodified lines |
| 20 | } | 21 | } |
| 21 | | 22 | |
| 22 | const MICROSOFT_ICON = "https://www.microsoft.com/favicon.ico"; | 23 | const MICROSOFT_ICON = "https://www.microsoft.com/favicon.ico"; |
| | 24 | const svglIcon = (name: string) => `https://svgl.app/library/${name}.svg`; |
| 23 | | 25 | |
| 24 | export const MICROSOFT_GRAPH_OPENAPI_URL = | 26 | export const MICROSOFT_GRAPH_OPENAPI_URL = |
| 25 | "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml"; | 27 | "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml"; |
| @@ -46,6 +48,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 20 unmodified lines |
| 46 | id: "profile", | 48 | id: "profile", |
| 47 | name: "Profile", | 49 | name: "Profile", |
| 48 | summary: "Signed-in user profile and photo.", | 50 | summary: "Signed-in user profile and photo.", |
| | 51 | icon: svglIcon("microsoft"), |
| 49 | scopes: ["User.Read"], | 52 | scopes: ["User.Read"], |
| 50 | exactPaths: ["/me", "/me/photo", "/me/photo/$value"], | 53 | exactPaths: ["/me", "/me/photo", "/me/photo/$value"], |
| 51 | featured: true, | 54 | featured: true, |
| @@ -55,6 +58,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 3 unmodified lines |
| 55 | id: "mail", | 58 | id: "mail", |
| 56 | name: "Outlook Mail", | 59 | name: "Outlook Mail", |
| 57 | summary: "Messages, folders, attachments, and send mail.", | 60 | summary: "Messages, folders, attachments, and send mail.", |
| | 61 | icon: svglIcon("microsoft-outlook"), |
| 58 | scopes: ["Mail.ReadWrite", "Mail.Send"], | 62 | scopes: ["Mail.ReadWrite", "Mail.Send"], |
| 59 | pathPrefixes: [ | 63 | pathPrefixes: [ |
| 60 | "/me/messages", | 64 | "/me/messages", |
| @@ -71,6 +75,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 10 unmodified lines |
| 71 | id: "calendar", | 75 | id: "calendar", |
| 72 | name: "Outlook Calendar", | 76 | name: "Outlook Calendar", |
| 73 | summary: "Calendars, events, and scheduling.", | 77 | summary: "Calendars, events, and scheduling.", |
| | 78 | icon: svglIcon("microsoft-outlook"), |
| 74 | scopes: ["Calendars.ReadWrite"], | 79 | scopes: ["Calendars.ReadWrite"], |
| 75 | pathPrefixes: [ | 80 | pathPrefixes: [ |
| 76 | "/me/calendar", | 81 | "/me/calendar", |
| @@ -89,6 +94,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 12 unmodified lines |
| 89 | id: "files", | 94 | id: "files", |
| 90 | name: "OneDrive Files", | 95 | name: "OneDrive Files", |
| 91 | summary: "Drives, files, folders, sharing links, and permissions.", | 96 | summary: "Drives, files, folders, sharing links, and permissions.", |
| | 97 | icon: svglIcon("microsoft-onedrive"), |
| 92 | scopes: ["Files.ReadWrite.All"], | 98 | scopes: ["Files.ReadWrite.All"], |
| 93 | pathPrefixes: ["/me/drive", "/users/{user-id}/drive", "/drives", "/shares"], | 99 | pathPrefixes: ["/me/drive", "/users/{user-id}/drive", "/drives", "/shares"], |
| 94 | featured: true, | 100 | featured: true, |
| @@ -98,6 +104,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 3 unmodified lines |
| 98 | id: "excel", | 104 | id: "excel", |
| 99 | name: "Excel Workbooks", | 105 | name: "Excel Workbooks", |
| 100 | summary: "Workbook tables, worksheets, ranges, charts, and sessions.", | 106 | summary: "Workbook tables, worksheets, ranges, charts, and sessions.", |
| | 107 | icon: svglIcon("microsoft-excel"), |
| 101 | scopes: ["Files.ReadWrite.All"], | 108 | scopes: ["Files.ReadWrite.All"], |
| 102 | pathPrefixes: [ | 109 | pathPrefixes: [ |
| 103 | "/me/drive/items/{driveItem-id}/workbook", | 110 | "/me/drive/items/{driveItem-id}/workbook", |
| @@ -110,6 +117,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 6 unmodified lines |
| 110 | id: "contacts", | 117 | id: "contacts", |
| 111 | name: "Outlook Contacts", | 118 | name: "Outlook Contacts", |
| 112 | summary: "Contacts and contact folders.", | 119 | summary: "Contacts and contact folders.", |
| | 120 | icon: svglIcon("microsoft-outlook"), |
| 113 | scopes: ["Contacts.ReadWrite"], | 121 | scopes: ["Contacts.ReadWrite"], |
| 114 | pathPrefixes: [ | 122 | pathPrefixes: [ |
| 115 | "/me/contacts", | 123 | "/me/contacts", |
| @@ -123,6 +131,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 7 unmodified lines |
| 123 | id: "tasks", | 131 | id: "tasks", |
| 124 | name: "To Do Tasks", | 132 | name: "To Do Tasks", |
| 125 | summary: "Task lists, tasks, and checklist items.", | 133 | summary: "Task lists, tasks, and checklist items.", |
| | 134 | icon: svglIcon("microsoft-todo"), |
| 126 | scopes: ["Tasks.ReadWrite"], | 135 | scopes: ["Tasks.ReadWrite"], |
| 127 | pathPrefixes: ["/me/todo", "/users/{user-id}/todo"], | 136 | pathPrefixes: ["/me/todo", "/users/{user-id}/todo"], |
| 128 | audience: "standard-user", | 137 | audience: "standard-user", |
| @@ -131,6 +140,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 2 unmodified lines |
| 131 | id: "teams-chat", | 140 | id: "teams-chat", |
| 132 | name: "Teams Chats", | 141 | name: "Teams Chats", |
| 133 | summary: "Chats, chat messages, installed apps, and members.", | 142 | summary: "Chats, chat messages, installed apps, and members.", |
| | 143 | icon: svglIcon("microsoft-teams"), |
| 134 | scopes: ["Chat.ReadWrite"], | 144 | scopes: ["Chat.ReadWrite"], |
| 135 | pathPrefixes: ["/me/chats", "/chats"], | 145 | pathPrefixes: ["/me/chats", "/chats"], |
| 136 | audience: "standard-user", | 146 | audience: "standard-user", |
| @@ -139,6 +149,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 2 unmodified lines |
| 139 | id: "sites", | 149 | id: "sites", |
| 140 | name: "SharePoint Sites", | 150 | name: "SharePoint Sites", |
| 141 | summary: "Sites, lists, pages, and columns.", | 151 | summary: "Sites, lists, pages, and columns.", |
| | 152 | icon: svglIcon("microsoft-sharepoint"), |
| 142 | scopes: ["Sites.ReadWrite.All"], | 153 | scopes: ["Sites.ReadWrite.All"], |
| 143 | pathPrefixes: ["/sites"], | 154 | pathPrefixes: ["/sites"], |
| 144 | audience: "admin", | 155 | audience: "admin", |
| @@ -147,6 +158,7 @@ export const microsoftGraphScopePresets: readonly MicrosoftGraphScopePreset[] = · 2 unmodified lines |
| 147 | id: "users", | 158 | id: "users", |
| 148 | name: "Directory Users", | 159 | name: "Directory Users", |
| 149 | summary: "Users, managers, app role assignments, and directory metadata.", | 160 | summary: "Users, managers, app role assignments, and directory metadata.", |
| | 161 | icon: svglIcon("microsoft"), |
| 150 | scopes: ["User.ReadWrite.All", "Directory.Read.All"], | 162 | scopes: ["User.ReadWrite.All", "Directory.Read.All"], |
| 151 | pathPrefixes: ["/users"], | 163 | pathPrefixes: ["/users"], |
| 152 | audience: "admin", | 164 | audience: "admin", |