@squadbase/vite-server 0.1.3-dev.2 → 0.1.3-dev.4
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/dist/cli/index.js +922 -904
- package/dist/connectors/hubspot-oauth.js +1 -1
- package/dist/connectors/hubspot.js +3 -12
- package/dist/connectors/stripe-api-key.d.ts +5 -0
- package/dist/connectors/stripe-api-key.js +526 -0
- package/dist/index.js +922 -904
- package/dist/main.js +922 -904
- package/dist/vite-plugin.js +922 -904
- package/package.json +6 -2
package/dist/vite-plugin.js
CHANGED
|
@@ -72016,7 +72016,7 @@ var tools17 = { request: requestTool8 };
|
|
|
72016
72016
|
var hubspotOauthConnector = new ConnectorPlugin({
|
|
72017
72017
|
slug: "hubspot",
|
|
72018
72018
|
authType: AUTH_TYPES.OAUTH,
|
|
72019
|
-
name: "HubSpot
|
|
72019
|
+
name: "HubSpot",
|
|
72020
72020
|
description: "Connect to HubSpot CRM for contacts, deals, companies, and marketing data using OAuth.",
|
|
72021
72021
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5UcSkKkzhUMA4RsM45ynuo/43b967e36915ca0fc5d277684b204320/hubspot.svg",
|
|
72022
72022
|
parameters: parameters17,
|
|
@@ -72449,11 +72449,303 @@ const data = await res.json();
|
|
|
72449
72449
|
}
|
|
72450
72450
|
});
|
|
72451
72451
|
|
|
72452
|
-
// ../connectors/src/connectors/
|
|
72452
|
+
// ../connectors/src/connectors/stripe-api-key/tools/request.ts
|
|
72453
72453
|
import { z as z27 } from "zod";
|
|
72454
72454
|
|
|
72455
|
-
// ../connectors/src/connectors/
|
|
72455
|
+
// ../connectors/src/connectors/stripe-api-key/parameters.ts
|
|
72456
72456
|
var parameters19 = {
|
|
72457
|
+
apiKey: new ParameterDefinition({
|
|
72458
|
+
slug: "api-key",
|
|
72459
|
+
name: "Stripe API Key",
|
|
72460
|
+
description: "Your Stripe Secret API Key (sk_live_... / sk_test_...) or Restricted API Key (rk_live_... / rk_test_...).",
|
|
72461
|
+
envVarBaseKey: "STRIPE_API_KEY",
|
|
72462
|
+
type: "text",
|
|
72463
|
+
secret: true,
|
|
72464
|
+
required: true
|
|
72465
|
+
})
|
|
72466
|
+
};
|
|
72467
|
+
|
|
72468
|
+
// ../connectors/src/connectors/stripe-api-key/tools/request.ts
|
|
72469
|
+
var BASE_URL12 = "https://api.stripe.com";
|
|
72470
|
+
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
72471
|
+
var inputSchema27 = z27.object({
|
|
72472
|
+
toolUseIntent: z27.string().optional().describe(
|
|
72473
|
+
"Brief description of what you intend to accomplish with this tool call"
|
|
72474
|
+
),
|
|
72475
|
+
connectionId: z27.string().describe("ID of the Stripe API Key connection to use"),
|
|
72476
|
+
method: z27.enum(["GET", "POST", "DELETE"]).describe(
|
|
72477
|
+
"HTTP method. GET for reading resources, POST for creating or updating, DELETE for removing."
|
|
72478
|
+
),
|
|
72479
|
+
path: z27.string().describe(
|
|
72480
|
+
"API path appended to https://api.stripe.com (e.g., '/v1/charges', '/v1/customers', '/v1/invoices')"
|
|
72481
|
+
),
|
|
72482
|
+
queryParams: z27.record(z27.string(), z27.string()).optional().describe("Query parameters to append to the URL"),
|
|
72483
|
+
body: z27.record(z27.string(), z27.unknown()).optional().describe(
|
|
72484
|
+
"Request body for POST requests. Stripe uses form-encoded bodies \u2014 pass a flat key-value object and it will be encoded automatically."
|
|
72485
|
+
)
|
|
72486
|
+
});
|
|
72487
|
+
var outputSchema27 = z27.discriminatedUnion("success", [
|
|
72488
|
+
z27.object({
|
|
72489
|
+
success: z27.literal(true),
|
|
72490
|
+
status: z27.number(),
|
|
72491
|
+
data: z27.record(z27.string(), z27.unknown())
|
|
72492
|
+
}),
|
|
72493
|
+
z27.object({
|
|
72494
|
+
success: z27.literal(false),
|
|
72495
|
+
error: z27.string()
|
|
72496
|
+
})
|
|
72497
|
+
]);
|
|
72498
|
+
var requestTool10 = new ConnectorTool({
|
|
72499
|
+
name: "request",
|
|
72500
|
+
description: `Send authenticated requests to the Stripe API.
|
|
72501
|
+
Authentication is handled automatically using the configured API Key (Bearer token).
|
|
72502
|
+
Use this tool for all Stripe API interactions: querying charges, customers, invoices, subscriptions, products, prices, payment intents, balances, and more.`,
|
|
72503
|
+
inputSchema: inputSchema27,
|
|
72504
|
+
outputSchema: outputSchema27,
|
|
72505
|
+
async execute({ connectionId, method, path: path4, queryParams, body }, connections) {
|
|
72506
|
+
const connection = connections.find((c6) => c6.id === connectionId);
|
|
72507
|
+
if (!connection) {
|
|
72508
|
+
return {
|
|
72509
|
+
success: false,
|
|
72510
|
+
error: `Connection ${connectionId} not found`
|
|
72511
|
+
};
|
|
72512
|
+
}
|
|
72513
|
+
console.log(
|
|
72514
|
+
`[connector-request] stripe-api-key/${connection.name}: ${method} ${path4}`
|
|
72515
|
+
);
|
|
72516
|
+
try {
|
|
72517
|
+
const apiKey = parameters19.apiKey.getValue(connection);
|
|
72518
|
+
let url = `${BASE_URL12}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
72519
|
+
if (queryParams) {
|
|
72520
|
+
const searchParams = new URLSearchParams(queryParams);
|
|
72521
|
+
url += `?${searchParams.toString()}`;
|
|
72522
|
+
}
|
|
72523
|
+
const controller = new AbortController();
|
|
72524
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS17);
|
|
72525
|
+
try {
|
|
72526
|
+
const headers = {
|
|
72527
|
+
Authorization: `Bearer ${apiKey}`
|
|
72528
|
+
};
|
|
72529
|
+
let requestBody;
|
|
72530
|
+
if (body) {
|
|
72531
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
72532
|
+
requestBody = new URLSearchParams(
|
|
72533
|
+
Object.entries(body).map(([k6, v7]) => [k6, String(v7)])
|
|
72534
|
+
).toString();
|
|
72535
|
+
}
|
|
72536
|
+
const response = await fetch(url, {
|
|
72537
|
+
method,
|
|
72538
|
+
headers,
|
|
72539
|
+
body: requestBody,
|
|
72540
|
+
signal: controller.signal
|
|
72541
|
+
});
|
|
72542
|
+
const data = await response.json();
|
|
72543
|
+
if (!response.ok) {
|
|
72544
|
+
const errorObj = data?.error;
|
|
72545
|
+
const errorMessage = typeof errorObj === "object" && errorObj !== null && "message" in errorObj ? String(errorObj.message) : typeof data?.message === "string" ? data.message : `HTTP ${response.status} ${response.statusText}`;
|
|
72546
|
+
return { success: false, error: errorMessage };
|
|
72547
|
+
}
|
|
72548
|
+
return { success: true, status: response.status, data };
|
|
72549
|
+
} finally {
|
|
72550
|
+
clearTimeout(timeout);
|
|
72551
|
+
}
|
|
72552
|
+
} catch (err) {
|
|
72553
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
72554
|
+
return { success: false, error: msg };
|
|
72555
|
+
}
|
|
72556
|
+
}
|
|
72557
|
+
});
|
|
72558
|
+
|
|
72559
|
+
// ../connectors/src/connectors/stripe-api-key/setup.ts
|
|
72560
|
+
var requestToolName4 = `stripe-api-key_${requestTool10.name}`;
|
|
72561
|
+
var stripeApiKeyOnboarding = new ConnectorOnboarding({
|
|
72562
|
+
connectionSetupInstructions: {
|
|
72563
|
+
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Stripe\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
72564
|
+
|
|
72565
|
+
1. \`${requestToolName4}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B:
|
|
72566
|
+
- \`method\`: \`"GET"\`
|
|
72567
|
+
- \`path\`: \`"/v1/balance"\`
|
|
72568
|
+
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306BAPI\u30AD\u30FC\u306E\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B\uFF08Secret API Key\u307E\u305F\u306FRestricted API Key\u304C\u6B63\u3057\u304F\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u304B\uFF09
|
|
72569
|
+
3. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3059:
|
|
72570
|
+
- \`note\`: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5185\u5BB9\u306E\u7C21\u5358\u306A\u8AAC\u660E
|
|
72571
|
+
|
|
72572
|
+
#### \u5236\u7D04
|
|
72573
|
+
- **\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u6C7A\u6E08\u30C7\u30FC\u30BF\u3092\u8AAD\u307F\u53D6\u3089\u306A\u3044\u3053\u3068**\u3002\u5B9F\u884C\u3057\u3066\u3088\u3044\u306E\u306F\u4E0A\u8A18\u624B\u9806\u3067\u6307\u5B9A\u3055\u308C\u305F\u30E1\u30BF\u30C7\u30FC\u30BF\u53D6\u5F97\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u307F
|
|
72574
|
+
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
72575
|
+
en: `Follow these steps to set up the Stripe connection.
|
|
72576
|
+
|
|
72577
|
+
1. Call \`${requestToolName4}\` to fetch account balance:
|
|
72578
|
+
- \`method\`: \`"GET"\`
|
|
72579
|
+
- \`path\`: \`"/v1/balance"\`
|
|
72580
|
+
2. If an error is returned, ask the user to check the API key settings (verify that the Secret API Key or Restricted API Key is configured correctly)
|
|
72581
|
+
3. Call \`updateConnectionContext\`:
|
|
72582
|
+
- \`note\`: Brief description of the setup
|
|
72583
|
+
|
|
72584
|
+
#### Constraints
|
|
72585
|
+
- **Do NOT read payment data during setup**. Only the metadata request specified in the steps above is allowed
|
|
72586
|
+
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
72587
|
+
},
|
|
72588
|
+
dataOverviewInstructions: {
|
|
72589
|
+
en: `1. Call ${requestToolName4} with GET /v1/customers?limit=5 to explore customers structure
|
|
72590
|
+
2. Call ${requestToolName4} with GET /v1/charges?limit=5 to explore charges structure
|
|
72591
|
+
3. Explore other endpoints (invoices, subscriptions, products) as needed`,
|
|
72592
|
+
ja: `1. ${requestToolName4} \u3067 GET /v1/customers?limit=5 \u3092\u547C\u3073\u51FA\u3057\u3001\u9867\u5BA2\u306E\u69CB\u9020\u3092\u78BA\u8A8D
|
|
72593
|
+
2. ${requestToolName4} \u3067 GET /v1/charges?limit=5 \u3092\u547C\u3073\u51FA\u3057\u3001\u8AB2\u91D1\u306E\u69CB\u9020\u3092\u78BA\u8A8D
|
|
72594
|
+
3. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u4ED6\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\uFF08\u8ACB\u6C42\u66F8\u3001\u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u3001\u5546\u54C1\uFF09\u3092\u63A2\u7D22`
|
|
72595
|
+
}
|
|
72596
|
+
});
|
|
72597
|
+
|
|
72598
|
+
// ../connectors/src/connectors/stripe-api-key/index.ts
|
|
72599
|
+
var tools19 = { request: requestTool10 };
|
|
72600
|
+
var stripeApiKeyConnector = new ConnectorPlugin({
|
|
72601
|
+
slug: "stripe",
|
|
72602
|
+
authType: AUTH_TYPES.API_KEY,
|
|
72603
|
+
name: "Stripe (API Key)",
|
|
72604
|
+
description: "Connect to Stripe for payment, customer, and subscription data using a Secret API Key or Restricted API Key.",
|
|
72605
|
+
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2QNK0u2doqp41uL0POS4Ks/7a92367e2388ec77c7f4ada143606f9a/stripe.jpeg",
|
|
72606
|
+
parameters: parameters19,
|
|
72607
|
+
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
72608
|
+
onboarding: stripeApiKeyOnboarding,
|
|
72609
|
+
systemPrompt: {
|
|
72610
|
+
en: `### Tools
|
|
72611
|
+
|
|
72612
|
+
- \`stripe-api-key_request\`: The only way to call the Stripe API. Use it to query charges, customers, invoices, subscriptions, products, prices, payment intents, balances, and more. Authentication is configured automatically using the API Key (Bearer token). Stripe uses cursor-based pagination with \`starting_after\` and \`has_more\`.
|
|
72613
|
+
|
|
72614
|
+
### Stripe API Reference
|
|
72615
|
+
|
|
72616
|
+
#### Available Endpoints
|
|
72617
|
+
- GET \`/v1/charges\` \u2014 List charges
|
|
72618
|
+
- GET \`/v1/charges/{chargeId}\` \u2014 Get a charge
|
|
72619
|
+
- GET \`/v1/customers\` \u2014 List customers
|
|
72620
|
+
- GET \`/v1/customers/{customerId}\` \u2014 Get a customer
|
|
72621
|
+
- GET \`/v1/invoices\` \u2014 List invoices
|
|
72622
|
+
- GET \`/v1/invoices/{invoiceId}\` \u2014 Get an invoice
|
|
72623
|
+
- GET \`/v1/subscriptions\` \u2014 List subscriptions
|
|
72624
|
+
- GET \`/v1/subscriptions/{subscriptionId}\` \u2014 Get a subscription
|
|
72625
|
+
- GET \`/v1/products\` \u2014 List products
|
|
72626
|
+
- GET \`/v1/prices\` \u2014 List prices
|
|
72627
|
+
- GET \`/v1/payment_intents\` \u2014 List payment intents
|
|
72628
|
+
- GET \`/v1/balance\` \u2014 Get account balance
|
|
72629
|
+
- GET \`/v1/balance_transactions\` \u2014 List balance transactions
|
|
72630
|
+
|
|
72631
|
+
### Query Parameters
|
|
72632
|
+
- \`limit\` \u2014 Number of results per page (max 100, default 10)
|
|
72633
|
+
- \`starting_after\` \u2014 Pagination cursor (object ID)
|
|
72634
|
+
- \`ending_before\` \u2014 Reverse pagination cursor
|
|
72635
|
+
- \`created[gte]\`, \`created[lte]\` \u2014 Filter by creation date (Unix timestamp)
|
|
72636
|
+
- \`status\` \u2014 Filter by status (varies by resource)
|
|
72637
|
+
|
|
72638
|
+
### Tips
|
|
72639
|
+
- Stripe uses cursor-based pagination with \`starting_after\` and \`has_more\`
|
|
72640
|
+
- All timestamps are Unix timestamps in seconds
|
|
72641
|
+
- Use \`expand[]\` query parameter to include related objects inline
|
|
72642
|
+
- List responses have \`data\` array and \`has_more\` boolean
|
|
72643
|
+
- POST request bodies are form-encoded (pass a flat key-value object)
|
|
72644
|
+
- If using a Restricted API Key, some endpoints may return 403 depending on the key's permissions
|
|
72645
|
+
|
|
72646
|
+
### Business Logic
|
|
72647
|
+
|
|
72648
|
+
The business logic type for this connector is "typescript". Write handler code using the connector SDK shown below. Do NOT access credentials directly from environment variables.
|
|
72649
|
+
|
|
72650
|
+
#### Example
|
|
72651
|
+
|
|
72652
|
+
\`\`\`ts
|
|
72653
|
+
import { connection } from "@squadbase/vite-server/connectors/stripe-api-key";
|
|
72654
|
+
|
|
72655
|
+
const stripe = connection("<connectionId>");
|
|
72656
|
+
|
|
72657
|
+
// Authenticated fetch (returns standard Response)
|
|
72658
|
+
const res = await stripe.request("/v1/customers?limit=10");
|
|
72659
|
+
const data = await res.json();
|
|
72660
|
+
\`\`\``,
|
|
72661
|
+
ja: `### \u30C4\u30FC\u30EB
|
|
72662
|
+
|
|
72663
|
+
- \`stripe-api-key_request\`: Stripe API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u8ACB\u6C42\u3001\u9867\u5BA2\u3001\u8ACB\u6C42\u66F8\u3001\u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u3001\u5546\u54C1\u3001\u4FA1\u683C\u3001\u652F\u6255\u3044\u30A4\u30F3\u30C6\u30F3\u30C8\u3001\u6B8B\u9AD8\u306A\u3069\u306E\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002API\u30AD\u30FC\uFF08Bearer\u30C8\u30FC\u30AF\u30F3\uFF09\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002Stripe\u306F \`starting_after\` \u3068 \`has_more\` \u306B\u3088\u308B\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u306E\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
72664
|
+
|
|
72665
|
+
### Stripe API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
72666
|
+
|
|
72667
|
+
#### \u5229\u7528\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
|
|
72668
|
+
- GET \`/v1/charges\` \u2014 \u8ACB\u6C42\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72669
|
+
- GET \`/v1/charges/{chargeId}\` \u2014 \u8ACB\u6C42\u3092\u53D6\u5F97
|
|
72670
|
+
- GET \`/v1/customers\` \u2014 \u9867\u5BA2\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72671
|
+
- GET \`/v1/customers/{customerId}\` \u2014 \u9867\u5BA2\u3092\u53D6\u5F97
|
|
72672
|
+
- GET \`/v1/invoices\` \u2014 \u8ACB\u6C42\u66F8\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72673
|
+
- GET \`/v1/invoices/{invoiceId}\` \u2014 \u8ACB\u6C42\u66F8\u3092\u53D6\u5F97
|
|
72674
|
+
- GET \`/v1/subscriptions\` \u2014 \u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72675
|
+
- GET \`/v1/subscriptions/{subscriptionId}\` \u2014 \u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u3092\u53D6\u5F97
|
|
72676
|
+
- GET \`/v1/products\` \u2014 \u5546\u54C1\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72677
|
+
- GET \`/v1/prices\` \u2014 \u4FA1\u683C\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72678
|
+
- GET \`/v1/payment_intents\` \u2014 \u652F\u6255\u3044\u30A4\u30F3\u30C6\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72679
|
+
- GET \`/v1/balance\` \u2014 \u30A2\u30AB\u30A6\u30F3\u30C8\u6B8B\u9AD8\u3092\u53D6\u5F97
|
|
72680
|
+
- GET \`/v1/balance_transactions\` \u2014 \u6B8B\u9AD8\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
|
|
72681
|
+
|
|
72682
|
+
### \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF
|
|
72683
|
+
- \`limit\` \u2014 \u30DA\u30FC\u30B8\u3042\u305F\u308A\u306E\u7D50\u679C\u6570\uFF08\u6700\u5927100\u3001\u30C7\u30D5\u30A9\u30EB\u30C810\uFF09
|
|
72684
|
+
- \`starting_after\` \u2014 \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u30AB\u30FC\u30BD\u30EB\uFF08\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8ID\uFF09
|
|
72685
|
+
- \`ending_before\` \u2014 \u9006\u65B9\u5411\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u30AB\u30FC\u30BD\u30EB
|
|
72686
|
+
- \`created[gte]\`, \`created[lte]\` \u2014 \u4F5C\u6210\u65E5\u3067\u30D5\u30A3\u30EB\u30BF\uFF08Unix\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\uFF09
|
|
72687
|
+
- \`status\` \u2014 \u30B9\u30C6\u30FC\u30BF\u30B9\u3067\u30D5\u30A3\u30EB\u30BF\uFF08\u30EA\u30BD\u30FC\u30B9\u306B\u3088\u308A\u7570\u306A\u308B\uFF09
|
|
72688
|
+
|
|
72689
|
+
### \u30D2\u30F3\u30C8
|
|
72690
|
+
- Stripe\u306F \`starting_after\` \u3068 \`has_more\` \u306B\u3088\u308B\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u306E\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u307E\u3059
|
|
72691
|
+
- \u3059\u3079\u3066\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u306F\u79D2\u5358\u4F4D\u306EUnix\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3067\u3059
|
|
72692
|
+
- \u95A2\u9023\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u30A4\u30F3\u30E9\u30A4\u30F3\u3067\u542B\u3081\u308B\u306B\u306F \`expand[]\` \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u307E\u3059
|
|
72693
|
+
- \u4E00\u89A7\u30EC\u30B9\u30DD\u30F3\u30B9\u306B\u306F \`data\` \u914D\u5217\u3068 \`has_more\` \u30D6\u30FC\u30EB\u5024\u304C\u542B\u307E\u308C\u307E\u3059
|
|
72694
|
+
- POST\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30DC\u30C7\u30A3\u306F\u30D5\u30A9\u30FC\u30E0\u30A8\u30F3\u30B3\u30FC\u30C9\u3067\u3059\uFF08\u30D5\u30E9\u30C3\u30C8\u306A\u30AD\u30FC\u30FB\u30D0\u30EA\u30E5\u30FC\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\uFF09
|
|
72695
|
+
- Restricted API Key\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u5834\u5408\u3001\u30AD\u30FC\u306E\u6A29\u9650\u306B\u3088\u3063\u3066\u306F\u4E00\u90E8\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3067403\u304C\u8FD4\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059
|
|
72696
|
+
|
|
72697
|
+
### Business Logic
|
|
72698
|
+
|
|
72699
|
+
\u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u4EE5\u4E0B\u306B\u793A\u3059\u30B3\u30CD\u30AF\u30BFSDK\u3092\u4F7F\u7528\u3057\u3066\u30CF\u30F3\u30C9\u30E9\u30B3\u30FC\u30C9\u3092\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u74B0\u5883\u5909\u6570\u304B\u3089\u76F4\u63A5\u8A8D\u8A3C\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
|
|
72700
|
+
|
|
72701
|
+
#### Example
|
|
72702
|
+
|
|
72703
|
+
\`\`\`ts
|
|
72704
|
+
import { connection } from "@squadbase/vite-server/connectors/stripe-api-key";
|
|
72705
|
+
|
|
72706
|
+
const stripe = connection("<connectionId>");
|
|
72707
|
+
|
|
72708
|
+
// Authenticated fetch (returns standard Response)
|
|
72709
|
+
const res = await stripe.request("/v1/customers?limit=10");
|
|
72710
|
+
const data = await res.json();
|
|
72711
|
+
\`\`\``
|
|
72712
|
+
},
|
|
72713
|
+
tools: tools19,
|
|
72714
|
+
async checkConnection(params) {
|
|
72715
|
+
try {
|
|
72716
|
+
const apiKey = params["api-key"];
|
|
72717
|
+
if (!apiKey) {
|
|
72718
|
+
return {
|
|
72719
|
+
success: false,
|
|
72720
|
+
error: "API Key is not configured"
|
|
72721
|
+
};
|
|
72722
|
+
}
|
|
72723
|
+
const res = await fetch("https://api.stripe.com/v1/balance", {
|
|
72724
|
+
method: "GET",
|
|
72725
|
+
headers: { Authorization: `Bearer ${apiKey}` }
|
|
72726
|
+
});
|
|
72727
|
+
if (!res.ok) {
|
|
72728
|
+
const errorText = await res.text().catch(() => res.statusText);
|
|
72729
|
+
return {
|
|
72730
|
+
success: false,
|
|
72731
|
+
error: `Stripe API failed: HTTP ${res.status} ${errorText}`
|
|
72732
|
+
};
|
|
72733
|
+
}
|
|
72734
|
+
return { success: true };
|
|
72735
|
+
} catch (error2) {
|
|
72736
|
+
return {
|
|
72737
|
+
success: false,
|
|
72738
|
+
error: error2 instanceof Error ? error2.message : String(error2)
|
|
72739
|
+
};
|
|
72740
|
+
}
|
|
72741
|
+
}
|
|
72742
|
+
});
|
|
72743
|
+
|
|
72744
|
+
// ../connectors/src/connectors/airtable-oauth/tools/request.ts
|
|
72745
|
+
import { z as z28 } from "zod";
|
|
72746
|
+
|
|
72747
|
+
// ../connectors/src/connectors/airtable-oauth/parameters.ts
|
|
72748
|
+
var parameters20 = {
|
|
72457
72749
|
baseId: new ParameterDefinition({
|
|
72458
72750
|
slug: "base-id",
|
|
72459
72751
|
name: "Airtable Base ID",
|
|
@@ -72466,8 +72758,8 @@ var parameters19 = {
|
|
|
72466
72758
|
};
|
|
72467
72759
|
|
|
72468
72760
|
// ../connectors/src/connectors/airtable-oauth/tools/request.ts
|
|
72469
|
-
var
|
|
72470
|
-
var
|
|
72761
|
+
var BASE_URL13 = "https://api.airtable.com/v0";
|
|
72762
|
+
var REQUEST_TIMEOUT_MS18 = 6e4;
|
|
72471
72763
|
var cachedToken12 = null;
|
|
72472
72764
|
async function getProxyToken12(config) {
|
|
72473
72765
|
if (cachedToken12 && cachedToken12.expiresAt > Date.now() + 6e4) {
|
|
@@ -72499,36 +72791,36 @@ async function getProxyToken12(config) {
|
|
|
72499
72791
|
};
|
|
72500
72792
|
return data.token;
|
|
72501
72793
|
}
|
|
72502
|
-
var
|
|
72503
|
-
toolUseIntent:
|
|
72794
|
+
var inputSchema28 = z28.object({
|
|
72795
|
+
toolUseIntent: z28.string().optional().describe(
|
|
72504
72796
|
"Brief description of what you intend to accomplish with this tool call"
|
|
72505
72797
|
),
|
|
72506
|
-
connectionId:
|
|
72507
|
-
method:
|
|
72508
|
-
path:
|
|
72798
|
+
connectionId: z28.string().describe("ID of the Airtable OAuth connection to use"),
|
|
72799
|
+
method: z28.enum(["GET", "POST", "PATCH", "DELETE"]).describe("HTTP method"),
|
|
72800
|
+
path: z28.string().describe(
|
|
72509
72801
|
"API path appended to https://api.airtable.com/v0 (e.g., '/{baseId}/{tableIdOrName}', '/meta/bases/{baseId}/tables'). {baseId} is automatically replaced if a default is configured."
|
|
72510
72802
|
),
|
|
72511
|
-
queryParams:
|
|
72512
|
-
body:
|
|
72803
|
+
queryParams: z28.record(z28.string(), z28.string()).optional().describe("Query parameters to append to the URL"),
|
|
72804
|
+
body: z28.record(z28.string(), z28.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
72513
72805
|
});
|
|
72514
|
-
var
|
|
72515
|
-
|
|
72516
|
-
success:
|
|
72517
|
-
status:
|
|
72518
|
-
data:
|
|
72806
|
+
var outputSchema28 = z28.discriminatedUnion("success", [
|
|
72807
|
+
z28.object({
|
|
72808
|
+
success: z28.literal(true),
|
|
72809
|
+
status: z28.number(),
|
|
72810
|
+
data: z28.record(z28.string(), z28.unknown())
|
|
72519
72811
|
}),
|
|
72520
|
-
|
|
72521
|
-
success:
|
|
72522
|
-
error:
|
|
72812
|
+
z28.object({
|
|
72813
|
+
success: z28.literal(false),
|
|
72814
|
+
error: z28.string()
|
|
72523
72815
|
})
|
|
72524
72816
|
]);
|
|
72525
|
-
var
|
|
72817
|
+
var requestTool11 = new ConnectorTool({
|
|
72526
72818
|
name: "request",
|
|
72527
72819
|
description: `Send authenticated requests to the Airtable API.
|
|
72528
72820
|
Authentication is handled automatically via OAuth proxy.
|
|
72529
72821
|
{baseId} in the path is automatically replaced with the connection's default base ID if configured.`,
|
|
72530
|
-
inputSchema:
|
|
72531
|
-
outputSchema:
|
|
72822
|
+
inputSchema: inputSchema28,
|
|
72823
|
+
outputSchema: outputSchema28,
|
|
72532
72824
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
72533
72825
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
72534
72826
|
if (!connection) {
|
|
@@ -72541,9 +72833,9 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
72541
72833
|
`[connector-request] airtable-oauth/${connection.name}: ${method} ${path4}`
|
|
72542
72834
|
);
|
|
72543
72835
|
try {
|
|
72544
|
-
const baseId =
|
|
72836
|
+
const baseId = parameters20.baseId.tryGetValue(connection);
|
|
72545
72837
|
const resolvedPath = baseId ? path4.replace(/\{baseId\}/g, baseId) : path4;
|
|
72546
|
-
let url = `${
|
|
72838
|
+
let url = `${BASE_URL13}${resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
|
|
72547
72839
|
if (queryParams) {
|
|
72548
72840
|
const searchParams = new URLSearchParams(queryParams);
|
|
72549
72841
|
url += `?${searchParams.toString()}`;
|
|
@@ -72551,7 +72843,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
72551
72843
|
const token = await getProxyToken12(config.oauthProxy);
|
|
72552
72844
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
72553
72845
|
const controller = new AbortController();
|
|
72554
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
72846
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS18);
|
|
72555
72847
|
try {
|
|
72556
72848
|
const response = await fetch(proxyUrl, {
|
|
72557
72849
|
method: "POST",
|
|
@@ -72583,7 +72875,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
72583
72875
|
});
|
|
72584
72876
|
|
|
72585
72877
|
// ../connectors/src/connectors/airtable-oauth/setup.ts
|
|
72586
|
-
var
|
|
72878
|
+
var requestToolName5 = `airtable-oauth_${requestTool11.name}`;
|
|
72587
72879
|
var airtableOauthOnboarding = new ConnectorOnboarding({
|
|
72588
72880
|
connectionSetupInstructions: {
|
|
72589
72881
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Airtable OAuth\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
@@ -72593,7 +72885,7 @@ var airtableOauthOnboarding = new ConnectorOnboarding({
|
|
|
72593
72885
|
3. \`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
|
|
72594
72886
|
- \`parameterSlug\`: \`"base-id"\`
|
|
72595
72887
|
- \`value\`: \u62BD\u51FA\u3057\u305F\u30D9\u30FC\u30B9ID
|
|
72596
|
-
4. \`${
|
|
72888
|
+
4. \`${requestToolName5}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30D9\u30FC\u30B9\u306E\u30C6\u30FC\u30D6\u30EB\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B:
|
|
72597
72889
|
- \`method\`: \`"GET"\`
|
|
72598
72890
|
- \`path\`: \`"/meta/bases/{baseId}/tables"\`
|
|
72599
72891
|
5. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306B\u30D9\u30FC\u30B9\u306E\u5171\u6709\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
|
|
@@ -72612,7 +72904,7 @@ var airtableOauthOnboarding = new ConnectorOnboarding({
|
|
|
72612
72904
|
3. Call \`updateConnectionParameters\`:
|
|
72613
72905
|
- \`parameterSlug\`: \`"base-id"\`
|
|
72614
72906
|
- \`value\`: The extracted base ID
|
|
72615
|
-
4. Call \`${
|
|
72907
|
+
4. Call \`${requestToolName5}\` to fetch the base's table list:
|
|
72616
72908
|
- \`method\`: \`"GET"\`
|
|
72617
72909
|
- \`path\`: \`"/meta/bases/{baseId}/tables"\`
|
|
72618
72910
|
5. If an error is returned, ask the user to check the base sharing settings
|
|
@@ -72634,14 +72926,14 @@ var airtableOauthOnboarding = new ConnectorOnboarding({
|
|
|
72634
72926
|
});
|
|
72635
72927
|
|
|
72636
72928
|
// ../connectors/src/connectors/airtable-oauth/index.ts
|
|
72637
|
-
var
|
|
72929
|
+
var tools20 = { request: requestTool11 };
|
|
72638
72930
|
var airtableOauthConnector = new ConnectorPlugin({
|
|
72639
72931
|
slug: "airtable",
|
|
72640
72932
|
authType: AUTH_TYPES.OAUTH,
|
|
72641
72933
|
name: "Airtable (OAuth)",
|
|
72642
72934
|
description: "Connect to Airtable for spreadsheet-database hybrid data management using OAuth.",
|
|
72643
72935
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/19JUphfOZjyjTK6Zg4NGCf/8c56227b088cada52d3a2d9385a3be97/airtable.svg",
|
|
72644
|
-
parameters:
|
|
72936
|
+
parameters: parameters20,
|
|
72645
72937
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
72646
72938
|
onboarding: airtableOauthOnboarding,
|
|
72647
72939
|
proxyPolicy: {
|
|
@@ -72750,10 +73042,10 @@ const records = await airtable.request("/{baseId}/Tasks?maxRecords=100");
|
|
|
72750
73042
|
const recordsData = await records.json();
|
|
72751
73043
|
\`\`\``
|
|
72752
73044
|
},
|
|
72753
|
-
tools:
|
|
73045
|
+
tools: tools20,
|
|
72754
73046
|
async checkConnection(params, config) {
|
|
72755
73047
|
const { proxyFetch } = config;
|
|
72756
|
-
const baseId = params[
|
|
73048
|
+
const baseId = params[parameters20.baseId.slug];
|
|
72757
73049
|
if (!baseId) {
|
|
72758
73050
|
return { success: true };
|
|
72759
73051
|
}
|
|
@@ -72792,7 +73084,7 @@ var kintoneOnboarding = new ConnectorOnboarding({
|
|
|
72792
73084
|
});
|
|
72793
73085
|
|
|
72794
73086
|
// ../connectors/src/connectors/kintone/parameters.ts
|
|
72795
|
-
var
|
|
73087
|
+
var parameters21 = {
|
|
72796
73088
|
baseUrl: new ParameterDefinition({
|
|
72797
73089
|
slug: "base-url",
|
|
72798
73090
|
name: "kintone Base URL",
|
|
@@ -72823,32 +73115,32 @@ var parameters20 = {
|
|
|
72823
73115
|
};
|
|
72824
73116
|
|
|
72825
73117
|
// ../connectors/src/connectors/kintone/tools/request.ts
|
|
72826
|
-
import { z as
|
|
72827
|
-
var
|
|
72828
|
-
var
|
|
72829
|
-
toolUseIntent:
|
|
72830
|
-
connectionId:
|
|
72831
|
-
method:
|
|
72832
|
-
path:
|
|
72833
|
-
body:
|
|
73118
|
+
import { z as z29 } from "zod";
|
|
73119
|
+
var REQUEST_TIMEOUT_MS19 = 6e4;
|
|
73120
|
+
var inputSchema29 = z29.object({
|
|
73121
|
+
toolUseIntent: z29.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
73122
|
+
connectionId: z29.string().describe("ID of the kintone connection to use"),
|
|
73123
|
+
method: z29.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
|
|
73124
|
+
path: z29.string().describe("API path (e.g., 'apps.json', 'records.json?app=1&query=...')"),
|
|
73125
|
+
body: z29.record(z29.string(), z29.unknown()).optional().describe("Request body (JSON)")
|
|
72834
73126
|
});
|
|
72835
|
-
var
|
|
72836
|
-
|
|
72837
|
-
success:
|
|
72838
|
-
status:
|
|
72839
|
-
data:
|
|
73127
|
+
var outputSchema29 = z29.discriminatedUnion("success", [
|
|
73128
|
+
z29.object({
|
|
73129
|
+
success: z29.literal(true),
|
|
73130
|
+
status: z29.number(),
|
|
73131
|
+
data: z29.record(z29.string(), z29.unknown())
|
|
72840
73132
|
}),
|
|
72841
|
-
|
|
72842
|
-
success:
|
|
72843
|
-
error:
|
|
73133
|
+
z29.object({
|
|
73134
|
+
success: z29.literal(false),
|
|
73135
|
+
error: z29.string()
|
|
72844
73136
|
})
|
|
72845
73137
|
]);
|
|
72846
|
-
var
|
|
73138
|
+
var requestTool12 = new ConnectorTool({
|
|
72847
73139
|
name: "request",
|
|
72848
73140
|
description: `Send authenticated requests to the kintone REST API.
|
|
72849
73141
|
Authentication is handled automatically using username and password.`,
|
|
72850
|
-
inputSchema:
|
|
72851
|
-
outputSchema:
|
|
73142
|
+
inputSchema: inputSchema29,
|
|
73143
|
+
outputSchema: outputSchema29,
|
|
72852
73144
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
72853
73145
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
72854
73146
|
if (!connection) {
|
|
@@ -72856,13 +73148,13 @@ Authentication is handled automatically using username and password.`,
|
|
|
72856
73148
|
}
|
|
72857
73149
|
console.log(`[connector-request] kintone/${connection.name}: ${method} ${path4}`);
|
|
72858
73150
|
try {
|
|
72859
|
-
const baseUrl =
|
|
72860
|
-
const username =
|
|
72861
|
-
const password =
|
|
73151
|
+
const baseUrl = parameters21.baseUrl.getValue(connection);
|
|
73152
|
+
const username = parameters21.username.getValue(connection);
|
|
73153
|
+
const password = parameters21.password.getValue(connection);
|
|
72862
73154
|
const authToken = Buffer.from(`${username}:${password}`).toString("base64");
|
|
72863
73155
|
const url = `${baseUrl.replace(/\/+$/, "")}/k/v1/${path4}`;
|
|
72864
73156
|
const controller = new AbortController();
|
|
72865
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
73157
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS19);
|
|
72866
73158
|
try {
|
|
72867
73159
|
const headers = {
|
|
72868
73160
|
"X-Cybozu-Authorization": authToken
|
|
@@ -72895,14 +73187,14 @@ Authentication is handled automatically using username and password.`,
|
|
|
72895
73187
|
});
|
|
72896
73188
|
|
|
72897
73189
|
// ../connectors/src/connectors/kintone/index.ts
|
|
72898
|
-
var
|
|
73190
|
+
var tools21 = { request: requestTool12 };
|
|
72899
73191
|
var kintoneConnector = new ConnectorPlugin({
|
|
72900
73192
|
slug: "kintone",
|
|
72901
73193
|
authType: null,
|
|
72902
73194
|
name: "kintone (Password)",
|
|
72903
73195
|
description: "Connect to kintone for business application data retrieval and analytics.",
|
|
72904
73196
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/76nPGMJFZkMFE3UQNo2JFy/e71dc5f5d5cec1306ce0e17aafbfd9f0/kintone.png",
|
|
72905
|
-
parameters:
|
|
73197
|
+
parameters: parameters21,
|
|
72906
73198
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
72907
73199
|
onboarding: kintoneOnboarding,
|
|
72908
73200
|
systemPrompt: {
|
|
@@ -73041,7 +73333,7 @@ export default async function handler(c: Context) {
|
|
|
73041
73333
|
- \u5236\u9650: \`limit 100 offset 0\`
|
|
73042
73334
|
- \u6587\u5B57\u5217: \`like "\u90E8\u5206\u4E00\u81F4"\``
|
|
73043
73335
|
},
|
|
73044
|
-
tools:
|
|
73336
|
+
tools: tools21
|
|
73045
73337
|
});
|
|
73046
73338
|
|
|
73047
73339
|
// ../connectors/src/connectors/kintone-api-token/setup.ts
|
|
@@ -73057,7 +73349,7 @@ var kintoneApiTokenOnboarding = new ConnectorOnboarding({
|
|
|
73057
73349
|
});
|
|
73058
73350
|
|
|
73059
73351
|
// ../connectors/src/connectors/kintone-api-token/parameters.ts
|
|
73060
|
-
var
|
|
73352
|
+
var parameters22 = {
|
|
73061
73353
|
baseUrl: new ParameterDefinition({
|
|
73062
73354
|
slug: "base-url",
|
|
73063
73355
|
name: "kintone Base URL",
|
|
@@ -73079,32 +73371,32 @@ var parameters21 = {
|
|
|
73079
73371
|
};
|
|
73080
73372
|
|
|
73081
73373
|
// ../connectors/src/connectors/kintone-api-token/tools/request.ts
|
|
73082
|
-
import { z as
|
|
73083
|
-
var
|
|
73084
|
-
var
|
|
73085
|
-
toolUseIntent:
|
|
73086
|
-
connectionId:
|
|
73087
|
-
method:
|
|
73088
|
-
path:
|
|
73089
|
-
body:
|
|
73374
|
+
import { z as z30 } from "zod";
|
|
73375
|
+
var REQUEST_TIMEOUT_MS20 = 6e4;
|
|
73376
|
+
var inputSchema30 = z30.object({
|
|
73377
|
+
toolUseIntent: z30.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
73378
|
+
connectionId: z30.string().describe("ID of the kintone connection to use"),
|
|
73379
|
+
method: z30.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
|
|
73380
|
+
path: z30.string().describe("API path (e.g., 'apps.json', 'records.json?app=1&query=...')"),
|
|
73381
|
+
body: z30.record(z30.string(), z30.unknown()).optional().describe("Request body (JSON)")
|
|
73090
73382
|
});
|
|
73091
|
-
var
|
|
73092
|
-
|
|
73093
|
-
success:
|
|
73094
|
-
status:
|
|
73095
|
-
data:
|
|
73383
|
+
var outputSchema30 = z30.discriminatedUnion("success", [
|
|
73384
|
+
z30.object({
|
|
73385
|
+
success: z30.literal(true),
|
|
73386
|
+
status: z30.number(),
|
|
73387
|
+
data: z30.record(z30.string(), z30.unknown())
|
|
73096
73388
|
}),
|
|
73097
|
-
|
|
73098
|
-
success:
|
|
73099
|
-
error:
|
|
73389
|
+
z30.object({
|
|
73390
|
+
success: z30.literal(false),
|
|
73391
|
+
error: z30.string()
|
|
73100
73392
|
})
|
|
73101
73393
|
]);
|
|
73102
|
-
var
|
|
73394
|
+
var requestTool13 = new ConnectorTool({
|
|
73103
73395
|
name: "request",
|
|
73104
73396
|
description: `Send authenticated requests to the kintone REST API.
|
|
73105
73397
|
Authentication is handled automatically using the API token.`,
|
|
73106
|
-
inputSchema:
|
|
73107
|
-
outputSchema:
|
|
73398
|
+
inputSchema: inputSchema30,
|
|
73399
|
+
outputSchema: outputSchema30,
|
|
73108
73400
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
73109
73401
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
73110
73402
|
if (!connection) {
|
|
@@ -73112,11 +73404,11 @@ Authentication is handled automatically using the API token.`,
|
|
|
73112
73404
|
}
|
|
73113
73405
|
console.log(`[connector-request] kintone-api-token/${connection.name}: ${method} ${path4}`);
|
|
73114
73406
|
try {
|
|
73115
|
-
const baseUrl =
|
|
73116
|
-
const apiToken =
|
|
73407
|
+
const baseUrl = parameters22.baseUrl.getValue(connection);
|
|
73408
|
+
const apiToken = parameters22.apiToken.getValue(connection);
|
|
73117
73409
|
const url = `${baseUrl.replace(/\/+$/, "")}/k/v1/${path4}`;
|
|
73118
73410
|
const controller = new AbortController();
|
|
73119
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
73411
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS20);
|
|
73120
73412
|
try {
|
|
73121
73413
|
const headers = {
|
|
73122
73414
|
"X-Cybozu-API-Token": apiToken
|
|
@@ -73149,14 +73441,14 @@ Authentication is handled automatically using the API token.`,
|
|
|
73149
73441
|
});
|
|
73150
73442
|
|
|
73151
73443
|
// ../connectors/src/connectors/kintone-api-token/index.ts
|
|
73152
|
-
var
|
|
73444
|
+
var tools22 = { request: requestTool13 };
|
|
73153
73445
|
var kintoneApiTokenConnector = new ConnectorPlugin({
|
|
73154
73446
|
slug: "kintone",
|
|
73155
73447
|
authType: AUTH_TYPES.API_KEY,
|
|
73156
73448
|
name: "kintone (API Token)",
|
|
73157
73449
|
description: "Connect to kintone for business application data retrieval and analytics using API token authentication.",
|
|
73158
73450
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/76nPGMJFZkMFE3UQNo2JFy/e71dc5f5d5cec1306ce0e17aafbfd9f0/kintone.png",
|
|
73159
|
-
parameters:
|
|
73451
|
+
parameters: parameters22,
|
|
73160
73452
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
73161
73453
|
onboarding: kintoneApiTokenOnboarding,
|
|
73162
73454
|
systemPrompt: {
|
|
@@ -73255,7 +73547,7 @@ await kintone.request("/k/v1/record.json", {
|
|
|
73255
73547
|
});
|
|
73256
73548
|
\`\`\``
|
|
73257
73549
|
},
|
|
73258
|
-
tools:
|
|
73550
|
+
tools: tools22
|
|
73259
73551
|
});
|
|
73260
73552
|
|
|
73261
73553
|
// ../connectors/src/connectors/wix-store/setup.ts
|
|
@@ -73271,7 +73563,7 @@ var wixStoreOnboarding = new ConnectorOnboarding({
|
|
|
73271
73563
|
});
|
|
73272
73564
|
|
|
73273
73565
|
// ../connectors/src/connectors/wix-store/parameters.ts
|
|
73274
|
-
var
|
|
73566
|
+
var parameters23 = {
|
|
73275
73567
|
accountId: new ParameterDefinition({
|
|
73276
73568
|
slug: "account-id",
|
|
73277
73569
|
name: "Account ID",
|
|
@@ -73302,33 +73594,33 @@ var parameters22 = {
|
|
|
73302
73594
|
};
|
|
73303
73595
|
|
|
73304
73596
|
// ../connectors/src/connectors/wix-store/tools/request.ts
|
|
73305
|
-
import { z as
|
|
73306
|
-
var
|
|
73307
|
-
var
|
|
73308
|
-
var
|
|
73309
|
-
toolUseIntent:
|
|
73310
|
-
connectionId:
|
|
73311
|
-
method:
|
|
73312
|
-
path:
|
|
73313
|
-
body:
|
|
73597
|
+
import { z as z31 } from "zod";
|
|
73598
|
+
var BASE_URL14 = "https://www.wixapis.com/";
|
|
73599
|
+
var REQUEST_TIMEOUT_MS21 = 6e4;
|
|
73600
|
+
var inputSchema31 = z31.object({
|
|
73601
|
+
toolUseIntent: z31.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
73602
|
+
connectionId: z31.string().describe("ID of the Wix Store connection to use"),
|
|
73603
|
+
method: z31.enum(["GET", "POST"]).describe("HTTP method"),
|
|
73604
|
+
path: z31.string().describe("API path (e.g., 'stores/v1/products/query', 'stores/v2/orders/query')"),
|
|
73605
|
+
body: z31.record(z31.string(), z31.unknown()).optional().describe("Request body (JSON)")
|
|
73314
73606
|
});
|
|
73315
|
-
var
|
|
73316
|
-
|
|
73317
|
-
success:
|
|
73318
|
-
status:
|
|
73319
|
-
data:
|
|
73607
|
+
var outputSchema31 = z31.discriminatedUnion("success", [
|
|
73608
|
+
z31.object({
|
|
73609
|
+
success: z31.literal(true),
|
|
73610
|
+
status: z31.number(),
|
|
73611
|
+
data: z31.record(z31.string(), z31.unknown())
|
|
73320
73612
|
}),
|
|
73321
|
-
|
|
73322
|
-
success:
|
|
73323
|
-
error:
|
|
73613
|
+
z31.object({
|
|
73614
|
+
success: z31.literal(false),
|
|
73615
|
+
error: z31.string()
|
|
73324
73616
|
})
|
|
73325
73617
|
]);
|
|
73326
|
-
var
|
|
73618
|
+
var requestTool14 = new ConnectorTool({
|
|
73327
73619
|
name: "request",
|
|
73328
73620
|
description: `Send authenticated requests to the Wix Store API.
|
|
73329
73621
|
Authentication is handled automatically using the API Key and Site ID.`,
|
|
73330
|
-
inputSchema:
|
|
73331
|
-
outputSchema:
|
|
73622
|
+
inputSchema: inputSchema31,
|
|
73623
|
+
outputSchema: outputSchema31,
|
|
73332
73624
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
73333
73625
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
73334
73626
|
if (!connection) {
|
|
@@ -73336,11 +73628,11 @@ Authentication is handled automatically using the API Key and Site ID.`,
|
|
|
73336
73628
|
}
|
|
73337
73629
|
console.log(`[connector-request] wix-store/${connection.name}: ${method} ${path4}`);
|
|
73338
73630
|
try {
|
|
73339
|
-
const apiKey =
|
|
73340
|
-
const siteId =
|
|
73341
|
-
const url = `${
|
|
73631
|
+
const apiKey = parameters23.apiKey.getValue(connection);
|
|
73632
|
+
const siteId = parameters23.siteId.getValue(connection);
|
|
73633
|
+
const url = `${BASE_URL14}${path4}`;
|
|
73342
73634
|
const controller = new AbortController();
|
|
73343
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
73635
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS21);
|
|
73344
73636
|
try {
|
|
73345
73637
|
const response = await fetch(url, {
|
|
73346
73638
|
method,
|
|
@@ -73372,14 +73664,14 @@ Authentication is handled automatically using the API Key and Site ID.`,
|
|
|
73372
73664
|
});
|
|
73373
73665
|
|
|
73374
73666
|
// ../connectors/src/connectors/wix-store/index.ts
|
|
73375
|
-
var
|
|
73667
|
+
var tools23 = { request: requestTool14 };
|
|
73376
73668
|
var wixStoreConnector = new ConnectorPlugin({
|
|
73377
73669
|
slug: "wix-store",
|
|
73378
73670
|
authType: null,
|
|
73379
73671
|
name: "Wix Store",
|
|
73380
73672
|
description: "Connect to Wix Store.",
|
|
73381
73673
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/YyFxclQFzROIYpFam6vRK/e7e75d3feac49a1cc5e433c147216d23/Wix_logo_black.svg",
|
|
73382
|
-
parameters:
|
|
73674
|
+
parameters: parameters23,
|
|
73383
73675
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
73384
73676
|
onboarding: wixStoreOnboarding,
|
|
73385
73677
|
systemPrompt: {
|
|
@@ -73532,7 +73824,7 @@ export default async function handler(c: Context) {
|
|
|
73532
73824
|
- \`POST stores/v2/inventoryItems/query\`
|
|
73533
73825
|
- Body: \`{ "query": { "paging": { "limit": 50 } } }\``
|
|
73534
73826
|
},
|
|
73535
|
-
tools:
|
|
73827
|
+
tools: tools23
|
|
73536
73828
|
});
|
|
73537
73829
|
|
|
73538
73830
|
// ../connectors/src/connectors/dbt/setup.ts
|
|
@@ -73548,7 +73840,7 @@ var dbtOnboarding = new ConnectorOnboarding({
|
|
|
73548
73840
|
});
|
|
73549
73841
|
|
|
73550
73842
|
// ../connectors/src/connectors/dbt/parameters.ts
|
|
73551
|
-
var
|
|
73843
|
+
var parameters24 = {
|
|
73552
73844
|
host: new ParameterDefinition({
|
|
73553
73845
|
slug: "host",
|
|
73554
73846
|
name: "dbt Cloud Host",
|
|
@@ -73588,36 +73880,36 @@ var parameters23 = {
|
|
|
73588
73880
|
};
|
|
73589
73881
|
|
|
73590
73882
|
// ../connectors/src/connectors/dbt/tools/request.ts
|
|
73591
|
-
import { z as
|
|
73592
|
-
var
|
|
73883
|
+
import { z as z32 } from "zod";
|
|
73884
|
+
var REQUEST_TIMEOUT_MS22 = 6e4;
|
|
73593
73885
|
function resolveGraphqlEndpoint(host) {
|
|
73594
73886
|
if (host.includes("emea")) return "https://metadata.emea.dbt.com/graphql";
|
|
73595
73887
|
if (host.includes(".au.")) return "https://metadata.au.dbt.com/graphql";
|
|
73596
73888
|
return "https://metadata.cloud.getdbt.com/graphql";
|
|
73597
73889
|
}
|
|
73598
|
-
var
|
|
73599
|
-
toolUseIntent:
|
|
73600
|
-
connectionId:
|
|
73601
|
-
query:
|
|
73602
|
-
variables:
|
|
73890
|
+
var inputSchema32 = z32.object({
|
|
73891
|
+
toolUseIntent: z32.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
73892
|
+
connectionId: z32.string().describe("ID of the dbt Cloud connection to use"),
|
|
73893
|
+
query: z32.string().describe("GraphQL query"),
|
|
73894
|
+
variables: z32.record(z32.string(), z32.unknown()).optional().describe("GraphQL variables (JSON)")
|
|
73603
73895
|
});
|
|
73604
|
-
var
|
|
73605
|
-
|
|
73606
|
-
success:
|
|
73607
|
-
data:
|
|
73896
|
+
var outputSchema32 = z32.discriminatedUnion("success", [
|
|
73897
|
+
z32.object({
|
|
73898
|
+
success: z32.literal(true),
|
|
73899
|
+
data: z32.record(z32.string(), z32.unknown())
|
|
73608
73900
|
}),
|
|
73609
|
-
|
|
73610
|
-
success:
|
|
73611
|
-
error:
|
|
73901
|
+
z32.object({
|
|
73902
|
+
success: z32.literal(false),
|
|
73903
|
+
error: z32.string()
|
|
73612
73904
|
})
|
|
73613
73905
|
]);
|
|
73614
|
-
var
|
|
73906
|
+
var requestTool15 = new ConnectorTool({
|
|
73615
73907
|
name: "request",
|
|
73616
73908
|
description: `Send authenticated requests to the dbt Cloud Discovery API (GraphQL).
|
|
73617
73909
|
Authentication is handled automatically using the API token.
|
|
73618
73910
|
{environmentId} in GraphQL variables is automatically replaced with the prod-env-id.`,
|
|
73619
|
-
inputSchema:
|
|
73620
|
-
outputSchema:
|
|
73911
|
+
inputSchema: inputSchema32,
|
|
73912
|
+
outputSchema: outputSchema32,
|
|
73621
73913
|
async execute({ connectionId, query, variables }, connections) {
|
|
73622
73914
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
73623
73915
|
if (!connection) {
|
|
@@ -73625,9 +73917,9 @@ Authentication is handled automatically using the API token.
|
|
|
73625
73917
|
}
|
|
73626
73918
|
console.log(`[connector-request] dbt/${connection.name}: GraphQL query`);
|
|
73627
73919
|
try {
|
|
73628
|
-
const host =
|
|
73629
|
-
const token =
|
|
73630
|
-
const environmentId =
|
|
73920
|
+
const host = parameters24.host.getValue(connection);
|
|
73921
|
+
const token = parameters24.token.getValue(connection);
|
|
73922
|
+
const environmentId = parameters24.prodEnvId.getValue(connection);
|
|
73631
73923
|
const resolvedVariables = variables ? JSON.parse(
|
|
73632
73924
|
JSON.stringify(variables).replace(
|
|
73633
73925
|
/"\{environmentId\}"/g,
|
|
@@ -73636,7 +73928,7 @@ Authentication is handled automatically using the API token.
|
|
|
73636
73928
|
) : void 0;
|
|
73637
73929
|
const endpoint = resolveGraphqlEndpoint(host);
|
|
73638
73930
|
const controller = new AbortController();
|
|
73639
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
73931
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS22);
|
|
73640
73932
|
try {
|
|
73641
73933
|
const response = await fetch(endpoint, {
|
|
73642
73934
|
method: "POST",
|
|
@@ -73673,14 +73965,14 @@ Authentication is handled automatically using the API token.
|
|
|
73673
73965
|
});
|
|
73674
73966
|
|
|
73675
73967
|
// ../connectors/src/connectors/dbt/index.ts
|
|
73676
|
-
var
|
|
73968
|
+
var tools24 = { request: requestTool15 };
|
|
73677
73969
|
var dbtConnector = new ConnectorPlugin({
|
|
73678
73970
|
slug: "dbt",
|
|
73679
73971
|
authType: null,
|
|
73680
73972
|
name: "dbt",
|
|
73681
73973
|
description: "Connect to dbt Cloud for data transformation and analytics engineering.",
|
|
73682
73974
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4iT6ncXtdtHdkXexU0WgfZ/0367a38d245f2568eab5eb511f9ee692/dbt.png",
|
|
73683
|
-
parameters:
|
|
73975
|
+
parameters: parameters24,
|
|
73684
73976
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
73685
73977
|
onboarding: dbtOnboarding,
|
|
73686
73978
|
systemPrompt: {
|
|
@@ -73903,7 +74195,7 @@ query($environmentId: BigInt!, $uniqueIds: [String!]!) {
|
|
|
73903
74195
|
- \`ancestors\` / \`children\` \u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u4F7F\u7528\u3057\u3066\u95A2\u4FC2\u3092\u30C8\u30E9\u30D0\u30FC\u30B9\u3057\u307E\u3059
|
|
73904
74196
|
- node\u5185\u3067 \`ancestors { uniqueId name }\` \u307E\u305F\u306F \`children { uniqueId name }\` \u3092\u53D6\u5F97\u3057\u307E\u3059`
|
|
73905
74197
|
},
|
|
73906
|
-
tools:
|
|
74198
|
+
tools: tools24
|
|
73907
74199
|
});
|
|
73908
74200
|
|
|
73909
74201
|
// ../connectors/src/connectors/squadbase-db/setup.ts
|
|
@@ -73919,7 +74211,7 @@ var squadbaseDbOnboarding = new ConnectorOnboarding({
|
|
|
73919
74211
|
});
|
|
73920
74212
|
|
|
73921
74213
|
// ../connectors/src/connectors/squadbase-db/parameters.ts
|
|
73922
|
-
var
|
|
74214
|
+
var parameters25 = {
|
|
73923
74215
|
connectionUrl: new ParameterDefinition({
|
|
73924
74216
|
slug: "connection-url",
|
|
73925
74217
|
name: "Connection URL",
|
|
@@ -73932,27 +74224,27 @@ var parameters24 = {
|
|
|
73932
74224
|
};
|
|
73933
74225
|
|
|
73934
74226
|
// ../connectors/src/connectors/squadbase-db/tools/execute-query.ts
|
|
73935
|
-
import { z as
|
|
74227
|
+
import { z as z33 } from "zod";
|
|
73936
74228
|
var MAX_ROWS10 = 500;
|
|
73937
74229
|
var CONNECT_TIMEOUT_MS3 = 1e4;
|
|
73938
74230
|
var STATEMENT_TIMEOUT_MS2 = 6e4;
|
|
73939
|
-
var
|
|
73940
|
-
toolUseIntent:
|
|
74231
|
+
var inputSchema33 = z33.object({
|
|
74232
|
+
toolUseIntent: z33.string().optional().describe(
|
|
73941
74233
|
"Brief description of what you intend to accomplish with this tool call"
|
|
73942
74234
|
),
|
|
73943
|
-
connectionId:
|
|
73944
|
-
sql:
|
|
74235
|
+
connectionId: z33.string().describe("ID of the Squadbase DB connection to use"),
|
|
74236
|
+
sql: z33.string().describe("PostgreSQL SQL query. Always include LIMIT in queries.")
|
|
73945
74237
|
});
|
|
73946
|
-
var
|
|
73947
|
-
|
|
73948
|
-
success:
|
|
73949
|
-
rowCount:
|
|
73950
|
-
truncated:
|
|
73951
|
-
rows:
|
|
74238
|
+
var outputSchema33 = z33.discriminatedUnion("success", [
|
|
74239
|
+
z33.object({
|
|
74240
|
+
success: z33.literal(true),
|
|
74241
|
+
rowCount: z33.number(),
|
|
74242
|
+
truncated: z33.boolean(),
|
|
74243
|
+
rows: z33.array(z33.record(z33.string(), z33.unknown()))
|
|
73952
74244
|
}),
|
|
73953
|
-
|
|
73954
|
-
success:
|
|
73955
|
-
error:
|
|
74245
|
+
z33.object({
|
|
74246
|
+
success: z33.literal(false),
|
|
74247
|
+
error: z33.string()
|
|
73956
74248
|
})
|
|
73957
74249
|
]);
|
|
73958
74250
|
var executeQueryTool10 = new ConnectorTool({
|
|
@@ -73960,8 +74252,8 @@ var executeQueryTool10 = new ConnectorTool({
|
|
|
73960
74252
|
description: `Execute SQL against Squadbase DB (PostgreSQL). Returns up to ${MAX_ROWS10} rows.
|
|
73961
74253
|
Use for: schema exploration (information_schema), data sampling, analytical queries.
|
|
73962
74254
|
Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
73963
|
-
inputSchema:
|
|
73964
|
-
outputSchema:
|
|
74255
|
+
inputSchema: inputSchema33,
|
|
74256
|
+
outputSchema: outputSchema33,
|
|
73965
74257
|
async execute({ connectionId, sql }, connections) {
|
|
73966
74258
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
73967
74259
|
if (!connection) {
|
|
@@ -73976,7 +74268,7 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
73976
74268
|
let connectionUrl;
|
|
73977
74269
|
try {
|
|
73978
74270
|
const { Pool } = await import("pg");
|
|
73979
|
-
connectionUrl =
|
|
74271
|
+
connectionUrl = parameters25.connectionUrl.getValue(connection);
|
|
73980
74272
|
const pool = new Pool({
|
|
73981
74273
|
connectionString: connectionUrl,
|
|
73982
74274
|
ssl: { rejectUnauthorized: false },
|
|
@@ -74007,14 +74299,14 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
74007
74299
|
});
|
|
74008
74300
|
|
|
74009
74301
|
// ../connectors/src/connectors/squadbase-db/index.ts
|
|
74010
|
-
var
|
|
74302
|
+
var tools25 = { executeQuery: executeQueryTool10 };
|
|
74011
74303
|
var squadbaseDbConnector = new ConnectorPlugin({
|
|
74012
74304
|
slug: "squadbase-db",
|
|
74013
74305
|
authType: null,
|
|
74014
74306
|
name: "Squadbase DB",
|
|
74015
74307
|
description: "Connect to Squadbase DB (PostgreSQL).",
|
|
74016
74308
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/25y0XqMxIufeD3egWH3bEl/659b4ade405890654cfaf91c03a4b458/icon.svg",
|
|
74017
|
-
parameters:
|
|
74309
|
+
parameters: parameters25,
|
|
74018
74310
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
74019
74311
|
onboarding: squadbaseDbOnboarding,
|
|
74020
74312
|
systemPrompt: {
|
|
@@ -74047,11 +74339,11 @@ The business logic type for this connector is "sql".
|
|
|
74047
74339
|
- \u30AB\u30E9\u30E0\u4E00\u89A7: \`SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'public' AND table_name = 'xxx'\`
|
|
74048
74340
|
- \u30AF\u30A8\u30EA\u306B\u306F\u5FC5\u305A LIMIT \u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044`
|
|
74049
74341
|
},
|
|
74050
|
-
tools:
|
|
74342
|
+
tools: tools25,
|
|
74051
74343
|
async checkConnection(params, _config) {
|
|
74052
74344
|
const { Pool } = await import("pg");
|
|
74053
74345
|
const pool = new Pool({
|
|
74054
|
-
connectionString: params[
|
|
74346
|
+
connectionString: params[parameters25.connectionUrl.slug],
|
|
74055
74347
|
ssl: { rejectUnauthorized: false },
|
|
74056
74348
|
connectionTimeoutMillis: 1e4
|
|
74057
74349
|
});
|
|
@@ -74068,7 +74360,7 @@ The business logic type for this connector is "sql".
|
|
|
74068
74360
|
const { Pool } = await import("pg");
|
|
74069
74361
|
const { text, values } = buildPositionalParams(sql, namedParams);
|
|
74070
74362
|
const pool = new Pool({
|
|
74071
|
-
connectionString: params[
|
|
74363
|
+
connectionString: params[parameters25.connectionUrl.slug],
|
|
74072
74364
|
ssl: { rejectUnauthorized: false },
|
|
74073
74365
|
connectionTimeoutMillis: 1e4,
|
|
74074
74366
|
statement_timeout: 6e4
|
|
@@ -74083,7 +74375,7 @@ The business logic type for this connector is "sql".
|
|
|
74083
74375
|
});
|
|
74084
74376
|
|
|
74085
74377
|
// ../connectors/src/connectors/openai/parameters.ts
|
|
74086
|
-
var
|
|
74378
|
+
var parameters26 = {
|
|
74087
74379
|
apiKey: new ParameterDefinition({
|
|
74088
74380
|
slug: "api-key",
|
|
74089
74381
|
name: "OpenAI API Key",
|
|
@@ -74096,14 +74388,14 @@ var parameters25 = {
|
|
|
74096
74388
|
};
|
|
74097
74389
|
|
|
74098
74390
|
// ../connectors/src/connectors/openai/index.ts
|
|
74099
|
-
var
|
|
74391
|
+
var tools26 = {};
|
|
74100
74392
|
var openaiConnector = new ConnectorPlugin({
|
|
74101
74393
|
slug: "openai",
|
|
74102
74394
|
authType: null,
|
|
74103
74395
|
name: "OpenAI",
|
|
74104
74396
|
description: "Connect to OpenAI for AI model inference, embeddings, and image generation.",
|
|
74105
74397
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/53XJtCgUlW10x6i1X8xpxM/0bfd634069f1d74241296543cb20427a/openai.svg",
|
|
74106
|
-
parameters:
|
|
74398
|
+
parameters: parameters26,
|
|
74107
74399
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
74108
74400
|
systemPrompt: {
|
|
74109
74401
|
en: `### Business Logic
|
|
@@ -74153,11 +74445,11 @@ export default async function handler(c: Context) {
|
|
|
74153
74445
|
}
|
|
74154
74446
|
\`\`\``
|
|
74155
74447
|
},
|
|
74156
|
-
tools:
|
|
74448
|
+
tools: tools26
|
|
74157
74449
|
});
|
|
74158
74450
|
|
|
74159
74451
|
// ../connectors/src/connectors/gemini/parameters.ts
|
|
74160
|
-
var
|
|
74452
|
+
var parameters27 = {
|
|
74161
74453
|
apiKey: new ParameterDefinition({
|
|
74162
74454
|
slug: "api-key",
|
|
74163
74455
|
name: "Gemini API Key",
|
|
@@ -74170,14 +74462,14 @@ var parameters26 = {
|
|
|
74170
74462
|
};
|
|
74171
74463
|
|
|
74172
74464
|
// ../connectors/src/connectors/gemini/index.ts
|
|
74173
|
-
var
|
|
74465
|
+
var tools27 = {};
|
|
74174
74466
|
var geminiConnector = new ConnectorPlugin({
|
|
74175
74467
|
slug: "gemini",
|
|
74176
74468
|
authType: null,
|
|
74177
74469
|
name: "Gemini",
|
|
74178
74470
|
description: "Connect to Google Gemini for AI model inference, embeddings, and multimodal generation.",
|
|
74179
74471
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6K2qZQZEQq90YENfrXy5my/c83c0c3815af0a97d29ee70f37215f01/gemini.png",
|
|
74180
|
-
parameters:
|
|
74472
|
+
parameters: parameters27,
|
|
74181
74473
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
74182
74474
|
systemPrompt: {
|
|
74183
74475
|
en: `### Business Logic
|
|
@@ -74221,11 +74513,11 @@ export default async function handler(c: Context) {
|
|
|
74221
74513
|
}
|
|
74222
74514
|
\`\`\``
|
|
74223
74515
|
},
|
|
74224
|
-
tools:
|
|
74516
|
+
tools: tools27
|
|
74225
74517
|
});
|
|
74226
74518
|
|
|
74227
74519
|
// ../connectors/src/connectors/anthropic/parameters.ts
|
|
74228
|
-
var
|
|
74520
|
+
var parameters28 = {
|
|
74229
74521
|
apiKey: new ParameterDefinition({
|
|
74230
74522
|
slug: "api-key",
|
|
74231
74523
|
name: "Anthropic API Key",
|
|
@@ -74238,14 +74530,14 @@ var parameters27 = {
|
|
|
74238
74530
|
};
|
|
74239
74531
|
|
|
74240
74532
|
// ../connectors/src/connectors/anthropic/index.ts
|
|
74241
|
-
var
|
|
74533
|
+
var tools28 = {};
|
|
74242
74534
|
var anthropicConnector = new ConnectorPlugin({
|
|
74243
74535
|
slug: "anthropic",
|
|
74244
74536
|
authType: null,
|
|
74245
74537
|
name: "Anthropic",
|
|
74246
74538
|
description: "Connect to Anthropic for AI model inference and text generation with Claude.",
|
|
74247
74539
|
iconUrl: "https://www.anthropic.com/images/icons/safari-pinned-tab.svg",
|
|
74248
|
-
parameters:
|
|
74540
|
+
parameters: parameters28,
|
|
74249
74541
|
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
74250
74542
|
systemPrompt: {
|
|
74251
74543
|
en: `### Business Logic
|
|
@@ -74297,7 +74589,7 @@ export default async function handler(c: Context) {
|
|
|
74297
74589
|
}
|
|
74298
74590
|
\`\`\``
|
|
74299
74591
|
},
|
|
74300
|
-
tools:
|
|
74592
|
+
tools: tools28
|
|
74301
74593
|
});
|
|
74302
74594
|
|
|
74303
74595
|
// ../connectors/src/connectors/amplitude/setup.ts
|
|
@@ -74317,7 +74609,7 @@ NOTE: The Dashboard REST API endpoints (events/segmentation, funnels, retention,
|
|
|
74317
74609
|
});
|
|
74318
74610
|
|
|
74319
74611
|
// ../connectors/src/connectors/amplitude/parameters.ts
|
|
74320
|
-
var
|
|
74612
|
+
var parameters29 = {
|
|
74321
74613
|
apiKey: new ParameterDefinition({
|
|
74322
74614
|
slug: "api-key",
|
|
74323
74615
|
name: "Amplitude API Key",
|
|
@@ -74348,33 +74640,33 @@ var parameters28 = {
|
|
|
74348
74640
|
};
|
|
74349
74641
|
|
|
74350
74642
|
// ../connectors/src/connectors/amplitude/tools/request.ts
|
|
74351
|
-
import { z as
|
|
74352
|
-
var
|
|
74353
|
-
var
|
|
74354
|
-
toolUseIntent:
|
|
74643
|
+
import { z as z34 } from "zod";
|
|
74644
|
+
var REQUEST_TIMEOUT_MS23 = 6e4;
|
|
74645
|
+
var inputSchema34 = z34.object({
|
|
74646
|
+
toolUseIntent: z34.string().optional().describe(
|
|
74355
74647
|
"Brief description of what you intend to accomplish with this tool call"
|
|
74356
74648
|
),
|
|
74357
|
-
connectionId:
|
|
74358
|
-
method:
|
|
74649
|
+
connectionId: z34.string().describe("ID of the Amplitude connection to use"),
|
|
74650
|
+
method: z34.enum(["GET", "POST"]).describe(
|
|
74359
74651
|
"HTTP method. GET for most read endpoints (events/list, export, usersearch, useractivity). POST is rarely needed."
|
|
74360
74652
|
),
|
|
74361
|
-
url:
|
|
74653
|
+
url: z34.string().describe(
|
|
74362
74654
|
"Full URL including query parameters (e.g., 'https://amplitude.com/api/2/events/list', 'https://amplitude.com/api/2/export?start=20240101T00&end=20240102T00')"
|
|
74363
74655
|
),
|
|
74364
|
-
body:
|
|
74656
|
+
body: z34.record(z34.string(), z34.unknown()).optional().describe("Request body (JSON) for POST requests")
|
|
74365
74657
|
});
|
|
74366
|
-
var
|
|
74367
|
-
|
|
74368
|
-
success:
|
|
74369
|
-
status:
|
|
74370
|
-
data:
|
|
74658
|
+
var outputSchema34 = z34.discriminatedUnion("success", [
|
|
74659
|
+
z34.object({
|
|
74660
|
+
success: z34.literal(true),
|
|
74661
|
+
status: z34.number(),
|
|
74662
|
+
data: z34.record(z34.string(), z34.unknown())
|
|
74371
74663
|
}),
|
|
74372
|
-
|
|
74373
|
-
success:
|
|
74374
|
-
error:
|
|
74664
|
+
z34.object({
|
|
74665
|
+
success: z34.literal(false),
|
|
74666
|
+
error: z34.string()
|
|
74375
74667
|
})
|
|
74376
74668
|
]);
|
|
74377
|
-
var
|
|
74669
|
+
var requestTool16 = new ConnectorTool({
|
|
74378
74670
|
name: "request",
|
|
74379
74671
|
description: `Send authenticated requests to the Amplitude REST API.
|
|
74380
74672
|
Authentication is handled automatically using Basic auth (API Key + Secret Key).
|
|
@@ -74388,8 +74680,8 @@ Recommended endpoints (available on all plans):
|
|
|
74388
74680
|
- GET {baseUrl}/api/2/useractivity?user=AMPLITUDE_ID \u2014 user activity
|
|
74389
74681
|
|
|
74390
74682
|
IMPORTANT: Dashboard REST API endpoints (events/segmentation, funnels, retention, revenue, etc.) require a paid Growth or Enterprise plan and will return 403 Forbidden on free plans. Always try the Export API first and aggregate data in code.`,
|
|
74391
|
-
inputSchema:
|
|
74392
|
-
outputSchema:
|
|
74683
|
+
inputSchema: inputSchema34,
|
|
74684
|
+
outputSchema: outputSchema34,
|
|
74393
74685
|
async execute({ connectionId, method, url, body }, connections) {
|
|
74394
74686
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
74395
74687
|
if (!connection) {
|
|
@@ -74402,11 +74694,11 @@ IMPORTANT: Dashboard REST API endpoints (events/segmentation, funnels, retention
|
|
|
74402
74694
|
`[connector-request] amplitude/${connection.name}: ${method} ${url}`
|
|
74403
74695
|
);
|
|
74404
74696
|
try {
|
|
74405
|
-
const apiKey =
|
|
74406
|
-
const secretKey =
|
|
74697
|
+
const apiKey = parameters29.apiKey.getValue(connection);
|
|
74698
|
+
const secretKey = parameters29.secretKey.getValue(connection);
|
|
74407
74699
|
const authToken = btoa(`${apiKey}:${secretKey}`);
|
|
74408
74700
|
const controller = new AbortController();
|
|
74409
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
74701
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS23);
|
|
74410
74702
|
try {
|
|
74411
74703
|
const response = await fetch(url, {
|
|
74412
74704
|
method,
|
|
@@ -74434,14 +74726,14 @@ IMPORTANT: Dashboard REST API endpoints (events/segmentation, funnels, retention
|
|
|
74434
74726
|
});
|
|
74435
74727
|
|
|
74436
74728
|
// ../connectors/src/connectors/amplitude/index.ts
|
|
74437
|
-
var
|
|
74729
|
+
var tools29 = { request: requestTool16 };
|
|
74438
74730
|
var amplitudeConnector = new ConnectorPlugin({
|
|
74439
74731
|
slug: "amplitude",
|
|
74440
74732
|
authType: null,
|
|
74441
74733
|
name: "Amplitude",
|
|
74442
74734
|
description: "Connect to Amplitude for product analytics and user behavior data.",
|
|
74443
74735
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2UBJSdRlFJaLq52WUCTBEB/308b59b374cf6c662ac70989860bffd7/amplitude-icon.svg",
|
|
74444
|
-
parameters:
|
|
74736
|
+
parameters: parameters29,
|
|
74445
74737
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
74446
74738
|
onboarding: amplitudeOnboarding,
|
|
74447
74739
|
systemPrompt: {
|
|
@@ -74574,7 +74866,7 @@ export default async function handler(c: Context) {
|
|
|
74574
74866
|
- \`i\` \u2014 \u30A4\u30F3\u30BF\u30FC\u30D0\u30EB\uFF081=\u65E5\u6B21\u30017=\u9031\u6B21\u300130=\u6708\u6B21\uFF09
|
|
74575
74867
|
- \`g\` \u2014 \u30B0\u30EB\u30FC\u30D7\u5316\u30D7\u30ED\u30D1\u30C6\u30A3`
|
|
74576
74868
|
},
|
|
74577
|
-
tools:
|
|
74869
|
+
tools: tools29
|
|
74578
74870
|
});
|
|
74579
74871
|
|
|
74580
74872
|
// ../connectors/src/connectors/attio/setup.ts
|
|
@@ -74592,7 +74884,7 @@ var attioOnboarding = new ConnectorOnboarding({
|
|
|
74592
74884
|
});
|
|
74593
74885
|
|
|
74594
74886
|
// ../connectors/src/connectors/attio/parameters.ts
|
|
74595
|
-
var
|
|
74887
|
+
var parameters30 = {
|
|
74596
74888
|
apiKey: new ParameterDefinition({
|
|
74597
74889
|
slug: "api-key",
|
|
74598
74890
|
name: "Attio API Key",
|
|
@@ -74605,41 +74897,41 @@ var parameters29 = {
|
|
|
74605
74897
|
};
|
|
74606
74898
|
|
|
74607
74899
|
// ../connectors/src/connectors/attio/tools/request.ts
|
|
74608
|
-
import { z as
|
|
74609
|
-
var
|
|
74610
|
-
var
|
|
74611
|
-
var
|
|
74612
|
-
toolUseIntent:
|
|
74900
|
+
import { z as z35 } from "zod";
|
|
74901
|
+
var BASE_URL15 = "https://api.attio.com/v2";
|
|
74902
|
+
var REQUEST_TIMEOUT_MS24 = 6e4;
|
|
74903
|
+
var inputSchema35 = z35.object({
|
|
74904
|
+
toolUseIntent: z35.string().optional().describe(
|
|
74613
74905
|
"Brief description of what you intend to accomplish with this tool call"
|
|
74614
74906
|
),
|
|
74615
|
-
connectionId:
|
|
74616
|
-
method:
|
|
74907
|
+
connectionId: z35.string().describe("ID of the Attio connection to use"),
|
|
74908
|
+
method: z35.enum(["GET", "POST", "PATCH", "DELETE"]).describe(
|
|
74617
74909
|
"HTTP method. GET for reading resources, POST for creating or querying records, PATCH for updating, DELETE for removing."
|
|
74618
74910
|
),
|
|
74619
|
-
path:
|
|
74911
|
+
path: z35.string().describe(
|
|
74620
74912
|
"API path (e.g., '/objects', '/objects/people/records/query', '/objects/companies/records/{record_id}')"
|
|
74621
74913
|
),
|
|
74622
|
-
body:
|
|
74914
|
+
body: z35.record(z35.string(), z35.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
74623
74915
|
});
|
|
74624
|
-
var
|
|
74625
|
-
|
|
74626
|
-
success:
|
|
74627
|
-
status:
|
|
74628
|
-
data:
|
|
74916
|
+
var outputSchema35 = z35.discriminatedUnion("success", [
|
|
74917
|
+
z35.object({
|
|
74918
|
+
success: z35.literal(true),
|
|
74919
|
+
status: z35.number(),
|
|
74920
|
+
data: z35.record(z35.string(), z35.unknown())
|
|
74629
74921
|
}),
|
|
74630
|
-
|
|
74631
|
-
success:
|
|
74632
|
-
error:
|
|
74922
|
+
z35.object({
|
|
74923
|
+
success: z35.literal(false),
|
|
74924
|
+
error: z35.string()
|
|
74633
74925
|
})
|
|
74634
74926
|
]);
|
|
74635
|
-
var
|
|
74927
|
+
var requestTool17 = new ConnectorTool({
|
|
74636
74928
|
name: "request",
|
|
74637
74929
|
description: `Send authenticated requests to the Attio REST API.
|
|
74638
74930
|
Authentication is handled automatically using the API Key (Bearer token).
|
|
74639
74931
|
Use this tool for all Attio API interactions: querying records (people, companies, deals), listing objects and attributes, managing list entries, and working with notes.
|
|
74640
74932
|
Note that querying records uses POST (not GET) with a request body for filters.`,
|
|
74641
|
-
inputSchema:
|
|
74642
|
-
outputSchema:
|
|
74933
|
+
inputSchema: inputSchema35,
|
|
74934
|
+
outputSchema: outputSchema35,
|
|
74643
74935
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
74644
74936
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
74645
74937
|
if (!connection) {
|
|
@@ -74652,10 +74944,10 @@ Note that querying records uses POST (not GET) with a request body for filters.`
|
|
|
74652
74944
|
`[connector-request] attio/${connection.name}: ${method} ${path4}`
|
|
74653
74945
|
);
|
|
74654
74946
|
try {
|
|
74655
|
-
const apiKey =
|
|
74656
|
-
const url = `${
|
|
74947
|
+
const apiKey = parameters30.apiKey.getValue(connection);
|
|
74948
|
+
const url = `${BASE_URL15}${path4}`;
|
|
74657
74949
|
const controller = new AbortController();
|
|
74658
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
74950
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS24);
|
|
74659
74951
|
try {
|
|
74660
74952
|
const response = await fetch(url, {
|
|
74661
74953
|
method,
|
|
@@ -74683,14 +74975,14 @@ Note that querying records uses POST (not GET) with a request body for filters.`
|
|
|
74683
74975
|
});
|
|
74684
74976
|
|
|
74685
74977
|
// ../connectors/src/connectors/attio/index.ts
|
|
74686
|
-
var
|
|
74978
|
+
var tools30 = { request: requestTool17 };
|
|
74687
74979
|
var attioConnector = new ConnectorPlugin({
|
|
74688
74980
|
slug: "attio",
|
|
74689
74981
|
authType: null,
|
|
74690
74982
|
name: "Attio",
|
|
74691
74983
|
description: "Connect to Attio for CRM data and relationship intelligence.",
|
|
74692
74984
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2qqx99vvXJojUM3tSrSWPX/1e7c35e13da6b365b8b475c1effe568f/attio.svg",
|
|
74693
|
-
parameters:
|
|
74985
|
+
parameters: parameters30,
|
|
74694
74986
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
74695
74987
|
onboarding: attioOnboarding,
|
|
74696
74988
|
systemPrompt: {
|
|
@@ -74809,7 +75101,7 @@ export default async function handler(c: Context) {
|
|
|
74809
75101
|
- \`limit\` \u2014 \u30DA\u30FC\u30B8\u3042\u305F\u308A\u306E\u6700\u5927\u30EC\u30B3\u30FC\u30C9\u6570\uFF08\u30C7\u30D5\u30A9\u30EB\u30C825\uFF09
|
|
74810
75102
|
- \`offset\` \u2014 \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u30AA\u30D5\u30BB\u30C3\u30C8`
|
|
74811
75103
|
},
|
|
74812
|
-
tools:
|
|
75104
|
+
tools: tools30
|
|
74813
75105
|
});
|
|
74814
75106
|
|
|
74815
75107
|
// ../connectors/src/connectors/shopify/setup.ts
|
|
@@ -74825,7 +75117,7 @@ var shopifyOnboarding = new ConnectorOnboarding({
|
|
|
74825
75117
|
});
|
|
74826
75118
|
|
|
74827
75119
|
// ../connectors/src/connectors/shopify/parameters.ts
|
|
74828
|
-
var
|
|
75120
|
+
var parameters31 = {
|
|
74829
75121
|
storeDomain: new ParameterDefinition({
|
|
74830
75122
|
slug: "store-domain",
|
|
74831
75123
|
name: "Shop Name",
|
|
@@ -74856,40 +75148,40 @@ var parameters30 = {
|
|
|
74856
75148
|
};
|
|
74857
75149
|
|
|
74858
75150
|
// ../connectors/src/connectors/shopify/tools/request.ts
|
|
74859
|
-
import { z as
|
|
74860
|
-
var
|
|
74861
|
-
var
|
|
74862
|
-
toolUseIntent:
|
|
75151
|
+
import { z as z36 } from "zod";
|
|
75152
|
+
var REQUEST_TIMEOUT_MS25 = 6e4;
|
|
75153
|
+
var inputSchema36 = z36.object({
|
|
75154
|
+
toolUseIntent: z36.string().optional().describe(
|
|
74863
75155
|
"Brief description of what you intend to accomplish with this tool call"
|
|
74864
75156
|
),
|
|
74865
|
-
connectionId:
|
|
74866
|
-
method:
|
|
75157
|
+
connectionId: z36.string().describe("ID of the Shopify connection to use"),
|
|
75158
|
+
method: z36.enum(["GET", "POST", "PUT", "DELETE"]).describe(
|
|
74867
75159
|
"HTTP method. GET for reading resources (products, orders, customers), POST for creating, PUT for updating, DELETE for removing."
|
|
74868
75160
|
),
|
|
74869
|
-
path:
|
|
75161
|
+
path: z36.string().describe(
|
|
74870
75162
|
"API path including version (e.g., '/admin/api/2024-10/products.json', '/admin/api/2024-10/orders.json?limit=50')"
|
|
74871
75163
|
),
|
|
74872
|
-
body:
|
|
75164
|
+
body: z36.record(z36.string(), z36.unknown()).optional().describe("Request body (JSON) for POST/PUT requests")
|
|
74873
75165
|
});
|
|
74874
|
-
var
|
|
74875
|
-
|
|
74876
|
-
success:
|
|
74877
|
-
status:
|
|
74878
|
-
data:
|
|
75166
|
+
var outputSchema36 = z36.discriminatedUnion("success", [
|
|
75167
|
+
z36.object({
|
|
75168
|
+
success: z36.literal(true),
|
|
75169
|
+
status: z36.number(),
|
|
75170
|
+
data: z36.record(z36.string(), z36.unknown())
|
|
74879
75171
|
}),
|
|
74880
|
-
|
|
74881
|
-
success:
|
|
74882
|
-
error:
|
|
75172
|
+
z36.object({
|
|
75173
|
+
success: z36.literal(false),
|
|
75174
|
+
error: z36.string()
|
|
74883
75175
|
})
|
|
74884
75176
|
]);
|
|
74885
|
-
var
|
|
75177
|
+
var requestTool18 = new ConnectorTool({
|
|
74886
75178
|
name: "request",
|
|
74887
75179
|
description: `Send authenticated requests to the Shopify Admin REST API.
|
|
74888
75180
|
Authentication is handled automatically using Custom App credentials (Client ID + Client Secret). An access token is obtained on each request.
|
|
74889
75181
|
The store domain is resolved from the connection \u2014 only provide the path starting with /admin/api/.
|
|
74890
75182
|
Use this tool for all Shopify API interactions: listing products, orders, customers, inventory, collections, and more.`,
|
|
74891
|
-
inputSchema:
|
|
74892
|
-
outputSchema:
|
|
75183
|
+
inputSchema: inputSchema36,
|
|
75184
|
+
outputSchema: outputSchema36,
|
|
74893
75185
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
74894
75186
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
74895
75187
|
if (!connection) {
|
|
@@ -74902,9 +75194,9 @@ Use this tool for all Shopify API interactions: listing products, orders, custom
|
|
|
74902
75194
|
`[connector-request] shopify/${connection.name}: ${method} ${path4}`
|
|
74903
75195
|
);
|
|
74904
75196
|
try {
|
|
74905
|
-
const storeDomain =
|
|
74906
|
-
const clientId =
|
|
74907
|
-
const clientSecret =
|
|
75197
|
+
const storeDomain = parameters31.storeDomain.getValue(connection);
|
|
75198
|
+
const clientId = parameters31.clientId.getValue(connection);
|
|
75199
|
+
const clientSecret = parameters31.clientSecret.getValue(connection);
|
|
74908
75200
|
const tokenRes = await fetch(
|
|
74909
75201
|
`https://${storeDomain}/admin/oauth/access_token`,
|
|
74910
75202
|
{
|
|
@@ -74932,7 +75224,7 @@ Use this tool for all Shopify API interactions: listing products, orders, custom
|
|
|
74932
75224
|
}
|
|
74933
75225
|
const url = `https://${storeDomain}${path4}`;
|
|
74934
75226
|
const controller = new AbortController();
|
|
74935
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
75227
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS25);
|
|
74936
75228
|
try {
|
|
74937
75229
|
const response = await fetch(url, {
|
|
74938
75230
|
method,
|
|
@@ -74960,14 +75252,14 @@ Use this tool for all Shopify API interactions: listing products, orders, custom
|
|
|
74960
75252
|
});
|
|
74961
75253
|
|
|
74962
75254
|
// ../connectors/src/connectors/shopify/index.ts
|
|
74963
|
-
var
|
|
75255
|
+
var tools31 = { request: requestTool18 };
|
|
74964
75256
|
var shopifyConnector = new ConnectorPlugin({
|
|
74965
75257
|
slug: "shopify",
|
|
74966
75258
|
authType: null,
|
|
74967
75259
|
name: "Shopify",
|
|
74968
75260
|
description: "Connect to Shopify for e-commerce data including products, orders, and customers.",
|
|
74969
75261
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/57KEjZCBskKgSxgKyU4Sm0/117d681a410f48dc36f97cdd9c0593c5/shopify-icon.svg",
|
|
74970
|
-
parameters:
|
|
75262
|
+
parameters: parameters31,
|
|
74971
75263
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
74972
75264
|
onboarding: shopifyOnboarding,
|
|
74973
75265
|
systemPrompt: {
|
|
@@ -75116,11 +75408,11 @@ export default async function handler(c: Context) {
|
|
|
75116
75408
|
- \`updated_at_min\`, \`updated_at_max\` \u2014 \u66F4\u65B0\u65E5\u30D5\u30A3\u30EB\u30BF\u30FC\uFF08ISO 8601\uFF09
|
|
75117
75409
|
- \`status\` \u2014 \u30B9\u30C6\u30FC\u30BF\u30B9\u3067\u30D5\u30A3\u30EB\u30BF\u30FC\uFF08\u4F8B: \u5546\u54C1\u306E\u5834\u5408 active, draft, archived\u3001\u6CE8\u6587\u306E\u5834\u5408 open, closed, cancelled, any\uFF09`
|
|
75118
75410
|
},
|
|
75119
|
-
tools:
|
|
75411
|
+
tools: tools31
|
|
75120
75412
|
});
|
|
75121
75413
|
|
|
75122
75414
|
// ../connectors/src/connectors/slack/parameters.ts
|
|
75123
|
-
var
|
|
75415
|
+
var parameters32 = {
|
|
75124
75416
|
botToken: new ParameterDefinition({
|
|
75125
75417
|
slug: "bot-token",
|
|
75126
75418
|
name: "Slack Bot Token",
|
|
@@ -75201,14 +75493,14 @@ The following scopes are commonly required. Inform the user if any are missing:
|
|
|
75201
75493
|
});
|
|
75202
75494
|
|
|
75203
75495
|
// ../connectors/src/connectors/slack/index.ts
|
|
75204
|
-
var
|
|
75496
|
+
var tools32 = {};
|
|
75205
75497
|
var slackConnector = new ConnectorPlugin({
|
|
75206
75498
|
slug: "slack",
|
|
75207
75499
|
authType: null,
|
|
75208
75500
|
name: "Slack",
|
|
75209
75501
|
description: "Connect to Slack for messaging and workspace data retrieval.",
|
|
75210
75502
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7zTp67vMTvAV1wPftt6Z9R/f859e25c223d9fe4c3fd4f83895acbf6/slack.svg",
|
|
75211
|
-
parameters:
|
|
75503
|
+
parameters: parameters32,
|
|
75212
75504
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
75213
75505
|
onboarding: slackOnboarding,
|
|
75214
75506
|
systemPrompt: {
|
|
@@ -75283,12 +75575,12 @@ const data = await res.json();
|
|
|
75283
75575
|
- \u30EC\u30FC\u30C8\u5236\u9650: Tier 1-4\u3001\u307B\u3068\u3093\u3069\u306E\u30E1\u30BD\u30C3\u30C9\u306FTier 3\uFF081\u5206\u3042\u305F\u308A50\u56DE\u4EE5\u4E0A\uFF09
|
|
75284
75576
|
- \`data.ok\`\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 Slack\u306F\u30A8\u30E9\u30FC\u6642\u3082HTTP 200\u3092\u8FD4\u3057\u307E\u3059`
|
|
75285
75577
|
},
|
|
75286
|
-
tools:
|
|
75578
|
+
tools: tools32
|
|
75287
75579
|
});
|
|
75288
75580
|
|
|
75289
75581
|
// ../connectors/src/connectors/shopify-oauth/tools/request.ts
|
|
75290
|
-
import { z as
|
|
75291
|
-
var
|
|
75582
|
+
import { z as z37 } from "zod";
|
|
75583
|
+
var REQUEST_TIMEOUT_MS26 = 6e4;
|
|
75292
75584
|
var cachedToken13 = null;
|
|
75293
75585
|
async function getProxyToken13(config) {
|
|
75294
75586
|
if (cachedToken13 && cachedToken13.expiresAt > Date.now() + 6e4) {
|
|
@@ -75320,35 +75612,35 @@ async function getProxyToken13(config) {
|
|
|
75320
75612
|
};
|
|
75321
75613
|
return data.token;
|
|
75322
75614
|
}
|
|
75323
|
-
var
|
|
75324
|
-
toolUseIntent:
|
|
75615
|
+
var inputSchema37 = z37.object({
|
|
75616
|
+
toolUseIntent: z37.string().optional().describe(
|
|
75325
75617
|
"Brief description of what you intend to accomplish with this tool call"
|
|
75326
75618
|
),
|
|
75327
|
-
connectionId:
|
|
75328
|
-
method:
|
|
75329
|
-
path:
|
|
75619
|
+
connectionId: z37.string().describe("ID of the Shopify OAuth connection to use"),
|
|
75620
|
+
method: z37.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
|
|
75621
|
+
path: z37.string().describe(
|
|
75330
75622
|
"API path (e.g., '/admin/api/2024-10/products.json', '/admin/api/2024-10/orders.json')"
|
|
75331
75623
|
),
|
|
75332
|
-
queryParams:
|
|
75333
|
-
body:
|
|
75624
|
+
queryParams: z37.record(z37.string(), z37.string()).optional().describe("Query parameters to append to the URL"),
|
|
75625
|
+
body: z37.record(z37.string(), z37.unknown()).optional().describe("Request body (JSON) for POST/PUT requests")
|
|
75334
75626
|
});
|
|
75335
|
-
var
|
|
75336
|
-
|
|
75337
|
-
success:
|
|
75338
|
-
status:
|
|
75339
|
-
data:
|
|
75627
|
+
var outputSchema37 = z37.discriminatedUnion("success", [
|
|
75628
|
+
z37.object({
|
|
75629
|
+
success: z37.literal(true),
|
|
75630
|
+
status: z37.number(),
|
|
75631
|
+
data: z37.record(z37.string(), z37.unknown())
|
|
75340
75632
|
}),
|
|
75341
|
-
|
|
75342
|
-
success:
|
|
75343
|
-
error:
|
|
75633
|
+
z37.object({
|
|
75634
|
+
success: z37.literal(false),
|
|
75635
|
+
error: z37.string()
|
|
75344
75636
|
})
|
|
75345
75637
|
]);
|
|
75346
|
-
var
|
|
75638
|
+
var requestTool19 = new ConnectorTool({
|
|
75347
75639
|
name: "request",
|
|
75348
75640
|
description: `Send authenticated requests to the Shopify Admin API.
|
|
75349
75641
|
Authentication is handled automatically via OAuth proxy.`,
|
|
75350
|
-
inputSchema:
|
|
75351
|
-
outputSchema:
|
|
75642
|
+
inputSchema: inputSchema37,
|
|
75643
|
+
outputSchema: outputSchema37,
|
|
75352
75644
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
75353
75645
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
75354
75646
|
if (!connection) {
|
|
@@ -75369,7 +75661,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
75369
75661
|
const token = await getProxyToken13(config.oauthProxy);
|
|
75370
75662
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
75371
75663
|
const controller = new AbortController();
|
|
75372
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
75664
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS26);
|
|
75373
75665
|
try {
|
|
75374
75666
|
const response = await fetch(proxyUrl, {
|
|
75375
75667
|
method: "POST",
|
|
@@ -75401,12 +75693,12 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
75401
75693
|
});
|
|
75402
75694
|
|
|
75403
75695
|
// ../connectors/src/connectors/shopify-oauth/setup.ts
|
|
75404
|
-
var
|
|
75696
|
+
var requestToolName6 = `shopify-oauth_${requestTool19.name}`;
|
|
75405
75697
|
var shopifyOauthOnboarding = new ConnectorOnboarding({
|
|
75406
75698
|
connectionSetupInstructions: {
|
|
75407
75699
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Shopify\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
75408
75700
|
|
|
75409
|
-
1. \`${
|
|
75701
|
+
1. \`${requestToolName6}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30B7\u30E7\u30C3\u30D7\u60C5\u5831\u3092\u53D6\u5F97\u3059\u308B:
|
|
75410
75702
|
- \`method\`: \`"GET"\`
|
|
75411
75703
|
- \`path\`: \`"/admin/api/2024-10/shop.json"\`
|
|
75412
75704
|
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306BOAuth\u63A5\u7D9A\u306E\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
|
|
@@ -75419,7 +75711,7 @@ var shopifyOauthOnboarding = new ConnectorOnboarding({
|
|
|
75419
75711
|
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
75420
75712
|
en: `Follow these steps to set up the Shopify connection.
|
|
75421
75713
|
|
|
75422
|
-
1. Call \`${
|
|
75714
|
+
1. Call \`${requestToolName6}\` to fetch shop info:
|
|
75423
75715
|
- \`method\`: \`"GET"\`
|
|
75424
75716
|
- \`path\`: \`"/admin/api/2024-10/shop.json"\`
|
|
75425
75717
|
2. If an error is returned, ask the user to check the OAuth connection settings
|
|
@@ -75442,17 +75734,17 @@ var shopifyOauthOnboarding = new ConnectorOnboarding({
|
|
|
75442
75734
|
});
|
|
75443
75735
|
|
|
75444
75736
|
// ../connectors/src/connectors/shopify-oauth/parameters.ts
|
|
75445
|
-
var
|
|
75737
|
+
var parameters33 = {};
|
|
75446
75738
|
|
|
75447
75739
|
// ../connectors/src/connectors/shopify-oauth/index.ts
|
|
75448
|
-
var
|
|
75740
|
+
var tools33 = { request: requestTool19 };
|
|
75449
75741
|
var shopifyOauthConnector = new ConnectorPlugin({
|
|
75450
75742
|
slug: "shopify",
|
|
75451
75743
|
authType: AUTH_TYPES.OAUTH,
|
|
75452
75744
|
name: "Shopify (OAuth)",
|
|
75453
75745
|
description: "Connect to Shopify for e-commerce data including products, orders, and customers using OAuth.",
|
|
75454
75746
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/57KEjZCBskKgSxgKyU4Sm0/117d681a410f48dc36f97cdd9c0593c5/shopify-icon.svg",
|
|
75455
|
-
parameters:
|
|
75747
|
+
parameters: parameters33,
|
|
75456
75748
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
75457
75749
|
onboarding: shopifyOauthOnboarding,
|
|
75458
75750
|
proxyPolicy: {
|
|
@@ -75559,7 +75851,7 @@ const res = await shopify.request("/admin/api/2024-10/products.json?limit=10");
|
|
|
75559
75851
|
const data = await res.json();
|
|
75560
75852
|
\`\`\``
|
|
75561
75853
|
},
|
|
75562
|
-
tools:
|
|
75854
|
+
tools: tools33,
|
|
75563
75855
|
async checkConnection(_params, config) {
|
|
75564
75856
|
const { proxyFetch } = config;
|
|
75565
75857
|
try {
|
|
@@ -75584,7 +75876,7 @@ const data = await res.json();
|
|
|
75584
75876
|
});
|
|
75585
75877
|
|
|
75586
75878
|
// ../connectors/src/connectors/ms-teams/parameters.ts
|
|
75587
|
-
var
|
|
75879
|
+
var parameters34 = {
|
|
75588
75880
|
clientId: new ParameterDefinition({
|
|
75589
75881
|
slug: "client-id",
|
|
75590
75882
|
name: "Azure AD Client ID",
|
|
@@ -75615,14 +75907,14 @@ var parameters33 = {
|
|
|
75615
75907
|
};
|
|
75616
75908
|
|
|
75617
75909
|
// ../connectors/src/connectors/ms-teams/index.ts
|
|
75618
|
-
var
|
|
75910
|
+
var tools34 = {};
|
|
75619
75911
|
var msTeamsConnector = new ConnectorPlugin({
|
|
75620
75912
|
slug: "microsoft-teams",
|
|
75621
75913
|
authType: null,
|
|
75622
75914
|
name: "Microsoft Teams",
|
|
75623
75915
|
description: "Connect to Microsoft Teams for messaging, channels, and team data.",
|
|
75624
75916
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6QM1sVuqarTJAB2UihVNQ9/12b8353c9b022916d72ef0f53349bae2/microsoft-teams-icon.svg",
|
|
75625
|
-
parameters:
|
|
75917
|
+
parameters: parameters34,
|
|
75626
75918
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
75627
75919
|
systemPrompt: {
|
|
75628
75920
|
en: `### Microsoft Teams SDK (TypeScript handler)
|
|
@@ -75772,13 +76064,13 @@ const data = await res.json();
|
|
|
75772
76064
|
- Graph API\u304C**403 Forbidden**\u3092\u8FD4\u3059\u5834\u5408\u3001Azure AD\u30A2\u30D7\u30EA\u306B\u5FC5\u8981\u306A\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u6A29\u9650\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u308B\u304B\u3001\u7BA1\u7406\u8005\u540C\u610F\u304C\u4ED8\u4E0E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30E6\u30FC\u30B6\u30FC\u306BAzure\u30DD\u30FC\u30BF\u30EB > \u30A2\u30D7\u30EA\u306E\u767B\u9332 > API\u6A29\u9650\u3067\u3001\u5FC5\u8981\u306A\u6A29\u9650\uFF08\u307E\u305F\u306F\u305D\u308C\u4EE5\u4E0A\u306E\u6A29\u9650\uFF09\u306E\u7BA1\u7406\u8005\u540C\u610F\u3092\u4ED8\u4E0E\u3059\u308B\u3088\u3046\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044: Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, Chat.Read.All, User.Read.All
|
|
75773
76065
|
- Graph API\u304C**401 Unauthorized**\u3092\u8FD4\u3059\u5834\u5408\u3001\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u304C\u7121\u52B9\u307E\u305F\u306F\u671F\u9650\u5207\u308C\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u8CC7\u683C\u60C5\u5831\u30D5\u30ED\u30FC\u3067\u518D\u53D6\u5F97\u3057\u3066\u304F\u3060\u3055\u3044`
|
|
75774
76066
|
},
|
|
75775
|
-
tools:
|
|
76067
|
+
tools: tools34
|
|
75776
76068
|
});
|
|
75777
76069
|
|
|
75778
76070
|
// ../connectors/src/connectors/ms-teams-oauth/tools/request.ts
|
|
75779
|
-
import { z as
|
|
75780
|
-
var
|
|
75781
|
-
var
|
|
76071
|
+
import { z as z38 } from "zod";
|
|
76072
|
+
var BASE_URL16 = "https://graph.microsoft.com";
|
|
76073
|
+
var REQUEST_TIMEOUT_MS27 = 6e4;
|
|
75782
76074
|
var cachedToken14 = null;
|
|
75783
76075
|
async function getProxyToken14(config) {
|
|
75784
76076
|
if (cachedToken14 && cachedToken14.expiresAt > Date.now() + 6e4) {
|
|
@@ -75810,35 +76102,35 @@ async function getProxyToken14(config) {
|
|
|
75810
76102
|
};
|
|
75811
76103
|
return data.token;
|
|
75812
76104
|
}
|
|
75813
|
-
var
|
|
75814
|
-
toolUseIntent:
|
|
76105
|
+
var inputSchema38 = z38.object({
|
|
76106
|
+
toolUseIntent: z38.string().optional().describe(
|
|
75815
76107
|
"Brief description of what you intend to accomplish with this tool call"
|
|
75816
76108
|
),
|
|
75817
|
-
connectionId:
|
|
75818
|
-
method:
|
|
75819
|
-
path:
|
|
76109
|
+
connectionId: z38.string().describe("ID of the Microsoft Teams OAuth connection to use"),
|
|
76110
|
+
method: z38.enum(["GET", "POST", "PATCH", "DELETE"]).describe("HTTP method"),
|
|
76111
|
+
path: z38.string().describe(
|
|
75820
76112
|
"API path appended to https://graph.microsoft.com (e.g., '/v1.0/me/joinedTeams', '/v1.0/teams/{id}/channels')"
|
|
75821
76113
|
),
|
|
75822
|
-
queryParams:
|
|
75823
|
-
body:
|
|
76114
|
+
queryParams: z38.record(z38.string(), z38.string()).optional().describe("Query parameters to append to the URL"),
|
|
76115
|
+
body: z38.record(z38.string(), z38.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
75824
76116
|
});
|
|
75825
|
-
var
|
|
75826
|
-
|
|
75827
|
-
success:
|
|
75828
|
-
status:
|
|
75829
|
-
data:
|
|
76117
|
+
var outputSchema38 = z38.discriminatedUnion("success", [
|
|
76118
|
+
z38.object({
|
|
76119
|
+
success: z38.literal(true),
|
|
76120
|
+
status: z38.number(),
|
|
76121
|
+
data: z38.record(z38.string(), z38.unknown())
|
|
75830
76122
|
}),
|
|
75831
|
-
|
|
75832
|
-
success:
|
|
75833
|
-
error:
|
|
76123
|
+
z38.object({
|
|
76124
|
+
success: z38.literal(false),
|
|
76125
|
+
error: z38.string()
|
|
75834
76126
|
})
|
|
75835
76127
|
]);
|
|
75836
|
-
var
|
|
76128
|
+
var requestTool20 = new ConnectorTool({
|
|
75837
76129
|
name: "request",
|
|
75838
76130
|
description: `Send authenticated requests to the Microsoft Graph API.
|
|
75839
76131
|
Authentication is handled automatically via OAuth proxy.`,
|
|
75840
|
-
inputSchema:
|
|
75841
|
-
outputSchema:
|
|
76132
|
+
inputSchema: inputSchema38,
|
|
76133
|
+
outputSchema: outputSchema38,
|
|
75842
76134
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
75843
76135
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
75844
76136
|
if (!connection) {
|
|
@@ -75851,7 +76143,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
75851
76143
|
`[connector-request] ms-teams-oauth/${connection.name}: ${method} ${path4}`
|
|
75852
76144
|
);
|
|
75853
76145
|
try {
|
|
75854
|
-
let url = `${
|
|
76146
|
+
let url = `${BASE_URL16}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
75855
76147
|
if (queryParams) {
|
|
75856
76148
|
const searchParams = new URLSearchParams(queryParams);
|
|
75857
76149
|
url += `?${searchParams.toString()}`;
|
|
@@ -75859,7 +76151,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
75859
76151
|
const token = await getProxyToken14(config.oauthProxy);
|
|
75860
76152
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
75861
76153
|
const controller = new AbortController();
|
|
75862
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
76154
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS27);
|
|
75863
76155
|
try {
|
|
75864
76156
|
const response = await fetch(proxyUrl, {
|
|
75865
76157
|
method: "POST",
|
|
@@ -75891,12 +76183,12 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
75891
76183
|
});
|
|
75892
76184
|
|
|
75893
76185
|
// ../connectors/src/connectors/ms-teams-oauth/setup.ts
|
|
75894
|
-
var
|
|
76186
|
+
var requestToolName7 = `microsoft-teams-oauth_${requestTool20.name}`;
|
|
75895
76187
|
var msTeamsOauthOnboarding = new ConnectorOnboarding({
|
|
75896
76188
|
connectionSetupInstructions: {
|
|
75897
76189
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3092\u6B63\u78BA\u306B\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u624B\u9806\u306B\u8A18\u8F09\u306E\u306A\u3044\u8FFD\u52A0\u306EAPI\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u4E00\u5207\u884C\u308F\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
|
|
75898
76190
|
|
|
75899
|
-
1. \`${
|
|
76191
|
+
1. \`${requestToolName7}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30E6\u30FC\u30B6\u30FC\u60C5\u5831\u3092\u53D6\u5F97\u3059\u308B:
|
|
75900
76192
|
- \`method\`: \`"GET"\`
|
|
75901
76193
|
- \`path\`: \`"/v1.0/me"\`
|
|
75902
76194
|
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306BOAuth\u63A5\u7D9A\u306E\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
|
|
@@ -75910,7 +76202,7 @@ var msTeamsOauthOnboarding = new ConnectorOnboarding({
|
|
|
75910
76202
|
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
75911
76203
|
en: `Follow these steps exactly. Do NOT make any API requests not listed in the steps below.
|
|
75912
76204
|
|
|
75913
|
-
1. Call \`${
|
|
76205
|
+
1. Call \`${requestToolName7}\` to fetch user info:
|
|
75914
76206
|
- \`method\`: \`"GET"\`
|
|
75915
76207
|
- \`path\`: \`"/v1.0/me"\`
|
|
75916
76208
|
2. If an error is returned, ask the user to check the OAuth connection settings
|
|
@@ -75934,17 +76226,17 @@ var msTeamsOauthOnboarding = new ConnectorOnboarding({
|
|
|
75934
76226
|
});
|
|
75935
76227
|
|
|
75936
76228
|
// ../connectors/src/connectors/ms-teams-oauth/parameters.ts
|
|
75937
|
-
var
|
|
76229
|
+
var parameters35 = {};
|
|
75938
76230
|
|
|
75939
76231
|
// ../connectors/src/connectors/ms-teams-oauth/index.ts
|
|
75940
|
-
var
|
|
76232
|
+
var tools35 = { request: requestTool20 };
|
|
75941
76233
|
var msTeamsOauthConnector = new ConnectorPlugin({
|
|
75942
76234
|
slug: "microsoft-teams",
|
|
75943
76235
|
authType: AUTH_TYPES.OAUTH,
|
|
75944
76236
|
name: "Microsoft Teams (OAuth)",
|
|
75945
76237
|
description: "Connect to Microsoft Teams for messaging, channels, and team data using OAuth.",
|
|
75946
76238
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6QM1sVuqarTJAB2UihVNQ9/12b8353c9b022916d72ef0f53349bae2/microsoft-teams-icon.svg",
|
|
75947
|
-
parameters:
|
|
76239
|
+
parameters: parameters35,
|
|
75948
76240
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
75949
76241
|
onboarding: msTeamsOauthOnboarding,
|
|
75950
76242
|
proxyPolicy: {
|
|
@@ -76047,7 +76339,7 @@ const res = await teams.request("/v1.0/me/joinedTeams");
|
|
|
76047
76339
|
const data = await res.json();
|
|
76048
76340
|
\`\`\``
|
|
76049
76341
|
},
|
|
76050
|
-
tools:
|
|
76342
|
+
tools: tools35,
|
|
76051
76343
|
async checkConnection(_params, config) {
|
|
76052
76344
|
const { proxyFetch } = config;
|
|
76053
76345
|
try {
|
|
@@ -76084,11 +76376,11 @@ var hubspotOnboarding2 = new ConnectorOnboarding({
|
|
|
76084
76376
|
});
|
|
76085
76377
|
|
|
76086
76378
|
// ../connectors/src/connectors/hubspot/parameters.ts
|
|
76087
|
-
var
|
|
76379
|
+
var parameters36 = {
|
|
76088
76380
|
apiKey: new ParameterDefinition({
|
|
76089
76381
|
slug: "api-key",
|
|
76090
|
-
name: "
|
|
76091
|
-
description: "Your HubSpot
|
|
76382
|
+
name: "Private App Access Token",
|
|
76383
|
+
description: "Your HubSpot Private App Access Token for authentication (starts with pat-). You can find it at Settings \u2192 Development \u2192 Legacy Apps \u2192 your Private App.",
|
|
76092
76384
|
envVarBaseKey: "HUBSPOT_API_KEY",
|
|
76093
76385
|
type: "text",
|
|
76094
76386
|
secret: true,
|
|
@@ -76097,41 +76389,41 @@ var parameters35 = {
|
|
|
76097
76389
|
};
|
|
76098
76390
|
|
|
76099
76391
|
// ../connectors/src/connectors/hubspot/tools/request.ts
|
|
76100
|
-
import { z as
|
|
76101
|
-
var
|
|
76102
|
-
var
|
|
76103
|
-
var
|
|
76104
|
-
toolUseIntent:
|
|
76392
|
+
import { z as z39 } from "zod";
|
|
76393
|
+
var BASE_URL17 = "https://api.hubapi.com";
|
|
76394
|
+
var REQUEST_TIMEOUT_MS28 = 6e4;
|
|
76395
|
+
var inputSchema39 = z39.object({
|
|
76396
|
+
toolUseIntent: z39.string().optional().describe(
|
|
76105
76397
|
"Brief description of what you intend to accomplish with this tool call"
|
|
76106
76398
|
),
|
|
76107
|
-
connectionId:
|
|
76108
|
-
method:
|
|
76399
|
+
connectionId: z39.string().describe("ID of the HubSpot connection to use"),
|
|
76400
|
+
method: z39.enum(["GET", "POST", "PATCH", "DELETE"]).describe(
|
|
76109
76401
|
"HTTP method. GET for reading resources, POST for creating or searching, PATCH for updating, DELETE for removing."
|
|
76110
76402
|
),
|
|
76111
|
-
path:
|
|
76403
|
+
path: z39.string().describe(
|
|
76112
76404
|
"API path appended to https://api.hubapi.com (e.g., '/crm/v3/objects/contacts', '/crm/v3/objects/deals', '/crm/v3/objects/contacts/search')"
|
|
76113
76405
|
),
|
|
76114
|
-
body:
|
|
76406
|
+
body: z39.record(z39.string(), z39.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
76115
76407
|
});
|
|
76116
|
-
var
|
|
76117
|
-
|
|
76118
|
-
success:
|
|
76119
|
-
status:
|
|
76120
|
-
data:
|
|
76408
|
+
var outputSchema39 = z39.discriminatedUnion("success", [
|
|
76409
|
+
z39.object({
|
|
76410
|
+
success: z39.literal(true),
|
|
76411
|
+
status: z39.number(),
|
|
76412
|
+
data: z39.record(z39.string(), z39.unknown())
|
|
76121
76413
|
}),
|
|
76122
|
-
|
|
76123
|
-
success:
|
|
76124
|
-
error:
|
|
76414
|
+
z39.object({
|
|
76415
|
+
success: z39.literal(false),
|
|
76416
|
+
error: z39.string()
|
|
76125
76417
|
})
|
|
76126
76418
|
]);
|
|
76127
|
-
var
|
|
76419
|
+
var requestTool21 = new ConnectorTool({
|
|
76128
76420
|
name: "request",
|
|
76129
76421
|
description: `Send authenticated requests to the HubSpot API.
|
|
76130
76422
|
Authentication is handled automatically using the Personal Access Key (Bearer token).
|
|
76131
76423
|
Use this tool for all HubSpot API interactions: querying contacts, deals, companies, tickets, and other CRM objects.
|
|
76132
76424
|
Use the search endpoint (POST /crm/v3/objects/{objectType}/search) for complex queries with filters.`,
|
|
76133
|
-
inputSchema:
|
|
76134
|
-
outputSchema:
|
|
76425
|
+
inputSchema: inputSchema39,
|
|
76426
|
+
outputSchema: outputSchema39,
|
|
76135
76427
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
76136
76428
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
76137
76429
|
if (!connection) {
|
|
@@ -76144,10 +76436,10 @@ Use the search endpoint (POST /crm/v3/objects/{objectType}/search) for complex q
|
|
|
76144
76436
|
`[connector-request] hubspot/${connection.name}: ${method} ${path4}`
|
|
76145
76437
|
);
|
|
76146
76438
|
try {
|
|
76147
|
-
const apiKey =
|
|
76148
|
-
const url = `${
|
|
76439
|
+
const apiKey = parameters36.apiKey.getValue(connection);
|
|
76440
|
+
const url = `${BASE_URL17}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
76149
76441
|
const controller = new AbortController();
|
|
76150
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
76442
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS28);
|
|
76151
76443
|
try {
|
|
76152
76444
|
const response = await fetch(url, {
|
|
76153
76445
|
method,
|
|
@@ -76175,14 +76467,14 @@ Use the search endpoint (POST /crm/v3/objects/{objectType}/search) for complex q
|
|
|
76175
76467
|
});
|
|
76176
76468
|
|
|
76177
76469
|
// ../connectors/src/connectors/hubspot/index.ts
|
|
76178
|
-
var
|
|
76470
|
+
var tools36 = { request: requestTool21 };
|
|
76179
76471
|
var hubspotConnector = new ConnectorPlugin({
|
|
76180
76472
|
slug: "hubspot",
|
|
76181
|
-
authType:
|
|
76473
|
+
authType: null,
|
|
76182
76474
|
name: "HubSpot",
|
|
76183
76475
|
description: "Connect to HubSpot CRM for contacts, deals, companies, and marketing data using a Personal Access Key.",
|
|
76184
76476
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5UcSkKkzhUMA4RsM45ynuo/43b967e36915ca0fc5d277684b204320/hubspot.svg",
|
|
76185
|
-
parameters:
|
|
76477
|
+
parameters: parameters36,
|
|
76186
76478
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
76187
76479
|
onboarding: hubspotOnboarding2,
|
|
76188
76480
|
systemPrompt: {
|
|
@@ -76319,7 +76611,7 @@ export default async function handler(c: Context) {
|
|
|
76319
76611
|
- \`limit\` \u2014 \u30DA\u30FC\u30B8\u3042\u305F\u308A\u306E\u6700\u5927\u7D50\u679C\u6570\uFF08\u6700\u5927100\uFF09
|
|
76320
76612
|
- \`after\` \u2014 \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u30AA\u30D5\u30BB\u30C3\u30C8`
|
|
76321
76613
|
},
|
|
76322
|
-
tools:
|
|
76614
|
+
tools: tools36
|
|
76323
76615
|
});
|
|
76324
76616
|
|
|
76325
76617
|
// ../connectors/src/connectors/jira/setup.ts
|
|
@@ -76335,7 +76627,7 @@ var jiraOnboarding = new ConnectorOnboarding({
|
|
|
76335
76627
|
});
|
|
76336
76628
|
|
|
76337
76629
|
// ../connectors/src/connectors/jira/parameters.ts
|
|
76338
|
-
var
|
|
76630
|
+
var parameters37 = {
|
|
76339
76631
|
instanceUrl: new ParameterDefinition({
|
|
76340
76632
|
slug: "instance-url",
|
|
76341
76633
|
name: "Jira Instance URL",
|
|
@@ -76366,34 +76658,34 @@ var parameters36 = {
|
|
|
76366
76658
|
};
|
|
76367
76659
|
|
|
76368
76660
|
// ../connectors/src/connectors/jira/tools/request.ts
|
|
76369
|
-
import { z as
|
|
76370
|
-
var
|
|
76371
|
-
var
|
|
76372
|
-
toolUseIntent:
|
|
76373
|
-
connectionId:
|
|
76374
|
-
method:
|
|
76375
|
-
path:
|
|
76376
|
-
body:
|
|
76661
|
+
import { z as z40 } from "zod";
|
|
76662
|
+
var REQUEST_TIMEOUT_MS29 = 6e4;
|
|
76663
|
+
var inputSchema40 = z40.object({
|
|
76664
|
+
toolUseIntent: z40.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
76665
|
+
connectionId: z40.string().describe("ID of the Jira connection to use"),
|
|
76666
|
+
method: z40.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method. Use GET to read resources, POST to create or search, PUT to update, DELETE to remove."),
|
|
76667
|
+
path: z40.string().describe("API path relative to /rest/api/3/ (e.g., 'project', 'search', 'issue/PROJ-123'). Query parameters can be appended (e.g., 'project?maxResults=50')."),
|
|
76668
|
+
body: z40.record(z40.string(), z40.unknown()).optional().describe("Request body as JSON object. Required for POST and PUT requests (e.g., issue creation, JQL search).")
|
|
76377
76669
|
});
|
|
76378
|
-
var
|
|
76379
|
-
|
|
76380
|
-
success:
|
|
76381
|
-
status:
|
|
76382
|
-
data:
|
|
76670
|
+
var outputSchema40 = z40.discriminatedUnion("success", [
|
|
76671
|
+
z40.object({
|
|
76672
|
+
success: z40.literal(true),
|
|
76673
|
+
status: z40.number(),
|
|
76674
|
+
data: z40.union([z40.record(z40.string(), z40.unknown()), z40.array(z40.unknown())])
|
|
76383
76675
|
}),
|
|
76384
|
-
|
|
76385
|
-
success:
|
|
76386
|
-
error:
|
|
76676
|
+
z40.object({
|
|
76677
|
+
success: z40.literal(false),
|
|
76678
|
+
error: z40.string()
|
|
76387
76679
|
})
|
|
76388
76680
|
]);
|
|
76389
|
-
var
|
|
76681
|
+
var requestTool22 = new ConnectorTool({
|
|
76390
76682
|
name: "request",
|
|
76391
76683
|
description: `Send authenticated requests to the Jira Cloud REST API (v3).
|
|
76392
76684
|
Authentication is handled automatically using Basic Auth (email + API token).
|
|
76393
76685
|
Use this tool for all Jira operations: listing projects, searching issues with JQL, creating/updating issues, managing transitions, and adding comments.
|
|
76394
76686
|
The base URL and authentication credentials are configured per connection \u2014 only specify the API path relative to /rest/api/3/.`,
|
|
76395
|
-
inputSchema:
|
|
76396
|
-
outputSchema:
|
|
76687
|
+
inputSchema: inputSchema40,
|
|
76688
|
+
outputSchema: outputSchema40,
|
|
76397
76689
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
76398
76690
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
76399
76691
|
if (!connection) {
|
|
@@ -76401,13 +76693,13 @@ The base URL and authentication credentials are configured per connection \u2014
|
|
|
76401
76693
|
}
|
|
76402
76694
|
console.log(`[connector-request] jira-api-key/${connection.name}: ${method} ${path4}`);
|
|
76403
76695
|
try {
|
|
76404
|
-
const instanceUrl =
|
|
76405
|
-
const email =
|
|
76406
|
-
const apiToken =
|
|
76696
|
+
const instanceUrl = parameters37.instanceUrl.getValue(connection);
|
|
76697
|
+
const email = parameters37.email.getValue(connection);
|
|
76698
|
+
const apiToken = parameters37.apiToken.getValue(connection);
|
|
76407
76699
|
const baseUrl = `${instanceUrl.replace(/\/+$/, "")}/rest/api/3/${path4}`;
|
|
76408
76700
|
const credentials = Buffer.from(`${email}:${apiToken}`).toString("base64");
|
|
76409
76701
|
const controller = new AbortController();
|
|
76410
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
76702
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS29);
|
|
76411
76703
|
try {
|
|
76412
76704
|
const headers = {
|
|
76413
76705
|
Authorization: `Basic ${credentials}`,
|
|
@@ -76443,14 +76735,14 @@ The base URL and authentication credentials are configured per connection \u2014
|
|
|
76443
76735
|
});
|
|
76444
76736
|
|
|
76445
76737
|
// ../connectors/src/connectors/jira/index.ts
|
|
76446
|
-
var
|
|
76738
|
+
var tools37 = { request: requestTool22 };
|
|
76447
76739
|
var jiraConnector = new ConnectorPlugin({
|
|
76448
76740
|
slug: "jira",
|
|
76449
76741
|
authType: AUTH_TYPES.API_KEY,
|
|
76450
76742
|
name: "Jira (API Key)",
|
|
76451
76743
|
description: "Connect to Jira Cloud for issue tracking, project management, and workflow data retrieval using API token authentication.",
|
|
76452
76744
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5zt4yjb36szSPPkCECYlPL/bc3e7223dc84fb16a1cce53a80f5afcc/jira.png",
|
|
76453
|
-
parameters:
|
|
76745
|
+
parameters: parameters37,
|
|
76454
76746
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
76455
76747
|
onboarding: jiraOnboarding,
|
|
76456
76748
|
systemPrompt: {
|
|
@@ -76595,7 +76887,7 @@ await jira.request("/rest/api/3/issue", {
|
|
|
76595
76887
|
- \u95A2\u6570: currentUser(), startOfDay(), endOfWeek()
|
|
76596
76888
|
- \u30C6\u30AD\u30B9\u30C8\u691C\u7D22: summary ~ "\u30AD\u30FC\u30EF\u30FC\u30C9"`
|
|
76597
76889
|
},
|
|
76598
|
-
tools:
|
|
76890
|
+
tools: tools37
|
|
76599
76891
|
});
|
|
76600
76892
|
|
|
76601
76893
|
// ../connectors/src/connectors/linear/setup.ts
|
|
@@ -76615,7 +76907,7 @@ var linearOnboarding = new ConnectorOnboarding({
|
|
|
76615
76907
|
});
|
|
76616
76908
|
|
|
76617
76909
|
// ../connectors/src/connectors/linear/parameters.ts
|
|
76618
|
-
var
|
|
76910
|
+
var parameters38 = {
|
|
76619
76911
|
apiKey: new ParameterDefinition({
|
|
76620
76912
|
slug: "api-key",
|
|
76621
76913
|
name: "Linear API Key",
|
|
@@ -76628,39 +76920,39 @@ var parameters37 = {
|
|
|
76628
76920
|
};
|
|
76629
76921
|
|
|
76630
76922
|
// ../connectors/src/connectors/linear/tools/request.ts
|
|
76631
|
-
import { z as
|
|
76632
|
-
var
|
|
76633
|
-
var
|
|
76634
|
-
var
|
|
76635
|
-
toolUseIntent:
|
|
76923
|
+
import { z as z41 } from "zod";
|
|
76924
|
+
var BASE_URL18 = "https://api.linear.app/graphql";
|
|
76925
|
+
var REQUEST_TIMEOUT_MS30 = 6e4;
|
|
76926
|
+
var inputSchema41 = z41.object({
|
|
76927
|
+
toolUseIntent: z41.string().optional().describe(
|
|
76636
76928
|
"Brief description of what you intend to accomplish with this tool call"
|
|
76637
76929
|
),
|
|
76638
|
-
connectionId:
|
|
76639
|
-
query:
|
|
76930
|
+
connectionId: z41.string().describe("ID of the Linear connection to use"),
|
|
76931
|
+
query: z41.string().describe(
|
|
76640
76932
|
`GraphQL query or mutation string. Use standard GraphQL syntax. Example: '{ issues(first: 10) { nodes { id title state { name } } } }' for queries, or 'mutation { issueCreate(input: { title: "Bug fix", teamId: "TEAM_ID" }) { success issue { id title } } }' for mutations.`
|
|
76641
76933
|
),
|
|
76642
|
-
variables:
|
|
76934
|
+
variables: z41.record(z41.string(), z41.unknown()).optional().describe(
|
|
76643
76935
|
'Optional GraphQL variables object. Use with parameterized queries, e.g. { "teamId": "abc-123", "first": 10 }'
|
|
76644
76936
|
)
|
|
76645
76937
|
});
|
|
76646
|
-
var
|
|
76647
|
-
|
|
76648
|
-
success:
|
|
76649
|
-
data:
|
|
76938
|
+
var outputSchema41 = z41.discriminatedUnion("success", [
|
|
76939
|
+
z41.object({
|
|
76940
|
+
success: z41.literal(true),
|
|
76941
|
+
data: z41.record(z41.string(), z41.unknown())
|
|
76650
76942
|
}),
|
|
76651
|
-
|
|
76652
|
-
success:
|
|
76653
|
-
error:
|
|
76943
|
+
z41.object({
|
|
76944
|
+
success: z41.literal(false),
|
|
76945
|
+
error: z41.string()
|
|
76654
76946
|
})
|
|
76655
76947
|
]);
|
|
76656
|
-
var
|
|
76948
|
+
var requestTool23 = new ConnectorTool({
|
|
76657
76949
|
name: "request",
|
|
76658
76950
|
description: `Send authenticated GraphQL queries and mutations to the Linear API (https://api.linear.app/graphql).
|
|
76659
76951
|
Use this tool for all Linear interactions: querying issues, projects, teams, cycles, users, labels, workflow states, and performing mutations like creating/updating issues and comments.
|
|
76660
76952
|
Linear's API is GraphQL-only \u2014 there is no REST API. All requests are POST with a JSON body containing "query" and optional "variables".
|
|
76661
76953
|
Archived resources are hidden by default; pass includeArchived: true in query arguments to include them. Pagination uses Relay-style cursors with first/after and last/before arguments.`,
|
|
76662
|
-
inputSchema:
|
|
76663
|
-
outputSchema:
|
|
76954
|
+
inputSchema: inputSchema41,
|
|
76955
|
+
outputSchema: outputSchema41,
|
|
76664
76956
|
async execute({ connectionId, query, variables }, connections) {
|
|
76665
76957
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
76666
76958
|
if (!connection) {
|
|
@@ -76673,13 +76965,13 @@ Archived resources are hidden by default; pass includeArchived: true in query ar
|
|
|
76673
76965
|
`[connector-request] linear/${connection.name}: GraphQL request`
|
|
76674
76966
|
);
|
|
76675
76967
|
try {
|
|
76676
|
-
const apiKey =
|
|
76968
|
+
const apiKey = parameters38.apiKey.getValue(connection);
|
|
76677
76969
|
const controller = new AbortController();
|
|
76678
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
76970
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS30);
|
|
76679
76971
|
try {
|
|
76680
76972
|
const body = { query };
|
|
76681
76973
|
if (variables) body.variables = variables;
|
|
76682
|
-
const response = await fetch(
|
|
76974
|
+
const response = await fetch(BASE_URL18, {
|
|
76683
76975
|
method: "POST",
|
|
76684
76976
|
headers: {
|
|
76685
76977
|
Authorization: apiKey,
|
|
@@ -76718,14 +77010,14 @@ Archived resources are hidden by default; pass includeArchived: true in query ar
|
|
|
76718
77010
|
});
|
|
76719
77011
|
|
|
76720
77012
|
// ../connectors/src/connectors/linear/index.ts
|
|
76721
|
-
var
|
|
77013
|
+
var tools38 = { request: requestTool23 };
|
|
76722
77014
|
var linearConnector = new ConnectorPlugin({
|
|
76723
77015
|
slug: "linear",
|
|
76724
77016
|
authType: null,
|
|
76725
77017
|
name: "Linear",
|
|
76726
77018
|
description: "Connect to Linear for project management data \u2014 issues, projects, teams, cycles, and more.",
|
|
76727
77019
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6oR77h6TeniXGdmnp2P2LX/a2ac8630ae52d164363adb0c695d9f0b/linear.webp",
|
|
76728
|
-
parameters:
|
|
77020
|
+
parameters: parameters38,
|
|
76729
77021
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
76730
77022
|
onboarding: linearOnboarding,
|
|
76731
77023
|
systemPrompt: {
|
|
@@ -76852,7 +77144,7 @@ export default async function handler(c: Context) {
|
|
|
76852
77144
|
- \`mutation { issueUpdate(id: "...", input: { stateId: "..." }) { success issue { id title state { name } } } }\` \u2014 Issue\u66F4\u65B0
|
|
76853
77145
|
- \`mutation { commentCreate(input: { issueId: "...", body: "..." }) { success comment { id body } } }\` \u2014 \u30B3\u30E1\u30F3\u30C8\u8FFD\u52A0`
|
|
76854
77146
|
},
|
|
76855
|
-
tools:
|
|
77147
|
+
tools: tools38
|
|
76856
77148
|
});
|
|
76857
77149
|
|
|
76858
77150
|
// ../connectors/src/connectors/asana/setup.ts
|
|
@@ -76870,7 +77162,7 @@ var asanaOnboarding = new ConnectorOnboarding({
|
|
|
76870
77162
|
});
|
|
76871
77163
|
|
|
76872
77164
|
// ../connectors/src/connectors/asana/parameters.ts
|
|
76873
|
-
var
|
|
77165
|
+
var parameters39 = {
|
|
76874
77166
|
personalAccessToken: new ParameterDefinition({
|
|
76875
77167
|
slug: "personal-access-token",
|
|
76876
77168
|
name: "Asana Personal Access Token",
|
|
@@ -76883,36 +77175,36 @@ var parameters38 = {
|
|
|
76883
77175
|
};
|
|
76884
77176
|
|
|
76885
77177
|
// ../connectors/src/connectors/asana/tools/request.ts
|
|
76886
|
-
import { z as
|
|
76887
|
-
var
|
|
76888
|
-
var
|
|
76889
|
-
var
|
|
76890
|
-
toolUseIntent:
|
|
77178
|
+
import { z as z42 } from "zod";
|
|
77179
|
+
var BASE_URL19 = "https://app.asana.com/api/1.0";
|
|
77180
|
+
var REQUEST_TIMEOUT_MS31 = 6e4;
|
|
77181
|
+
var inputSchema42 = z42.object({
|
|
77182
|
+
toolUseIntent: z42.string().optional().describe(
|
|
76891
77183
|
"Brief description of what you intend to accomplish with this tool call"
|
|
76892
77184
|
),
|
|
76893
|
-
connectionId:
|
|
76894
|
-
method:
|
|
77185
|
+
connectionId: z42.string().describe("ID of the Asana connection to use"),
|
|
77186
|
+
method: z42.enum(["GET", "POST", "PUT", "DELETE"]).describe(
|
|
76895
77187
|
"HTTP method. GET for reading resources, POST for creating, PUT for updating, DELETE for removing."
|
|
76896
77188
|
),
|
|
76897
|
-
path:
|
|
77189
|
+
path: z42.string().describe(
|
|
76898
77190
|
"API path (e.g., '/workspaces', '/projects', '/tasks', '/tasks/{task_gid}'). Query parameters can be appended (e.g., '/tasks?project=PROJECT_GID&opt_fields=name,completed')."
|
|
76899
77191
|
),
|
|
76900
|
-
body:
|
|
77192
|
+
body: z42.record(z42.string(), z42.unknown()).optional().describe(
|
|
76901
77193
|
'Request body (JSON) for POST/PUT requests. Wrap payload in a "data" key (e.g., { "data": { "name": "My Task", "workspace": "WORKSPACE_GID" } }).'
|
|
76902
77194
|
)
|
|
76903
77195
|
});
|
|
76904
|
-
var
|
|
76905
|
-
|
|
76906
|
-
success:
|
|
76907
|
-
status:
|
|
76908
|
-
data:
|
|
77196
|
+
var outputSchema42 = z42.discriminatedUnion("success", [
|
|
77197
|
+
z42.object({
|
|
77198
|
+
success: z42.literal(true),
|
|
77199
|
+
status: z42.number(),
|
|
77200
|
+
data: z42.record(z42.string(), z42.unknown())
|
|
76909
77201
|
}),
|
|
76910
|
-
|
|
76911
|
-
success:
|
|
76912
|
-
error:
|
|
77202
|
+
z42.object({
|
|
77203
|
+
success: z42.literal(false),
|
|
77204
|
+
error: z42.string()
|
|
76913
77205
|
})
|
|
76914
77206
|
]);
|
|
76915
|
-
var
|
|
77207
|
+
var requestTool24 = new ConnectorTool({
|
|
76916
77208
|
name: "request",
|
|
76917
77209
|
description: `Send authenticated requests to the Asana REST API.
|
|
76918
77210
|
Authentication is handled automatically using the Personal Access Token (Bearer token).
|
|
@@ -76933,8 +77225,8 @@ Common endpoints:
|
|
|
76933
77225
|
- GET /tasks/{task_gid}/stories \u2014 Get task comments/stories
|
|
76934
77226
|
|
|
76935
77227
|
Pagination: Use limit (1-100) and offset query parameters. The response includes next_page.offset for the next page.`,
|
|
76936
|
-
inputSchema:
|
|
76937
|
-
outputSchema:
|
|
77228
|
+
inputSchema: inputSchema42,
|
|
77229
|
+
outputSchema: outputSchema42,
|
|
76938
77230
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
76939
77231
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
76940
77232
|
if (!connection) {
|
|
@@ -76947,10 +77239,10 @@ Pagination: Use limit (1-100) and offset query parameters. The response includes
|
|
|
76947
77239
|
`[connector-request] asana/${connection.name}: ${method} ${path4}`
|
|
76948
77240
|
);
|
|
76949
77241
|
try {
|
|
76950
|
-
const token =
|
|
76951
|
-
const url = `${
|
|
77242
|
+
const token = parameters39.personalAccessToken.getValue(connection);
|
|
77243
|
+
const url = `${BASE_URL19}${path4}`;
|
|
76952
77244
|
const controller = new AbortController();
|
|
76953
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
77245
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS31);
|
|
76954
77246
|
try {
|
|
76955
77247
|
const response = await fetch(url, {
|
|
76956
77248
|
method,
|
|
@@ -76980,14 +77272,14 @@ Pagination: Use limit (1-100) and offset query parameters. The response includes
|
|
|
76980
77272
|
});
|
|
76981
77273
|
|
|
76982
77274
|
// ../connectors/src/connectors/asana/index.ts
|
|
76983
|
-
var
|
|
77275
|
+
var tools39 = { request: requestTool24 };
|
|
76984
77276
|
var asanaConnector = new ConnectorPlugin({
|
|
76985
77277
|
slug: "asana",
|
|
76986
77278
|
authType: null,
|
|
76987
77279
|
name: "Asana",
|
|
76988
77280
|
description: "Connect to Asana for project management, task tracking, and team collaboration data.",
|
|
76989
77281
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3eIdaoqzIIZs2Md0OoDJMf/2fa66e0841adb985da4d3120466f3ec4/asana-icon.png",
|
|
76990
|
-
parameters:
|
|
77282
|
+
parameters: parameters39,
|
|
76991
77283
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
76992
77284
|
onboarding: asanaOnboarding,
|
|
76993
77285
|
systemPrompt: {
|
|
@@ -77097,350 +77389,76 @@ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u30
|
|
|
77097
77389
|
- \`client.listUsers(workspaceGid, options?)\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30E6\u30FC\u30B6\u30FC\u4E00\u89A7
|
|
77098
77390
|
|
|
77099
77391
|
\`\`\`ts
|
|
77100
|
-
import type { Context } from "hono";
|
|
77101
|
-
import { connection } from "@squadbase/vite-server/connectors/asana";
|
|
77102
|
-
|
|
77103
|
-
const asana = connection("<connectionId>");
|
|
77104
|
-
|
|
77105
|
-
export default async function handler(c: Context) {
|
|
77106
|
-
const { projectGid } = await c.req.json<{ projectGid: string }>();
|
|
77107
|
-
|
|
77108
|
-
const { data: tasks } = await asana.listTasks(projectGid, {
|
|
77109
|
-
opt_fields: ["name", "completed", "assignee.name", "due_on"],
|
|
77110
|
-
limit: 50,
|
|
77111
|
-
});
|
|
77112
|
-
|
|
77113
|
-
return c.json({ tasks });
|
|
77114
|
-
}
|
|
77115
|
-
\`\`\`
|
|
77116
|
-
|
|
77117
|
-
### Asana REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
77118
|
-
|
|
77119
|
-
- \u30D9\u30FC\u30B9URL: \`https://app.asana.com/api/1.0\`
|
|
77120
|
-
- \u8A8D\u8A3C: Bearer\u30C8\u30FC\u30AF\u30F3\uFF08Personal Access Token\u3001\u81EA\u52D5\u8A2D\u5B9A\uFF09
|
|
77121
|
-
- \u66F8\u304D\u8FBC\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u30DA\u30A4\u30ED\u30FC\u30C9\u3092 \`data\` \u30AD\u30FC\u3067\u56F2\u3080: \`{ "data": { ... } }\`
|
|
77122
|
-
- \`opt_fields\` \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u7279\u5B9A\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6307\u5B9A\u3057\u3066\u30EC\u30B9\u30DD\u30F3\u30B9\u30B5\u30A4\u30BA\u3092\u524A\u6E1B\u53EF\u80FD
|
|
77123
|
-
- \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3: \`limit\`\uFF081-100\uFF09\u3068 \`offset\` \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3088\u308B\u30AA\u30D5\u30BB\u30C3\u30C8\u30D9\u30FC\u30B9\u3001\u30EC\u30B9\u30DD\u30F3\u30B9\u306B \`next_page.offset\` \u304C\u542B\u307E\u308C\u308B
|
|
77124
|
-
|
|
77125
|
-
#### \u30EA\u30BD\u30FC\u30B9\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
|
|
77126
|
-
|
|
77127
|
-
**\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9**
|
|
77128
|
-
- GET \`/workspaces\` \u2014 \u5168\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306E\u4E00\u89A7
|
|
77129
|
-
|
|
77130
|
-
**\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8**
|
|
77131
|
-
- GET \`/projects?workspace=WORKSPACE_GID\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7
|
|
77132
|
-
- GET \`/projects/{project_gid}\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u53D6\u5F97
|
|
77133
|
-
- POST \`/projects\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4F5C\u6210
|
|
77134
|
-
- PUT \`/projects/{project_gid}\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u66F4\u65B0
|
|
77135
|
-
|
|
77136
|
-
**\u30BF\u30B9\u30AF**
|
|
77137
|
-
- GET \`/tasks?project=PROJECT_GID\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30BF\u30B9\u30AF\u4E00\u89A7\uFF08project\u3001\u307E\u305F\u306Fassignee+workspace\u304C\u5FC5\u8981\uFF09
|
|
77138
|
-
- GET \`/tasks/{task_gid}\` \u2014 \u30BF\u30B9\u30AF\u306E\u53D6\u5F97
|
|
77139
|
-
- POST \`/tasks\` \u2014 \u30BF\u30B9\u30AF\u306E\u4F5C\u6210\uFF08body\u306Bworkspace\u307E\u305F\u306Fprojects\u304C\u5FC5\u8981\uFF09
|
|
77140
|
-
- PUT \`/tasks/{task_gid}\` \u2014 \u30BF\u30B9\u30AF\u306E\u66F4\u65B0
|
|
77141
|
-
- DELETE \`/tasks/{task_gid}\` \u2014 \u30BF\u30B9\u30AF\u306E\u524A\u9664
|
|
77142
|
-
- POST \`/tasks/{task_gid}/subtasks\` \u2014 \u30B5\u30D6\u30BF\u30B9\u30AF\u306E\u4F5C\u6210
|
|
77143
|
-
- GET \`/tasks/{task_gid}/subtasks\` \u2014 \u30B5\u30D6\u30BF\u30B9\u30AF\u306E\u4E00\u89A7
|
|
77144
|
-
|
|
77145
|
-
**\u30BB\u30AF\u30B7\u30E7\u30F3**
|
|
77146
|
-
- GET \`/sections?project=PROJECT_GID\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u4E00\u89A7
|
|
77147
|
-
- POST \`/sections/{section_gid}/addTask\` \u2014 \u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u30BF\u30B9\u30AF\u3092\u8FFD\u52A0
|
|
77148
|
-
|
|
77149
|
-
**\u30E6\u30FC\u30B6\u30FC**
|
|
77150
|
-
- GET \`/users?workspace=WORKSPACE_GID\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30E6\u30FC\u30B6\u30FC\u4E00\u89A7
|
|
77151
|
-
- GET \`/users/me\` \u2014 \u8A8D\u8A3C\u30E6\u30FC\u30B6\u30FC\u306E\u53D6\u5F97
|
|
77152
|
-
- GET \`/users/{user_gid}\` \u2014 \u30E6\u30FC\u30B6\u30FC\u306E\u53D6\u5F97
|
|
77153
|
-
|
|
77154
|
-
**\u30BF\u30B0**
|
|
77155
|
-
- GET \`/tags?workspace=WORKSPACE_GID\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30BF\u30B0\u4E00\u89A7
|
|
77156
|
-
|
|
77157
|
-
**\u30B9\u30C8\u30FC\u30EA\u30FC\uFF08\u30B3\u30E1\u30F3\u30C8\uFF09**
|
|
77158
|
-
- GET \`/tasks/{task_gid}/stories\` \u2014 \u30BF\u30B9\u30AF\u306E\u30B3\u30E1\u30F3\u30C8/\u30B9\u30C8\u30FC\u30EA\u30FC\u4E00\u89A7
|
|
77159
|
-
- POST \`/tasks/{task_gid}/stories\` \u2014 \u30BF\u30B9\u30AF\u306B\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0
|
|
77160
|
-
|
|
77161
|
-
**\u691C\u7D22**
|
|
77162
|
-
- GET \`/workspaces/{workspace_gid}/tasks/search?text=QUERY\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30BF\u30B9\u30AF\u691C\u7D22
|
|
77163
|
-
|
|
77164
|
-
#### \u3088\u304F\u4F7F\u3046opt_fields
|
|
77165
|
-
- \u30BF\u30B9\u30AF: name, completed, assignee, assignee.name, due_on, due_at, created_at, modified_at, notes, projects, projects.name, tags, tags.name, parent, parent.name, memberships, memberships.section, memberships.section.name, custom_fields
|
|
77166
|
-
- \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8: name, archived, created_at, modified_at, owner, owner.name, team, team.name, members
|
|
77167
|
-
- \u30E6\u30FC\u30B6\u30FC: name, email, photo`
|
|
77168
|
-
},
|
|
77169
|
-
tools: tools38
|
|
77170
|
-
});
|
|
77171
|
-
|
|
77172
|
-
// ../connectors/src/connectors/trino/setup.ts
|
|
77173
|
-
var trinoOnboarding = new ConnectorOnboarding({
|
|
77174
|
-
dataOverviewInstructions: {
|
|
77175
|
-
en: `1. Use executeQuery to list catalogs: \`SHOW CATALOGS\`
|
|
77176
|
-
2. Use executeQuery to list schemas in a catalog: \`SHOW SCHEMAS IN catalog_name\`
|
|
77177
|
-
3. Use executeQuery to list tables in a schema: \`SHOW TABLES IN catalog_name.schema_name\`
|
|
77178
|
-
4. For key tables, use executeQuery to get column info: \`DESCRIBE catalog_name.schema_name.table_name\`
|
|
77179
|
-
5. Sample up to 3 tables with \`SELECT * FROM catalog_name.schema_name.table_name LIMIT 5\` if column info alone is insufficient`,
|
|
77180
|
-
ja: `1. executeQuery \u3067\u30AB\u30BF\u30ED\u30B0\u4E00\u89A7\u3092\u53D6\u5F97: \`SHOW CATALOGS\`
|
|
77181
|
-
2. executeQuery \u3067\u30B9\u30AD\u30FC\u30DE\u4E00\u89A7\u3092\u53D6\u5F97: \`SHOW SCHEMAS IN catalog_name\`
|
|
77182
|
-
3. executeQuery \u3067\u30C6\u30FC\u30D6\u30EB\u4E00\u89A7\u3092\u53D6\u5F97: \`SHOW TABLES IN catalog_name.schema_name\`
|
|
77183
|
-
4. \u4E3B\u8981\u30C6\u30FC\u30D6\u30EB\u306B\u3064\u3044\u3066 executeQuery \u3067\u30AB\u30E9\u30E0\u60C5\u5831\u3092\u53D6\u5F97: \`DESCRIBE catalog_name.schema_name.table_name\`
|
|
77184
|
-
5. \u30AB\u30E9\u30E0\u60C5\u5831\u3060\u3051\u3067\u306F\u4E0D\u5341\u5206\u306A\u5834\u5408\u3001\u6700\u59273\u30C6\u30FC\u30D6\u30EB\u3092 \`SELECT * FROM catalog_name.schema_name.table_name LIMIT 5\` \u3067\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0`
|
|
77185
|
-
}
|
|
77186
|
-
});
|
|
77187
|
-
|
|
77188
|
-
// ../connectors/src/connectors/trino/parameters.ts
|
|
77189
|
-
var parameters39 = {
|
|
77190
|
-
host: new ParameterDefinition({
|
|
77191
|
-
slug: "host",
|
|
77192
|
-
name: "Trino Server URL",
|
|
77193
|
-
description: "The Trino server URL (e.g., https://trino.example.com:8443).",
|
|
77194
|
-
envVarBaseKey: "TRINO_HOST",
|
|
77195
|
-
type: "text",
|
|
77196
|
-
secret: false,
|
|
77197
|
-
required: true
|
|
77198
|
-
}),
|
|
77199
|
-
user: new ParameterDefinition({
|
|
77200
|
-
slug: "user",
|
|
77201
|
-
name: "Trino User",
|
|
77202
|
-
description: "The username for Trino authentication.",
|
|
77203
|
-
envVarBaseKey: "TRINO_USER",
|
|
77204
|
-
type: "text",
|
|
77205
|
-
secret: false,
|
|
77206
|
-
required: true
|
|
77207
|
-
}),
|
|
77208
|
-
password: new ParameterDefinition({
|
|
77209
|
-
slug: "password",
|
|
77210
|
-
name: "Trino Password",
|
|
77211
|
-
description: "The password for Trino authentication. Leave empty if not required.",
|
|
77212
|
-
envVarBaseKey: "TRINO_PASSWORD",
|
|
77213
|
-
type: "text",
|
|
77214
|
-
secret: true,
|
|
77215
|
-
required: false
|
|
77216
|
-
}),
|
|
77217
|
-
catalog: new ParameterDefinition({
|
|
77218
|
-
slug: "catalog",
|
|
77219
|
-
name: "Trino Catalog",
|
|
77220
|
-
description: "The default catalog to use (e.g., hive, iceberg, postgresql).",
|
|
77221
|
-
envVarBaseKey: "TRINO_CATALOG",
|
|
77222
|
-
type: "text",
|
|
77223
|
-
secret: false,
|
|
77224
|
-
required: false
|
|
77225
|
-
}),
|
|
77226
|
-
schema: new ParameterDefinition({
|
|
77227
|
-
slug: "schema",
|
|
77228
|
-
name: "Trino Schema",
|
|
77229
|
-
description: "The default schema to use within the catalog.",
|
|
77230
|
-
envVarBaseKey: "TRINO_SCHEMA",
|
|
77231
|
-
type: "text",
|
|
77232
|
-
secret: false,
|
|
77233
|
-
required: false
|
|
77234
|
-
})
|
|
77235
|
-
};
|
|
77236
|
-
|
|
77237
|
-
// ../connectors/src/connectors/trino/tools/execute-query.ts
|
|
77238
|
-
import { z as z42 } from "zod";
|
|
77239
|
-
var MAX_ROWS11 = 500;
|
|
77240
|
-
var QUERY_TIMEOUT_MS4 = 6e4;
|
|
77241
|
-
var inputSchema42 = z42.object({
|
|
77242
|
-
toolUseIntent: z42.string().optional().describe(
|
|
77243
|
-
"Brief description of what you intend to accomplish with this tool call"
|
|
77244
|
-
),
|
|
77245
|
-
connectionId: z42.string().describe("ID of the Trino connection to use"),
|
|
77246
|
-
sql: z42.string().describe("Trino SQL query. Always include LIMIT in queries.")
|
|
77247
|
-
});
|
|
77248
|
-
var outputSchema42 = z42.discriminatedUnion("success", [
|
|
77249
|
-
z42.object({
|
|
77250
|
-
success: z42.literal(true),
|
|
77251
|
-
rowCount: z42.number(),
|
|
77252
|
-
truncated: z42.boolean(),
|
|
77253
|
-
rows: z42.array(z42.record(z42.string(), z42.unknown()))
|
|
77254
|
-
}),
|
|
77255
|
-
z42.object({
|
|
77256
|
-
success: z42.literal(false),
|
|
77257
|
-
error: z42.string()
|
|
77258
|
-
})
|
|
77259
|
-
]);
|
|
77260
|
-
var executeQueryTool11 = new ConnectorTool({
|
|
77261
|
-
name: "executeQuery",
|
|
77262
|
-
description: `Execute SQL against Trino. Returns up to ${MAX_ROWS11} rows.
|
|
77263
|
-
Use for: schema exploration (SHOW CATALOGS, SHOW SCHEMAS, SHOW TABLES, DESCRIBE), data sampling, analytical queries across federated data sources.
|
|
77264
|
-
Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
77265
|
-
inputSchema: inputSchema42,
|
|
77266
|
-
outputSchema: outputSchema42,
|
|
77267
|
-
async execute({ connectionId, sql }, connections) {
|
|
77268
|
-
const connection = connections.find((c6) => c6.id === connectionId);
|
|
77269
|
-
if (!connection) {
|
|
77270
|
-
return {
|
|
77271
|
-
success: false,
|
|
77272
|
-
error: `Connection ${connectionId} not found`
|
|
77273
|
-
};
|
|
77274
|
-
}
|
|
77275
|
-
console.log(
|
|
77276
|
-
`[connector-query] trino/${connection.name}: ${sql}`
|
|
77277
|
-
);
|
|
77278
|
-
let host;
|
|
77279
|
-
try {
|
|
77280
|
-
const { Trino, BasicAuth } = await import("trino-client");
|
|
77281
|
-
host = parameters39.host.getValue(connection);
|
|
77282
|
-
const user = parameters39.user.getValue(connection);
|
|
77283
|
-
const password = parameters39.password.tryGetValue(connection);
|
|
77284
|
-
const catalog = parameters39.catalog.tryGetValue(connection);
|
|
77285
|
-
const schema = parameters39.schema.tryGetValue(connection);
|
|
77286
|
-
const trino = Trino.create({
|
|
77287
|
-
server: host,
|
|
77288
|
-
catalog: catalog || void 0,
|
|
77289
|
-
schema: schema || void 0,
|
|
77290
|
-
auth: new BasicAuth(user, password || void 0)
|
|
77291
|
-
});
|
|
77292
|
-
const iter = await trino.query(sql);
|
|
77293
|
-
const columns = [];
|
|
77294
|
-
const rows = [];
|
|
77295
|
-
let truncated = false;
|
|
77296
|
-
const timeout = new Promise(
|
|
77297
|
-
(_, reject) => setTimeout(() => reject(new Error("Query timed out after 60 seconds")), QUERY_TIMEOUT_MS4)
|
|
77298
|
-
);
|
|
77299
|
-
const collect = async () => {
|
|
77300
|
-
for await (const result of iter) {
|
|
77301
|
-
if (result.columns && columns.length === 0) {
|
|
77302
|
-
columns.push(...result.columns);
|
|
77303
|
-
}
|
|
77304
|
-
if (result.data) {
|
|
77305
|
-
for (const row of result.data) {
|
|
77306
|
-
if (rows.length >= MAX_ROWS11) {
|
|
77307
|
-
truncated = true;
|
|
77308
|
-
break;
|
|
77309
|
-
}
|
|
77310
|
-
const obj = {};
|
|
77311
|
-
columns.forEach((col, i6) => {
|
|
77312
|
-
obj[col.name] = row[i6];
|
|
77313
|
-
});
|
|
77314
|
-
rows.push(obj);
|
|
77315
|
-
}
|
|
77316
|
-
if (truncated) break;
|
|
77317
|
-
}
|
|
77318
|
-
}
|
|
77319
|
-
};
|
|
77320
|
-
await Promise.race([collect(), timeout]);
|
|
77321
|
-
return {
|
|
77322
|
-
success: true,
|
|
77323
|
-
rowCount: rows.length,
|
|
77324
|
-
truncated,
|
|
77325
|
-
rows
|
|
77326
|
-
};
|
|
77327
|
-
} catch (err) {
|
|
77328
|
-
let msg = err instanceof Error ? err.message : String(err);
|
|
77329
|
-
if (host) {
|
|
77330
|
-
msg = msg.replaceAll(host, "***");
|
|
77331
|
-
}
|
|
77332
|
-
return { success: false, error: msg };
|
|
77333
|
-
}
|
|
77334
|
-
}
|
|
77335
|
-
});
|
|
77392
|
+
import type { Context } from "hono";
|
|
77393
|
+
import { connection } from "@squadbase/vite-server/connectors/asana";
|
|
77336
77394
|
|
|
77337
|
-
|
|
77338
|
-
var tools39 = { executeQuery: executeQueryTool11 };
|
|
77339
|
-
var trinoConnector = new ConnectorPlugin({
|
|
77340
|
-
slug: "trino",
|
|
77341
|
-
authType: null,
|
|
77342
|
-
name: "Trino",
|
|
77343
|
-
description: "Connect to Trino for distributed SQL query engine across federated data sources.",
|
|
77344
|
-
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/8jqL4EZwHKnK5QzyNWkp2/e5831a080c8192cb18fb864cabd51c23/trino.png",
|
|
77345
|
-
parameters: parameters39,
|
|
77346
|
-
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
77347
|
-
onboarding: trinoOnboarding,
|
|
77348
|
-
systemPrompt: {
|
|
77349
|
-
en: `### Tools
|
|
77395
|
+
const asana = connection("<connectionId>");
|
|
77350
77396
|
|
|
77351
|
-
|
|
77397
|
+
export default async function handler(c: Context) {
|
|
77398
|
+
const { projectGid } = await c.req.json<{ projectGid: string }>();
|
|
77352
77399
|
|
|
77353
|
-
|
|
77400
|
+
const { data: tasks } = await asana.listTasks(projectGid, {
|
|
77401
|
+
opt_fields: ["name", "completed", "assignee.name", "due_on"],
|
|
77402
|
+
limit: 50,
|
|
77403
|
+
});
|
|
77354
77404
|
|
|
77355
|
-
|
|
77405
|
+
return c.json({ tasks });
|
|
77406
|
+
}
|
|
77407
|
+
\`\`\`
|
|
77356
77408
|
|
|
77357
|
-
###
|
|
77358
|
-
- Trino uses ANSI SQL syntax with extensions for federated queries
|
|
77359
|
-
- Use fully qualified names: \`catalog.schema.table\` for cross-catalog queries
|
|
77360
|
-
- Schema exploration commands:
|
|
77361
|
-
- List catalogs: \`SHOW CATALOGS\`
|
|
77362
|
-
- List schemas: \`SHOW SCHEMAS IN catalog_name\`
|
|
77363
|
-
- List tables: \`SHOW TABLES IN catalog_name.schema_name\`
|
|
77364
|
-
- List columns: \`DESCRIBE catalog_name.schema_name.table_name\`
|
|
77365
|
-
- Table details: \`SHOW COLUMNS FROM catalog_name.schema_name.table_name\`
|
|
77366
|
-
- INFORMATION_SCHEMA is available per catalog: \`SELECT * FROM catalog_name.information_schema.tables\`
|
|
77367
|
-
- Always include LIMIT in queries`,
|
|
77368
|
-
ja: `### \u30C4\u30FC\u30EB
|
|
77409
|
+
### Asana REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
77369
77410
|
|
|
77370
|
-
-
|
|
77411
|
+
- \u30D9\u30FC\u30B9URL: \`https://app.asana.com/api/1.0\`
|
|
77412
|
+
- \u8A8D\u8A3C: Bearer\u30C8\u30FC\u30AF\u30F3\uFF08Personal Access Token\u3001\u81EA\u52D5\u8A2D\u5B9A\uFF09
|
|
77413
|
+
- \u66F8\u304D\u8FBC\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u30DA\u30A4\u30ED\u30FC\u30C9\u3092 \`data\` \u30AD\u30FC\u3067\u56F2\u3080: \`{ "data": { ... } }\`
|
|
77414
|
+
- \`opt_fields\` \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u7279\u5B9A\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6307\u5B9A\u3057\u3066\u30EC\u30B9\u30DD\u30F3\u30B9\u30B5\u30A4\u30BA\u3092\u524A\u6E1B\u53EF\u80FD
|
|
77415
|
+
- \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3: \`limit\`\uFF081-100\uFF09\u3068 \`offset\` \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3088\u308B\u30AA\u30D5\u30BB\u30C3\u30C8\u30D9\u30FC\u30B9\u3001\u30EC\u30B9\u30DD\u30F3\u30B9\u306B \`next_page.offset\` \u304C\u542B\u307E\u308C\u308B
|
|
77371
77416
|
|
|
77372
|
-
|
|
77417
|
+
#### \u30EA\u30BD\u30FC\u30B9\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
|
|
77373
77418
|
|
|
77374
|
-
\
|
|
77419
|
+
**\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9**
|
|
77420
|
+
- GET \`/workspaces\` \u2014 \u5168\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306E\u4E00\u89A7
|
|
77375
77421
|
|
|
77376
|
-
|
|
77377
|
-
-
|
|
77378
|
-
- \
|
|
77379
|
-
- \
|
|
77380
|
-
|
|
77381
|
-
|
|
77382
|
-
|
|
77383
|
-
|
|
77384
|
-
|
|
77385
|
-
-
|
|
77386
|
-
-
|
|
77387
|
-
|
|
77388
|
-
|
|
77389
|
-
|
|
77390
|
-
|
|
77391
|
-
|
|
77392
|
-
|
|
77393
|
-
|
|
77394
|
-
|
|
77395
|
-
|
|
77396
|
-
|
|
77397
|
-
|
|
77398
|
-
|
|
77399
|
-
|
|
77400
|
-
|
|
77401
|
-
|
|
77402
|
-
|
|
77403
|
-
|
|
77404
|
-
|
|
77405
|
-
|
|
77406
|
-
|
|
77407
|
-
|
|
77408
|
-
|
|
77409
|
-
|
|
77422
|
+
**\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8**
|
|
77423
|
+
- GET \`/projects?workspace=WORKSPACE_GID\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7
|
|
77424
|
+
- GET \`/projects/{project_gid}\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u53D6\u5F97
|
|
77425
|
+
- POST \`/projects\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4F5C\u6210
|
|
77426
|
+
- PUT \`/projects/{project_gid}\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u66F4\u65B0
|
|
77427
|
+
|
|
77428
|
+
**\u30BF\u30B9\u30AF**
|
|
77429
|
+
- GET \`/tasks?project=PROJECT_GID\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30BF\u30B9\u30AF\u4E00\u89A7\uFF08project\u3001\u307E\u305F\u306Fassignee+workspace\u304C\u5FC5\u8981\uFF09
|
|
77430
|
+
- GET \`/tasks/{task_gid}\` \u2014 \u30BF\u30B9\u30AF\u306E\u53D6\u5F97
|
|
77431
|
+
- POST \`/tasks\` \u2014 \u30BF\u30B9\u30AF\u306E\u4F5C\u6210\uFF08body\u306Bworkspace\u307E\u305F\u306Fprojects\u304C\u5FC5\u8981\uFF09
|
|
77432
|
+
- PUT \`/tasks/{task_gid}\` \u2014 \u30BF\u30B9\u30AF\u306E\u66F4\u65B0
|
|
77433
|
+
- DELETE \`/tasks/{task_gid}\` \u2014 \u30BF\u30B9\u30AF\u306E\u524A\u9664
|
|
77434
|
+
- POST \`/tasks/{task_gid}/subtasks\` \u2014 \u30B5\u30D6\u30BF\u30B9\u30AF\u306E\u4F5C\u6210
|
|
77435
|
+
- GET \`/tasks/{task_gid}/subtasks\` \u2014 \u30B5\u30D6\u30BF\u30B9\u30AF\u306E\u4E00\u89A7
|
|
77436
|
+
|
|
77437
|
+
**\u30BB\u30AF\u30B7\u30E7\u30F3**
|
|
77438
|
+
- GET \`/sections?project=PROJECT_GID\` \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u4E00\u89A7
|
|
77439
|
+
- POST \`/sections/{section_gid}/addTask\` \u2014 \u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u30BF\u30B9\u30AF\u3092\u8FFD\u52A0
|
|
77440
|
+
|
|
77441
|
+
**\u30E6\u30FC\u30B6\u30FC**
|
|
77442
|
+
- GET \`/users?workspace=WORKSPACE_GID\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30E6\u30FC\u30B6\u30FC\u4E00\u89A7
|
|
77443
|
+
- GET \`/users/me\` \u2014 \u8A8D\u8A3C\u30E6\u30FC\u30B6\u30FC\u306E\u53D6\u5F97
|
|
77444
|
+
- GET \`/users/{user_gid}\` \u2014 \u30E6\u30FC\u30B6\u30FC\u306E\u53D6\u5F97
|
|
77445
|
+
|
|
77446
|
+
**\u30BF\u30B0**
|
|
77447
|
+
- GET \`/tags?workspace=WORKSPACE_GID\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30BF\u30B0\u4E00\u89A7
|
|
77448
|
+
|
|
77449
|
+
**\u30B9\u30C8\u30FC\u30EA\u30FC\uFF08\u30B3\u30E1\u30F3\u30C8\uFF09**
|
|
77450
|
+
- GET \`/tasks/{task_gid}/stories\` \u2014 \u30BF\u30B9\u30AF\u306E\u30B3\u30E1\u30F3\u30C8/\u30B9\u30C8\u30FC\u30EA\u30FC\u4E00\u89A7
|
|
77451
|
+
- POST \`/tasks/{task_gid}/stories\` \u2014 \u30BF\u30B9\u30AF\u306B\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0
|
|
77452
|
+
|
|
77453
|
+
**\u691C\u7D22**
|
|
77454
|
+
- GET \`/workspaces/{workspace_gid}/tasks/search?text=QUERY\` \u2014 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u5185\u306E\u30BF\u30B9\u30AF\u691C\u7D22
|
|
77455
|
+
|
|
77456
|
+
#### \u3088\u304F\u4F7F\u3046opt_fields
|
|
77457
|
+
- \u30BF\u30B9\u30AF: name, completed, assignee, assignee.name, due_on, due_at, created_at, modified_at, notes, projects, projects.name, tags, tags.name, parent, parent.name, memberships, memberships.section, memberships.section.name, custom_fields
|
|
77458
|
+
- \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8: name, archived, created_at, modified_at, owner, owner.name, team, team.name, members
|
|
77459
|
+
- \u30E6\u30FC\u30B6\u30FC: name, email, photo`
|
|
77410
77460
|
},
|
|
77411
|
-
|
|
77412
|
-
const resolvedSql = replaceLiteralParams(sql, namedParams);
|
|
77413
|
-
const { Trino, BasicAuth } = await import("trino-client");
|
|
77414
|
-
const host = params[parameters39.host.slug];
|
|
77415
|
-
const user = params[parameters39.user.slug];
|
|
77416
|
-
const password = params[parameters39.password.slug] || void 0;
|
|
77417
|
-
const catalog = params[parameters39.catalog.slug] || void 0;
|
|
77418
|
-
const schema = params[parameters39.schema.slug] || void 0;
|
|
77419
|
-
const trino = Trino.create({
|
|
77420
|
-
server: host,
|
|
77421
|
-
catalog,
|
|
77422
|
-
schema,
|
|
77423
|
-
auth: new BasicAuth(user, password)
|
|
77424
|
-
});
|
|
77425
|
-
const iter = await trino.query(resolvedSql);
|
|
77426
|
-
const columns = [];
|
|
77427
|
-
const rows = [];
|
|
77428
|
-
for await (const result of iter) {
|
|
77429
|
-
if (result.columns && columns.length === 0) {
|
|
77430
|
-
columns.push(...result.columns);
|
|
77431
|
-
}
|
|
77432
|
-
if (result.data) {
|
|
77433
|
-
for (const row of result.data) {
|
|
77434
|
-
const obj = {};
|
|
77435
|
-
columns.forEach((col, i6) => {
|
|
77436
|
-
obj[col.name] = row[i6];
|
|
77437
|
-
});
|
|
77438
|
-
rows.push(obj);
|
|
77439
|
-
}
|
|
77440
|
-
}
|
|
77441
|
-
}
|
|
77442
|
-
return { rows };
|
|
77443
|
-
}
|
|
77461
|
+
tools: tools39
|
|
77444
77462
|
});
|
|
77445
77463
|
|
|
77446
77464
|
// ../connectors/src/connectors/clickhouse/setup.ts
|
|
@@ -77499,8 +77517,8 @@ var parameters40 = {
|
|
|
77499
77517
|
|
|
77500
77518
|
// ../connectors/src/connectors/clickhouse/tools/execute-query.ts
|
|
77501
77519
|
import { z as z43 } from "zod";
|
|
77502
|
-
var
|
|
77503
|
-
var
|
|
77520
|
+
var MAX_ROWS11 = 500;
|
|
77521
|
+
var QUERY_TIMEOUT_MS4 = 6e4;
|
|
77504
77522
|
var inputSchema43 = z43.object({
|
|
77505
77523
|
toolUseIntent: z43.string().optional().describe(
|
|
77506
77524
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -77520,9 +77538,9 @@ var outputSchema43 = z43.discriminatedUnion("success", [
|
|
|
77520
77538
|
error: z43.string()
|
|
77521
77539
|
})
|
|
77522
77540
|
]);
|
|
77523
|
-
var
|
|
77541
|
+
var executeQueryTool11 = new ConnectorTool({
|
|
77524
77542
|
name: "executeQuery",
|
|
77525
|
-
description: `Execute SQL against ClickHouse. Returns up to ${
|
|
77543
|
+
description: `Execute SQL against ClickHouse. Returns up to ${MAX_ROWS11} rows.
|
|
77526
77544
|
Use for: schema exploration (SHOW DATABASES, SHOW TABLES, DESCRIBE TABLE), data sampling, analytical queries on large-scale columnar data.
|
|
77527
77545
|
Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
77528
77546
|
inputSchema: inputSchema43,
|
|
@@ -77550,7 +77568,7 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
77550
77568
|
username,
|
|
77551
77569
|
password: password || "",
|
|
77552
77570
|
database: database || "default",
|
|
77553
|
-
request_timeout:
|
|
77571
|
+
request_timeout: QUERY_TIMEOUT_MS4
|
|
77554
77572
|
});
|
|
77555
77573
|
try {
|
|
77556
77574
|
const resultSet = await client.query({
|
|
@@ -77558,12 +77576,12 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
77558
77576
|
format: "JSONEachRow"
|
|
77559
77577
|
});
|
|
77560
77578
|
const allRows = await resultSet.json();
|
|
77561
|
-
const truncated = allRows.length >
|
|
77579
|
+
const truncated = allRows.length > MAX_ROWS11;
|
|
77562
77580
|
return {
|
|
77563
77581
|
success: true,
|
|
77564
|
-
rowCount: Math.min(allRows.length,
|
|
77582
|
+
rowCount: Math.min(allRows.length, MAX_ROWS11),
|
|
77565
77583
|
truncated,
|
|
77566
|
-
rows: allRows.slice(0,
|
|
77584
|
+
rows: allRows.slice(0, MAX_ROWS11)
|
|
77567
77585
|
};
|
|
77568
77586
|
} finally {
|
|
77569
77587
|
await client.close();
|
|
@@ -77579,7 +77597,7 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
77579
77597
|
});
|
|
77580
77598
|
|
|
77581
77599
|
// ../connectors/src/connectors/clickhouse/index.ts
|
|
77582
|
-
var tools40 = { executeQuery:
|
|
77600
|
+
var tools40 = { executeQuery: executeQueryTool11 };
|
|
77583
77601
|
var clickhouseConnector = new ConnectorPlugin({
|
|
77584
77602
|
slug: "clickhouse",
|
|
77585
77603
|
authType: null,
|
|
@@ -77718,7 +77736,7 @@ var parameters41 = {
|
|
|
77718
77736
|
import { z as z46 } from "zod";
|
|
77719
77737
|
var MAX_DOCUMENTS = 500;
|
|
77720
77738
|
var CONNECT_TIMEOUT_MS4 = 1e4;
|
|
77721
|
-
var
|
|
77739
|
+
var QUERY_TIMEOUT_MS5 = 6e4;
|
|
77722
77740
|
var inputSchema44 = z46.object({
|
|
77723
77741
|
toolUseIntent: z46.string().optional().describe(
|
|
77724
77742
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -77777,7 +77795,7 @@ For listing collections, use the aggregate tool with an empty pipeline on the sp
|
|
|
77777
77795
|
const client = new MongoClient(connectionUrl, {
|
|
77778
77796
|
connectTimeoutMS: CONNECT_TIMEOUT_MS4,
|
|
77779
77797
|
serverSelectionTimeoutMS: CONNECT_TIMEOUT_MS4,
|
|
77780
|
-
socketTimeoutMS:
|
|
77798
|
+
socketTimeoutMS: QUERY_TIMEOUT_MS5
|
|
77781
77799
|
});
|
|
77782
77800
|
try {
|
|
77783
77801
|
await client.connect();
|
|
@@ -77823,7 +77841,7 @@ For listing collections, use the aggregate tool with an empty pipeline on the sp
|
|
|
77823
77841
|
import { z as z47 } from "zod";
|
|
77824
77842
|
var MAX_DOCUMENTS2 = 500;
|
|
77825
77843
|
var CONNECT_TIMEOUT_MS5 = 1e4;
|
|
77826
|
-
var
|
|
77844
|
+
var QUERY_TIMEOUT_MS6 = 6e4;
|
|
77827
77845
|
var inputSchema45 = z47.object({
|
|
77828
77846
|
toolUseIntent: z47.string().optional().describe(
|
|
77829
77847
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -77874,7 +77892,7 @@ Common stages: $match (filter), $group (aggregate), $sort (order), $project (res
|
|
|
77874
77892
|
const client = new MongoClient(connectionUrl, {
|
|
77875
77893
|
connectTimeoutMS: CONNECT_TIMEOUT_MS5,
|
|
77876
77894
|
serverSelectionTimeoutMS: CONNECT_TIMEOUT_MS5,
|
|
77877
|
-
socketTimeoutMS:
|
|
77895
|
+
socketTimeoutMS: QUERY_TIMEOUT_MS6
|
|
77878
77896
|
});
|
|
77879
77897
|
try {
|
|
77880
77898
|
await client.connect();
|
|
@@ -78092,9 +78110,9 @@ var parameters42 = {
|
|
|
78092
78110
|
|
|
78093
78111
|
// ../connectors/src/connectors/notion/tools/request.ts
|
|
78094
78112
|
import { z as z49 } from "zod";
|
|
78095
|
-
var
|
|
78113
|
+
var BASE_URL20 = "https://api.notion.com/v1";
|
|
78096
78114
|
var NOTION_VERSION = "2022-06-28";
|
|
78097
|
-
var
|
|
78115
|
+
var REQUEST_TIMEOUT_MS32 = 6e4;
|
|
78098
78116
|
var inputSchema47 = z49.object({
|
|
78099
78117
|
toolUseIntent: z49.string().optional().describe(
|
|
78100
78118
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -78119,7 +78137,7 @@ var outputSchema47 = z49.discriminatedUnion("success", [
|
|
|
78119
78137
|
error: z49.string()
|
|
78120
78138
|
})
|
|
78121
78139
|
]);
|
|
78122
|
-
var
|
|
78140
|
+
var requestTool25 = new ConnectorTool({
|
|
78123
78141
|
name: "request",
|
|
78124
78142
|
description: `Send authenticated requests to the Notion API.
|
|
78125
78143
|
Authentication (Bearer token) and Notion-Version header are configured automatically.
|
|
@@ -78140,9 +78158,9 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
78140
78158
|
);
|
|
78141
78159
|
try {
|
|
78142
78160
|
const apiKey = parameters42.apiKey.getValue(connection);
|
|
78143
|
-
const url = `${
|
|
78161
|
+
const url = `${BASE_URL20}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
78144
78162
|
const controller = new AbortController();
|
|
78145
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
78163
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS32);
|
|
78146
78164
|
try {
|
|
78147
78165
|
const response = await fetch(url, {
|
|
78148
78166
|
method,
|
|
@@ -78171,7 +78189,7 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
78171
78189
|
});
|
|
78172
78190
|
|
|
78173
78191
|
// ../connectors/src/connectors/notion/index.ts
|
|
78174
|
-
var tools42 = { request:
|
|
78192
|
+
var tools42 = { request: requestTool25 };
|
|
78175
78193
|
var notionConnector = new ConnectorPlugin({
|
|
78176
78194
|
slug: "notion",
|
|
78177
78195
|
authType: null,
|
|
@@ -78328,9 +78346,9 @@ export default async function handler(c: Context) {
|
|
|
78328
78346
|
|
|
78329
78347
|
// ../connectors/src/connectors/notion-oauth/tools/request.ts
|
|
78330
78348
|
import { z as z50 } from "zod";
|
|
78331
|
-
var
|
|
78349
|
+
var BASE_URL21 = "https://api.notion.com/v1";
|
|
78332
78350
|
var NOTION_VERSION2 = "2022-06-28";
|
|
78333
|
-
var
|
|
78351
|
+
var REQUEST_TIMEOUT_MS33 = 6e4;
|
|
78334
78352
|
var cachedToken15 = null;
|
|
78335
78353
|
async function getProxyToken15(config) {
|
|
78336
78354
|
if (cachedToken15 && cachedToken15.expiresAt > Date.now() + 6e4) {
|
|
@@ -78384,7 +78402,7 @@ var outputSchema48 = z50.discriminatedUnion("success", [
|
|
|
78384
78402
|
error: z50.string()
|
|
78385
78403
|
})
|
|
78386
78404
|
]);
|
|
78387
|
-
var
|
|
78405
|
+
var requestTool26 = new ConnectorTool({
|
|
78388
78406
|
name: "request",
|
|
78389
78407
|
description: `Send authenticated requests to the Notion API.
|
|
78390
78408
|
Authentication is handled automatically via OAuth proxy. Notion-Version header is set automatically.
|
|
@@ -78404,11 +78422,11 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
78404
78422
|
`[connector-request] notion-oauth/${connection.name}: ${method} ${path4}`
|
|
78405
78423
|
);
|
|
78406
78424
|
try {
|
|
78407
|
-
const url = `${
|
|
78425
|
+
const url = `${BASE_URL21}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
78408
78426
|
const token = await getProxyToken15(config.oauthProxy);
|
|
78409
78427
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
78410
78428
|
const controller = new AbortController();
|
|
78411
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
78429
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS33);
|
|
78412
78430
|
try {
|
|
78413
78431
|
const response = await fetch(proxyUrl, {
|
|
78414
78432
|
method: "POST",
|
|
@@ -78441,12 +78459,12 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
78441
78459
|
});
|
|
78442
78460
|
|
|
78443
78461
|
// ../connectors/src/connectors/notion-oauth/setup.ts
|
|
78444
|
-
var
|
|
78462
|
+
var requestToolName8 = `notion-oauth_${requestTool26.name}`;
|
|
78445
78463
|
var notionOauthOnboarding = new ConnectorOnboarding({
|
|
78446
78464
|
connectionSetupInstructions: {
|
|
78447
78465
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Notion\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
78448
78466
|
|
|
78449
|
-
1. \`${
|
|
78467
|
+
1. \`${requestToolName8}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30DC\u30C3\u30C8\u30E6\u30FC\u30B6\u30FC\u60C5\u5831\u3092\u53D6\u5F97\u3059\u308B:
|
|
78450
78468
|
- \`method\`: \`"GET"\`
|
|
78451
78469
|
- \`path\`: \`"/users/me"\`
|
|
78452
78470
|
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306BOAuth\u63A5\u7D9A\u306E\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
|
|
@@ -78459,7 +78477,7 @@ var notionOauthOnboarding = new ConnectorOnboarding({
|
|
|
78459
78477
|
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
78460
78478
|
en: `Follow these steps to set up the Notion connection.
|
|
78461
78479
|
|
|
78462
|
-
1. Call \`${
|
|
78480
|
+
1. Call \`${requestToolName8}\` to fetch bot user info:
|
|
78463
78481
|
- \`method\`: \`"GET"\`
|
|
78464
78482
|
- \`path\`: \`"/users/me"\`
|
|
78465
78483
|
2. If an error is returned, ask the user to check the OAuth connection settings
|
|
@@ -78487,7 +78505,7 @@ var notionOauthOnboarding = new ConnectorOnboarding({
|
|
|
78487
78505
|
var parameters43 = {};
|
|
78488
78506
|
|
|
78489
78507
|
// ../connectors/src/connectors/notion-oauth/index.ts
|
|
78490
|
-
var tools43 = { request:
|
|
78508
|
+
var tools43 = { request: requestTool26 };
|
|
78491
78509
|
var notionOauthConnector = new ConnectorPlugin({
|
|
78492
78510
|
slug: "notion",
|
|
78493
78511
|
authType: AUTH_TYPES.OAUTH,
|
|
@@ -78658,8 +78676,8 @@ var parameters44 = {
|
|
|
78658
78676
|
};
|
|
78659
78677
|
|
|
78660
78678
|
// ../connectors/src/connectors/meta-ads/tools/list-ad-accounts.ts
|
|
78661
|
-
var
|
|
78662
|
-
var
|
|
78679
|
+
var BASE_URL22 = "https://graph.facebook.com/v21.0/";
|
|
78680
|
+
var REQUEST_TIMEOUT_MS34 = 6e4;
|
|
78663
78681
|
var inputSchema49 = z51.object({
|
|
78664
78682
|
toolUseIntent: z51.string().optional().describe(
|
|
78665
78683
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -78699,9 +78717,9 @@ var listAdAccountsTool = new ConnectorTool({
|
|
|
78699
78717
|
);
|
|
78700
78718
|
try {
|
|
78701
78719
|
const accessToken = parameters44.accessToken.getValue(connection);
|
|
78702
|
-
const url = `${
|
|
78720
|
+
const url = `${BASE_URL22}me/adaccounts?fields=account_id,name,account_status&access_token=${encodeURIComponent(accessToken)}`;
|
|
78703
78721
|
const controller = new AbortController();
|
|
78704
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
78722
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS34);
|
|
78705
78723
|
try {
|
|
78706
78724
|
const response = await fetch(url, {
|
|
78707
78725
|
method: "GET",
|
|
@@ -78776,8 +78794,8 @@ var metaAdsOnboarding = new ConnectorOnboarding({
|
|
|
78776
78794
|
|
|
78777
78795
|
// ../connectors/src/connectors/meta-ads/tools/request.ts
|
|
78778
78796
|
import { z as z52 } from "zod";
|
|
78779
|
-
var
|
|
78780
|
-
var
|
|
78797
|
+
var BASE_URL23 = "https://graph.facebook.com/v21.0/";
|
|
78798
|
+
var REQUEST_TIMEOUT_MS35 = 6e4;
|
|
78781
78799
|
var inputSchema50 = z52.object({
|
|
78782
78800
|
toolUseIntent: z52.string().optional().describe(
|
|
78783
78801
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -78801,7 +78819,7 @@ var outputSchema50 = z52.discriminatedUnion("success", [
|
|
|
78801
78819
|
error: z52.string()
|
|
78802
78820
|
})
|
|
78803
78821
|
]);
|
|
78804
|
-
var
|
|
78822
|
+
var requestTool27 = new ConnectorTool({
|
|
78805
78823
|
name: "request",
|
|
78806
78824
|
description: `Send authenticated requests to the Meta Marketing API v21.0.
|
|
78807
78825
|
Authentication is handled via the configured access token.
|
|
@@ -78823,13 +78841,13 @@ Authentication is handled via the configured access token.
|
|
|
78823
78841
|
const accessToken = parameters44.accessToken.getValue(connection);
|
|
78824
78842
|
const adAccountId = parameters44.adAccountId.tryGetValue(connection) ?? "";
|
|
78825
78843
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
78826
|
-
let url = `${
|
|
78844
|
+
let url = `${BASE_URL23}${resolvedPath}`;
|
|
78827
78845
|
const params = new URLSearchParams(queryParams ?? {});
|
|
78828
78846
|
params.set("access_token", accessToken);
|
|
78829
78847
|
const separator = url.includes("?") ? "&" : "?";
|
|
78830
78848
|
url = `${url}${separator}${params.toString()}`;
|
|
78831
78849
|
const controller = new AbortController();
|
|
78832
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
78850
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS35);
|
|
78833
78851
|
try {
|
|
78834
78852
|
const response = await fetch(url, {
|
|
78835
78853
|
method,
|
|
@@ -78859,7 +78877,7 @@ Authentication is handled via the configured access token.
|
|
|
78859
78877
|
|
|
78860
78878
|
// ../connectors/src/connectors/meta-ads/index.ts
|
|
78861
78879
|
var tools44 = {
|
|
78862
|
-
request:
|
|
78880
|
+
request: requestTool27,
|
|
78863
78881
|
listAdAccounts: listAdAccountsTool
|
|
78864
78882
|
};
|
|
78865
78883
|
var metaAdsConnector = new ConnectorPlugin({
|
|
@@ -79028,8 +79046,8 @@ const accounts = await meta.listAdAccounts();
|
|
|
79028
79046
|
|
|
79029
79047
|
// ../connectors/src/connectors/meta-ads-oauth/tools/list-ad-accounts.ts
|
|
79030
79048
|
import { z as z53 } from "zod";
|
|
79031
|
-
var
|
|
79032
|
-
var
|
|
79049
|
+
var BASE_URL24 = "https://graph.facebook.com/v21.0/";
|
|
79050
|
+
var REQUEST_TIMEOUT_MS36 = 6e4;
|
|
79033
79051
|
var cachedToken16 = null;
|
|
79034
79052
|
async function getProxyToken16(config) {
|
|
79035
79053
|
if (cachedToken16 && cachedToken16.expiresAt > Date.now() + 6e4) {
|
|
@@ -79102,7 +79120,7 @@ var listAdAccountsTool2 = new ConnectorTool({
|
|
|
79102
79120
|
const token = await getProxyToken16(config.oauthProxy);
|
|
79103
79121
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
79104
79122
|
const controller = new AbortController();
|
|
79105
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
79123
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS36);
|
|
79106
79124
|
try {
|
|
79107
79125
|
const response = await fetch(proxyUrl, {
|
|
79108
79126
|
method: "POST",
|
|
@@ -79111,7 +79129,7 @@ var listAdAccountsTool2 = new ConnectorTool({
|
|
|
79111
79129
|
Authorization: `Bearer ${token}`
|
|
79112
79130
|
},
|
|
79113
79131
|
body: JSON.stringify({
|
|
79114
|
-
url: `${
|
|
79132
|
+
url: `${BASE_URL24}me/adaccounts?fields=account_id,name,account_status`,
|
|
79115
79133
|
method: "GET"
|
|
79116
79134
|
}),
|
|
79117
79135
|
signal: controller.signal
|
|
@@ -79198,8 +79216,8 @@ var parameters45 = {
|
|
|
79198
79216
|
|
|
79199
79217
|
// ../connectors/src/connectors/meta-ads-oauth/tools/request.ts
|
|
79200
79218
|
import { z as z54 } from "zod";
|
|
79201
|
-
var
|
|
79202
|
-
var
|
|
79219
|
+
var BASE_URL25 = "https://graph.facebook.com/v21.0/";
|
|
79220
|
+
var REQUEST_TIMEOUT_MS37 = 6e4;
|
|
79203
79221
|
var cachedToken17 = null;
|
|
79204
79222
|
async function getProxyToken17(config) {
|
|
79205
79223
|
if (cachedToken17 && cachedToken17.expiresAt > Date.now() + 6e4) {
|
|
@@ -79254,7 +79272,7 @@ var outputSchema52 = z54.discriminatedUnion("success", [
|
|
|
79254
79272
|
error: z54.string()
|
|
79255
79273
|
})
|
|
79256
79274
|
]);
|
|
79257
|
-
var
|
|
79275
|
+
var requestTool28 = new ConnectorTool({
|
|
79258
79276
|
name: "request",
|
|
79259
79277
|
description: `Send authenticated requests to the Meta Marketing API v21.0.
|
|
79260
79278
|
Authentication is handled automatically via OAuth proxy.
|
|
@@ -79275,7 +79293,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
79275
79293
|
try {
|
|
79276
79294
|
const adAccountId = parameters45.adAccountId.tryGetValue(connection) ?? "";
|
|
79277
79295
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
79278
|
-
let url = `${
|
|
79296
|
+
let url = `${BASE_URL25}${resolvedPath}`;
|
|
79279
79297
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
79280
79298
|
const params = new URLSearchParams(queryParams);
|
|
79281
79299
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -79284,7 +79302,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
79284
79302
|
const token = await getProxyToken17(config.oauthProxy);
|
|
79285
79303
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
79286
79304
|
const controller = new AbortController();
|
|
79287
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
79305
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS37);
|
|
79288
79306
|
try {
|
|
79289
79307
|
const response = await fetch(proxyUrl, {
|
|
79290
79308
|
method: "POST",
|
|
@@ -79319,7 +79337,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
79319
79337
|
|
|
79320
79338
|
// ../connectors/src/connectors/meta-ads-oauth/index.ts
|
|
79321
79339
|
var tools45 = {
|
|
79322
|
-
request:
|
|
79340
|
+
request: requestTool28,
|
|
79323
79341
|
listAdAccounts: listAdAccountsTool2
|
|
79324
79342
|
};
|
|
79325
79343
|
var metaAdsOauthConnector = new ConnectorPlugin({
|
|
@@ -79552,8 +79570,8 @@ var parameters46 = {
|
|
|
79552
79570
|
|
|
79553
79571
|
// ../connectors/src/connectors/tiktok-ads/tools/request.ts
|
|
79554
79572
|
import { z as z55 } from "zod";
|
|
79555
|
-
var
|
|
79556
|
-
var
|
|
79573
|
+
var BASE_URL26 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
79574
|
+
var REQUEST_TIMEOUT_MS38 = 6e4;
|
|
79557
79575
|
var inputSchema53 = z55.object({
|
|
79558
79576
|
toolUseIntent: z55.string().optional().describe(
|
|
79559
79577
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -79577,7 +79595,7 @@ var outputSchema53 = z55.discriminatedUnion("success", [
|
|
|
79577
79595
|
error: z55.string()
|
|
79578
79596
|
})
|
|
79579
79597
|
]);
|
|
79580
|
-
var
|
|
79598
|
+
var requestTool29 = new ConnectorTool({
|
|
79581
79599
|
name: "request",
|
|
79582
79600
|
description: `Send authenticated requests to the TikTok Marketing API v1.3.
|
|
79583
79601
|
Authentication is handled via the configured access token (sent as Access-Token header).
|
|
@@ -79598,7 +79616,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
79598
79616
|
try {
|
|
79599
79617
|
const accessToken = parameters46.accessToken.getValue(connection);
|
|
79600
79618
|
const advertiserId = parameters46.advertiserId.tryGetValue(connection) ?? "";
|
|
79601
|
-
let url = `${
|
|
79619
|
+
let url = `${BASE_URL26}${path4}`;
|
|
79602
79620
|
if (method === "GET") {
|
|
79603
79621
|
const params = new URLSearchParams(queryParams ?? {});
|
|
79604
79622
|
if (advertiserId && !params.has("advertiser_id")) {
|
|
@@ -79614,7 +79632,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
79614
79632
|
...body
|
|
79615
79633
|
} : void 0;
|
|
79616
79634
|
const controller = new AbortController();
|
|
79617
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
79635
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS38);
|
|
79618
79636
|
try {
|
|
79619
79637
|
const response = await fetch(url, {
|
|
79620
79638
|
method,
|
|
@@ -79650,9 +79668,9 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
79650
79668
|
});
|
|
79651
79669
|
|
|
79652
79670
|
// ../connectors/src/connectors/tiktok-ads/index.ts
|
|
79653
|
-
var
|
|
79671
|
+
var BASE_URL27 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
79654
79672
|
var tools46 = {
|
|
79655
|
-
request:
|
|
79673
|
+
request: requestTool29
|
|
79656
79674
|
};
|
|
79657
79675
|
var tiktokAdsConnector = new ConnectorPlugin({
|
|
79658
79676
|
slug: "tiktok-ads",
|
|
@@ -79825,7 +79843,7 @@ const campaigns = await tiktok.listCampaigns();
|
|
|
79825
79843
|
return { success: true };
|
|
79826
79844
|
}
|
|
79827
79845
|
try {
|
|
79828
|
-
const url = `${
|
|
79846
|
+
const url = `${BASE_URL27}advertiser/info/?advertiser_id=${encodeURIComponent(advertiserId)}`;
|
|
79829
79847
|
const res = await fetch(url, {
|
|
79830
79848
|
method: "GET",
|
|
79831
79849
|
headers: {
|
|
@@ -79857,8 +79875,8 @@ const campaigns = await tiktok.listCampaigns();
|
|
|
79857
79875
|
|
|
79858
79876
|
// ../connectors/src/connectors/tiktok-ads-oauth/tools/list-advertisers.ts
|
|
79859
79877
|
import { z as z56 } from "zod";
|
|
79860
|
-
var
|
|
79861
|
-
var
|
|
79878
|
+
var BASE_URL28 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
79879
|
+
var REQUEST_TIMEOUT_MS39 = 6e4;
|
|
79862
79880
|
var cachedToken18 = null;
|
|
79863
79881
|
async function getProxyToken18(config) {
|
|
79864
79882
|
if (cachedToken18 && cachedToken18.expiresAt > Date.now() + 6e4) {
|
|
@@ -79931,7 +79949,7 @@ var listAdvertisersTool = new ConnectorTool({
|
|
|
79931
79949
|
const token = await getProxyToken18(config.oauthProxy);
|
|
79932
79950
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
79933
79951
|
const controller = new AbortController();
|
|
79934
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
79952
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS39);
|
|
79935
79953
|
try {
|
|
79936
79954
|
const advertiserListResponse = await fetch(proxyUrl, {
|
|
79937
79955
|
method: "POST",
|
|
@@ -79940,7 +79958,7 @@ var listAdvertisersTool = new ConnectorTool({
|
|
|
79940
79958
|
Authorization: `Bearer ${token}`
|
|
79941
79959
|
},
|
|
79942
79960
|
body: JSON.stringify({
|
|
79943
|
-
url: `${
|
|
79961
|
+
url: `${BASE_URL28}oauth2/advertiser/get/`,
|
|
79944
79962
|
method: "GET"
|
|
79945
79963
|
}),
|
|
79946
79964
|
signal: controller.signal
|
|
@@ -80037,8 +80055,8 @@ var parameters47 = {
|
|
|
80037
80055
|
|
|
80038
80056
|
// ../connectors/src/connectors/tiktok-ads-oauth/tools/request.ts
|
|
80039
80057
|
import { z as z57 } from "zod";
|
|
80040
|
-
var
|
|
80041
|
-
var
|
|
80058
|
+
var BASE_URL29 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
80059
|
+
var REQUEST_TIMEOUT_MS40 = 6e4;
|
|
80042
80060
|
var cachedToken19 = null;
|
|
80043
80061
|
async function getProxyToken19(config) {
|
|
80044
80062
|
if (cachedToken19 && cachedToken19.expiresAt > Date.now() + 6e4) {
|
|
@@ -80093,7 +80111,7 @@ var outputSchema55 = z57.discriminatedUnion("success", [
|
|
|
80093
80111
|
error: z57.string()
|
|
80094
80112
|
})
|
|
80095
80113
|
]);
|
|
80096
|
-
var
|
|
80114
|
+
var requestTool30 = new ConnectorTool({
|
|
80097
80115
|
name: "request",
|
|
80098
80116
|
description: `Send authenticated requests to the TikTok Marketing API v1.3.
|
|
80099
80117
|
Authentication is handled automatically via OAuth proxy.
|
|
@@ -80113,7 +80131,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
80113
80131
|
);
|
|
80114
80132
|
try {
|
|
80115
80133
|
const advertiserId = parameters47.advertiserId.tryGetValue(connection) ?? "";
|
|
80116
|
-
let url = `${
|
|
80134
|
+
let url = `${BASE_URL29}${path4}`;
|
|
80117
80135
|
if (method === "GET") {
|
|
80118
80136
|
const params = new URLSearchParams(queryParams ?? {});
|
|
80119
80137
|
if (advertiserId && !params.has("advertiser_id")) {
|
|
@@ -80131,7 +80149,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
80131
80149
|
const token = await getProxyToken19(config.oauthProxy);
|
|
80132
80150
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
80133
80151
|
const controller = new AbortController();
|
|
80134
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
80152
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS40);
|
|
80135
80153
|
try {
|
|
80136
80154
|
const response = await fetch(proxyUrl, {
|
|
80137
80155
|
method: "POST",
|
|
@@ -80172,7 +80190,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
80172
80190
|
|
|
80173
80191
|
// ../connectors/src/connectors/tiktok-ads-oauth/index.ts
|
|
80174
80192
|
var tools47 = {
|
|
80175
|
-
request:
|
|
80193
|
+
request: requestTool30,
|
|
80176
80194
|
listAdvertisers: listAdvertisersTool
|
|
80177
80195
|
};
|
|
80178
80196
|
var tiktokAdsOauthConnector = new ConnectorPlugin({
|
|
@@ -80384,7 +80402,7 @@ var parameters48 = {
|
|
|
80384
80402
|
|
|
80385
80403
|
// ../connectors/src/connectors/mailchimp/tools/request.ts
|
|
80386
80404
|
import { z as z58 } from "zod";
|
|
80387
|
-
var
|
|
80405
|
+
var REQUEST_TIMEOUT_MS41 = 6e4;
|
|
80388
80406
|
function extractDatacenter(apiKey) {
|
|
80389
80407
|
const parts = apiKey.split("-");
|
|
80390
80408
|
const dc = parts[parts.length - 1];
|
|
@@ -80420,7 +80438,7 @@ var outputSchema56 = z58.discriminatedUnion("success", [
|
|
|
80420
80438
|
error: z58.string()
|
|
80421
80439
|
})
|
|
80422
80440
|
]);
|
|
80423
|
-
var
|
|
80441
|
+
var requestTool31 = new ConnectorTool({
|
|
80424
80442
|
name: "request",
|
|
80425
80443
|
description: `Send authenticated requests to the Mailchimp Marketing API v3.
|
|
80426
80444
|
Authentication is handled automatically using the API Key (Basic Auth).
|
|
@@ -80449,7 +80467,7 @@ The datacenter is automatically extracted from the API key suffix.`,
|
|
|
80449
80467
|
url += `?${searchParams.toString()}`;
|
|
80450
80468
|
}
|
|
80451
80469
|
const controller = new AbortController();
|
|
80452
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
80470
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS41);
|
|
80453
80471
|
try {
|
|
80454
80472
|
const response = await fetch(url, {
|
|
80455
80473
|
method,
|
|
@@ -80477,7 +80495,7 @@ The datacenter is automatically extracted from the API key suffix.`,
|
|
|
80477
80495
|
});
|
|
80478
80496
|
|
|
80479
80497
|
// ../connectors/src/connectors/mailchimp/index.ts
|
|
80480
|
-
var tools48 = { request:
|
|
80498
|
+
var tools48 = { request: requestTool31 };
|
|
80481
80499
|
var mailchimpConnector = new ConnectorPlugin({
|
|
80482
80500
|
slug: "mailchimp",
|
|
80483
80501
|
authType: null,
|
|
@@ -80715,7 +80733,7 @@ var parameters49 = {
|
|
|
80715
80733
|
|
|
80716
80734
|
// ../connectors/src/connectors/mailchimp-oauth/tools/request.ts
|
|
80717
80735
|
import { z as z59 } from "zod";
|
|
80718
|
-
var
|
|
80736
|
+
var REQUEST_TIMEOUT_MS42 = 6e4;
|
|
80719
80737
|
var cachedToken20 = null;
|
|
80720
80738
|
async function getProxyToken20(config) {
|
|
80721
80739
|
if (cachedToken20 && cachedToken20.expiresAt > Date.now() + 6e4) {
|
|
@@ -80770,7 +80788,7 @@ var outputSchema57 = z59.discriminatedUnion("success", [
|
|
|
80770
80788
|
error: z59.string()
|
|
80771
80789
|
})
|
|
80772
80790
|
]);
|
|
80773
|
-
var
|
|
80791
|
+
var requestTool32 = new ConnectorTool({
|
|
80774
80792
|
name: "request",
|
|
80775
80793
|
description: `Send authenticated requests to the Mailchimp Marketing API v3.
|
|
80776
80794
|
Authentication is handled automatically via OAuth proxy.`,
|
|
@@ -80798,7 +80816,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
80798
80816
|
const token = await getProxyToken20(config.oauthProxy);
|
|
80799
80817
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
80800
80818
|
const controller = new AbortController();
|
|
80801
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
80819
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS42);
|
|
80802
80820
|
try {
|
|
80803
80821
|
const response = await fetch(proxyUrl, {
|
|
80804
80822
|
method: "POST",
|
|
@@ -80830,7 +80848,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
80830
80848
|
});
|
|
80831
80849
|
|
|
80832
80850
|
// ../connectors/src/connectors/mailchimp-oauth/index.ts
|
|
80833
|
-
var tools49 = { request:
|
|
80851
|
+
var tools49 = { request: requestTool32 };
|
|
80834
80852
|
var mailchimpOauthConnector = new ConnectorPlugin({
|
|
80835
80853
|
slug: "mailchimp",
|
|
80836
80854
|
authType: AUTH_TYPES.OAUTH,
|
|
@@ -81030,7 +81048,7 @@ var parameters50 = {
|
|
|
81030
81048
|
|
|
81031
81049
|
// ../connectors/src/connectors/customerio/tools/request.ts
|
|
81032
81050
|
import { z as z60 } from "zod";
|
|
81033
|
-
var
|
|
81051
|
+
var REQUEST_TIMEOUT_MS43 = 6e4;
|
|
81034
81052
|
function getBaseUrl(region) {
|
|
81035
81053
|
return region === "eu" ? "https://api-eu.customer.io" : "https://api.customer.io";
|
|
81036
81054
|
}
|
|
@@ -81057,7 +81075,7 @@ var outputSchema58 = z60.discriminatedUnion("success", [
|
|
|
81057
81075
|
error: z60.string()
|
|
81058
81076
|
})
|
|
81059
81077
|
]);
|
|
81060
|
-
var
|
|
81078
|
+
var requestTool33 = new ConnectorTool({
|
|
81061
81079
|
name: "request",
|
|
81062
81080
|
description: `Send authenticated requests to the Customer.io App API.
|
|
81063
81081
|
Authentication is handled automatically using the App API Key (Bearer token).
|
|
@@ -81086,7 +81104,7 @@ The App API is the read and management path for Customer.io data.`,
|
|
|
81086
81104
|
url += `?${searchParams.toString()}`;
|
|
81087
81105
|
}
|
|
81088
81106
|
const controller = new AbortController();
|
|
81089
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
81107
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS43);
|
|
81090
81108
|
try {
|
|
81091
81109
|
const response = await fetch(url, {
|
|
81092
81110
|
method,
|
|
@@ -81123,7 +81141,7 @@ The App API is the read and management path for Customer.io data.`,
|
|
|
81123
81141
|
});
|
|
81124
81142
|
|
|
81125
81143
|
// ../connectors/src/connectors/customerio/index.ts
|
|
81126
|
-
var tools50 = { request:
|
|
81144
|
+
var tools50 = { request: requestTool33 };
|
|
81127
81145
|
var customerioConnector = new ConnectorPlugin({
|
|
81128
81146
|
slug: "customerio",
|
|
81129
81147
|
authType: null,
|
|
@@ -81308,8 +81326,8 @@ export default async function handler(c: Context) {
|
|
|
81308
81326
|
|
|
81309
81327
|
// ../connectors/src/connectors/gmail-oauth/tools/request.ts
|
|
81310
81328
|
import { z as z61 } from "zod";
|
|
81311
|
-
var
|
|
81312
|
-
var
|
|
81329
|
+
var BASE_URL30 = "https://gmail.googleapis.com/gmail/v1/users";
|
|
81330
|
+
var REQUEST_TIMEOUT_MS44 = 6e4;
|
|
81313
81331
|
var cachedToken21 = null;
|
|
81314
81332
|
async function getProxyToken21(config) {
|
|
81315
81333
|
if (cachedToken21 && cachedToken21.expiresAt > Date.now() + 6e4) {
|
|
@@ -81365,7 +81383,7 @@ var outputSchema59 = z61.discriminatedUnion("success", [
|
|
|
81365
81383
|
error: z61.string()
|
|
81366
81384
|
})
|
|
81367
81385
|
]);
|
|
81368
|
-
var
|
|
81386
|
+
var requestTool34 = new ConnectorTool({
|
|
81369
81387
|
name: "request",
|
|
81370
81388
|
description: `Send authenticated GET requests to the Gmail API v1.
|
|
81371
81389
|
Authentication is handled automatically via OAuth proxy.
|
|
@@ -81384,7 +81402,7 @@ All paths are relative to https://gmail.googleapis.com/gmail/v1/users. Use '/me'
|
|
|
81384
81402
|
`[connector-request] gmail-oauth/${connection.name}: ${method} ${path4}`
|
|
81385
81403
|
);
|
|
81386
81404
|
try {
|
|
81387
|
-
let url = `${
|
|
81405
|
+
let url = `${BASE_URL30}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
81388
81406
|
if (queryParams) {
|
|
81389
81407
|
const searchParams = new URLSearchParams(queryParams);
|
|
81390
81408
|
url += `?${searchParams.toString()}`;
|
|
@@ -81392,7 +81410,7 @@ All paths are relative to https://gmail.googleapis.com/gmail/v1/users. Use '/me'
|
|
|
81392
81410
|
const token = await getProxyToken21(config.oauthProxy);
|
|
81393
81411
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
81394
81412
|
const controller = new AbortController();
|
|
81395
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
81413
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS44);
|
|
81396
81414
|
try {
|
|
81397
81415
|
const response = await fetch(proxyUrl, {
|
|
81398
81416
|
method: "POST",
|
|
@@ -81423,16 +81441,16 @@ All paths are relative to https://gmail.googleapis.com/gmail/v1/users. Use '/me'
|
|
|
81423
81441
|
});
|
|
81424
81442
|
|
|
81425
81443
|
// ../connectors/src/connectors/gmail-oauth/setup.ts
|
|
81426
|
-
var
|
|
81444
|
+
var requestToolName9 = `gmail-oauth_${requestTool34.name}`;
|
|
81427
81445
|
var gmailOnboarding = new ConnectorOnboarding({
|
|
81428
81446
|
connectionSetupInstructions: {
|
|
81429
81447
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Gmail\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
81430
81448
|
|
|
81431
|
-
1. \`${
|
|
81449
|
+
1. \`${requestToolName9}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u30E6\u30FC\u30B6\u30FC\u306E\u30D7\u30ED\u30D5\u30A3\u30FC\u30EB\u3092\u53D6\u5F97\u3059\u308B:
|
|
81432
81450
|
- \`method\`: \`"GET"\`
|
|
81433
81451
|
- \`path\`: \`"/me/profile"\`
|
|
81434
81452
|
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001OAuth\u306E\u8A8D\u8A3C\u304C\u6B63\u3057\u304F\u5B8C\u4E86\u3057\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3059\u308B\u3088\u3046\u30E6\u30FC\u30B6\u30FC\u306B\u4F1D\u3048\u308B
|
|
81435
|
-
3. \`${
|
|
81453
|
+
3. \`${requestToolName9}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u30E9\u30D9\u30EB\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B:
|
|
81436
81454
|
- \`method\`: \`"GET"\`
|
|
81437
81455
|
- \`path\`: \`"/me/labels"\`
|
|
81438
81456
|
4. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3059:
|
|
@@ -81445,11 +81463,11 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
81445
81463
|
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
81446
81464
|
en: `Follow these steps to set up the Gmail connection.
|
|
81447
81465
|
|
|
81448
|
-
1. Call \`${
|
|
81466
|
+
1. Call \`${requestToolName9}\` to get the user's profile:
|
|
81449
81467
|
- \`method\`: \`"GET"\`
|
|
81450
81468
|
- \`path\`: \`"/me/profile"\`
|
|
81451
81469
|
2. If an error is returned, ask the user to verify that OAuth authentication completed correctly
|
|
81452
|
-
3. Call \`${
|
|
81470
|
+
3. Call \`${requestToolName9}\` to get the label list:
|
|
81453
81471
|
- \`method\`: \`"GET"\`
|
|
81454
81472
|
- \`path\`: \`"/me/labels"\`
|
|
81455
81473
|
4. Call \`updateConnectionContext\`:
|
|
@@ -81475,7 +81493,7 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
81475
81493
|
var parameters51 = {};
|
|
81476
81494
|
|
|
81477
81495
|
// ../connectors/src/connectors/gmail-oauth/index.ts
|
|
81478
|
-
var tools51 = { request:
|
|
81496
|
+
var tools51 = { request: requestTool34 };
|
|
81479
81497
|
var gmailOauthConnector = new ConnectorPlugin({
|
|
81480
81498
|
slug: "gmail",
|
|
81481
81499
|
authType: AUTH_TYPES.OAUTH,
|
|
@@ -81690,7 +81708,7 @@ var parameters52 = {
|
|
|
81690
81708
|
};
|
|
81691
81709
|
|
|
81692
81710
|
// ../connectors/src/connectors/linkedin-ads/tools/list-ad-accounts.ts
|
|
81693
|
-
var
|
|
81711
|
+
var REQUEST_TIMEOUT_MS45 = 6e4;
|
|
81694
81712
|
var LINKEDIN_VERSION = "202603";
|
|
81695
81713
|
var inputSchema60 = z62.object({
|
|
81696
81714
|
toolUseIntent: z62.string().optional().describe(
|
|
@@ -81733,7 +81751,7 @@ var listAdAccountsTool3 = new ConnectorTool({
|
|
|
81733
81751
|
const accessToken = parameters52.accessToken.getValue(connection);
|
|
81734
81752
|
const url = "https://api.linkedin.com/rest/adAccounts?q=search&search=(status:(values:List(ACTIVE)))&pageSize=100";
|
|
81735
81753
|
const controller = new AbortController();
|
|
81736
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
81754
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS45);
|
|
81737
81755
|
try {
|
|
81738
81756
|
const response = await fetch(url, {
|
|
81739
81757
|
method: "GET",
|
|
@@ -81813,9 +81831,9 @@ var linkedinAdsOnboarding = new ConnectorOnboarding({
|
|
|
81813
81831
|
|
|
81814
81832
|
// ../connectors/src/connectors/linkedin-ads/tools/request.ts
|
|
81815
81833
|
import { z as z63 } from "zod";
|
|
81816
|
-
var
|
|
81834
|
+
var BASE_URL31 = "https://api.linkedin.com/rest/";
|
|
81817
81835
|
var LINKEDIN_VERSION2 = "202603";
|
|
81818
|
-
var
|
|
81836
|
+
var REQUEST_TIMEOUT_MS46 = 6e4;
|
|
81819
81837
|
var inputSchema61 = z63.object({
|
|
81820
81838
|
toolUseIntent: z63.string().optional().describe(
|
|
81821
81839
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -81839,7 +81857,7 @@ var outputSchema61 = z63.discriminatedUnion("success", [
|
|
|
81839
81857
|
error: z63.string()
|
|
81840
81858
|
})
|
|
81841
81859
|
]);
|
|
81842
|
-
var
|
|
81860
|
+
var requestTool35 = new ConnectorTool({
|
|
81843
81861
|
name: "request",
|
|
81844
81862
|
description: `Send authenticated requests to the LinkedIn Marketing API (REST).
|
|
81845
81863
|
Authentication is handled via the configured access token.
|
|
@@ -81862,14 +81880,14 @@ Required headers (Authorization, LinkedIn-Version, X-Restli-Protocol-Version) ar
|
|
|
81862
81880
|
const accessToken = parameters52.accessToken.getValue(connection);
|
|
81863
81881
|
const adAccountId = parameters52.adAccountId.tryGetValue(connection) ?? "";
|
|
81864
81882
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
81865
|
-
let url = `${
|
|
81883
|
+
let url = `${BASE_URL31}${resolvedPath}`;
|
|
81866
81884
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
81867
81885
|
const params = new URLSearchParams(queryParams);
|
|
81868
81886
|
const separator = url.includes("?") ? "&" : "?";
|
|
81869
81887
|
url = `${url}${separator}${params.toString()}`;
|
|
81870
81888
|
}
|
|
81871
81889
|
const controller = new AbortController();
|
|
81872
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
81890
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS46);
|
|
81873
81891
|
try {
|
|
81874
81892
|
const headers = {
|
|
81875
81893
|
Authorization: `Bearer ${accessToken}`,
|
|
@@ -81908,7 +81926,7 @@ Required headers (Authorization, LinkedIn-Version, X-Restli-Protocol-Version) ar
|
|
|
81908
81926
|
|
|
81909
81927
|
// ../connectors/src/connectors/linkedin-ads/index.ts
|
|
81910
81928
|
var tools52 = {
|
|
81911
|
-
request:
|
|
81929
|
+
request: requestTool35,
|
|
81912
81930
|
listAdAccounts: listAdAccountsTool3
|
|
81913
81931
|
};
|
|
81914
81932
|
var linkedinAdsConnector = new ConnectorPlugin({
|
|
@@ -82170,9 +82188,9 @@ const data = await res.json();
|
|
|
82170
82188
|
|
|
82171
82189
|
// ../connectors/src/connectors/linkedin-ads-oauth/tools/list-ad-accounts.ts
|
|
82172
82190
|
import { z as z64 } from "zod";
|
|
82173
|
-
var
|
|
82191
|
+
var BASE_URL32 = "https://api.linkedin.com/rest/";
|
|
82174
82192
|
var LINKEDIN_VERSION3 = "202603";
|
|
82175
|
-
var
|
|
82193
|
+
var REQUEST_TIMEOUT_MS47 = 6e4;
|
|
82176
82194
|
var cachedToken22 = null;
|
|
82177
82195
|
async function getProxyToken22(config) {
|
|
82178
82196
|
if (cachedToken22 && cachedToken22.expiresAt > Date.now() + 6e4) {
|
|
@@ -82245,7 +82263,7 @@ var listAdAccountsTool4 = new ConnectorTool({
|
|
|
82245
82263
|
const token = await getProxyToken22(config.oauthProxy);
|
|
82246
82264
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
82247
82265
|
const controller = new AbortController();
|
|
82248
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
82266
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS47);
|
|
82249
82267
|
try {
|
|
82250
82268
|
const response = await fetch(proxyUrl, {
|
|
82251
82269
|
method: "POST",
|
|
@@ -82254,7 +82272,7 @@ var listAdAccountsTool4 = new ConnectorTool({
|
|
|
82254
82272
|
Authorization: `Bearer ${token}`
|
|
82255
82273
|
},
|
|
82256
82274
|
body: JSON.stringify({
|
|
82257
|
-
url: `${
|
|
82275
|
+
url: `${BASE_URL32}adAccounts?q=search&search=(status:(values:List(ACTIVE)))&pageSize=100`,
|
|
82258
82276
|
method: "GET",
|
|
82259
82277
|
headers: {
|
|
82260
82278
|
"LinkedIn-Version": LINKEDIN_VERSION3,
|
|
@@ -82345,9 +82363,9 @@ var parameters53 = {
|
|
|
82345
82363
|
|
|
82346
82364
|
// ../connectors/src/connectors/linkedin-ads-oauth/tools/request.ts
|
|
82347
82365
|
import { z as z65 } from "zod";
|
|
82348
|
-
var
|
|
82366
|
+
var BASE_URL33 = "https://api.linkedin.com/rest/";
|
|
82349
82367
|
var LINKEDIN_VERSION4 = "202603";
|
|
82350
|
-
var
|
|
82368
|
+
var REQUEST_TIMEOUT_MS48 = 6e4;
|
|
82351
82369
|
var cachedToken23 = null;
|
|
82352
82370
|
async function getProxyToken23(config) {
|
|
82353
82371
|
if (cachedToken23 && cachedToken23.expiresAt > Date.now() + 6e4) {
|
|
@@ -82402,7 +82420,7 @@ var outputSchema63 = z65.discriminatedUnion("success", [
|
|
|
82402
82420
|
error: z65.string()
|
|
82403
82421
|
})
|
|
82404
82422
|
]);
|
|
82405
|
-
var
|
|
82423
|
+
var requestTool36 = new ConnectorTool({
|
|
82406
82424
|
name: "request",
|
|
82407
82425
|
description: `Send authenticated requests to the LinkedIn Marketing API (REST).
|
|
82408
82426
|
Authentication is handled automatically via OAuth proxy.
|
|
@@ -82424,7 +82442,7 @@ Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatic
|
|
|
82424
82442
|
try {
|
|
82425
82443
|
const adAccountId = parameters53.adAccountId.tryGetValue(connection) ?? "";
|
|
82426
82444
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
82427
|
-
let url = `${
|
|
82445
|
+
let url = `${BASE_URL33}${resolvedPath}`;
|
|
82428
82446
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
82429
82447
|
const params = new URLSearchParams(queryParams);
|
|
82430
82448
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -82433,7 +82451,7 @@ Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatic
|
|
|
82433
82451
|
const token = await getProxyToken23(config.oauthProxy);
|
|
82434
82452
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
82435
82453
|
const controller = new AbortController();
|
|
82436
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
82454
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS48);
|
|
82437
82455
|
try {
|
|
82438
82456
|
const additionalHeaders = {
|
|
82439
82457
|
"LinkedIn-Version": LINKEDIN_VERSION4,
|
|
@@ -82478,7 +82496,7 @@ Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatic
|
|
|
82478
82496
|
|
|
82479
82497
|
// ../connectors/src/connectors/linkedin-ads-oauth/index.ts
|
|
82480
82498
|
var tools53 = {
|
|
82481
|
-
request:
|
|
82499
|
+
request: requestTool36,
|
|
82482
82500
|
listAdAccounts: listAdAccountsTool4
|
|
82483
82501
|
};
|
|
82484
82502
|
var linkedinAdsOauthConnector = new ConnectorPlugin({
|
|
@@ -82762,7 +82780,7 @@ var parameters54 = {
|
|
|
82762
82780
|
|
|
82763
82781
|
// ../connectors/src/connectors/zendesk/tools/request.ts
|
|
82764
82782
|
import { z as z66 } from "zod";
|
|
82765
|
-
var
|
|
82783
|
+
var REQUEST_TIMEOUT_MS49 = 6e4;
|
|
82766
82784
|
var inputSchema64 = z66.object({
|
|
82767
82785
|
toolUseIntent: z66.string().optional().describe(
|
|
82768
82786
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -82787,7 +82805,7 @@ var outputSchema64 = z66.discriminatedUnion("success", [
|
|
|
82787
82805
|
error: z66.string()
|
|
82788
82806
|
})
|
|
82789
82807
|
]);
|
|
82790
|
-
var
|
|
82808
|
+
var requestTool37 = new ConnectorTool({
|
|
82791
82809
|
name: "request",
|
|
82792
82810
|
description: `Send authenticated requests to the Zendesk Support API.
|
|
82793
82811
|
Authentication is handled automatically using email/token Basic auth.
|
|
@@ -82815,7 +82833,7 @@ Zendesk uses cursor-based pagination with page[size] and page[after] parameters.
|
|
|
82815
82833
|
);
|
|
82816
82834
|
const url = `https://${subdomain}.zendesk.com${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
82817
82835
|
const controller = new AbortController();
|
|
82818
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
82836
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS49);
|
|
82819
82837
|
try {
|
|
82820
82838
|
const response = await fetch(url, {
|
|
82821
82839
|
method,
|
|
@@ -82843,7 +82861,7 @@ Zendesk uses cursor-based pagination with page[size] and page[after] parameters.
|
|
|
82843
82861
|
});
|
|
82844
82862
|
|
|
82845
82863
|
// ../connectors/src/connectors/zendesk/index.ts
|
|
82846
|
-
var tools54 = { request:
|
|
82864
|
+
var tools54 = { request: requestTool37 };
|
|
82847
82865
|
var zendeskConnector = new ConnectorPlugin({
|
|
82848
82866
|
slug: "zendesk",
|
|
82849
82867
|
authType: null,
|
|
@@ -83032,7 +83050,7 @@ export default async function handler(c: Context) {
|
|
|
83032
83050
|
|
|
83033
83051
|
// ../connectors/src/connectors/zendesk-oauth/tools/request.ts
|
|
83034
83052
|
import { z as z67 } from "zod";
|
|
83035
|
-
var
|
|
83053
|
+
var REQUEST_TIMEOUT_MS50 = 6e4;
|
|
83036
83054
|
var cachedToken24 = null;
|
|
83037
83055
|
async function getProxyToken24(config) {
|
|
83038
83056
|
if (cachedToken24 && cachedToken24.expiresAt > Date.now() + 6e4) {
|
|
@@ -83087,7 +83105,7 @@ var outputSchema65 = z67.discriminatedUnion("success", [
|
|
|
83087
83105
|
error: z67.string()
|
|
83088
83106
|
})
|
|
83089
83107
|
]);
|
|
83090
|
-
var
|
|
83108
|
+
var requestTool38 = new ConnectorTool({
|
|
83091
83109
|
name: "request",
|
|
83092
83110
|
description: `Send authenticated requests to the Zendesk Support API.
|
|
83093
83111
|
Authentication is handled automatically via OAuth proxy.
|
|
@@ -83116,7 +83134,7 @@ Zendesk uses cursor-based pagination with page[size] and page[after] parameters.
|
|
|
83116
83134
|
const token = await getProxyToken24(config.oauthProxy);
|
|
83117
83135
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
83118
83136
|
const controller = new AbortController();
|
|
83119
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
83137
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS50);
|
|
83120
83138
|
try {
|
|
83121
83139
|
const response = await fetch(proxyUrl, {
|
|
83122
83140
|
method: "POST",
|
|
@@ -83148,12 +83166,12 @@ Zendesk uses cursor-based pagination with page[size] and page[after] parameters.
|
|
|
83148
83166
|
});
|
|
83149
83167
|
|
|
83150
83168
|
// ../connectors/src/connectors/zendesk-oauth/setup.ts
|
|
83151
|
-
var
|
|
83169
|
+
var requestToolName10 = `zendesk-oauth_${requestTool38.name}`;
|
|
83152
83170
|
var zendeskOauthOnboarding = new ConnectorOnboarding({
|
|
83153
83171
|
connectionSetupInstructions: {
|
|
83154
83172
|
en: `Follow these steps to set up the Zendesk connection.
|
|
83155
83173
|
|
|
83156
|
-
1. Call \`${
|
|
83174
|
+
1. Call \`${requestToolName10}\` to fetch account info:
|
|
83157
83175
|
- \`method\`: \`"GET"\`
|
|
83158
83176
|
- \`path\`: \`"/api/v2/account/settings.json"\`
|
|
83159
83177
|
2. If an error is returned, ask the user to check the OAuth connection settings
|
|
@@ -83166,7 +83184,7 @@ var zendeskOauthOnboarding = new ConnectorOnboarding({
|
|
|
83166
83184
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`,
|
|
83167
83185
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Zendesk\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
83168
83186
|
|
|
83169
|
-
1. \`${
|
|
83187
|
+
1. \`${requestToolName10}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u60C5\u5831\u3092\u53D6\u5F97\u3059\u308B:
|
|
83170
83188
|
- \`method\`: \`"GET"\`
|
|
83171
83189
|
- \`path\`: \`"/api/v2/account/settings.json"\`
|
|
83172
83190
|
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306BOAuth\u63A5\u7D9A\u306E\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
|
|
@@ -83194,7 +83212,7 @@ var zendeskOauthOnboarding = new ConnectorOnboarding({
|
|
|
83194
83212
|
var parameters55 = {};
|
|
83195
83213
|
|
|
83196
83214
|
// ../connectors/src/connectors/zendesk-oauth/index.ts
|
|
83197
|
-
var tools55 = { request:
|
|
83215
|
+
var tools55 = { request: requestTool38 };
|
|
83198
83216
|
var zendeskOauthConnector = new ConnectorPlugin({
|
|
83199
83217
|
slug: "zendesk",
|
|
83200
83218
|
authType: AUTH_TYPES.OAUTH,
|
|
@@ -83383,9 +83401,9 @@ var parameters56 = {
|
|
|
83383
83401
|
|
|
83384
83402
|
// ../connectors/src/connectors/intercom/tools/request.ts
|
|
83385
83403
|
import { z as z68 } from "zod";
|
|
83386
|
-
var
|
|
83404
|
+
var BASE_URL34 = "https://api.intercom.io";
|
|
83387
83405
|
var API_VERSION = "2.11";
|
|
83388
|
-
var
|
|
83406
|
+
var REQUEST_TIMEOUT_MS51 = 6e4;
|
|
83389
83407
|
var inputSchema66 = z68.object({
|
|
83390
83408
|
toolUseIntent: z68.string().optional().describe(
|
|
83391
83409
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -83410,7 +83428,7 @@ var outputSchema66 = z68.discriminatedUnion("success", [
|
|
|
83410
83428
|
error: z68.string()
|
|
83411
83429
|
})
|
|
83412
83430
|
]);
|
|
83413
|
-
var
|
|
83431
|
+
var requestTool39 = new ConnectorTool({
|
|
83414
83432
|
name: "request",
|
|
83415
83433
|
description: `Send authenticated requests to the Intercom API.
|
|
83416
83434
|
Authentication is handled automatically using the Access Token (Bearer token).
|
|
@@ -83433,9 +83451,9 @@ The Intercom-Version header is set to 2.11 automatically.`,
|
|
|
83433
83451
|
);
|
|
83434
83452
|
try {
|
|
83435
83453
|
const accessToken = parameters56.accessToken.getValue(connection);
|
|
83436
|
-
const url = `${
|
|
83454
|
+
const url = `${BASE_URL34}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
83437
83455
|
const controller = new AbortController();
|
|
83438
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
83456
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS51);
|
|
83439
83457
|
try {
|
|
83440
83458
|
const response = await fetch(url, {
|
|
83441
83459
|
method,
|
|
@@ -83466,7 +83484,7 @@ The Intercom-Version header is set to 2.11 automatically.`,
|
|
|
83466
83484
|
});
|
|
83467
83485
|
|
|
83468
83486
|
// ../connectors/src/connectors/intercom/index.ts
|
|
83469
|
-
var tools56 = { request:
|
|
83487
|
+
var tools56 = { request: requestTool39 };
|
|
83470
83488
|
var intercomConnector = new ConnectorPlugin({
|
|
83471
83489
|
slug: "intercom",
|
|
83472
83490
|
authType: null,
|
|
@@ -83675,8 +83693,8 @@ export default async function handler(c: Context) {
|
|
|
83675
83693
|
|
|
83676
83694
|
// ../connectors/src/connectors/intercom-oauth/tools/request.ts
|
|
83677
83695
|
import { z as z69 } from "zod";
|
|
83678
|
-
var
|
|
83679
|
-
var
|
|
83696
|
+
var BASE_URL35 = "https://api.intercom.io";
|
|
83697
|
+
var REQUEST_TIMEOUT_MS52 = 6e4;
|
|
83680
83698
|
var cachedToken25 = null;
|
|
83681
83699
|
async function getProxyToken25(config) {
|
|
83682
83700
|
if (cachedToken25 && cachedToken25.expiresAt > Date.now() + 6e4) {
|
|
@@ -83731,7 +83749,7 @@ var outputSchema67 = z69.discriminatedUnion("success", [
|
|
|
83731
83749
|
error: z69.string()
|
|
83732
83750
|
})
|
|
83733
83751
|
]);
|
|
83734
|
-
var
|
|
83752
|
+
var requestTool40 = new ConnectorTool({
|
|
83735
83753
|
name: "request",
|
|
83736
83754
|
description: `Send authenticated requests to the Intercom API.
|
|
83737
83755
|
Authentication is handled automatically via OAuth proxy.
|
|
@@ -83752,7 +83770,7 @@ Search endpoints (contacts/search, conversations/search) use POST with a query o
|
|
|
83752
83770
|
`[connector-request] intercom-oauth/${connection.name}: ${method} ${path4}`
|
|
83753
83771
|
);
|
|
83754
83772
|
try {
|
|
83755
|
-
let url = `${
|
|
83773
|
+
let url = `${BASE_URL35}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
83756
83774
|
if (queryParams) {
|
|
83757
83775
|
const searchParams = new URLSearchParams(queryParams);
|
|
83758
83776
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -83761,7 +83779,7 @@ Search endpoints (contacts/search, conversations/search) use POST with a query o
|
|
|
83761
83779
|
const token = await getProxyToken25(config.oauthProxy);
|
|
83762
83780
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
83763
83781
|
const controller = new AbortController();
|
|
83764
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
83782
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS52);
|
|
83765
83783
|
try {
|
|
83766
83784
|
const response = await fetch(proxyUrl, {
|
|
83767
83785
|
method: "POST",
|
|
@@ -83794,12 +83812,12 @@ Search endpoints (contacts/search, conversations/search) use POST with a query o
|
|
|
83794
83812
|
});
|
|
83795
83813
|
|
|
83796
83814
|
// ../connectors/src/connectors/intercom-oauth/setup.ts
|
|
83797
|
-
var
|
|
83815
|
+
var requestToolName11 = `intercom-oauth_${requestTool40.name}`;
|
|
83798
83816
|
var intercomOauthOnboarding = new ConnectorOnboarding({
|
|
83799
83817
|
connectionSetupInstructions: {
|
|
83800
83818
|
en: `Follow these steps to set up the Intercom connection.
|
|
83801
83819
|
|
|
83802
|
-
1. Call \`${
|
|
83820
|
+
1. Call \`${requestToolName11}\` to verify the connection:
|
|
83803
83821
|
- \`method\`: \`"GET"\`
|
|
83804
83822
|
- \`path\`: \`"/me"\`
|
|
83805
83823
|
2. If an error is returned, ask the user to check the OAuth connection settings
|
|
@@ -83812,7 +83830,7 @@ var intercomOauthOnboarding = new ConnectorOnboarding({
|
|
|
83812
83830
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`,
|
|
83813
83831
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Intercom\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
83814
83832
|
|
|
83815
|
-
1. \`${
|
|
83833
|
+
1. \`${requestToolName11}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u63A5\u7D9A\u3092\u78BA\u8A8D\u3059\u308B:
|
|
83816
83834
|
- \`method\`: \`"GET"\`
|
|
83817
83835
|
- \`path\`: \`"/me"\`
|
|
83818
83836
|
2. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306BOAuth\u63A5\u7D9A\u306E\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
|
|
@@ -83840,7 +83858,7 @@ var intercomOauthOnboarding = new ConnectorOnboarding({
|
|
|
83840
83858
|
var parameters57 = {};
|
|
83841
83859
|
|
|
83842
83860
|
// ../connectors/src/connectors/intercom-oauth/index.ts
|
|
83843
|
-
var tools57 = { request:
|
|
83861
|
+
var tools57 = { request: requestTool40 };
|
|
83844
83862
|
var intercomOauthConnector = new ConnectorPlugin({
|
|
83845
83863
|
slug: "intercom",
|
|
83846
83864
|
authType: AUTH_TYPES.OAUTH,
|
|
@@ -84062,7 +84080,7 @@ var parameters58 = {
|
|
|
84062
84080
|
|
|
84063
84081
|
// ../connectors/src/connectors/mixpanel/tools/request.ts
|
|
84064
84082
|
import { z as z70 } from "zod";
|
|
84065
|
-
var
|
|
84083
|
+
var REQUEST_TIMEOUT_MS53 = 6e4;
|
|
84066
84084
|
var inputSchema68 = z70.object({
|
|
84067
84085
|
toolUseIntent: z70.string().optional().describe(
|
|
84068
84086
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -84092,7 +84110,7 @@ var outputSchema68 = z70.discriminatedUnion("success", [
|
|
|
84092
84110
|
error: z70.string()
|
|
84093
84111
|
})
|
|
84094
84112
|
]);
|
|
84095
|
-
var
|
|
84113
|
+
var requestTool41 = new ConnectorTool({
|
|
84096
84114
|
name: "request",
|
|
84097
84115
|
description: `Send authenticated requests to the Mixpanel REST API.
|
|
84098
84116
|
Authentication is handled automatically using Basic auth (Service Account username + secret).
|
|
@@ -84135,7 +84153,7 @@ Rate limit: 60 queries/hour, 5 concurrent queries for Query API.`,
|
|
|
84135
84153
|
finalUrl = urlObj.toString();
|
|
84136
84154
|
}
|
|
84137
84155
|
const controller = new AbortController();
|
|
84138
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
84156
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS53);
|
|
84139
84157
|
try {
|
|
84140
84158
|
const headers = {
|
|
84141
84159
|
Authorization: `Basic ${authToken}`,
|
|
@@ -84186,7 +84204,7 @@ Rate limit: 60 queries/hour, 5 concurrent queries for Query API.`,
|
|
|
84186
84204
|
});
|
|
84187
84205
|
|
|
84188
84206
|
// ../connectors/src/connectors/mixpanel/index.ts
|
|
84189
|
-
var tools58 = { request:
|
|
84207
|
+
var tools58 = { request: requestTool41 };
|
|
84190
84208
|
var mixpanelConnector = new ConnectorPlugin({
|
|
84191
84209
|
slug: "mixpanel",
|
|
84192
84210
|
authType: null,
|
|
@@ -84370,7 +84388,7 @@ var parameters59 = {
|
|
|
84370
84388
|
|
|
84371
84389
|
// ../connectors/src/connectors/posthog/tools/request.ts
|
|
84372
84390
|
import { z as z71 } from "zod";
|
|
84373
|
-
var
|
|
84391
|
+
var REQUEST_TIMEOUT_MS54 = 6e4;
|
|
84374
84392
|
var inputSchema69 = z71.object({
|
|
84375
84393
|
toolUseIntent: z71.string().optional().describe(
|
|
84376
84394
|
"Brief description of what you intend to accomplish with this tool call"
|
|
@@ -84395,7 +84413,7 @@ var outputSchema69 = z71.discriminatedUnion("success", [
|
|
|
84395
84413
|
error: z71.string()
|
|
84396
84414
|
})
|
|
84397
84415
|
]);
|
|
84398
|
-
var
|
|
84416
|
+
var requestTool42 = new ConnectorTool({
|
|
84399
84417
|
name: "request",
|
|
84400
84418
|
description: `Send authenticated requests to the PostHog REST API.
|
|
84401
84419
|
Authentication is handled automatically using a Bearer token (Personal API Key).
|
|
@@ -84431,7 +84449,7 @@ Rate limit: 240/minute, 1200/hour for analytics endpoints.`,
|
|
|
84431
84449
|
const host = parameters59.host.tryGetValue(connection) ?? "https://us.posthog.com";
|
|
84432
84450
|
const url = `${host.replace(/\/$/, "")}${path4}`;
|
|
84433
84451
|
const controller = new AbortController();
|
|
84434
|
-
const timeout = setTimeout(() => controller.abort(),
|
|
84452
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS54);
|
|
84435
84453
|
try {
|
|
84436
84454
|
const headers = {
|
|
84437
84455
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -84461,7 +84479,7 @@ Rate limit: 240/minute, 1200/hour for analytics endpoints.`,
|
|
|
84461
84479
|
});
|
|
84462
84480
|
|
|
84463
84481
|
// ../connectors/src/connectors/posthog/index.ts
|
|
84464
|
-
var tools59 = { request:
|
|
84482
|
+
var tools59 = { request: requestTool42 };
|
|
84465
84483
|
var posthogConnector = new ConnectorPlugin({
|
|
84466
84484
|
slug: "posthog",
|
|
84467
84485
|
authType: null,
|
|
@@ -84640,6 +84658,7 @@ var plugins = {
|
|
|
84640
84658
|
googleSheetsOauth: googleSheetsOauthConnector,
|
|
84641
84659
|
hubspotOauth: hubspotOauthConnector,
|
|
84642
84660
|
stripeOauth: stripeOauthConnector,
|
|
84661
|
+
stripeApiKey: stripeApiKeyConnector,
|
|
84643
84662
|
airtable: airtableConnector,
|
|
84644
84663
|
airtableOauth: airtableOauthConnector,
|
|
84645
84664
|
squadbaseDb: squadbaseDbConnector,
|
|
@@ -84660,7 +84679,6 @@ var plugins = {
|
|
|
84660
84679
|
jira: jiraConnector,
|
|
84661
84680
|
linear: linearConnector,
|
|
84662
84681
|
asana: asanaConnector,
|
|
84663
|
-
trino: trinoConnector,
|
|
84664
84682
|
clickhouse: clickhouseConnector,
|
|
84665
84683
|
mongodb: mongodbConnector,
|
|
84666
84684
|
notion: notionConnector,
|