@opengeni/capabilities 0.1.1 → 0.3.0-canary.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.
@@ -1,6 +1,8 @@
1
1
  import { IntegrationProtocolError } from "./types";
2
2
 
3
- export interface OAuthProviderPreset {
3
+ export interface IntegrationDefinitionOAuth2Authentication {
4
+ readonly kind: "oauth2";
5
+ readonly provider: "google" | "microsoft";
4
6
  readonly authorizationUrl: string;
5
7
  readonly tokenUrl: string;
6
8
  readonly scopes: readonly string[];
@@ -11,32 +13,45 @@ export interface OAuthProviderPreset {
11
13
  };
12
14
  }
13
15
 
14
- export interface OpenApiProviderPreset {
16
+ export type IntegrationDefinitionSource =
17
+ | Readonly<{
18
+ kind: "google_discovery";
19
+ url: string;
20
+ }>
21
+ | Readonly<{
22
+ kind: "openapi";
23
+ url: string;
24
+ operationPathPrefixes?: readonly string[];
25
+ }>;
26
+
27
+ export interface IntegrationDefinition {
15
28
  readonly id: string;
16
29
  readonly name: string;
17
30
  readonly summary: string;
18
- readonly family: "google" | "microsoft";
19
- readonly sourceFormat: "google-discovery" | "openapi";
20
- readonly sourceUrl: string;
31
+ readonly protocol: "openapi";
32
+ readonly provider: Readonly<{
33
+ id: "google" | "microsoft";
34
+ domain: string;
35
+ }>;
36
+ readonly source: IntegrationDefinitionSource;
21
37
  readonly baseUrl: string;
22
- readonly oauth: OAuthProviderPreset;
23
- readonly pathPrefixes?: readonly string[];
24
- readonly healthOperation?: string;
25
- readonly healthArgs?: Readonly<Record<string, unknown>>;
26
- readonly features: readonly IntegrationFeatureDefinition[];
38
+ readonly authentication: IntegrationDefinitionOAuth2Authentication;
39
+ readonly healthCheck?: Readonly<{
40
+ operationKey: string;
41
+ arguments: Readonly<Record<string, unknown>>;
42
+ }>;
43
+ readonly facets: readonly IntegrationFacetDefinition[];
27
44
  }
28
45
 
29
- export interface IntegrationFeatureDefinition {
30
- readonly featureKey: string;
46
+ export interface IntegrationFacetDefinition {
47
+ readonly facetKey: string;
31
48
  readonly kind: "knowledge_source" | "inbound_trigger" | "delivery_destination" | "identity_link";
32
49
  readonly configSchema: Readonly<Record<string, unknown>>;
33
50
  readonly capabilities: Readonly<Record<string, unknown>>;
34
51
  }
35
52
 
36
- const accountIdentityFeature = (
37
- provider: "google" | "microsoft",
38
- ): IntegrationFeatureDefinition => ({
39
- featureKey: "account-identity",
53
+ const accountIdentityFacet = (provider: "google" | "microsoft"): IntegrationFacetDefinition => ({
54
+ facetKey: "account-identity",
40
55
  kind: "identity_link",
41
56
  configSchema: { type: "object", properties: {}, additionalProperties: false },
42
57
  capabilities: {
@@ -46,10 +61,10 @@ const accountIdentityFeature = (
46
61
  },
47
62
  });
48
63
 
49
- const driveKnowledgeFeature = (
64
+ const driveKnowledgeFacet = (
50
65
  provider: "google-drive" | "microsoft-onedrive",
51
- ): IntegrationFeatureDefinition => ({
52
- featureKey: "drive-content",
66
+ ): IntegrationFacetDefinition => ({
67
+ facetKey: "drive-content",
53
68
  kind: "knowledge_source",
54
69
  configSchema: {
55
70
  type: "object",
@@ -107,11 +122,11 @@ const driveKnowledgeFeature = (
107
122
  },
108
123
  });
109
124
 
110
- const mailboxFeatures = (
111
- provider: "google-gmail" | "microsoft-outlook-mail",
112
- ): readonly IntegrationFeatureDefinition[] => [
125
+ const mailboxFacets = (
126
+ provider: "microsoft-outlook-mail",
127
+ ): readonly IntegrationFacetDefinition[] => [
113
128
  {
114
- featureKey: "mail-inbox",
129
+ facetKey: "mail-inbox",
115
130
  kind: "inbound_trigger",
116
131
  configSchema: {
117
132
  type: "object",
@@ -125,11 +140,11 @@ const mailboxFeatures = (
125
140
  provider,
126
141
  connectionRequired: true,
127
142
  delivery: "poll",
128
- cursor: provider === "google-gmail" ? "history_id" : "delta_link",
143
+ cursor: "delta_link",
129
144
  },
130
145
  },
131
146
  {
132
- featureKey: "mail-delivery",
147
+ facetKey: "mail-delivery",
133
148
  kind: "delivery_destination",
134
149
  configSchema: {
135
150
  type: "object",
@@ -145,100 +160,98 @@ const mailboxFeatures = (
145
160
  delivery: "email",
146
161
  },
147
162
  },
148
- accountIdentityFeature(provider === "google-gmail" ? "google" : "microsoft"),
163
+ accountIdentityFacet("microsoft"),
149
164
  ];
150
165
 
151
166
  const googleDiscoveryUrl = (service: string, version: string): string =>
152
167
  `https://www.googleapis.com/discovery/v1/apis/${service}/${version}/rest`;
153
168
 
154
- const googleOAuth = (scopes: readonly string[]): OAuthProviderPreset => ({
169
+ const googleOAuth = (scopes: readonly string[]): IntegrationDefinitionOAuth2Authentication => ({
170
+ kind: "oauth2",
171
+ provider: "google",
155
172
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
156
173
  tokenUrl: "https://oauth2.googleapis.com/token",
157
174
  scopes: ["openid", "email", "profile", ...scopes],
158
175
  tokenPlacement: { carrier: "header", name: "Authorization", prefix: "Bearer " },
159
176
  });
160
177
 
161
- export const GOOGLE_DRIVE_PRESET: OpenApiProviderPreset = {
178
+ export const GOOGLE_DRIVE_INTEGRATION_DEFINITION: IntegrationDefinition = {
162
179
  id: "google-drive",
163
180
  name: "Google Drive",
164
181
  summary: "Files, folders, permissions, and shared drives.",
165
- family: "google",
166
- sourceFormat: "google-discovery",
167
- sourceUrl: googleDiscoveryUrl("drive", "v3"),
182
+ protocol: "openapi",
183
+ provider: { id: "google", domain: "www.googleapis.com" },
184
+ source: { kind: "google_discovery", url: googleDiscoveryUrl("drive", "v3") },
168
185
  baseUrl: "https://www.googleapis.com/drive/v3/",
169
- oauth: googleOAuth(["https://www.googleapis.com/auth/drive"]),
170
- healthOperation: "drive.about.get",
171
- healthArgs: { query: { fields: "user" } },
172
- features: [driveKnowledgeFeature("google-drive"), accountIdentityFeature("google")],
173
- };
174
-
175
- export const GOOGLE_GMAIL_PRESET: OpenApiProviderPreset = {
176
- id: "google-gmail",
177
- name: "Gmail",
178
- summary: "Messages, threads, labels, drafts, and sending mail.",
179
- family: "google",
180
- sourceFormat: "google-discovery",
181
- sourceUrl: googleDiscoveryUrl("gmail", "v1"),
182
- baseUrl: "https://gmail.googleapis.com/",
183
- oauth: googleOAuth(["https://mail.google.com/"]),
184
- healthOperation: "gmail.users.labels.list",
185
- healthArgs: { path: { userId: "me" } },
186
- features: mailboxFeatures("google-gmail"),
186
+ authentication: googleOAuth(["https://www.googleapis.com/auth/drive"]),
187
+ healthCheck: {
188
+ operationKey: "drive.about.get",
189
+ arguments: { query: { fields: "user" } },
190
+ },
191
+ facets: [driveKnowledgeFacet("google-drive"), accountIdentityFacet("google")],
187
192
  };
188
193
 
189
194
  export const MICROSOFT_GRAPH_OPENAPI_URL =
190
195
  "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/openapi.yaml";
191
196
  export const MICROSOFT_GRAPH_BASE_URL = "https://graph.microsoft.com/v1.0";
192
197
 
193
- const microsoftOAuth = (scopes: readonly string[]): OAuthProviderPreset => ({
198
+ const microsoftOAuth = (scopes: readonly string[]): IntegrationDefinitionOAuth2Authentication => ({
199
+ kind: "oauth2",
200
+ provider: "microsoft",
194
201
  authorizationUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
195
202
  tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
196
203
  scopes: ["offline_access", "User.Read", ...scopes],
197
204
  tokenPlacement: { carrier: "header", name: "Authorization", prefix: "Bearer " },
198
205
  });
199
206
 
200
- export const MICROSOFT_OUTLOOK_MAIL_PRESET: OpenApiProviderPreset = {
207
+ export const MICROSOFT_OUTLOOK_MAIL_INTEGRATION_DEFINITION: IntegrationDefinition = {
201
208
  id: "microsoft-outlook-mail",
202
209
  name: "Outlook Mail",
203
210
  summary: "Messages, folders, attachments, settings, and sending mail.",
204
- family: "microsoft",
205
- sourceFormat: "openapi",
206
- sourceUrl: MICROSOFT_GRAPH_OPENAPI_URL,
211
+ protocol: "openapi",
212
+ provider: { id: "microsoft", domain: "graph.microsoft.com" },
213
+ source: {
214
+ kind: "openapi",
215
+ url: MICROSOFT_GRAPH_OPENAPI_URL,
216
+ operationPathPrefixes: [
217
+ "/me/messages",
218
+ "/me/mailFolders",
219
+ "/me/sendMail",
220
+ "/me/getMailTips",
221
+ "/me/inferenceClassification",
222
+ "/me/mailboxSettings",
223
+ "/me/outlook",
224
+ ],
225
+ },
207
226
  baseUrl: MICROSOFT_GRAPH_BASE_URL,
208
- oauth: microsoftOAuth(["Mail.ReadWrite", "Mail.Send", "MailboxSettings.ReadWrite"]),
209
- pathPrefixes: [
210
- "/me/messages",
211
- "/me/mailFolders",
212
- "/me/sendMail",
213
- "/me/getMailTips",
214
- "/me/inferenceClassification",
215
- "/me/mailboxSettings",
216
- "/me/outlook",
217
- ],
218
- features: mailboxFeatures("microsoft-outlook-mail"),
227
+ authentication: microsoftOAuth(["Mail.ReadWrite", "Mail.Send", "MailboxSettings.ReadWrite"]),
228
+ facets: mailboxFacets("microsoft-outlook-mail"),
219
229
  };
220
230
 
221
- export const MICROSOFT_OUTLOOK_CALENDAR_PRESET: OpenApiProviderPreset = {
231
+ export const MICROSOFT_OUTLOOK_CALENDAR_INTEGRATION_DEFINITION: IntegrationDefinition = {
222
232
  id: "microsoft-outlook-calendar",
223
233
  name: "Outlook Calendar",
224
234
  summary: "Calendars, events, availability, and scheduling.",
225
- family: "microsoft",
226
- sourceFormat: "openapi",
227
- sourceUrl: MICROSOFT_GRAPH_OPENAPI_URL,
235
+ protocol: "openapi",
236
+ provider: { id: "microsoft", domain: "graph.microsoft.com" },
237
+ source: {
238
+ kind: "openapi",
239
+ url: MICROSOFT_GRAPH_OPENAPI_URL,
240
+ operationPathPrefixes: [
241
+ "/me/calendar",
242
+ "/me/calendars",
243
+ "/me/calendarGroups",
244
+ "/me/calendarView",
245
+ "/me/events",
246
+ "/me/findMeetingTimes",
247
+ "/me/reminderView",
248
+ ],
249
+ },
228
250
  baseUrl: MICROSOFT_GRAPH_BASE_URL,
229
- oauth: microsoftOAuth(["Calendars.ReadWrite"]),
230
- pathPrefixes: [
231
- "/me/calendar",
232
- "/me/calendars",
233
- "/me/calendarGroups",
234
- "/me/calendarView",
235
- "/me/events",
236
- "/me/findMeetingTimes",
237
- "/me/reminderView",
238
- ],
239
- features: [
251
+ authentication: microsoftOAuth(["Calendars.ReadWrite"]),
252
+ facets: [
240
253
  {
241
- featureKey: "calendar-events",
254
+ facetKey: "calendar-events",
242
255
  kind: "inbound_trigger",
243
256
  configSchema: {
244
257
  type: "object",
@@ -256,7 +269,7 @@ export const MICROSOFT_OUTLOOK_CALENDAR_PRESET: OpenApiProviderPreset = {
256
269
  },
257
270
  },
258
271
  {
259
- featureKey: "calendar-delivery",
272
+ facetKey: "calendar-delivery",
260
273
  kind: "delivery_destination",
261
274
  configSchema: {
262
275
  type: "object",
@@ -271,82 +284,90 @@ export const MICROSOFT_OUTLOOK_CALENDAR_PRESET: OpenApiProviderPreset = {
271
284
  delivery: "calendar_event",
272
285
  },
273
286
  },
274
- accountIdentityFeature("microsoft"),
287
+ accountIdentityFacet("microsoft"),
275
288
  ],
276
289
  };
277
290
 
278
- export const MICROSOFT_OUTLOOK_CONTACTS_PRESET: OpenApiProviderPreset = {
291
+ export const MICROSOFT_OUTLOOK_CONTACTS_INTEGRATION_DEFINITION: IntegrationDefinition = {
279
292
  id: "microsoft-outlook-contacts",
280
293
  name: "Outlook Contacts",
281
294
  summary: "Contacts, contact folders, and people suggestions.",
282
- family: "microsoft",
283
- sourceFormat: "openapi",
284
- sourceUrl: MICROSOFT_GRAPH_OPENAPI_URL,
295
+ protocol: "openapi",
296
+ provider: { id: "microsoft", domain: "graph.microsoft.com" },
297
+ source: {
298
+ kind: "openapi",
299
+ url: MICROSOFT_GRAPH_OPENAPI_URL,
300
+ operationPathPrefixes: ["/me/contacts", "/me/contactFolders", "/me/people"],
301
+ },
285
302
  baseUrl: MICROSOFT_GRAPH_BASE_URL,
286
- oauth: microsoftOAuth(["Contacts.ReadWrite", "People.Read.All"]),
287
- pathPrefixes: ["/me/contacts", "/me/contactFolders", "/me/people"],
288
- features: [accountIdentityFeature("microsoft")],
303
+ authentication: microsoftOAuth(["Contacts.ReadWrite", "People.Read.All"]),
304
+ facets: [accountIdentityFacet("microsoft")],
289
305
  };
290
306
 
291
- export const MICROSOFT_ONEDRIVE_PRESET: OpenApiProviderPreset = {
307
+ export const MICROSOFT_ONEDRIVE_INTEGRATION_DEFINITION: IntegrationDefinition = {
292
308
  id: "microsoft-onedrive",
293
309
  name: "OneDrive",
294
310
  summary: "Drives, files, folders, sharing links, and permissions.",
295
- family: "microsoft",
296
- sourceFormat: "openapi",
297
- sourceUrl: MICROSOFT_GRAPH_OPENAPI_URL,
311
+ protocol: "openapi",
312
+ provider: { id: "microsoft", domain: "graph.microsoft.com" },
313
+ source: {
314
+ kind: "openapi",
315
+ url: MICROSOFT_GRAPH_OPENAPI_URL,
316
+ operationPathPrefixes: ["/me/drive", "/me/drives", "/me/followedSites", "/drives", "/shares"],
317
+ },
298
318
  baseUrl: MICROSOFT_GRAPH_BASE_URL,
299
- oauth: microsoftOAuth(["Files.ReadWrite.All", "Sites.ReadWrite.All"]),
300
- pathPrefixes: ["/me/drive", "/me/drives", "/me/followedSites", "/drives", "/shares"],
301
- features: [driveKnowledgeFeature("microsoft-onedrive"), accountIdentityFeature("microsoft")],
319
+ authentication: microsoftOAuth(["Files.ReadWrite.All", "Sites.ReadWrite.All"]),
320
+ facets: [driveKnowledgeFacet("microsoft-onedrive"), accountIdentityFacet("microsoft")],
302
321
  };
303
322
 
304
- export const CORE_PROVIDER_PRESETS: readonly OpenApiProviderPreset[] = [
305
- GOOGLE_DRIVE_PRESET,
306
- GOOGLE_GMAIL_PRESET,
307
- MICROSOFT_OUTLOOK_MAIL_PRESET,
308
- MICROSOFT_OUTLOOK_CALENDAR_PRESET,
309
- MICROSOFT_OUTLOOK_CONTACTS_PRESET,
310
- MICROSOFT_ONEDRIVE_PRESET,
323
+ export const CORE_INTEGRATION_DEFINITIONS: readonly IntegrationDefinition[] = [
324
+ GOOGLE_DRIVE_INTEGRATION_DEFINITION,
325
+ MICROSOFT_OUTLOOK_MAIL_INTEGRATION_DEFINITION,
326
+ MICROSOFT_OUTLOOK_CALENDAR_INTEGRATION_DEFINITION,
327
+ MICROSOFT_OUTLOOK_CONTACTS_INTEGRATION_DEFINITION,
328
+ MICROSOFT_ONEDRIVE_INTEGRATION_DEFINITION,
311
329
  ];
312
330
 
313
- export function providerPresetById(id: string): OpenApiProviderPreset | undefined {
314
- return CORE_PROVIDER_PRESETS.find((preset) => preset.id === id);
331
+ export function integrationDefinitionById(id: string): IntegrationDefinition | undefined {
332
+ return CORE_INTEGRATION_DEFINITIONS.find((definition) => definition.id === id);
315
333
  }
316
334
 
317
- export function providerDomainForPreset(preset: OpenApiProviderPreset): string {
318
- return new URL(preset.baseUrl).hostname.toLowerCase();
335
+ export function integrationDefinitionProviderDomain(definition: IntegrationDefinition): string {
336
+ return definition.provider.domain;
319
337
  }
320
338
 
321
- export function integrationFeaturesForPreset(
322
- presetId: string | null | undefined,
323
- ): readonly IntegrationFeatureDefinition[] {
324
- return presetId ? (providerPresetById(presetId)?.features ?? []) : [];
339
+ export function integrationFacetDefinitions(
340
+ definitionId: string | null | undefined,
341
+ ): readonly IntegrationFacetDefinition[] {
342
+ return definitionId ? (integrationDefinitionById(definitionId)?.facets ?? []) : [];
325
343
  }
326
344
 
327
- export function filterOpenApiDocumentForPreset(
345
+ export function filterOpenApiDocumentForDefinition(
328
346
  document: Record<string, unknown>,
329
- preset: OpenApiProviderPreset,
347
+ definition: IntegrationDefinition,
330
348
  ): Record<string, unknown> {
331
- if (!preset.pathPrefixes?.length) return document;
349
+ if (definition.source.kind !== "openapi" || !definition.source.operationPathPrefixes?.length) {
350
+ return document;
351
+ }
352
+ const operationPathPrefixes = definition.source.operationPathPrefixes;
332
353
  if (!isRecord(document.paths)) {
333
354
  throw new IntegrationProtocolError("openapi_paths", "OpenAPI document has no paths object");
334
355
  }
335
356
  const paths = Object.fromEntries(
336
357
  Object.entries(document.paths).filter(([path]) =>
337
- preset.pathPrefixes!.some((prefix) => path === prefix || path.startsWith(`${prefix}/`)),
358
+ operationPathPrefixes.some((prefix) => path === prefix || path.startsWith(`${prefix}/`)),
338
359
  ),
339
360
  );
340
361
  if (Object.keys(paths).length === 0) {
341
362
  throw new IntegrationProtocolError(
342
- "provider_preset_empty",
343
- `${preset.name} did not match any operations in the supplied OpenAPI document`,
363
+ "integration_definition_empty",
364
+ `${definition.name} did not match any operations in the supplied OpenAPI document`,
344
365
  );
345
366
  }
346
367
  return {
347
368
  ...document,
348
369
  paths,
349
- ...(preset.baseUrl ? { servers: [{ url: preset.baseUrl }] } : {}),
370
+ servers: [{ url: definition.baseUrl }],
350
371
  };
351
372
  }
352
373
 
@@ -442,23 +463,23 @@ function collectGoogleMethods(
442
463
  const path = stringValue(rawMethod.path);
443
464
  const httpMethod = stringValue(rawMethod.httpMethod)?.toLowerCase();
444
465
  if (!path || !httpMethod) continue;
445
- const parameters = Object.entries(
446
- isRecord(rawMethod.parameters) ? rawMethod.parameters : {},
447
- ).flatMap(([name, rawParameter]): Record<string, unknown>[] => {
448
- if (!isRecord(rawParameter)) return [];
449
- const location = rawParameter.location === "path" ? "path" : "query";
450
- return [
451
- {
452
- name,
453
- in: location,
454
- required: location === "path" || rawParameter.required === true,
455
- ...(stringValue(rawParameter.description)
456
- ? { description: stringValue(rawParameter.description) }
457
- : {}),
458
- schema: convertGoogleSchema(rawParameter),
459
- },
460
- ];
461
- });
466
+ const parameters = Object.entries(isRecord(rawMethod.parameters) ? rawMethod.parameters : {})
467
+ .sort(([left], [right]) => left.localeCompare(right))
468
+ .flatMap(([name, rawParameter]): Record<string, unknown>[] => {
469
+ if (!isRecord(rawParameter)) return [];
470
+ const location = rawParameter.location === "path" ? "path" : "query";
471
+ return [
472
+ {
473
+ name,
474
+ in: location,
475
+ required: location === "path" || rawParameter.required === true,
476
+ ...(stringValue(rawParameter.description)
477
+ ? { description: stringValue(rawParameter.description) }
478
+ : {}),
479
+ schema: convertGoogleSchema(rawParameter),
480
+ },
481
+ ];
482
+ });
462
483
  const requestRef = isRecord(rawMethod.request)
463
484
  ? stringValue(rawMethod.request.$ref)
464
485
  : undefined;
@@ -467,7 +488,10 @@ function collectGoogleMethods(
467
488
  : undefined;
468
489
  const operation: Record<string, unknown> = {
469
490
  operationId: stringValue(rawMethod.id) ?? fallbackId,
470
- summary: stringValue(rawMethod.description) ?? stringValue(rawMethod.id) ?? fallbackId,
491
+ // Discovery descriptions are often full documentation paragraphs. Keep
492
+ // them as descriptions and use the stable method identity for the short
493
+ // OpenGeni tool display name.
494
+ summary: stringValue(rawMethod.id) ?? fallbackId,
471
495
  description: stringValue(rawMethod.description),
472
496
  parameters,
473
497
  responses: {
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Reviewed consent copy for the core API integration definitions.
3
+ *
4
+ * Presentation only: nothing here grants a scope, selects a connection, or
5
+ * replaces server-side authorization. The copy used to live hardcoded in the
6
+ * web bundle (`REVIEWED_INTEGRATION_EXPERIENCES`); it is served with the
7
+ * definition now so polishing a consent screen is a data change, not a
8
+ * frontend release. The web keeps its generic fallback for any definition or
9
+ * field missing here. Gmail's reviewed presentation lives on its catalog row
10
+ * instead (`data/catalog/curated.json`): Gmail is a Connector, not one of
11
+ * these API integration definitions.
12
+ *
13
+ * MCP connectors carry the same shape on their curated catalog row
14
+ * (`presentation` in `data/catalog/curated.json` -> importer ->
15
+ * `capability_catalog_items.metadata.presentation`).
16
+ */
17
+
18
+ export type IntegrationPresentationIcon = "calendar" | "cloud" | "contacts" | "files" | "mail";
19
+
20
+ export type IntegrationPresentationCopy = {
21
+ readonly providerName?: string;
22
+ readonly icon?: IntegrationPresentationIcon;
23
+ readonly introduction?: string;
24
+ readonly capabilities?: readonly { readonly title: string; readonly description: string }[];
25
+ readonly permissionSummary?: string;
26
+ readonly scopeLabels?: Readonly<
27
+ Record<string, { readonly label: string; readonly description: string }>
28
+ >;
29
+ };
30
+
31
+ export const INTEGRATION_DEFINITION_PRESENTATIONS: Readonly<
32
+ Record<string, IntegrationPresentationCopy>
33
+ > = {
34
+ "google-drive": {
35
+ providerName: "Google",
36
+ icon: "files",
37
+ introduction: "Let agents work with files in the Google Drive account you choose.",
38
+ capabilities: [
39
+ {
40
+ title: "Find files and folders",
41
+ description: "Browse and search content in My Drive and shared drives.",
42
+ },
43
+ {
44
+ title: "Create and update content",
45
+ description: "Work with files and folders through the reviewed Drive tools.",
46
+ },
47
+ {
48
+ title: "Manage sharing",
49
+ description: "Review and update links, permissions, and shared-drive content.",
50
+ },
51
+ ],
52
+ permissionSummary:
53
+ "Google asks for access to the Drive account you approve, including files shared with that account.",
54
+ scopeLabels: {
55
+ "https://www.googleapis.com/auth/drive": {
56
+ label: "Work with Google Drive files",
57
+ description: "See, create, edit, organize, and share files available to this account.",
58
+ },
59
+ },
60
+ },
61
+ "microsoft-outlook-mail": {
62
+ providerName: "Microsoft",
63
+ icon: "mail",
64
+ introduction: "Let agents work with mail in the Microsoft account you choose.",
65
+ capabilities: [
66
+ {
67
+ title: "Find and understand mail",
68
+ description: "Search messages, folders, and attachments for useful context.",
69
+ },
70
+ {
71
+ title: "Draft and send messages",
72
+ description: "Prepare, update, and send mail through the reviewed Outlook tools.",
73
+ },
74
+ {
75
+ title: "Manage mailbox settings",
76
+ description: "Work with supported folders, classifications, and mailbox preferences.",
77
+ },
78
+ ],
79
+ permissionSummary:
80
+ "Microsoft asks for mail and mailbox-setting access for the account you approve.",
81
+ scopeLabels: {
82
+ "Mail.ReadWrite": {
83
+ label: "Read and update mail",
84
+ description: "Work with messages, folders, and attachments in this mailbox.",
85
+ },
86
+ "Mail.Send": {
87
+ label: "Send mail",
88
+ description: "Send messages as the connected Microsoft account.",
89
+ },
90
+ "MailboxSettings.ReadWrite": {
91
+ label: "Manage mailbox settings",
92
+ description: "Read and update supported Outlook mailbox preferences.",
93
+ },
94
+ },
95
+ },
96
+ "microsoft-outlook-calendar": {
97
+ providerName: "Microsoft",
98
+ icon: "calendar",
99
+ introduction: "Let agents help coordinate the calendars in your Microsoft account.",
100
+ capabilities: [
101
+ {
102
+ title: "Understand your schedule",
103
+ description: "Review calendars, events, availability, and reminders.",
104
+ },
105
+ {
106
+ title: "Plan meetings",
107
+ description: "Find suitable times and coordinate calendar activity.",
108
+ },
109
+ {
110
+ title: "Manage events",
111
+ description: "Create and update events through the reviewed calendar tools.",
112
+ },
113
+ ],
114
+ permissionSummary:
115
+ "Microsoft asks for permission to view and manage calendars for the account you approve.",
116
+ scopeLabels: {
117
+ "Calendars.ReadWrite": {
118
+ label: "View and manage calendars",
119
+ description: "Read, create, update, and organize calendar events.",
120
+ },
121
+ },
122
+ },
123
+ "microsoft-outlook-contacts": {
124
+ providerName: "Microsoft",
125
+ icon: "contacts",
126
+ introduction: "Let agents work with contacts in your Microsoft account.",
127
+ capabilities: [
128
+ {
129
+ title: "Find people",
130
+ description: "Look up contacts and relevant people suggestions.",
131
+ },
132
+ {
133
+ title: "Organize contacts",
134
+ description: "Work with contacts and contact folders.",
135
+ },
136
+ {
137
+ title: "Keep details current",
138
+ description: "Create or update contact information through reviewed tools.",
139
+ },
140
+ ],
141
+ permissionSummary:
142
+ "Microsoft asks for contact access and people suggestions for the account you approve.",
143
+ scopeLabels: {
144
+ "Contacts.ReadWrite": {
145
+ label: "View and manage contacts",
146
+ description: "Read, create, update, and organize contacts and contact folders.",
147
+ },
148
+ "People.Read.All": {
149
+ label: "Find relevant people",
150
+ description: "Use people suggestions available to the connected account.",
151
+ },
152
+ },
153
+ },
154
+ "microsoft-onedrive": {
155
+ providerName: "Microsoft",
156
+ icon: "cloud",
157
+ introduction: "Let agents work with files in the Microsoft account you choose.",
158
+ capabilities: [
159
+ {
160
+ title: "Find files and folders",
161
+ description: "Browse drives, folders, shared items, and sites available to the account.",
162
+ },
163
+ {
164
+ title: "Create and update content",
165
+ description: "Work with OneDrive and SharePoint files through reviewed tools.",
166
+ },
167
+ {
168
+ title: "Manage sharing",
169
+ description: "Review and update sharing links and permissions.",
170
+ },
171
+ ],
172
+ permissionSummary:
173
+ "Microsoft asks for file and site access anywhere the connected account already has access.",
174
+ scopeLabels: {
175
+ "Files.ReadWrite.All": {
176
+ label: "Work with accessible files",
177
+ description: "Read, create, update, and organize files available to this account.",
178
+ },
179
+ "Sites.ReadWrite.All": {
180
+ label: "Work with accessible sites",
181
+ description: "Read and update files in SharePoint sites available to this account.",
182
+ },
183
+ },
184
+ },
185
+ };