integrate-sdk 0.9.27-dev.1 → 0.9.28-dev.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/README.md +82 -0
- package/dist/adapters/auto-routes.js +177 -8
- package/dist/adapters/base-handler.d.ts +4 -2
- package/dist/adapters/base-handler.d.ts.map +1 -1
- package/dist/adapters/base-handler.js +177 -8
- package/dist/adapters/index.js +245 -81
- package/dist/adapters/nextjs.js +177 -8
- package/dist/adapters/solid-start.js +245 -81
- package/dist/adapters/svelte-kit.js +245 -81
- package/dist/index.js +422 -109
- package/dist/oauth.js +177 -8
- package/dist/server.js +449 -138
- package/dist/src/adapters/base-handler.d.ts +4 -2
- package/dist/src/adapters/base-handler.d.ts.map +1 -1
- package/dist/src/client.d.ts +8 -0
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/integrations/dropbox.d.ts +22 -0
- package/dist/src/integrations/dropbox.d.ts.map +1 -0
- package/dist/src/integrations/granola.d.ts +14 -0
- package/dist/src/integrations/granola.d.ts.map +1 -0
- package/dist/src/integrations/integration-summary.d.ts +24 -0
- package/dist/src/integrations/integration-summary.d.ts.map +1 -0
- package/dist/src/integrations/library-metadata.d.ts +26 -0
- package/dist/src/integrations/library-metadata.d.ts.map +1 -0
- package/dist/src/integrations/mercury.d.ts +14 -0
- package/dist/src/integrations/mercury.d.ts.map +1 -0
- package/dist/src/integrations/server-client.d.ts +4 -0
- package/dist/src/integrations/server-client.d.ts.map +1 -1
- package/dist/src/integrations/types.d.ts +12 -0
- package/dist/src/integrations/types.d.ts.map +1 -1
- package/dist/src/server.d.ts +3 -0
- package/dist/src/server.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/oauth.js
CHANGED
|
@@ -27,6 +27,180 @@ var __export = (target, all) => {
|
|
|
27
27
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
28
28
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
29
29
|
|
|
30
|
+
// src/integrations/library-metadata.ts
|
|
31
|
+
function integrationLibraryPresentationFields(integration) {
|
|
32
|
+
const id = typeof integration["id"] === "string" ? integration["id"] : String(integration["id"] ?? "");
|
|
33
|
+
const fromCatalog = id ? INTEGRATION_LIBRARY_METADATA[id] : undefined;
|
|
34
|
+
const explicitDescription = integration["description"];
|
|
35
|
+
const explicitCategory = integration["category"];
|
|
36
|
+
const description = typeof explicitDescription === "string" && explicitDescription.trim().length > 0 ? explicitDescription.trim() : fromCatalog?.description;
|
|
37
|
+
const category = typeof explicitCategory === "string" && explicitCategory.trim().length > 0 ? explicitCategory.trim() : fromCatalog?.category;
|
|
38
|
+
const out = {};
|
|
39
|
+
if (description)
|
|
40
|
+
out.description = description;
|
|
41
|
+
if (category)
|
|
42
|
+
out.category = category;
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
var INTEGRATION_LIBRARY_METADATA;
|
|
46
|
+
var init_library_metadata = __esm(() => {
|
|
47
|
+
INTEGRATION_LIBRARY_METADATA = {
|
|
48
|
+
airtable: {
|
|
49
|
+
description: "Manage Airtable bases, tables, and records",
|
|
50
|
+
category: "Business"
|
|
51
|
+
},
|
|
52
|
+
calcom: {
|
|
53
|
+
description: "Manage Cal.com bookings and schedules",
|
|
54
|
+
category: "Productivity"
|
|
55
|
+
},
|
|
56
|
+
cursor: {
|
|
57
|
+
description: "Manage Cursor Cloud Agents and background tasks",
|
|
58
|
+
category: "Engineering"
|
|
59
|
+
},
|
|
60
|
+
figma: {
|
|
61
|
+
description: "Access Figma files, comments, and components",
|
|
62
|
+
category: "Engineering"
|
|
63
|
+
},
|
|
64
|
+
github: {
|
|
65
|
+
description: "Manage GitHub repos, issues, and pull requests",
|
|
66
|
+
category: "Engineering"
|
|
67
|
+
},
|
|
68
|
+
gmail: {
|
|
69
|
+
description: "Send, read, and search Gmail messages",
|
|
70
|
+
category: "Communication"
|
|
71
|
+
},
|
|
72
|
+
gcal: {
|
|
73
|
+
description: "Manage Google Calendar events and schedules",
|
|
74
|
+
category: "Productivity"
|
|
75
|
+
},
|
|
76
|
+
hubspot: {
|
|
77
|
+
description: "Manage HubSpot contacts, deals, and tickets",
|
|
78
|
+
category: "Business"
|
|
79
|
+
},
|
|
80
|
+
intercom: {
|
|
81
|
+
description: "Manage Intercom contacts and conversations",
|
|
82
|
+
category: "Business"
|
|
83
|
+
},
|
|
84
|
+
linear: {
|
|
85
|
+
description: "Manage Linear issues, projects, and cycles",
|
|
86
|
+
category: "Engineering"
|
|
87
|
+
},
|
|
88
|
+
notion: {
|
|
89
|
+
description: "Manage Notion pages and databases",
|
|
90
|
+
category: "Productivity"
|
|
91
|
+
},
|
|
92
|
+
onedrive: {
|
|
93
|
+
description: "Manage OneDrive files, folders, and sharing",
|
|
94
|
+
category: "Storage"
|
|
95
|
+
},
|
|
96
|
+
outlook: {
|
|
97
|
+
description: "Manage Outlook mail, calendars, and contacts",
|
|
98
|
+
category: "Communication"
|
|
99
|
+
},
|
|
100
|
+
polar: {
|
|
101
|
+
description: "Manage Polar products, orders, and subscriptions",
|
|
102
|
+
category: "Business"
|
|
103
|
+
},
|
|
104
|
+
ramp: {
|
|
105
|
+
description: "Manage Ramp corporate cards, bills, and spend",
|
|
106
|
+
category: "Business"
|
|
107
|
+
},
|
|
108
|
+
slack: {
|
|
109
|
+
description: "Send and manage Slack messages and channels",
|
|
110
|
+
category: "Communication"
|
|
111
|
+
},
|
|
112
|
+
stripe: {
|
|
113
|
+
description: "Manage Stripe customers, payments, and subscriptions",
|
|
114
|
+
category: "Business"
|
|
115
|
+
},
|
|
116
|
+
todoist: {
|
|
117
|
+
description: "Manage Todoist tasks, projects, and labels",
|
|
118
|
+
category: "Productivity"
|
|
119
|
+
},
|
|
120
|
+
gslides: {
|
|
121
|
+
description: "Create and update Google Slides presentations",
|
|
122
|
+
category: "Productivity"
|
|
123
|
+
},
|
|
124
|
+
gsheets: {
|
|
125
|
+
description: "Read and update Google Sheets spreadsheets",
|
|
126
|
+
category: "Productivity"
|
|
127
|
+
},
|
|
128
|
+
gdocs: {
|
|
129
|
+
description: "Create and edit Google Docs documents",
|
|
130
|
+
category: "Productivity"
|
|
131
|
+
},
|
|
132
|
+
gdrive: {
|
|
133
|
+
description: "Manage Google Drive files, folders, and sharing",
|
|
134
|
+
category: "Storage"
|
|
135
|
+
},
|
|
136
|
+
vercel: {
|
|
137
|
+
description: "Manage Vercel projects, deployments, and domains",
|
|
138
|
+
category: "Engineering"
|
|
139
|
+
},
|
|
140
|
+
whatsapp: {
|
|
141
|
+
description: "Send WhatsApp messages and templates",
|
|
142
|
+
category: "Communication"
|
|
143
|
+
},
|
|
144
|
+
youtube: {
|
|
145
|
+
description: "Search and access YouTube videos and channels",
|
|
146
|
+
category: "Communication"
|
|
147
|
+
},
|
|
148
|
+
powerpoint: {
|
|
149
|
+
description: "Manage PowerPoint presentations and sharing",
|
|
150
|
+
category: "Productivity"
|
|
151
|
+
},
|
|
152
|
+
excel: {
|
|
153
|
+
description: "Manage Excel workbooks, worksheets, and tables",
|
|
154
|
+
category: "Productivity"
|
|
155
|
+
},
|
|
156
|
+
word: {
|
|
157
|
+
description: "Manage Word documents and sharing",
|
|
158
|
+
category: "Productivity"
|
|
159
|
+
},
|
|
160
|
+
dropbox: {
|
|
161
|
+
description: "Manage Dropbox files, folders, and sharing",
|
|
162
|
+
category: "Storage"
|
|
163
|
+
},
|
|
164
|
+
granola: {
|
|
165
|
+
description: "List and read Granola meeting notes and folders",
|
|
166
|
+
category: "Productivity"
|
|
167
|
+
},
|
|
168
|
+
mercury: {
|
|
169
|
+
description: "Manage Mercury bank accounts, cards, and transactions",
|
|
170
|
+
category: "Business"
|
|
171
|
+
},
|
|
172
|
+
zendesk: {
|
|
173
|
+
description: "Manage Zendesk tickets, users, and help center content",
|
|
174
|
+
category: "Business"
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// src/integrations/integration-summary.ts
|
|
180
|
+
function toConfiguredIntegrationSummary(integration) {
|
|
181
|
+
const row = integration;
|
|
182
|
+
const pres = integrationLibraryPresentationFields(row);
|
|
183
|
+
return {
|
|
184
|
+
id: integration.id,
|
|
185
|
+
name: row.name || integration.id,
|
|
186
|
+
logoUrl: row.logoUrl,
|
|
187
|
+
tools: integration.tools,
|
|
188
|
+
hasOAuth: !!integration.oauth,
|
|
189
|
+
scopes: integration.oauth?.scopes,
|
|
190
|
+
provider: integration.oauth?.provider,
|
|
191
|
+
...pres
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function toConfiguredIntegrationWithToolMetadata(integration, toolMetadata) {
|
|
195
|
+
return {
|
|
196
|
+
...toConfiguredIntegrationSummary(integration),
|
|
197
|
+
toolMetadata
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
var init_integration_summary = __esm(() => {
|
|
201
|
+
init_library_metadata();
|
|
202
|
+
});
|
|
203
|
+
|
|
30
204
|
// src/utils/logger.ts
|
|
31
205
|
function shouldLog(level, context) {
|
|
32
206
|
return logLevelHierarchy[level] <= logLevelHierarchy[contextLogLevels[context]];
|
|
@@ -472,14 +646,8 @@ class OAuthHandler {
|
|
|
472
646
|
const integrations = this.config.integrations || [];
|
|
473
647
|
return {
|
|
474
648
|
integrations: integrations.map((integration) => ({
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
logoUrl: integration.logoUrl,
|
|
478
|
-
tools: integration.tools,
|
|
479
|
-
hasOAuth: !!integration.oauth,
|
|
480
|
-
scopes: integration.oauth?.scopes,
|
|
481
|
-
optionalScopes: integration.oauth?.optionalScopes,
|
|
482
|
-
provider: integration.oauth?.provider
|
|
649
|
+
...toConfiguredIntegrationSummary(integration),
|
|
650
|
+
optionalScopes: integration.oauth?.optionalScopes
|
|
483
651
|
}))
|
|
484
652
|
};
|
|
485
653
|
}
|
|
@@ -866,6 +1034,7 @@ class OAuthHandler {
|
|
|
866
1034
|
}
|
|
867
1035
|
var SERVER_LOG_CONTEXT = "server", logger2, MCP_SERVER_URL = "https://mcp.integrate.dev/api/v1/mcp";
|
|
868
1036
|
var init_base_handler = __esm(() => {
|
|
1037
|
+
init_integration_summary();
|
|
869
1038
|
init_email_fetcher();
|
|
870
1039
|
init_logger();
|
|
871
1040
|
logger2 = createLogger("OAuthHandler", SERVER_LOG_CONTEXT);
|