@hasna/connectors 0.8.1 → 0.8.2
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/bin/index.js
CHANGED
|
@@ -8084,7 +8084,7 @@ var PRESETS = {
|
|
|
8084
8084
|
commerce: { description: "Commerce and finance", connectors: ["stripe", "shopify", "revolut", "mercury", "pandadoc"] }
|
|
8085
8085
|
};
|
|
8086
8086
|
var program2 = new Command;
|
|
8087
|
-
program2.name("connectors").description("Install API connectors for your project").version("0.8.
|
|
8087
|
+
program2.name("connectors").description("Install API connectors for your project").version("0.8.2").enablePositionalOptions();
|
|
8088
8088
|
program2.command("interactive", { isDefault: true }).alias("i").description("Interactive connector browser").action(() => {
|
|
8089
8089
|
if (!isTTY) {
|
|
8090
8090
|
console.log(`Non-interactive environment detected. Use a subcommand:
|
package/bin/mcp.js
CHANGED
|
@@ -21552,7 +21552,7 @@ async function getConnectorCommandHelp(name, command) {
|
|
|
21552
21552
|
loadConnectorVersions();
|
|
21553
21553
|
var server = new McpServer({
|
|
21554
21554
|
name: "connectors",
|
|
21555
|
-
version: "0.8.
|
|
21555
|
+
version: "0.8.2"
|
|
21556
21556
|
});
|
|
21557
21557
|
server.registerTool("search_connectors", {
|
|
21558
21558
|
title: "Search Connectors",
|
|
@@ -21756,8 +21756,8 @@ server.registerTool("configure_auth", {
|
|
|
21756
21756
|
description: "Save an API key or token for a connector.",
|
|
21757
21757
|
inputSchema: {
|
|
21758
21758
|
name: exports_external.string(),
|
|
21759
|
-
key: exports_external.string(),
|
|
21760
|
-
field: exports_external.string().optional()
|
|
21759
|
+
key: exports_external.string().describe("The API key or token VALUE to save"),
|
|
21760
|
+
field: exports_external.string().optional().describe("Config field name to save as (e.g. apiKey, clientId, clientSecret). Defaults to auto-detected field.")
|
|
21761
21761
|
}
|
|
21762
21762
|
}, async ({ name, key, field }) => {
|
|
21763
21763
|
try {
|
|
@@ -21913,8 +21913,8 @@ server.registerTool("setup_connector", {
|
|
|
21913
21913
|
description: "Install a connector and configure auth in one step. Installs if not already present, saves API key if provided, and returns install + auth status.",
|
|
21914
21914
|
inputSchema: {
|
|
21915
21915
|
name: exports_external.string().describe("Connector name (e.g. stripe, gmail, anthropic)"),
|
|
21916
|
-
key: exports_external.string().optional().describe("API key or
|
|
21917
|
-
field: exports_external.string().optional().describe("
|
|
21916
|
+
key: exports_external.string().optional().describe("The API key or token VALUE to save"),
|
|
21917
|
+
field: exports_external.string().optional().describe("Config field name to save as (e.g. apiKey, clientId, clientSecret). Defaults to auto-detected field."),
|
|
21918
21918
|
overwrite: exports_external.boolean().optional().describe("Overwrite existing installation (default: false)")
|
|
21919
21919
|
}
|
|
21920
21920
|
}, async ({ name, key, field, overwrite }) => {
|
|
@@ -182,7 +182,7 @@ export class DriveClient {
|
|
|
182
182
|
|
|
183
183
|
async download(fileId: string): Promise<ArrayBuffer> {
|
|
184
184
|
const accessToken = await getValidAccessToken();
|
|
185
|
-
const url = DRIVE_API_BASE + '/files/' + fileId + '?alt=media';
|
|
185
|
+
const url = DRIVE_API_BASE + '/files/' + fileId + '?alt=media&supportsAllDrives=true';
|
|
186
186
|
|
|
187
187
|
const response = await fetch(url, {
|
|
188
188
|
headers: {
|
|
@@ -199,7 +199,7 @@ export class DriveClient {
|
|
|
199
199
|
|
|
200
200
|
async export(fileId: string, mimeType: string): Promise<ArrayBuffer> {
|
|
201
201
|
const accessToken = await getValidAccessToken();
|
|
202
|
-
const url = DRIVE_API_BASE + '/files/' + fileId + '/export?mimeType=' + encodeURIComponent(mimeType);
|
|
202
|
+
const url = DRIVE_API_BASE + '/files/' + fileId + '/export?mimeType=' + encodeURIComponent(mimeType) + '&supportsAllDrives=true';
|
|
203
203
|
|
|
204
204
|
const response = await fetch(url, {
|
|
205
205
|
headers: {
|
|
@@ -97,7 +97,7 @@ export class FilesApi {
|
|
|
97
97
|
'/files',
|
|
98
98
|
content,
|
|
99
99
|
metadata,
|
|
100
|
-
{ fields: DEFAULT_FILE_FIELDS },
|
|
100
|
+
{ fields: DEFAULT_FILE_FIELDS, supportsAllDrives: true },
|
|
101
101
|
mimeType
|
|
102
102
|
);
|
|
103
103
|
}
|
|
@@ -107,19 +107,19 @@ export class FilesApi {
|
|
|
107
107
|
*/
|
|
108
108
|
async create(name: string, content: string | Buffer, options?: { folderId?: string; mimeType?: string }): Promise<DriveFile> {
|
|
109
109
|
const metadata: Record<string, unknown> = { name };
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
if (options?.folderId) {
|
|
112
112
|
metadata.parents = [options.folderId];
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
const buffer = typeof content === 'string' ? Buffer.from(content) : content;
|
|
116
116
|
const mimeType = options?.mimeType || 'text/plain';
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
return this.client.upload<DriveFile>(
|
|
119
119
|
'/files',
|
|
120
120
|
buffer,
|
|
121
121
|
metadata,
|
|
122
|
-
{ fields: DEFAULT_FILE_FIELDS },
|
|
122
|
+
{ fields: DEFAULT_FILE_FIELDS, supportsAllDrives: true },
|
|
123
123
|
mimeType
|
|
124
124
|
);
|
|
125
125
|
}
|