@squadbase/vite-server 0.1.3-dev.2 → 0.1.3-dev.3
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 +701 -976
- package/dist/index.js +699 -974
- package/dist/main.js +699 -974
- package/dist/vite-plugin.js +699 -974
- package/package.json +2 -2
package/dist/vite-plugin.js
CHANGED
|
@@ -18863,14 +18863,14 @@ var init_NormalizedSchema = __esm({
|
|
|
18863
18863
|
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
18864
18864
|
}
|
|
18865
18865
|
const struct = this.getSchema();
|
|
18866
|
-
const
|
|
18866
|
+
const z72 = struct[4].length;
|
|
18867
18867
|
let it = struct[anno.it];
|
|
18868
|
-
if (it &&
|
|
18868
|
+
if (it && z72 === it.length) {
|
|
18869
18869
|
yield* it;
|
|
18870
18870
|
return;
|
|
18871
18871
|
}
|
|
18872
|
-
it = Array(
|
|
18873
|
-
for (let i6 = 0; i6 <
|
|
18872
|
+
it = Array(z72);
|
|
18873
|
+
for (let i6 = 0; i6 < z72; ++i6) {
|
|
18874
18874
|
const k6 = struct[4][i6];
|
|
18875
18875
|
const v7 = member([struct[5][i6], 0], k6);
|
|
18876
18876
|
yield it[i6] = [k6, v7];
|
|
@@ -19546,12 +19546,12 @@ var init_split_header = __esm({
|
|
|
19546
19546
|
"../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() {
|
|
19547
19547
|
"use strict";
|
|
19548
19548
|
splitHeader = (value) => {
|
|
19549
|
-
const
|
|
19549
|
+
const z72 = value.length;
|
|
19550
19550
|
const values = [];
|
|
19551
19551
|
let withinQuotes = false;
|
|
19552
19552
|
let prevChar = void 0;
|
|
19553
19553
|
let anchor = 0;
|
|
19554
|
-
for (let i6 = 0; i6 <
|
|
19554
|
+
for (let i6 = 0; i6 < z72; ++i6) {
|
|
19555
19555
|
const char = value[i6];
|
|
19556
19556
|
switch (char) {
|
|
19557
19557
|
case `"`:
|
|
@@ -19572,12 +19572,12 @@ var init_split_header = __esm({
|
|
|
19572
19572
|
values.push(value.slice(anchor));
|
|
19573
19573
|
return values.map((v7) => {
|
|
19574
19574
|
v7 = v7.trim();
|
|
19575
|
-
const
|
|
19576
|
-
if (
|
|
19575
|
+
const z73 = v7.length;
|
|
19576
|
+
if (z73 < 2) {
|
|
19577
19577
|
return v7;
|
|
19578
19578
|
}
|
|
19579
|
-
if (v7[0] === `"` && v7[
|
|
19580
|
-
v7 = v7.slice(1,
|
|
19579
|
+
if (v7[0] === `"` && v7[z73 - 1] === `"`) {
|
|
19580
|
+
v7 = v7.slice(1, z73 - 1);
|
|
19581
19581
|
}
|
|
19582
19582
|
return v7.replace(/\\"/g, '"');
|
|
19583
19583
|
});
|
|
@@ -20975,11 +20975,11 @@ var init_EndpointCache = __esm({
|
|
|
20975
20975
|
}
|
|
20976
20976
|
hash(endpointParams) {
|
|
20977
20977
|
let buffer = "";
|
|
20978
|
-
const { parameters:
|
|
20979
|
-
if (
|
|
20978
|
+
const { parameters: parameters59 } = this;
|
|
20979
|
+
if (parameters59.length === 0) {
|
|
20980
20980
|
return false;
|
|
20981
20981
|
}
|
|
20982
|
-
for (const param of
|
|
20982
|
+
for (const param of parameters59) {
|
|
20983
20983
|
const val = String(endpointParams[param] ?? "");
|
|
20984
20984
|
if (val.includes("|;")) {
|
|
20985
20985
|
return false;
|
|
@@ -21696,15 +21696,15 @@ var init_resolveEndpoint = __esm({
|
|
|
21696
21696
|
init_utils();
|
|
21697
21697
|
resolveEndpoint = (ruleSetObject, options) => {
|
|
21698
21698
|
const { endpointParams, logger: logger2 } = options;
|
|
21699
|
-
const { parameters:
|
|
21699
|
+
const { parameters: parameters59, rules } = ruleSetObject;
|
|
21700
21700
|
options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
|
|
21701
|
-
const paramsWithDefault = Object.entries(
|
|
21701
|
+
const paramsWithDefault = Object.entries(parameters59).filter(([, v7]) => v7.default != null).map(([k6, v7]) => [k6, v7.default]);
|
|
21702
21702
|
if (paramsWithDefault.length > 0) {
|
|
21703
21703
|
for (const [paramKey, paramDefaultValue] of paramsWithDefault) {
|
|
21704
21704
|
endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
|
|
21705
21705
|
}
|
|
21706
21706
|
}
|
|
21707
|
-
const requiredParams = Object.entries(
|
|
21707
|
+
const requiredParams = Object.entries(parameters59).filter(([, v7]) => v7.required).map(([k6]) => k6);
|
|
21708
21708
|
for (const requiredParam of requiredParams) {
|
|
21709
21709
|
if (endpointParams[requiredParam] == null) {
|
|
21710
21710
|
throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
|
|
@@ -27314,8 +27314,8 @@ var init_ProtocolLib = __esm({
|
|
|
27314
27314
|
constructor(queryCompat = false) {
|
|
27315
27315
|
this.queryCompat = queryCompat;
|
|
27316
27316
|
}
|
|
27317
|
-
resolveRestContentType(defaultContentType,
|
|
27318
|
-
const members =
|
|
27317
|
+
resolveRestContentType(defaultContentType, inputSchema69) {
|
|
27318
|
+
const members = inputSchema69.getMemberSchemas();
|
|
27319
27319
|
const httpPayloadMember = Object.values(members).find((m6) => {
|
|
27320
27320
|
return !!m6.getMergedTraits().httpPayload;
|
|
27321
27321
|
});
|
|
@@ -27330,7 +27330,7 @@ var init_ProtocolLib = __esm({
|
|
|
27330
27330
|
} else {
|
|
27331
27331
|
return defaultContentType;
|
|
27332
27332
|
}
|
|
27333
|
-
} else if (!
|
|
27333
|
+
} else if (!inputSchema69.isUnitSchema()) {
|
|
27334
27334
|
const hasBody = Object.values(members).find((m6) => {
|
|
27335
27335
|
const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m6.getMergedTraits();
|
|
27336
27336
|
const noPrefixHeaders = httpPrefixHeaders === void 0;
|
|
@@ -28173,9 +28173,9 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
28173
28173
|
}
|
|
28174
28174
|
async serializeRequest(operationSchema, input, context) {
|
|
28175
28175
|
const request2 = await super.serializeRequest(operationSchema, input, context);
|
|
28176
|
-
const
|
|
28176
|
+
const inputSchema69 = NormalizedSchema.of(operationSchema.input);
|
|
28177
28177
|
if (!request2.headers["content-type"]) {
|
|
28178
|
-
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(),
|
|
28178
|
+
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema69);
|
|
28179
28179
|
if (contentType) {
|
|
28180
28180
|
request2.headers["content-type"] = contentType;
|
|
28181
28181
|
}
|
|
@@ -28187,8 +28187,8 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
28187
28187
|
}
|
|
28188
28188
|
async deserializeResponse(operationSchema, context, response) {
|
|
28189
28189
|
const output = await super.deserializeResponse(operationSchema, context, response);
|
|
28190
|
-
const
|
|
28191
|
-
for (const [name, member2] of
|
|
28190
|
+
const outputSchema69 = NormalizedSchema.of(operationSchema.output);
|
|
28191
|
+
for (const [name, member2] of outputSchema69.structIterator()) {
|
|
28192
28192
|
if (member2.getMemberTraits().httpPayload && !(name in output)) {
|
|
28193
28193
|
output[name] = null;
|
|
28194
28194
|
}
|
|
@@ -31223,14 +31223,14 @@ var init_protocols2 = __esm({
|
|
|
31223
31223
|
});
|
|
31224
31224
|
|
|
31225
31225
|
// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/ruleset.js
|
|
31226
|
-
var w, x, y,
|
|
31226
|
+
var w, x, y, z43, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, _data, ruleSet;
|
|
31227
31227
|
var init_ruleset = __esm({
|
|
31228
31228
|
"../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/ruleset.js"() {
|
|
31229
31229
|
"use strict";
|
|
31230
31230
|
w = "required";
|
|
31231
31231
|
x = "fn";
|
|
31232
31232
|
y = "argv";
|
|
31233
|
-
|
|
31233
|
+
z43 = "ref";
|
|
31234
31234
|
a = true;
|
|
31235
31235
|
b = "isSet";
|
|
31236
31236
|
c = "booleanEquals";
|
|
@@ -31242,13 +31242,13 @@ var init_ruleset = __esm({
|
|
|
31242
31242
|
i = "stringEquals";
|
|
31243
31243
|
j = { [w]: false, type: "string" };
|
|
31244
31244
|
k = { [w]: true, default: false, type: "boolean" };
|
|
31245
|
-
l = { [
|
|
31246
|
-
m = { [x]: c, [y]: [{ [
|
|
31247
|
-
n = { [x]: c, [y]: [{ [
|
|
31245
|
+
l = { [z43]: "Endpoint" };
|
|
31246
|
+
m = { [x]: c, [y]: [{ [z43]: "UseFIPS" }, true] };
|
|
31247
|
+
n = { [x]: c, [y]: [{ [z43]: "UseDualStack" }, true] };
|
|
31248
31248
|
o = {};
|
|
31249
|
-
p = { [
|
|
31250
|
-
q = { [x]: h, [y]: [{ [
|
|
31251
|
-
r = { [
|
|
31249
|
+
p = { [z43]: "Region" };
|
|
31250
|
+
q = { [x]: h, [y]: [{ [z43]: g }, "supportsFIPS"] };
|
|
31251
|
+
r = { [z43]: g };
|
|
31252
31252
|
s = { [x]: c, [y]: [true, { [x]: h, [y]: [r, "supportsDualStack"] }] };
|
|
31253
31253
|
t = [m];
|
|
31254
31254
|
u = [n];
|
|
@@ -32052,22 +32052,22 @@ var init_loadCognitoIdentity = __esm({
|
|
|
32052
32052
|
});
|
|
32053
32053
|
|
|
32054
32054
|
// ../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js
|
|
32055
|
-
function fromCognitoIdentity(
|
|
32055
|
+
function fromCognitoIdentity(parameters59) {
|
|
32056
32056
|
return async (awsIdentityProperties) => {
|
|
32057
|
-
|
|
32057
|
+
parameters59.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");
|
|
32058
32058
|
const { GetCredentialsForIdentityCommand: GetCredentialsForIdentityCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));
|
|
32059
|
-
const fromConfigs = (property) =>
|
|
32060
|
-
const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(
|
|
32059
|
+
const fromConfigs = (property) => parameters59.clientConfig?.[property] ?? parameters59.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property];
|
|
32060
|
+
const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters59.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters59.logger), SessionToken } = throwOnMissingCredentials(parameters59.logger) } = await (parameters59.client ?? new CognitoIdentityClient2(Object.assign({}, parameters59.clientConfig ?? {}, {
|
|
32061
32061
|
region: fromConfigs("region"),
|
|
32062
32062
|
profile: fromConfigs("profile"),
|
|
32063
32063
|
userAgentAppId: fromConfigs("userAgentAppId")
|
|
32064
32064
|
}))).send(new GetCredentialsForIdentityCommand2({
|
|
32065
|
-
CustomRoleArn:
|
|
32066
|
-
IdentityId:
|
|
32067
|
-
Logins:
|
|
32065
|
+
CustomRoleArn: parameters59.customRoleArn,
|
|
32066
|
+
IdentityId: parameters59.identityId,
|
|
32067
|
+
Logins: parameters59.logins ? await resolveLogins(parameters59.logins) : void 0
|
|
32068
32068
|
}));
|
|
32069
32069
|
return {
|
|
32070
|
-
identityId:
|
|
32070
|
+
identityId: parameters59.identityId,
|
|
32071
32071
|
accessKeyId: AccessKeyId,
|
|
32072
32072
|
secretAccessKey: SecretKey,
|
|
32073
32073
|
sessionToken: SessionToken,
|
|
@@ -32695,7 +32695,7 @@ var init_EndpointParameters2 = __esm({
|
|
|
32695
32695
|
});
|
|
32696
32696
|
|
|
32697
32697
|
// ../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js
|
|
32698
|
-
var F, G, H, I, J, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2,
|
|
32698
|
+
var F, G, H, I, J, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z44, A, B, C, D, E, _data2, ruleSet2;
|
|
32699
32699
|
var init_ruleset2 = __esm({
|
|
32700
32700
|
"../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js"() {
|
|
32701
32701
|
"use strict";
|
|
@@ -32733,7 +32733,7 @@ var init_ruleset2 = __esm({
|
|
|
32733
32733
|
w2 = { conditions: [{ [H]: d2, [I]: [q2, "aws-global"] }], [h2]: u2, [G]: h2 };
|
|
32734
32734
|
x2 = { [H]: c2, [I]: [s2, true] };
|
|
32735
32735
|
y2 = { [H]: c2, [I]: [t2, true] };
|
|
32736
|
-
|
|
32736
|
+
z44 = { [H]: l2, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
|
|
32737
32737
|
A = { [J]: "PartitionResult" };
|
|
32738
32738
|
B = { [H]: c2, [I]: [true, { [H]: l2, [I]: [A, "supportsDualStack"] }] };
|
|
32739
32739
|
C = [{ [H]: "isSet", [I]: [o2] }];
|
|
@@ -32799,7 +32799,7 @@ var init_ruleset2 = __esm({
|
|
|
32799
32799
|
conditions: [x2, y2],
|
|
32800
32800
|
rules: [
|
|
32801
32801
|
{
|
|
32802
|
-
conditions: [{ [H]: c2, [I]: [b2,
|
|
32802
|
+
conditions: [{ [H]: c2, [I]: [b2, z44] }, B],
|
|
32803
32803
|
rules: [
|
|
32804
32804
|
{
|
|
32805
32805
|
endpoint: {
|
|
@@ -32820,7 +32820,7 @@ var init_ruleset2 = __esm({
|
|
|
32820
32820
|
conditions: D,
|
|
32821
32821
|
rules: [
|
|
32822
32822
|
{
|
|
32823
|
-
conditions: [{ [H]: c2, [I]: [
|
|
32823
|
+
conditions: [{ [H]: c2, [I]: [z44, b2] }],
|
|
32824
32824
|
rules: [
|
|
32825
32825
|
{
|
|
32826
32826
|
conditions: [{ [H]: d2, [I]: [{ [H]: l2, [I]: [A, "name"] }, "aws-us-gov"] }],
|
|
@@ -44628,11 +44628,11 @@ var require_bignumber = __commonJS({
|
|
|
44628
44628
|
return n6 > 0 || n6 === i6 ? i6 : i6 - 1;
|
|
44629
44629
|
}
|
|
44630
44630
|
function coeffToString(a6) {
|
|
44631
|
-
var s6,
|
|
44631
|
+
var s6, z72, i6 = 1, j6 = a6.length, r6 = a6[0] + "";
|
|
44632
44632
|
for (; i6 < j6; ) {
|
|
44633
44633
|
s6 = a6[i6++] + "";
|
|
44634
|
-
|
|
44635
|
-
for (;
|
|
44634
|
+
z72 = LOG_BASE - s6.length;
|
|
44635
|
+
for (; z72--; s6 = "0" + s6) ;
|
|
44636
44636
|
r6 += s6;
|
|
44637
44637
|
}
|
|
44638
44638
|
for (j6 = r6.length; r6.charCodeAt(--j6) === 48; ) ;
|
|
@@ -44665,15 +44665,15 @@ var require_bignumber = __commonJS({
|
|
|
44665
44665
|
function toExponential(str, e6) {
|
|
44666
44666
|
return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e6 < 0 ? "e" : "e+") + e6;
|
|
44667
44667
|
}
|
|
44668
|
-
function toFixedPoint(str, e6,
|
|
44668
|
+
function toFixedPoint(str, e6, z72) {
|
|
44669
44669
|
var len, zs;
|
|
44670
44670
|
if (e6 < 0) {
|
|
44671
|
-
for (zs =
|
|
44671
|
+
for (zs = z72 + "."; ++e6; zs += z72) ;
|
|
44672
44672
|
str = zs + str;
|
|
44673
44673
|
} else {
|
|
44674
44674
|
len = str.length;
|
|
44675
44675
|
if (++e6 > len) {
|
|
44676
|
-
for (zs =
|
|
44676
|
+
for (zs = z72, e6 -= len; --e6; zs += z72) ;
|
|
44677
44677
|
str += zs;
|
|
44678
44678
|
} else if (e6 < len) {
|
|
44679
44679
|
str = str.slice(0, e6) + "." + str.slice(e6);
|
|
@@ -77169,280 +77169,6 @@ export default async function handler(c: Context) {
|
|
|
77169
77169
|
tools: tools38
|
|
77170
77170
|
});
|
|
77171
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
|
-
});
|
|
77336
|
-
|
|
77337
|
-
// ../connectors/src/connectors/trino/index.ts
|
|
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
|
|
77350
|
-
|
|
77351
|
-
- \`trino_executeQuery\`: Executes a Trino SQL query and returns rows. Use this for schema exploration (\`SHOW CATALOGS\`, \`SHOW SCHEMAS\`, \`SHOW TABLES\`, \`DESCRIBE\`) and for sampling data. See the SQL Reference below for syntax notes.
|
|
77352
|
-
|
|
77353
|
-
### Business Logic
|
|
77354
|
-
|
|
77355
|
-
The business logic type for this connector is "sql".
|
|
77356
|
-
|
|
77357
|
-
### SQL Reference
|
|
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
|
|
77369
|
-
|
|
77370
|
-
- \`trino_executeQuery\`: Trino SQL\u30AF\u30A8\u30EA\u3092\u5B9F\u884C\u3057\u3001\u884C\u30C7\u30FC\u30BF\u3092\u8FD4\u3057\u307E\u3059\u3002\u30B9\u30AD\u30FC\u30DE\u63A2\u7D22 (\`SHOW CATALOGS\`, \`SHOW SCHEMAS\`, \`SHOW TABLES\`, \`DESCRIBE\`) \u3084\u30C7\u30FC\u30BF\u306E\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u306B\u4F7F\u3044\u307E\u3059\u3002\u69CB\u6587\u306E\u6CE8\u610F\u70B9\u306F\u4E0B\u90E8\u306E\u300CSQL \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
77371
|
-
|
|
77372
|
-
### Business Logic
|
|
77373
|
-
|
|
77374
|
-
\u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "sql" \u3067\u3059\u3002
|
|
77375
|
-
|
|
77376
|
-
### SQL \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
77377
|
-
- Trino\u306FANSI SQL\u69CB\u6587\u3092\u4F7F\u7528\u3057\u3001\u30D5\u30A7\u30C7\u30EC\u30FC\u30C6\u30C3\u30C9\u30AF\u30A8\u30EA\u306E\u62E1\u5F35\u304C\u3042\u308A\u307E\u3059
|
|
77378
|
-
- \u30AF\u30ED\u30B9\u30AB\u30BF\u30ED\u30B0\u30AF\u30A8\u30EA\u306B\u306F\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u4F7F\u7528: \`catalog.schema.table\`
|
|
77379
|
-
- \u30B9\u30AD\u30FC\u30DE\u63A2\u7D22\u30B3\u30DE\u30F3\u30C9:
|
|
77380
|
-
- \u30AB\u30BF\u30ED\u30B0\u4E00\u89A7: \`SHOW CATALOGS\`
|
|
77381
|
-
- \u30B9\u30AD\u30FC\u30DE\u4E00\u89A7: \`SHOW SCHEMAS IN catalog_name\`
|
|
77382
|
-
- \u30C6\u30FC\u30D6\u30EB\u4E00\u89A7: \`SHOW TABLES IN catalog_name.schema_name\`
|
|
77383
|
-
- \u30AB\u30E9\u30E0\u4E00\u89A7: \`DESCRIBE catalog_name.schema_name.table_name\`
|
|
77384
|
-
- \u30C6\u30FC\u30D6\u30EB\u8A73\u7D30: \`SHOW COLUMNS FROM catalog_name.schema_name.table_name\`
|
|
77385
|
-
- INFORMATION_SCHEMA\u306F\u30AB\u30BF\u30ED\u30B0\u3054\u3068\u306B\u5229\u7528\u53EF\u80FD: \`SELECT * FROM catalog_name.information_schema.tables\`
|
|
77386
|
-
- \u30AF\u30A8\u30EA\u306B\u306F\u5FC5\u305A LIMIT \u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044`
|
|
77387
|
-
},
|
|
77388
|
-
tools: tools39,
|
|
77389
|
-
async checkConnection(params, _config) {
|
|
77390
|
-
try {
|
|
77391
|
-
const { Trino, BasicAuth } = await import("trino-client");
|
|
77392
|
-
const host = params[parameters39.host.slug];
|
|
77393
|
-
const user = params[parameters39.user.slug];
|
|
77394
|
-
const password = params[parameters39.password.slug] || void 0;
|
|
77395
|
-
const catalog = params[parameters39.catalog.slug] || void 0;
|
|
77396
|
-
const schema = params[parameters39.schema.slug] || void 0;
|
|
77397
|
-
const trino = Trino.create({
|
|
77398
|
-
server: host,
|
|
77399
|
-
catalog,
|
|
77400
|
-
schema,
|
|
77401
|
-
auth: new BasicAuth(user, password)
|
|
77402
|
-
});
|
|
77403
|
-
const iter = await trino.query("SELECT 1");
|
|
77404
|
-
for await (const _result of iter) {
|
|
77405
|
-
}
|
|
77406
|
-
return { success: true };
|
|
77407
|
-
} catch (error2) {
|
|
77408
|
-
return { success: false, error: error2 instanceof Error ? error2.message : String(error2) };
|
|
77409
|
-
}
|
|
77410
|
-
},
|
|
77411
|
-
async query(params, sql, namedParams) {
|
|
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
|
-
}
|
|
77444
|
-
});
|
|
77445
|
-
|
|
77446
77172
|
// ../connectors/src/connectors/clickhouse/setup.ts
|
|
77447
77173
|
var clickhouseOnboarding = new ConnectorOnboarding({
|
|
77448
77174
|
dataOverviewInstructions: {
|
|
@@ -77458,7 +77184,7 @@ var clickhouseOnboarding = new ConnectorOnboarding({
|
|
|
77458
77184
|
});
|
|
77459
77185
|
|
|
77460
77186
|
// ../connectors/src/connectors/clickhouse/parameters.ts
|
|
77461
|
-
var
|
|
77187
|
+
var parameters39 = {
|
|
77462
77188
|
url: new ParameterDefinition({
|
|
77463
77189
|
slug: "url",
|
|
77464
77190
|
name: "ClickHouse Server URL",
|
|
@@ -77498,35 +77224,35 @@ var parameters40 = {
|
|
|
77498
77224
|
};
|
|
77499
77225
|
|
|
77500
77226
|
// ../connectors/src/connectors/clickhouse/tools/execute-query.ts
|
|
77501
|
-
import { z as
|
|
77502
|
-
var
|
|
77503
|
-
var
|
|
77504
|
-
var
|
|
77505
|
-
toolUseIntent:
|
|
77227
|
+
import { z as z42 } from "zod";
|
|
77228
|
+
var MAX_ROWS11 = 500;
|
|
77229
|
+
var QUERY_TIMEOUT_MS4 = 6e4;
|
|
77230
|
+
var inputSchema42 = z42.object({
|
|
77231
|
+
toolUseIntent: z42.string().optional().describe(
|
|
77506
77232
|
"Brief description of what you intend to accomplish with this tool call"
|
|
77507
77233
|
),
|
|
77508
|
-
connectionId:
|
|
77509
|
-
sql:
|
|
77510
|
-
});
|
|
77511
|
-
var
|
|
77512
|
-
|
|
77513
|
-
success:
|
|
77514
|
-
rowCount:
|
|
77515
|
-
truncated:
|
|
77516
|
-
rows:
|
|
77234
|
+
connectionId: z42.string().describe("ID of the ClickHouse connection to use"),
|
|
77235
|
+
sql: z42.string().describe("ClickHouse SQL query. Always include LIMIT in queries.")
|
|
77236
|
+
});
|
|
77237
|
+
var outputSchema42 = z42.discriminatedUnion("success", [
|
|
77238
|
+
z42.object({
|
|
77239
|
+
success: z42.literal(true),
|
|
77240
|
+
rowCount: z42.number(),
|
|
77241
|
+
truncated: z42.boolean(),
|
|
77242
|
+
rows: z42.array(z42.record(z42.string(), z42.unknown()))
|
|
77517
77243
|
}),
|
|
77518
|
-
|
|
77519
|
-
success:
|
|
77520
|
-
error:
|
|
77244
|
+
z42.object({
|
|
77245
|
+
success: z42.literal(false),
|
|
77246
|
+
error: z42.string()
|
|
77521
77247
|
})
|
|
77522
77248
|
]);
|
|
77523
|
-
var
|
|
77249
|
+
var executeQueryTool11 = new ConnectorTool({
|
|
77524
77250
|
name: "executeQuery",
|
|
77525
|
-
description: `Execute SQL against ClickHouse. Returns up to ${
|
|
77251
|
+
description: `Execute SQL against ClickHouse. Returns up to ${MAX_ROWS11} rows.
|
|
77526
77252
|
Use for: schema exploration (SHOW DATABASES, SHOW TABLES, DESCRIBE TABLE), data sampling, analytical queries on large-scale columnar data.
|
|
77527
77253
|
Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
77528
|
-
inputSchema:
|
|
77529
|
-
outputSchema:
|
|
77254
|
+
inputSchema: inputSchema42,
|
|
77255
|
+
outputSchema: outputSchema42,
|
|
77530
77256
|
async execute({ connectionId, sql }, connections) {
|
|
77531
77257
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
77532
77258
|
if (!connection) {
|
|
@@ -77541,16 +77267,16 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
77541
77267
|
let url;
|
|
77542
77268
|
try {
|
|
77543
77269
|
const { createClient } = await import("@clickhouse/client");
|
|
77544
|
-
url =
|
|
77545
|
-
const username =
|
|
77546
|
-
const password =
|
|
77547
|
-
const database =
|
|
77270
|
+
url = parameters39.url.getValue(connection);
|
|
77271
|
+
const username = parameters39.username.getValue(connection);
|
|
77272
|
+
const password = parameters39.password.tryGetValue(connection);
|
|
77273
|
+
const database = parameters39.database.tryGetValue(connection);
|
|
77548
77274
|
const client = createClient({
|
|
77549
77275
|
url,
|
|
77550
77276
|
username,
|
|
77551
77277
|
password: password || "",
|
|
77552
77278
|
database: database || "default",
|
|
77553
|
-
request_timeout:
|
|
77279
|
+
request_timeout: QUERY_TIMEOUT_MS4
|
|
77554
77280
|
});
|
|
77555
77281
|
try {
|
|
77556
77282
|
const resultSet = await client.query({
|
|
@@ -77558,12 +77284,12 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
77558
77284
|
format: "JSONEachRow"
|
|
77559
77285
|
});
|
|
77560
77286
|
const allRows = await resultSet.json();
|
|
77561
|
-
const truncated = allRows.length >
|
|
77287
|
+
const truncated = allRows.length > MAX_ROWS11;
|
|
77562
77288
|
return {
|
|
77563
77289
|
success: true,
|
|
77564
|
-
rowCount: Math.min(allRows.length,
|
|
77290
|
+
rowCount: Math.min(allRows.length, MAX_ROWS11),
|
|
77565
77291
|
truncated,
|
|
77566
|
-
rows: allRows.slice(0,
|
|
77292
|
+
rows: allRows.slice(0, MAX_ROWS11)
|
|
77567
77293
|
};
|
|
77568
77294
|
} finally {
|
|
77569
77295
|
await client.close();
|
|
@@ -77579,14 +77305,14 @@ Avoid loading large amounts of data; always include LIMIT in queries.`,
|
|
|
77579
77305
|
});
|
|
77580
77306
|
|
|
77581
77307
|
// ../connectors/src/connectors/clickhouse/index.ts
|
|
77582
|
-
var
|
|
77308
|
+
var tools39 = { executeQuery: executeQueryTool11 };
|
|
77583
77309
|
var clickhouseConnector = new ConnectorPlugin({
|
|
77584
77310
|
slug: "clickhouse",
|
|
77585
77311
|
authType: null,
|
|
77586
77312
|
name: "ClickHouse",
|
|
77587
77313
|
description: "Connect to ClickHouse for high-performance columnar analytics and real-time data processing.",
|
|
77588
77314
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/MencimqP92UmucqstLl51/d9f2b6160206f5454b26e223a763ab8f/clickhouse.png",
|
|
77589
|
-
parameters:
|
|
77315
|
+
parameters: parameters39,
|
|
77590
77316
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
77591
77317
|
onboarding: clickhouseOnboarding,
|
|
77592
77318
|
systemPrompt: {
|
|
@@ -77631,15 +77357,15 @@ The business logic type for this connector is "sql".
|
|
|
77631
77357
|
- \u96C6\u8A08\u95A2\u6570: \`countIf()\`, \`sumIf()\`, \`uniq()\`, \`quantile()\`
|
|
77632
77358
|
- \u30AF\u30A8\u30EA\u306B\u306F\u5FC5\u305A LIMIT \u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044`
|
|
77633
77359
|
},
|
|
77634
|
-
tools:
|
|
77360
|
+
tools: tools39,
|
|
77635
77361
|
async checkConnection(params, _config) {
|
|
77636
77362
|
try {
|
|
77637
77363
|
const { createClient } = await import("@clickhouse/client");
|
|
77638
77364
|
const client = createClient({
|
|
77639
|
-
url: params[
|
|
77640
|
-
username: params[
|
|
77641
|
-
password: params[
|
|
77642
|
-
database: params[
|
|
77365
|
+
url: params[parameters39.url.slug],
|
|
77366
|
+
username: params[parameters39.username.slug],
|
|
77367
|
+
password: params[parameters39.password.slug] || "",
|
|
77368
|
+
database: params[parameters39.database.slug] || "default",
|
|
77643
77369
|
request_timeout: 1e4
|
|
77644
77370
|
});
|
|
77645
77371
|
try {
|
|
@@ -77659,10 +77385,10 @@ The business logic type for this connector is "sql".
|
|
|
77659
77385
|
const resolvedSql = replaceLiteralParams(sql, namedParams);
|
|
77660
77386
|
const { createClient } = await import("@clickhouse/client");
|
|
77661
77387
|
const client = createClient({
|
|
77662
|
-
url: params[
|
|
77663
|
-
username: params[
|
|
77664
|
-
password: params[
|
|
77665
|
-
database: params[
|
|
77388
|
+
url: params[parameters39.url.slug],
|
|
77389
|
+
username: params[parameters39.username.slug],
|
|
77390
|
+
password: params[parameters39.password.slug] || "",
|
|
77391
|
+
database: params[parameters39.database.slug] || "default",
|
|
77666
77392
|
request_timeout: 6e4
|
|
77667
77393
|
});
|
|
77668
77394
|
try {
|
|
@@ -77693,7 +77419,7 @@ var mongodbOnboarding = new ConnectorOnboarding({
|
|
|
77693
77419
|
});
|
|
77694
77420
|
|
|
77695
77421
|
// ../connectors/src/connectors/mongodb/parameters.ts
|
|
77696
|
-
var
|
|
77422
|
+
var parameters40 = {
|
|
77697
77423
|
connectionUrl: new ParameterDefinition({
|
|
77698
77424
|
slug: "connection-url",
|
|
77699
77425
|
name: "MongoDB Connection URL",
|
|
@@ -77715,39 +77441,39 @@ var parameters41 = {
|
|
|
77715
77441
|
};
|
|
77716
77442
|
|
|
77717
77443
|
// ../connectors/src/connectors/mongodb/tools/find-documents.ts
|
|
77718
|
-
import { z as
|
|
77444
|
+
import { z as z45 } from "zod";
|
|
77719
77445
|
var MAX_DOCUMENTS = 500;
|
|
77720
77446
|
var CONNECT_TIMEOUT_MS4 = 1e4;
|
|
77721
|
-
var
|
|
77722
|
-
var
|
|
77723
|
-
toolUseIntent:
|
|
77447
|
+
var QUERY_TIMEOUT_MS5 = 6e4;
|
|
77448
|
+
var inputSchema43 = z45.object({
|
|
77449
|
+
toolUseIntent: z45.string().optional().describe(
|
|
77724
77450
|
"Brief description of what you intend to accomplish with this tool call"
|
|
77725
77451
|
),
|
|
77726
|
-
connectionId:
|
|
77727
|
-
collection:
|
|
77728
|
-
filter:
|
|
77452
|
+
connectionId: z45.string().describe("ID of the MongoDB connection to use"),
|
|
77453
|
+
collection: z45.string().describe("The name of the collection to query"),
|
|
77454
|
+
filter: z45.string().optional().describe(
|
|
77729
77455
|
`MongoDB filter query as a JSON string (e.g., '{"status": "active"}', '{"age": {"$gt": 25}}'). Defaults to '{}' (all documents).`
|
|
77730
77456
|
),
|
|
77731
|
-
projection:
|
|
77457
|
+
projection: z45.string().optional().describe(
|
|
77732
77458
|
`MongoDB projection as a JSON string to include/exclude fields (e.g., '{"name": 1, "email": 1}' to include only name and email).`
|
|
77733
77459
|
),
|
|
77734
|
-
sort:
|
|
77460
|
+
sort: z45.string().optional().describe(
|
|
77735
77461
|
`MongoDB sort specification as a JSON string (e.g., '{"createdAt": -1}' for descending by createdAt).`
|
|
77736
77462
|
),
|
|
77737
|
-
limit:
|
|
77463
|
+
limit: z45.number().optional().describe(
|
|
77738
77464
|
`Maximum number of documents to return. Defaults to ${MAX_DOCUMENTS}. Cannot exceed ${MAX_DOCUMENTS}.`
|
|
77739
77465
|
)
|
|
77740
77466
|
});
|
|
77741
|
-
var
|
|
77742
|
-
|
|
77743
|
-
success:
|
|
77744
|
-
documentCount:
|
|
77745
|
-
truncated:
|
|
77746
|
-
documents:
|
|
77467
|
+
var outputSchema43 = z45.discriminatedUnion("success", [
|
|
77468
|
+
z45.object({
|
|
77469
|
+
success: z45.literal(true),
|
|
77470
|
+
documentCount: z45.number(),
|
|
77471
|
+
truncated: z45.boolean(),
|
|
77472
|
+
documents: z45.array(z45.record(z45.string(), z45.unknown()))
|
|
77747
77473
|
}),
|
|
77748
|
-
|
|
77749
|
-
success:
|
|
77750
|
-
error:
|
|
77474
|
+
z45.object({
|
|
77475
|
+
success: z45.literal(false),
|
|
77476
|
+
error: z45.string()
|
|
77751
77477
|
})
|
|
77752
77478
|
]);
|
|
77753
77479
|
var findDocumentsTool = new ConnectorTool({
|
|
@@ -77756,8 +77482,8 @@ var findDocumentsTool = new ConnectorTool({
|
|
|
77756
77482
|
Use for: querying documents with filters, projecting specific fields, sorting results, and data sampling.
|
|
77757
77483
|
Pass filter, projection, and sort as JSON strings. Always use limit to avoid loading large amounts of data.
|
|
77758
77484
|
For listing collections, use the aggregate tool with an empty pipeline on the special collection name "$cmd.listCollections".`,
|
|
77759
|
-
inputSchema:
|
|
77760
|
-
outputSchema:
|
|
77485
|
+
inputSchema: inputSchema43,
|
|
77486
|
+
outputSchema: outputSchema43,
|
|
77761
77487
|
async execute({ connectionId, collection, filter, projection, sort, limit }, connections) {
|
|
77762
77488
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
77763
77489
|
if (!connection) {
|
|
@@ -77772,12 +77498,12 @@ For listing collections, use the aggregate tool with an empty pipeline on the sp
|
|
|
77772
77498
|
let connectionUrl;
|
|
77773
77499
|
try {
|
|
77774
77500
|
const { MongoClient } = await Promise.resolve().then(() => __toESM(require_lib4(), 1));
|
|
77775
|
-
connectionUrl =
|
|
77776
|
-
const database =
|
|
77501
|
+
connectionUrl = parameters40.connectionUrl.getValue(connection);
|
|
77502
|
+
const database = parameters40.database.getValue(connection);
|
|
77777
77503
|
const client = new MongoClient(connectionUrl, {
|
|
77778
77504
|
connectTimeoutMS: CONNECT_TIMEOUT_MS4,
|
|
77779
77505
|
serverSelectionTimeoutMS: CONNECT_TIMEOUT_MS4,
|
|
77780
|
-
socketTimeoutMS:
|
|
77506
|
+
socketTimeoutMS: QUERY_TIMEOUT_MS5
|
|
77781
77507
|
});
|
|
77782
77508
|
try {
|
|
77783
77509
|
await client.connect();
|
|
@@ -77820,30 +77546,30 @@ For listing collections, use the aggregate tool with an empty pipeline on the sp
|
|
|
77820
77546
|
});
|
|
77821
77547
|
|
|
77822
77548
|
// ../connectors/src/connectors/mongodb/tools/aggregate.ts
|
|
77823
|
-
import { z as
|
|
77549
|
+
import { z as z46 } from "zod";
|
|
77824
77550
|
var MAX_DOCUMENTS2 = 500;
|
|
77825
77551
|
var CONNECT_TIMEOUT_MS5 = 1e4;
|
|
77826
|
-
var
|
|
77827
|
-
var
|
|
77828
|
-
toolUseIntent:
|
|
77552
|
+
var QUERY_TIMEOUT_MS6 = 6e4;
|
|
77553
|
+
var inputSchema44 = z46.object({
|
|
77554
|
+
toolUseIntent: z46.string().optional().describe(
|
|
77829
77555
|
"Brief description of what you intend to accomplish with this tool call"
|
|
77830
77556
|
),
|
|
77831
|
-
connectionId:
|
|
77832
|
-
collection:
|
|
77833
|
-
pipeline:
|
|
77557
|
+
connectionId: z46.string().describe("ID of the MongoDB connection to use"),
|
|
77558
|
+
collection: z46.string().describe("The name of the collection to run the aggregation pipeline on"),
|
|
77559
|
+
pipeline: z46.string().describe(
|
|
77834
77560
|
`MongoDB aggregation pipeline as a JSON string. An array of stage objects (e.g., '[{"$match": {"status": "active"}}, {"$group": {"_id": "$category", "count": {"$sum": 1}}}]'). Always include a $limit stage to avoid returning too many documents.`
|
|
77835
77561
|
)
|
|
77836
77562
|
});
|
|
77837
|
-
var
|
|
77838
|
-
|
|
77839
|
-
success:
|
|
77840
|
-
documentCount:
|
|
77841
|
-
truncated:
|
|
77842
|
-
documents:
|
|
77563
|
+
var outputSchema44 = z46.discriminatedUnion("success", [
|
|
77564
|
+
z46.object({
|
|
77565
|
+
success: z46.literal(true),
|
|
77566
|
+
documentCount: z46.number(),
|
|
77567
|
+
truncated: z46.boolean(),
|
|
77568
|
+
documents: z46.array(z46.record(z46.string(), z46.unknown()))
|
|
77843
77569
|
}),
|
|
77844
|
-
|
|
77845
|
-
success:
|
|
77846
|
-
error:
|
|
77570
|
+
z46.object({
|
|
77571
|
+
success: z46.literal(false),
|
|
77572
|
+
error: z46.string()
|
|
77847
77573
|
})
|
|
77848
77574
|
]);
|
|
77849
77575
|
var aggregateTool = new ConnectorTool({
|
|
@@ -77853,8 +77579,8 @@ Use for: complex data transformations, grouping, filtering, joining (via $lookup
|
|
|
77853
77579
|
Pass the pipeline as a JSON string representing an array of aggregation stages.
|
|
77854
77580
|
Always include a $limit stage in the pipeline to avoid loading large amounts of data.
|
|
77855
77581
|
Common stages: $match (filter), $group (aggregate), $sort (order), $project (reshape), $lookup (join), $unwind (flatten arrays).`,
|
|
77856
|
-
inputSchema:
|
|
77857
|
-
outputSchema:
|
|
77582
|
+
inputSchema: inputSchema44,
|
|
77583
|
+
outputSchema: outputSchema44,
|
|
77858
77584
|
async execute({ connectionId, collection, pipeline }, connections) {
|
|
77859
77585
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
77860
77586
|
if (!connection) {
|
|
@@ -77869,12 +77595,12 @@ Common stages: $match (filter), $group (aggregate), $sort (order), $project (res
|
|
|
77869
77595
|
let connectionUrl;
|
|
77870
77596
|
try {
|
|
77871
77597
|
const { MongoClient } = await Promise.resolve().then(() => __toESM(require_lib4(), 1));
|
|
77872
|
-
connectionUrl =
|
|
77873
|
-
const database =
|
|
77598
|
+
connectionUrl = parameters40.connectionUrl.getValue(connection);
|
|
77599
|
+
const database = parameters40.database.getValue(connection);
|
|
77874
77600
|
const client = new MongoClient(connectionUrl, {
|
|
77875
77601
|
connectTimeoutMS: CONNECT_TIMEOUT_MS5,
|
|
77876
77602
|
serverSelectionTimeoutMS: CONNECT_TIMEOUT_MS5,
|
|
77877
|
-
socketTimeoutMS:
|
|
77603
|
+
socketTimeoutMS: QUERY_TIMEOUT_MS6
|
|
77878
77604
|
});
|
|
77879
77605
|
try {
|
|
77880
77606
|
await client.connect();
|
|
@@ -77910,25 +77636,25 @@ Common stages: $match (filter), $group (aggregate), $sort (order), $project (res
|
|
|
77910
77636
|
});
|
|
77911
77637
|
|
|
77912
77638
|
// ../connectors/src/connectors/mongodb/tools/list-collections.ts
|
|
77913
|
-
import { z as
|
|
77639
|
+
import { z as z47 } from "zod";
|
|
77914
77640
|
var CONNECT_TIMEOUT_MS6 = 1e4;
|
|
77915
|
-
var
|
|
77916
|
-
toolUseIntent:
|
|
77641
|
+
var inputSchema45 = z47.object({
|
|
77642
|
+
toolUseIntent: z47.string().optional().describe(
|
|
77917
77643
|
"Brief description of what you intend to accomplish with this tool call"
|
|
77918
77644
|
),
|
|
77919
|
-
connectionId:
|
|
77645
|
+
connectionId: z47.string().describe("ID of the MongoDB connection to use")
|
|
77920
77646
|
});
|
|
77921
|
-
var
|
|
77922
|
-
|
|
77923
|
-
success:
|
|
77924
|
-
collections:
|
|
77925
|
-
name:
|
|
77926
|
-
type:
|
|
77647
|
+
var outputSchema45 = z47.discriminatedUnion("success", [
|
|
77648
|
+
z47.object({
|
|
77649
|
+
success: z47.literal(true),
|
|
77650
|
+
collections: z47.array(z47.object({
|
|
77651
|
+
name: z47.string(),
|
|
77652
|
+
type: z47.string()
|
|
77927
77653
|
}))
|
|
77928
77654
|
}),
|
|
77929
|
-
|
|
77930
|
-
success:
|
|
77931
|
-
error:
|
|
77655
|
+
z47.object({
|
|
77656
|
+
success: z47.literal(false),
|
|
77657
|
+
error: z47.string()
|
|
77932
77658
|
})
|
|
77933
77659
|
]);
|
|
77934
77660
|
var listCollectionsTool = new ConnectorTool({
|
|
@@ -77936,8 +77662,8 @@ var listCollectionsTool = new ConnectorTool({
|
|
|
77936
77662
|
description: `List all collections in the MongoDB database.
|
|
77937
77663
|
Use this as the first step to explore the data structure. Returns collection names and types.
|
|
77938
77664
|
After listing collections, use the find tool to sample documents and understand the schema of each collection.`,
|
|
77939
|
-
inputSchema:
|
|
77940
|
-
outputSchema:
|
|
77665
|
+
inputSchema: inputSchema45,
|
|
77666
|
+
outputSchema: outputSchema45,
|
|
77941
77667
|
async execute({ connectionId }, connections) {
|
|
77942
77668
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
77943
77669
|
if (!connection) {
|
|
@@ -77952,8 +77678,8 @@ After listing collections, use the find tool to sample documents and understand
|
|
|
77952
77678
|
let connectionUrl;
|
|
77953
77679
|
try {
|
|
77954
77680
|
const { MongoClient } = await Promise.resolve().then(() => __toESM(require_lib4(), 1));
|
|
77955
|
-
connectionUrl =
|
|
77956
|
-
const database =
|
|
77681
|
+
connectionUrl = parameters40.connectionUrl.getValue(connection);
|
|
77682
|
+
const database = parameters40.database.getValue(connection);
|
|
77957
77683
|
const client = new MongoClient(connectionUrl, {
|
|
77958
77684
|
connectTimeoutMS: CONNECT_TIMEOUT_MS6,
|
|
77959
77685
|
serverSelectionTimeoutMS: CONNECT_TIMEOUT_MS6
|
|
@@ -77983,7 +77709,7 @@ After listing collections, use the find tool to sample documents and understand
|
|
|
77983
77709
|
});
|
|
77984
77710
|
|
|
77985
77711
|
// ../connectors/src/connectors/mongodb/index.ts
|
|
77986
|
-
var
|
|
77712
|
+
var tools40 = {
|
|
77987
77713
|
find: findDocumentsTool,
|
|
77988
77714
|
aggregate: aggregateTool,
|
|
77989
77715
|
listCollections: listCollectionsTool
|
|
@@ -77994,7 +77720,7 @@ var mongodbConnector = new ConnectorPlugin({
|
|
|
77994
77720
|
name: "MongoDB",
|
|
77995
77721
|
description: "Connect to MongoDB for document-oriented data storage and querying.",
|
|
77996
77722
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/48JSUx9HE6oSa9JrHGg2E1/12b4cac65924cac3641d4bafcef37dbe/mongodb-icon.webp",
|
|
77997
|
-
parameters:
|
|
77723
|
+
parameters: parameters40,
|
|
77998
77724
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
77999
77725
|
onboarding: mongodbOnboarding,
|
|
78000
77726
|
systemPrompt: {
|
|
@@ -78041,17 +77767,17 @@ The business logic type for this connector is "typescript".
|
|
|
78041
77767
|
3. aggregate \u306E $group \u3067\u30C7\u30FC\u30BF\u5206\u5E03\u3092\u5206\u6790
|
|
78042
77768
|
- find \u30AF\u30A8\u30EA\u306B\u306F\u5FC5\u305A limit \u3092\u3001\u96C6\u7D04\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306B\u306F $limit \u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044`
|
|
78043
77769
|
},
|
|
78044
|
-
tools:
|
|
77770
|
+
tools: tools40,
|
|
78045
77771
|
async checkConnection(params, _config) {
|
|
78046
77772
|
try {
|
|
78047
77773
|
const { MongoClient } = await Promise.resolve().then(() => __toESM(require_lib4(), 1));
|
|
78048
|
-
const client = new MongoClient(params[
|
|
77774
|
+
const client = new MongoClient(params[parameters40.connectionUrl.slug], {
|
|
78049
77775
|
connectTimeoutMS: 1e4,
|
|
78050
77776
|
serverSelectionTimeoutMS: 1e4
|
|
78051
77777
|
});
|
|
78052
77778
|
try {
|
|
78053
77779
|
await client.connect();
|
|
78054
|
-
const db = client.db(params[
|
|
77780
|
+
const db = client.db(params[parameters40.database.slug]);
|
|
78055
77781
|
await db.command({ ping: 1 });
|
|
78056
77782
|
return { success: true };
|
|
78057
77783
|
} finally {
|
|
@@ -78078,7 +77804,7 @@ var notionOnboarding = new ConnectorOnboarding({
|
|
|
78078
77804
|
});
|
|
78079
77805
|
|
|
78080
77806
|
// ../connectors/src/connectors/notion/parameters.ts
|
|
78081
|
-
var
|
|
77807
|
+
var parameters41 = {
|
|
78082
77808
|
apiKey: new ParameterDefinition({
|
|
78083
77809
|
slug: "api-key",
|
|
78084
77810
|
name: "Notion Internal Integration Token",
|
|
@@ -78091,32 +77817,32 @@ var parameters42 = {
|
|
|
78091
77817
|
};
|
|
78092
77818
|
|
|
78093
77819
|
// ../connectors/src/connectors/notion/tools/request.ts
|
|
78094
|
-
import { z as
|
|
77820
|
+
import { z as z48 } from "zod";
|
|
78095
77821
|
var BASE_URL19 = "https://api.notion.com/v1";
|
|
78096
77822
|
var NOTION_VERSION = "2022-06-28";
|
|
78097
77823
|
var REQUEST_TIMEOUT_MS31 = 6e4;
|
|
78098
|
-
var
|
|
78099
|
-
toolUseIntent:
|
|
77824
|
+
var inputSchema46 = z48.object({
|
|
77825
|
+
toolUseIntent: z48.string().optional().describe(
|
|
78100
77826
|
"Brief description of what you intend to accomplish with this tool call"
|
|
78101
77827
|
),
|
|
78102
|
-
connectionId:
|
|
78103
|
-
method:
|
|
77828
|
+
connectionId: z48.string().describe("ID of the Notion connection to use"),
|
|
77829
|
+
method: z48.enum(["GET", "POST", "PATCH", "DELETE"]).describe(
|
|
78104
77830
|
"HTTP method. GET for reading resources, POST for searching/querying/creating, PATCH for updating, DELETE for deleting."
|
|
78105
77831
|
),
|
|
78106
|
-
path:
|
|
77832
|
+
path: z48.string().describe(
|
|
78107
77833
|
"API path (e.g., '/search', '/databases/{id}/query', '/pages/{id}', '/blocks/{id}/children')"
|
|
78108
77834
|
),
|
|
78109
|
-
body:
|
|
77835
|
+
body: z48.record(z48.string(), z48.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
78110
77836
|
});
|
|
78111
|
-
var
|
|
78112
|
-
|
|
78113
|
-
success:
|
|
78114
|
-
status:
|
|
78115
|
-
data:
|
|
77837
|
+
var outputSchema46 = z48.discriminatedUnion("success", [
|
|
77838
|
+
z48.object({
|
|
77839
|
+
success: z48.literal(true),
|
|
77840
|
+
status: z48.number(),
|
|
77841
|
+
data: z48.record(z48.string(), z48.unknown())
|
|
78116
77842
|
}),
|
|
78117
|
-
|
|
78118
|
-
success:
|
|
78119
|
-
error:
|
|
77843
|
+
z48.object({
|
|
77844
|
+
success: z48.literal(false),
|
|
77845
|
+
error: z48.string()
|
|
78120
77846
|
})
|
|
78121
77847
|
]);
|
|
78122
77848
|
var requestTool24 = new ConnectorTool({
|
|
@@ -78125,8 +77851,8 @@ var requestTool24 = new ConnectorTool({
|
|
|
78125
77851
|
Authentication (Bearer token) and Notion-Version header are configured automatically.
|
|
78126
77852
|
Use this tool for all Notion API interactions: searching pages/databases, querying databases, retrieving pages and blocks, managing content.
|
|
78127
77853
|
Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
78128
|
-
inputSchema:
|
|
78129
|
-
outputSchema:
|
|
77854
|
+
inputSchema: inputSchema46,
|
|
77855
|
+
outputSchema: outputSchema46,
|
|
78130
77856
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
78131
77857
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
78132
77858
|
if (!connection) {
|
|
@@ -78139,7 +77865,7 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
78139
77865
|
`[connector-request] notion/${connection.name}: ${method} ${path4}`
|
|
78140
77866
|
);
|
|
78141
77867
|
try {
|
|
78142
|
-
const apiKey =
|
|
77868
|
+
const apiKey = parameters41.apiKey.getValue(connection);
|
|
78143
77869
|
const url = `${BASE_URL19}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
78144
77870
|
const controller = new AbortController();
|
|
78145
77871
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS31);
|
|
@@ -78171,14 +77897,14 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
78171
77897
|
});
|
|
78172
77898
|
|
|
78173
77899
|
// ../connectors/src/connectors/notion/index.ts
|
|
78174
|
-
var
|
|
77900
|
+
var tools41 = { request: requestTool24 };
|
|
78175
77901
|
var notionConnector = new ConnectorPlugin({
|
|
78176
77902
|
slug: "notion",
|
|
78177
77903
|
authType: null,
|
|
78178
77904
|
name: "Notion",
|
|
78179
77905
|
description: "Connect to Notion to query databases, pages, and workspace content using an Internal Integration Token.",
|
|
78180
77906
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/797V5GDDTA8bsfKUHBCoQO/290ec49b70b68ddb4acd3bf0a6ab8bda/notion-icon.webp",
|
|
78181
|
-
parameters:
|
|
77907
|
+
parameters: parameters41,
|
|
78182
77908
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
78183
77909
|
onboarding: notionOnboarding,
|
|
78184
77910
|
systemPrompt: {
|
|
@@ -78323,11 +78049,11 @@ export default async function handler(c: Context) {
|
|
|
78323
78049
|
- \u30D6\u30ED\u30C3\u30AF\u306E\u5B50\u306F\u6700\u521D\u306E\u30EC\u30D9\u30EB\u306E\u307F\u3067\u3059\u3002\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u306F\u518D\u5E30\u304C\u5FC5\u8981\u3067\u3059
|
|
78324
78050
|
- 25\u4EF6\u4EE5\u4E0A\u306E\u30A2\u30A4\u30C6\u30E0\u3092\u6301\u3064\u30D7\u30ED\u30D1\u30C6\u30A3\uFF08people\u3001relation\u306A\u3069\uFF09\u306F\u5B8C\u5168\u306A\u30C7\u30FC\u30BF\u53D6\u5F97\u306B\u30D7\u30ED\u30D1\u30C6\u30A3\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u5FC5\u8981\u3067\u3059`
|
|
78325
78051
|
},
|
|
78326
|
-
tools:
|
|
78052
|
+
tools: tools41
|
|
78327
78053
|
});
|
|
78328
78054
|
|
|
78329
78055
|
// ../connectors/src/connectors/notion-oauth/tools/request.ts
|
|
78330
|
-
import { z as
|
|
78056
|
+
import { z as z49 } from "zod";
|
|
78331
78057
|
var BASE_URL20 = "https://api.notion.com/v1";
|
|
78332
78058
|
var NOTION_VERSION2 = "2022-06-28";
|
|
78333
78059
|
var REQUEST_TIMEOUT_MS32 = 6e4;
|
|
@@ -78362,26 +78088,26 @@ async function getProxyToken15(config) {
|
|
|
78362
78088
|
};
|
|
78363
78089
|
return data.token;
|
|
78364
78090
|
}
|
|
78365
|
-
var
|
|
78366
|
-
toolUseIntent:
|
|
78091
|
+
var inputSchema47 = z49.object({
|
|
78092
|
+
toolUseIntent: z49.string().optional().describe(
|
|
78367
78093
|
"Brief description of what you intend to accomplish with this tool call"
|
|
78368
78094
|
),
|
|
78369
|
-
connectionId:
|
|
78370
|
-
method:
|
|
78371
|
-
path:
|
|
78095
|
+
connectionId: z49.string().describe("ID of the Notion OAuth connection to use"),
|
|
78096
|
+
method: z49.enum(["GET", "POST", "PATCH", "DELETE"]).describe("HTTP method"),
|
|
78097
|
+
path: z49.string().describe(
|
|
78372
78098
|
"API path appended to https://api.notion.com/v1 (e.g., '/search', '/databases/{id}/query', '/pages/{id}')"
|
|
78373
78099
|
),
|
|
78374
|
-
body:
|
|
78100
|
+
body: z49.record(z49.string(), z49.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
78375
78101
|
});
|
|
78376
|
-
var
|
|
78377
|
-
|
|
78378
|
-
success:
|
|
78379
|
-
status:
|
|
78380
|
-
data:
|
|
78102
|
+
var outputSchema47 = z49.discriminatedUnion("success", [
|
|
78103
|
+
z49.object({
|
|
78104
|
+
success: z49.literal(true),
|
|
78105
|
+
status: z49.number(),
|
|
78106
|
+
data: z49.record(z49.string(), z49.unknown())
|
|
78381
78107
|
}),
|
|
78382
|
-
|
|
78383
|
-
success:
|
|
78384
|
-
error:
|
|
78108
|
+
z49.object({
|
|
78109
|
+
success: z49.literal(false),
|
|
78110
|
+
error: z49.string()
|
|
78385
78111
|
})
|
|
78386
78112
|
]);
|
|
78387
78113
|
var requestTool25 = new ConnectorTool({
|
|
@@ -78390,8 +78116,8 @@ var requestTool25 = new ConnectorTool({
|
|
|
78390
78116
|
Authentication is handled automatically via OAuth proxy. Notion-Version header is set automatically.
|
|
78391
78117
|
Use this tool for all Notion API interactions: searching pages/databases, querying databases, retrieving pages and blocks, managing content.
|
|
78392
78118
|
Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
78393
|
-
inputSchema:
|
|
78394
|
-
outputSchema:
|
|
78119
|
+
inputSchema: inputSchema47,
|
|
78120
|
+
outputSchema: outputSchema47,
|
|
78395
78121
|
async execute({ connectionId, method, path: path4, body }, connections, config) {
|
|
78396
78122
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
78397
78123
|
if (!connection) {
|
|
@@ -78484,17 +78210,17 @@ var notionOauthOnboarding = new ConnectorOnboarding({
|
|
|
78484
78210
|
});
|
|
78485
78211
|
|
|
78486
78212
|
// ../connectors/src/connectors/notion-oauth/parameters.ts
|
|
78487
|
-
var
|
|
78213
|
+
var parameters42 = {};
|
|
78488
78214
|
|
|
78489
78215
|
// ../connectors/src/connectors/notion-oauth/index.ts
|
|
78490
|
-
var
|
|
78216
|
+
var tools42 = { request: requestTool25 };
|
|
78491
78217
|
var notionOauthConnector = new ConnectorPlugin({
|
|
78492
78218
|
slug: "notion",
|
|
78493
78219
|
authType: AUTH_TYPES.OAUTH,
|
|
78494
78220
|
name: "Notion (OAuth)",
|
|
78495
78221
|
description: "Connect to Notion to query databases, pages, and workspace content using OAuth.",
|
|
78496
78222
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/797V5GDDTA8bsfKUHBCoQO/290ec49b70b68ddb4acd3bf0a6ab8bda/notion-icon.webp",
|
|
78497
|
-
parameters:
|
|
78223
|
+
parameters: parameters42,
|
|
78498
78224
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
78499
78225
|
onboarding: notionOauthOnboarding,
|
|
78500
78226
|
proxyPolicy: {
|
|
@@ -78607,7 +78333,7 @@ const res = await notion.request("/search", {
|
|
|
78607
78333
|
const data = await res.json();
|
|
78608
78334
|
\`\`\``
|
|
78609
78335
|
},
|
|
78610
|
-
tools:
|
|
78336
|
+
tools: tools42,
|
|
78611
78337
|
async checkConnection(_params, config) {
|
|
78612
78338
|
const { proxyFetch } = config;
|
|
78613
78339
|
try {
|
|
@@ -78633,10 +78359,10 @@ const data = await res.json();
|
|
|
78633
78359
|
});
|
|
78634
78360
|
|
|
78635
78361
|
// ../connectors/src/connectors/meta-ads/tools/list-ad-accounts.ts
|
|
78636
|
-
import { z as
|
|
78362
|
+
import { z as z50 } from "zod";
|
|
78637
78363
|
|
|
78638
78364
|
// ../connectors/src/connectors/meta-ads/parameters.ts
|
|
78639
|
-
var
|
|
78365
|
+
var parameters43 = {
|
|
78640
78366
|
accessToken: new ParameterDefinition({
|
|
78641
78367
|
slug: "access-token",
|
|
78642
78368
|
name: "Access Token",
|
|
@@ -78660,32 +78386,32 @@ var parameters44 = {
|
|
|
78660
78386
|
// ../connectors/src/connectors/meta-ads/tools/list-ad-accounts.ts
|
|
78661
78387
|
var BASE_URL21 = "https://graph.facebook.com/v21.0/";
|
|
78662
78388
|
var REQUEST_TIMEOUT_MS33 = 6e4;
|
|
78663
|
-
var
|
|
78664
|
-
toolUseIntent:
|
|
78389
|
+
var inputSchema48 = z50.object({
|
|
78390
|
+
toolUseIntent: z50.string().optional().describe(
|
|
78665
78391
|
"Brief description of what you intend to accomplish with this tool call"
|
|
78666
78392
|
),
|
|
78667
|
-
connectionId:
|
|
78393
|
+
connectionId: z50.string().describe("ID of the Meta Ads connection to use")
|
|
78668
78394
|
});
|
|
78669
|
-
var
|
|
78670
|
-
|
|
78671
|
-
success:
|
|
78672
|
-
adAccounts:
|
|
78673
|
-
|
|
78674
|
-
adAccountId:
|
|
78675
|
-
name:
|
|
78395
|
+
var outputSchema48 = z50.discriminatedUnion("success", [
|
|
78396
|
+
z50.object({
|
|
78397
|
+
success: z50.literal(true),
|
|
78398
|
+
adAccounts: z50.array(
|
|
78399
|
+
z50.object({
|
|
78400
|
+
adAccountId: z50.string(),
|
|
78401
|
+
name: z50.string()
|
|
78676
78402
|
})
|
|
78677
78403
|
)
|
|
78678
78404
|
}),
|
|
78679
|
-
|
|
78680
|
-
success:
|
|
78681
|
-
error:
|
|
78405
|
+
z50.object({
|
|
78406
|
+
success: z50.literal(false),
|
|
78407
|
+
error: z50.string()
|
|
78682
78408
|
})
|
|
78683
78409
|
]);
|
|
78684
78410
|
var listAdAccountsTool = new ConnectorTool({
|
|
78685
78411
|
name: "listAdAccounts",
|
|
78686
78412
|
description: "List Meta ad accounts accessible with the current access token.",
|
|
78687
|
-
inputSchema:
|
|
78688
|
-
outputSchema:
|
|
78413
|
+
inputSchema: inputSchema48,
|
|
78414
|
+
outputSchema: outputSchema48,
|
|
78689
78415
|
async execute({ connectionId }, connections) {
|
|
78690
78416
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
78691
78417
|
if (!connection) {
|
|
@@ -78698,7 +78424,7 @@ var listAdAccountsTool = new ConnectorTool({
|
|
|
78698
78424
|
`[connector-request] meta-ads/${connection.name}: listAdAccounts`
|
|
78699
78425
|
);
|
|
78700
78426
|
try {
|
|
78701
|
-
const accessToken =
|
|
78427
|
+
const accessToken = parameters43.accessToken.getValue(connection);
|
|
78702
78428
|
const url = `${BASE_URL21}me/adaccounts?fields=account_id,name,account_status&access_token=${encodeURIComponent(accessToken)}`;
|
|
78703
78429
|
const controller = new AbortController();
|
|
78704
78430
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS33);
|
|
@@ -78775,30 +78501,30 @@ var metaAdsOnboarding = new ConnectorOnboarding({
|
|
|
78775
78501
|
});
|
|
78776
78502
|
|
|
78777
78503
|
// ../connectors/src/connectors/meta-ads/tools/request.ts
|
|
78778
|
-
import { z as
|
|
78504
|
+
import { z as z51 } from "zod";
|
|
78779
78505
|
var BASE_URL22 = "https://graph.facebook.com/v21.0/";
|
|
78780
78506
|
var REQUEST_TIMEOUT_MS34 = 6e4;
|
|
78781
|
-
var
|
|
78782
|
-
toolUseIntent:
|
|
78507
|
+
var inputSchema49 = z51.object({
|
|
78508
|
+
toolUseIntent: z51.string().optional().describe(
|
|
78783
78509
|
"Brief description of what you intend to accomplish with this tool call"
|
|
78784
78510
|
),
|
|
78785
|
-
connectionId:
|
|
78786
|
-
method:
|
|
78787
|
-
path:
|
|
78511
|
+
connectionId: z51.string().describe("ID of the Meta Ads connection to use"),
|
|
78512
|
+
method: z51.enum(["GET", "POST"]).describe("HTTP method"),
|
|
78513
|
+
path: z51.string().describe(
|
|
78788
78514
|
"API path appended to https://graph.facebook.com/v21.0/ (e.g., 'act_{adAccountId}/campaigns'). {adAccountId} is automatically replaced."
|
|
78789
78515
|
),
|
|
78790
|
-
queryParams:
|
|
78791
|
-
body:
|
|
78516
|
+
queryParams: z51.record(z51.string(), z51.string()).optional().describe("Query parameters to append to the URL"),
|
|
78517
|
+
body: z51.record(z51.string(), z51.unknown()).optional().describe("POST request body (JSON)")
|
|
78792
78518
|
});
|
|
78793
|
-
var
|
|
78794
|
-
|
|
78795
|
-
success:
|
|
78796
|
-
status:
|
|
78797
|
-
data:
|
|
78519
|
+
var outputSchema49 = z51.discriminatedUnion("success", [
|
|
78520
|
+
z51.object({
|
|
78521
|
+
success: z51.literal(true),
|
|
78522
|
+
status: z51.number(),
|
|
78523
|
+
data: z51.unknown()
|
|
78798
78524
|
}),
|
|
78799
|
-
|
|
78800
|
-
success:
|
|
78801
|
-
error:
|
|
78525
|
+
z51.object({
|
|
78526
|
+
success: z51.literal(false),
|
|
78527
|
+
error: z51.string()
|
|
78802
78528
|
})
|
|
78803
78529
|
]);
|
|
78804
78530
|
var requestTool26 = new ConnectorTool({
|
|
@@ -78806,8 +78532,8 @@ var requestTool26 = new ConnectorTool({
|
|
|
78806
78532
|
description: `Send authenticated requests to the Meta Marketing API v21.0.
|
|
78807
78533
|
Authentication is handled via the configured access token.
|
|
78808
78534
|
{adAccountId} in the path is automatically replaced with the connection's ad account ID (with act_ prefix added).`,
|
|
78809
|
-
inputSchema:
|
|
78810
|
-
outputSchema:
|
|
78535
|
+
inputSchema: inputSchema49,
|
|
78536
|
+
outputSchema: outputSchema49,
|
|
78811
78537
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections) {
|
|
78812
78538
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
78813
78539
|
if (!connection) {
|
|
@@ -78820,8 +78546,8 @@ Authentication is handled via the configured access token.
|
|
|
78820
78546
|
`[connector-request] meta-ads/${connection.name}: ${method} ${path4}`
|
|
78821
78547
|
);
|
|
78822
78548
|
try {
|
|
78823
|
-
const accessToken =
|
|
78824
|
-
const adAccountId =
|
|
78549
|
+
const accessToken = parameters43.accessToken.getValue(connection);
|
|
78550
|
+
const adAccountId = parameters43.adAccountId.tryGetValue(connection) ?? "";
|
|
78825
78551
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
78826
78552
|
let url = `${BASE_URL22}${resolvedPath}`;
|
|
78827
78553
|
const params = new URLSearchParams(queryParams ?? {});
|
|
@@ -78858,7 +78584,7 @@ Authentication is handled via the configured access token.
|
|
|
78858
78584
|
});
|
|
78859
78585
|
|
|
78860
78586
|
// ../connectors/src/connectors/meta-ads/index.ts
|
|
78861
|
-
var
|
|
78587
|
+
var tools43 = {
|
|
78862
78588
|
request: requestTool26,
|
|
78863
78589
|
listAdAccounts: listAdAccountsTool
|
|
78864
78590
|
};
|
|
@@ -78868,7 +78594,7 @@ var metaAdsConnector = new ConnectorPlugin({
|
|
|
78868
78594
|
name: "Meta Ads",
|
|
78869
78595
|
description: "Connect to Meta (Facebook/Instagram) Ads for advertising campaign data and reporting using an access token.",
|
|
78870
78596
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2vyrgcvdf3jETIFXHtbteO/de7f3288e831c9f738e44cf1f961c3bd/meta-icon.webp",
|
|
78871
|
-
parameters:
|
|
78597
|
+
parameters: parameters43,
|
|
78872
78598
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
78873
78599
|
onboarding: metaAdsOnboarding,
|
|
78874
78600
|
systemPrompt: {
|
|
@@ -78997,9 +78723,9 @@ const insights = await meta.getInsights("act_{adAccountId}", {
|
|
|
78997
78723
|
const accounts = await meta.listAdAccounts();
|
|
78998
78724
|
\`\`\``
|
|
78999
78725
|
},
|
|
79000
|
-
tools:
|
|
78726
|
+
tools: tools43,
|
|
79001
78727
|
async checkConnection(params) {
|
|
79002
|
-
const accessToken = params[
|
|
78728
|
+
const accessToken = params[parameters43.accessToken.slug];
|
|
79003
78729
|
if (!accessToken) {
|
|
79004
78730
|
return {
|
|
79005
78731
|
success: false,
|
|
@@ -79027,7 +78753,7 @@ const accounts = await meta.listAdAccounts();
|
|
|
79027
78753
|
});
|
|
79028
78754
|
|
|
79029
78755
|
// ../connectors/src/connectors/meta-ads-oauth/tools/list-ad-accounts.ts
|
|
79030
|
-
import { z as
|
|
78756
|
+
import { z as z52 } from "zod";
|
|
79031
78757
|
var BASE_URL23 = "https://graph.facebook.com/v21.0/";
|
|
79032
78758
|
var REQUEST_TIMEOUT_MS35 = 6e4;
|
|
79033
78759
|
var cachedToken16 = null;
|
|
@@ -79061,32 +78787,32 @@ async function getProxyToken16(config) {
|
|
|
79061
78787
|
};
|
|
79062
78788
|
return data.token;
|
|
79063
78789
|
}
|
|
79064
|
-
var
|
|
79065
|
-
toolUseIntent:
|
|
78790
|
+
var inputSchema50 = z52.object({
|
|
78791
|
+
toolUseIntent: z52.string().optional().describe(
|
|
79066
78792
|
"Brief description of what you intend to accomplish with this tool call"
|
|
79067
78793
|
),
|
|
79068
|
-
connectionId:
|
|
78794
|
+
connectionId: z52.string().describe("ID of the Meta Ads OAuth connection to use")
|
|
79069
78795
|
});
|
|
79070
|
-
var
|
|
79071
|
-
|
|
79072
|
-
success:
|
|
79073
|
-
adAccounts:
|
|
79074
|
-
|
|
79075
|
-
adAccountId:
|
|
79076
|
-
name:
|
|
78796
|
+
var outputSchema50 = z52.discriminatedUnion("success", [
|
|
78797
|
+
z52.object({
|
|
78798
|
+
success: z52.literal(true),
|
|
78799
|
+
adAccounts: z52.array(
|
|
78800
|
+
z52.object({
|
|
78801
|
+
adAccountId: z52.string(),
|
|
78802
|
+
name: z52.string()
|
|
79077
78803
|
})
|
|
79078
78804
|
)
|
|
79079
78805
|
}),
|
|
79080
|
-
|
|
79081
|
-
success:
|
|
79082
|
-
error:
|
|
78806
|
+
z52.object({
|
|
78807
|
+
success: z52.literal(false),
|
|
78808
|
+
error: z52.string()
|
|
79083
78809
|
})
|
|
79084
78810
|
]);
|
|
79085
78811
|
var listAdAccountsTool2 = new ConnectorTool({
|
|
79086
78812
|
name: "listAdAccounts",
|
|
79087
78813
|
description: "List Meta ad accounts accessible with the current OAuth credentials.",
|
|
79088
|
-
inputSchema:
|
|
79089
|
-
outputSchema:
|
|
78814
|
+
inputSchema: inputSchema50,
|
|
78815
|
+
outputSchema: outputSchema50,
|
|
79090
78816
|
async execute({ connectionId }, connections, config) {
|
|
79091
78817
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
79092
78818
|
if (!connection) {
|
|
@@ -79184,7 +78910,7 @@ var metaAdsOauthOnboarding = new ConnectorOnboarding({
|
|
|
79184
78910
|
});
|
|
79185
78911
|
|
|
79186
78912
|
// ../connectors/src/connectors/meta-ads-oauth/parameters.ts
|
|
79187
|
-
var
|
|
78913
|
+
var parameters44 = {
|
|
79188
78914
|
adAccountId: new ParameterDefinition({
|
|
79189
78915
|
slug: "ad-account-id",
|
|
79190
78916
|
name: "Ad Account ID",
|
|
@@ -79197,7 +78923,7 @@ var parameters45 = {
|
|
|
79197
78923
|
};
|
|
79198
78924
|
|
|
79199
78925
|
// ../connectors/src/connectors/meta-ads-oauth/tools/request.ts
|
|
79200
|
-
import { z as
|
|
78926
|
+
import { z as z53 } from "zod";
|
|
79201
78927
|
var BASE_URL24 = "https://graph.facebook.com/v21.0/";
|
|
79202
78928
|
var REQUEST_TIMEOUT_MS36 = 6e4;
|
|
79203
78929
|
var cachedToken17 = null;
|
|
@@ -79231,27 +78957,27 @@ async function getProxyToken17(config) {
|
|
|
79231
78957
|
};
|
|
79232
78958
|
return data.token;
|
|
79233
78959
|
}
|
|
79234
|
-
var
|
|
79235
|
-
toolUseIntent:
|
|
78960
|
+
var inputSchema51 = z53.object({
|
|
78961
|
+
toolUseIntent: z53.string().optional().describe(
|
|
79236
78962
|
"Brief description of what you intend to accomplish with this tool call"
|
|
79237
78963
|
),
|
|
79238
|
-
connectionId:
|
|
79239
|
-
method:
|
|
79240
|
-
path:
|
|
78964
|
+
connectionId: z53.string().describe("ID of the Meta Ads OAuth connection to use"),
|
|
78965
|
+
method: z53.enum(["GET", "POST"]).describe("HTTP method"),
|
|
78966
|
+
path: z53.string().describe(
|
|
79241
78967
|
"API path appended to https://graph.facebook.com/v21.0/ (e.g., 'act_{adAccountId}/campaigns'). {adAccountId} is automatically replaced."
|
|
79242
78968
|
),
|
|
79243
|
-
queryParams:
|
|
79244
|
-
body:
|
|
78969
|
+
queryParams: z53.record(z53.string(), z53.string()).optional().describe("Query parameters to append to the URL"),
|
|
78970
|
+
body: z53.record(z53.string(), z53.unknown()).optional().describe("POST request body (JSON)")
|
|
79245
78971
|
});
|
|
79246
|
-
var
|
|
79247
|
-
|
|
79248
|
-
success:
|
|
79249
|
-
status:
|
|
79250
|
-
data:
|
|
78972
|
+
var outputSchema51 = z53.discriminatedUnion("success", [
|
|
78973
|
+
z53.object({
|
|
78974
|
+
success: z53.literal(true),
|
|
78975
|
+
status: z53.number(),
|
|
78976
|
+
data: z53.unknown()
|
|
79251
78977
|
}),
|
|
79252
|
-
|
|
79253
|
-
success:
|
|
79254
|
-
error:
|
|
78978
|
+
z53.object({
|
|
78979
|
+
success: z53.literal(false),
|
|
78980
|
+
error: z53.string()
|
|
79255
78981
|
})
|
|
79256
78982
|
]);
|
|
79257
78983
|
var requestTool27 = new ConnectorTool({
|
|
@@ -79259,8 +78985,8 @@ var requestTool27 = new ConnectorTool({
|
|
|
79259
78985
|
description: `Send authenticated requests to the Meta Marketing API v21.0.
|
|
79260
78986
|
Authentication is handled automatically via OAuth proxy.
|
|
79261
78987
|
{adAccountId} in the path is automatically replaced with the connection's ad account ID.`,
|
|
79262
|
-
inputSchema:
|
|
79263
|
-
outputSchema:
|
|
78988
|
+
inputSchema: inputSchema51,
|
|
78989
|
+
outputSchema: outputSchema51,
|
|
79264
78990
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
79265
78991
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
79266
78992
|
if (!connection) {
|
|
@@ -79273,7 +78999,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
79273
78999
|
`[connector-request] meta-ads-oauth/${connection.name}: ${method} ${path4}`
|
|
79274
79000
|
);
|
|
79275
79001
|
try {
|
|
79276
|
-
const adAccountId =
|
|
79002
|
+
const adAccountId = parameters44.adAccountId.tryGetValue(connection) ?? "";
|
|
79277
79003
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
79278
79004
|
let url = `${BASE_URL24}${resolvedPath}`;
|
|
79279
79005
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
@@ -79318,7 +79044,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
79318
79044
|
});
|
|
79319
79045
|
|
|
79320
79046
|
// ../connectors/src/connectors/meta-ads-oauth/index.ts
|
|
79321
|
-
var
|
|
79047
|
+
var tools44 = {
|
|
79322
79048
|
request: requestTool27,
|
|
79323
79049
|
listAdAccounts: listAdAccountsTool2
|
|
79324
79050
|
};
|
|
@@ -79328,7 +79054,7 @@ var metaAdsOauthConnector = new ConnectorPlugin({
|
|
|
79328
79054
|
name: "Meta Ads (OAuth)",
|
|
79329
79055
|
description: "Connect to Meta (Facebook/Instagram) Ads for advertising campaign data and reporting using OAuth.",
|
|
79330
79056
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2vyrgcvdf3jETIFXHtbteO/de7f3288e831c9f738e44cf1f961c3bd/meta-icon.webp",
|
|
79331
|
-
parameters:
|
|
79057
|
+
parameters: parameters44,
|
|
79332
79058
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
79333
79059
|
onboarding: metaAdsOauthOnboarding,
|
|
79334
79060
|
proxyPolicy: {
|
|
@@ -79455,7 +79181,7 @@ const res = await meta.request("act_{adAccountId}/campaigns?fields=id,name,statu
|
|
|
79455
79181
|
const data = await res.json();
|
|
79456
79182
|
\`\`\``
|
|
79457
79183
|
},
|
|
79458
|
-
tools:
|
|
79184
|
+
tools: tools44,
|
|
79459
79185
|
async checkConnection(_params, config) {
|
|
79460
79186
|
const { proxyFetch } = config;
|
|
79461
79187
|
try {
|
|
@@ -79529,7 +79255,7 @@ var tiktokAdsOnboarding = new ConnectorOnboarding({
|
|
|
79529
79255
|
});
|
|
79530
79256
|
|
|
79531
79257
|
// ../connectors/src/connectors/tiktok-ads/parameters.ts
|
|
79532
|
-
var
|
|
79258
|
+
var parameters45 = {
|
|
79533
79259
|
accessToken: new ParameterDefinition({
|
|
79534
79260
|
slug: "access-token",
|
|
79535
79261
|
name: "Access Token",
|
|
@@ -79551,30 +79277,30 @@ var parameters46 = {
|
|
|
79551
79277
|
};
|
|
79552
79278
|
|
|
79553
79279
|
// ../connectors/src/connectors/tiktok-ads/tools/request.ts
|
|
79554
|
-
import { z as
|
|
79280
|
+
import { z as z54 } from "zod";
|
|
79555
79281
|
var BASE_URL25 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
79556
79282
|
var REQUEST_TIMEOUT_MS37 = 6e4;
|
|
79557
|
-
var
|
|
79558
|
-
toolUseIntent:
|
|
79283
|
+
var inputSchema52 = z54.object({
|
|
79284
|
+
toolUseIntent: z54.string().optional().describe(
|
|
79559
79285
|
"Brief description of what you intend to accomplish with this tool call"
|
|
79560
79286
|
),
|
|
79561
|
-
connectionId:
|
|
79562
|
-
method:
|
|
79563
|
-
path:
|
|
79287
|
+
connectionId: z54.string().describe("ID of the TikTok Ads connection to use"),
|
|
79288
|
+
method: z54.enum(["GET", "POST"]).describe("HTTP method"),
|
|
79289
|
+
path: z54.string().describe(
|
|
79564
79290
|
"API path appended to https://business-api.tiktok.com/open_api/v1.3/ (e.g., 'campaign/get/'). The advertiser_id is automatically injected into query params or body."
|
|
79565
79291
|
),
|
|
79566
|
-
queryParams:
|
|
79567
|
-
body:
|
|
79292
|
+
queryParams: z54.record(z54.string(), z54.string()).optional().describe("Query parameters to append to the URL"),
|
|
79293
|
+
body: z54.record(z54.string(), z54.unknown()).optional().describe("POST request body (JSON)")
|
|
79568
79294
|
});
|
|
79569
|
-
var
|
|
79570
|
-
|
|
79571
|
-
success:
|
|
79572
|
-
status:
|
|
79573
|
-
data:
|
|
79295
|
+
var outputSchema52 = z54.discriminatedUnion("success", [
|
|
79296
|
+
z54.object({
|
|
79297
|
+
success: z54.literal(true),
|
|
79298
|
+
status: z54.number(),
|
|
79299
|
+
data: z54.unknown()
|
|
79574
79300
|
}),
|
|
79575
|
-
|
|
79576
|
-
success:
|
|
79577
|
-
error:
|
|
79301
|
+
z54.object({
|
|
79302
|
+
success: z54.literal(false),
|
|
79303
|
+
error: z54.string()
|
|
79578
79304
|
})
|
|
79579
79305
|
]);
|
|
79580
79306
|
var requestTool28 = new ConnectorTool({
|
|
@@ -79582,8 +79308,8 @@ var requestTool28 = new ConnectorTool({
|
|
|
79582
79308
|
description: `Send authenticated requests to the TikTok Marketing API v1.3.
|
|
79583
79309
|
Authentication is handled via the configured access token (sent as Access-Token header).
|
|
79584
79310
|
The advertiser_id is automatically injected if configured.`,
|
|
79585
|
-
inputSchema:
|
|
79586
|
-
outputSchema:
|
|
79311
|
+
inputSchema: inputSchema52,
|
|
79312
|
+
outputSchema: outputSchema52,
|
|
79587
79313
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections) {
|
|
79588
79314
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
79589
79315
|
if (!connection) {
|
|
@@ -79596,8 +79322,8 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
79596
79322
|
`[connector-request] tiktok-ads/${connection.name}: ${method} ${path4}`
|
|
79597
79323
|
);
|
|
79598
79324
|
try {
|
|
79599
|
-
const accessToken =
|
|
79600
|
-
const advertiserId =
|
|
79325
|
+
const accessToken = parameters45.accessToken.getValue(connection);
|
|
79326
|
+
const advertiserId = parameters45.advertiserId.tryGetValue(connection) ?? "";
|
|
79601
79327
|
let url = `${BASE_URL25}${path4}`;
|
|
79602
79328
|
if (method === "GET") {
|
|
79603
79329
|
const params = new URLSearchParams(queryParams ?? {});
|
|
@@ -79651,7 +79377,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
79651
79377
|
|
|
79652
79378
|
// ../connectors/src/connectors/tiktok-ads/index.ts
|
|
79653
79379
|
var BASE_URL26 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
79654
|
-
var
|
|
79380
|
+
var tools45 = {
|
|
79655
79381
|
request: requestTool28
|
|
79656
79382
|
};
|
|
79657
79383
|
var tiktokAdsConnector = new ConnectorPlugin({
|
|
@@ -79660,7 +79386,7 @@ var tiktokAdsConnector = new ConnectorPlugin({
|
|
|
79660
79386
|
name: "TikTok Ads",
|
|
79661
79387
|
description: "Connect to TikTok Ads for advertising campaign data and reporting using an access token.",
|
|
79662
79388
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/01jHuwvmhe4ts0wj23Hxpm/afac9fa50ac5b353927900a122e898ab/tiktok.webp",
|
|
79663
|
-
parameters:
|
|
79389
|
+
parameters: parameters45,
|
|
79664
79390
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
79665
79391
|
onboarding: tiktokAdsOnboarding,
|
|
79666
79392
|
systemPrompt: {
|
|
@@ -79811,16 +79537,16 @@ const rows = await tiktok.getReport({
|
|
|
79811
79537
|
const campaigns = await tiktok.listCampaigns();
|
|
79812
79538
|
\`\`\``
|
|
79813
79539
|
},
|
|
79814
|
-
tools:
|
|
79540
|
+
tools: tools45,
|
|
79815
79541
|
async checkConnection(params) {
|
|
79816
|
-
const accessToken = params[
|
|
79542
|
+
const accessToken = params[parameters45.accessToken.slug];
|
|
79817
79543
|
if (!accessToken) {
|
|
79818
79544
|
return {
|
|
79819
79545
|
success: false,
|
|
79820
79546
|
error: "Access token is required"
|
|
79821
79547
|
};
|
|
79822
79548
|
}
|
|
79823
|
-
const advertiserId = params[
|
|
79549
|
+
const advertiserId = params[parameters45.advertiserId.slug];
|
|
79824
79550
|
if (!advertiserId) {
|
|
79825
79551
|
return { success: true };
|
|
79826
79552
|
}
|
|
@@ -79856,7 +79582,7 @@ const campaigns = await tiktok.listCampaigns();
|
|
|
79856
79582
|
});
|
|
79857
79583
|
|
|
79858
79584
|
// ../connectors/src/connectors/tiktok-ads-oauth/tools/list-advertisers.ts
|
|
79859
|
-
import { z as
|
|
79585
|
+
import { z as z55 } from "zod";
|
|
79860
79586
|
var BASE_URL27 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
79861
79587
|
var REQUEST_TIMEOUT_MS38 = 6e4;
|
|
79862
79588
|
var cachedToken18 = null;
|
|
@@ -79890,32 +79616,32 @@ async function getProxyToken18(config) {
|
|
|
79890
79616
|
};
|
|
79891
79617
|
return data.token;
|
|
79892
79618
|
}
|
|
79893
|
-
var
|
|
79894
|
-
toolUseIntent:
|
|
79619
|
+
var inputSchema53 = z55.object({
|
|
79620
|
+
toolUseIntent: z55.string().optional().describe(
|
|
79895
79621
|
"Brief description of what you intend to accomplish with this tool call"
|
|
79896
79622
|
),
|
|
79897
|
-
connectionId:
|
|
79623
|
+
connectionId: z55.string().describe("ID of the TikTok Ads OAuth connection to use")
|
|
79898
79624
|
});
|
|
79899
|
-
var
|
|
79900
|
-
|
|
79901
|
-
success:
|
|
79902
|
-
advertisers:
|
|
79903
|
-
|
|
79904
|
-
advertiserId:
|
|
79905
|
-
name:
|
|
79625
|
+
var outputSchema53 = z55.discriminatedUnion("success", [
|
|
79626
|
+
z55.object({
|
|
79627
|
+
success: z55.literal(true),
|
|
79628
|
+
advertisers: z55.array(
|
|
79629
|
+
z55.object({
|
|
79630
|
+
advertiserId: z55.string(),
|
|
79631
|
+
name: z55.string()
|
|
79906
79632
|
})
|
|
79907
79633
|
)
|
|
79908
79634
|
}),
|
|
79909
|
-
|
|
79910
|
-
success:
|
|
79911
|
-
error:
|
|
79635
|
+
z55.object({
|
|
79636
|
+
success: z55.literal(false),
|
|
79637
|
+
error: z55.string()
|
|
79912
79638
|
})
|
|
79913
79639
|
]);
|
|
79914
79640
|
var listAdvertisersTool = new ConnectorTool({
|
|
79915
79641
|
name: "listAdvertisers",
|
|
79916
79642
|
description: "List TikTok Ads advertiser accounts accessible with the current OAuth credentials.",
|
|
79917
|
-
inputSchema:
|
|
79918
|
-
outputSchema:
|
|
79643
|
+
inputSchema: inputSchema53,
|
|
79644
|
+
outputSchema: outputSchema53,
|
|
79919
79645
|
async execute({ connectionId }, connections, config) {
|
|
79920
79646
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
79921
79647
|
if (!connection) {
|
|
@@ -80023,7 +79749,7 @@ var tiktokAdsOauthOnboarding = new ConnectorOnboarding({
|
|
|
80023
79749
|
});
|
|
80024
79750
|
|
|
80025
79751
|
// ../connectors/src/connectors/tiktok-ads-oauth/parameters.ts
|
|
80026
|
-
var
|
|
79752
|
+
var parameters46 = {
|
|
80027
79753
|
advertiserId: new ParameterDefinition({
|
|
80028
79754
|
slug: "advertiser-id",
|
|
80029
79755
|
name: "Advertiser ID",
|
|
@@ -80036,7 +79762,7 @@ var parameters47 = {
|
|
|
80036
79762
|
};
|
|
80037
79763
|
|
|
80038
79764
|
// ../connectors/src/connectors/tiktok-ads-oauth/tools/request.ts
|
|
80039
|
-
import { z as
|
|
79765
|
+
import { z as z56 } from "zod";
|
|
80040
79766
|
var BASE_URL28 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
80041
79767
|
var REQUEST_TIMEOUT_MS39 = 6e4;
|
|
80042
79768
|
var cachedToken19 = null;
|
|
@@ -80070,27 +79796,27 @@ async function getProxyToken19(config) {
|
|
|
80070
79796
|
};
|
|
80071
79797
|
return data.token;
|
|
80072
79798
|
}
|
|
80073
|
-
var
|
|
80074
|
-
toolUseIntent:
|
|
79799
|
+
var inputSchema54 = z56.object({
|
|
79800
|
+
toolUseIntent: z56.string().optional().describe(
|
|
80075
79801
|
"Brief description of what you intend to accomplish with this tool call"
|
|
80076
79802
|
),
|
|
80077
|
-
connectionId:
|
|
80078
|
-
method:
|
|
80079
|
-
path:
|
|
79803
|
+
connectionId: z56.string().describe("ID of the TikTok Ads OAuth connection to use"),
|
|
79804
|
+
method: z56.enum(["GET", "POST"]).describe("HTTP method"),
|
|
79805
|
+
path: z56.string().describe(
|
|
80080
79806
|
"API path appended to https://business-api.tiktok.com/open_api/v1.3/ (e.g., 'campaign/get/'). The advertiser_id is automatically injected."
|
|
80081
79807
|
),
|
|
80082
|
-
queryParams:
|
|
80083
|
-
body:
|
|
79808
|
+
queryParams: z56.record(z56.string(), z56.string()).optional().describe("Query parameters to append to the URL"),
|
|
79809
|
+
body: z56.record(z56.string(), z56.unknown()).optional().describe("POST request body (JSON)")
|
|
80084
79810
|
});
|
|
80085
|
-
var
|
|
80086
|
-
|
|
80087
|
-
success:
|
|
80088
|
-
status:
|
|
80089
|
-
data:
|
|
79811
|
+
var outputSchema54 = z56.discriminatedUnion("success", [
|
|
79812
|
+
z56.object({
|
|
79813
|
+
success: z56.literal(true),
|
|
79814
|
+
status: z56.number(),
|
|
79815
|
+
data: z56.unknown()
|
|
80090
79816
|
}),
|
|
80091
|
-
|
|
80092
|
-
success:
|
|
80093
|
-
error:
|
|
79817
|
+
z56.object({
|
|
79818
|
+
success: z56.literal(false),
|
|
79819
|
+
error: z56.string()
|
|
80094
79820
|
})
|
|
80095
79821
|
]);
|
|
80096
79822
|
var requestTool29 = new ConnectorTool({
|
|
@@ -80098,8 +79824,8 @@ var requestTool29 = new ConnectorTool({
|
|
|
80098
79824
|
description: `Send authenticated requests to the TikTok Marketing API v1.3.
|
|
80099
79825
|
Authentication is handled automatically via OAuth proxy.
|
|
80100
79826
|
The advertiser_id is automatically injected if configured.`,
|
|
80101
|
-
inputSchema:
|
|
80102
|
-
outputSchema:
|
|
79827
|
+
inputSchema: inputSchema54,
|
|
79828
|
+
outputSchema: outputSchema54,
|
|
80103
79829
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
80104
79830
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
80105
79831
|
if (!connection) {
|
|
@@ -80112,7 +79838,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
80112
79838
|
`[connector-request] tiktok-ads-oauth/${connection.name}: ${method} ${path4}`
|
|
80113
79839
|
);
|
|
80114
79840
|
try {
|
|
80115
|
-
const advertiserId =
|
|
79841
|
+
const advertiserId = parameters46.advertiserId.tryGetValue(connection) ?? "";
|
|
80116
79842
|
let url = `${BASE_URL28}${path4}`;
|
|
80117
79843
|
if (method === "GET") {
|
|
80118
79844
|
const params = new URLSearchParams(queryParams ?? {});
|
|
@@ -80171,7 +79897,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
80171
79897
|
});
|
|
80172
79898
|
|
|
80173
79899
|
// ../connectors/src/connectors/tiktok-ads-oauth/index.ts
|
|
80174
|
-
var
|
|
79900
|
+
var tools46 = {
|
|
80175
79901
|
request: requestTool29,
|
|
80176
79902
|
listAdvertisers: listAdvertisersTool
|
|
80177
79903
|
};
|
|
@@ -80181,7 +79907,7 @@ var tiktokAdsOauthConnector = new ConnectorPlugin({
|
|
|
80181
79907
|
name: "TikTok Ads (OAuth)",
|
|
80182
79908
|
description: "Connect to TikTok Ads for advertising campaign data and reporting using OAuth.",
|
|
80183
79909
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/01jHuwvmhe4ts0wj23Hxpm/afac9fa50ac5b353927900a122e898ab/tiktok.webp",
|
|
80184
|
-
parameters:
|
|
79910
|
+
parameters: parameters46,
|
|
80185
79911
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
80186
79912
|
onboarding: tiktokAdsOauthOnboarding,
|
|
80187
79913
|
proxyPolicy: {
|
|
@@ -80326,7 +80052,7 @@ const res = await tiktok.request("campaign/get/?advertiser_id={advertiserId}");
|
|
|
80326
80052
|
const data = await res.json();
|
|
80327
80053
|
\`\`\``
|
|
80328
80054
|
},
|
|
80329
|
-
tools:
|
|
80055
|
+
tools: tools46,
|
|
80330
80056
|
async checkConnection(_params, config) {
|
|
80331
80057
|
const { proxyFetch } = config;
|
|
80332
80058
|
try {
|
|
@@ -80370,7 +80096,7 @@ var mailchimpOnboarding = new ConnectorOnboarding({
|
|
|
80370
80096
|
});
|
|
80371
80097
|
|
|
80372
80098
|
// ../connectors/src/connectors/mailchimp/parameters.ts
|
|
80373
|
-
var
|
|
80099
|
+
var parameters47 = {
|
|
80374
80100
|
apiKey: new ParameterDefinition({
|
|
80375
80101
|
slug: "api-key",
|
|
80376
80102
|
name: "Mailchimp API Key",
|
|
@@ -80383,7 +80109,7 @@ var parameters48 = {
|
|
|
80383
80109
|
};
|
|
80384
80110
|
|
|
80385
80111
|
// ../connectors/src/connectors/mailchimp/tools/request.ts
|
|
80386
|
-
import { z as
|
|
80112
|
+
import { z as z57 } from "zod";
|
|
80387
80113
|
var REQUEST_TIMEOUT_MS40 = 6e4;
|
|
80388
80114
|
function extractDatacenter(apiKey) {
|
|
80389
80115
|
const parts = apiKey.split("-");
|
|
@@ -80395,29 +80121,29 @@ function extractDatacenter(apiKey) {
|
|
|
80395
80121
|
}
|
|
80396
80122
|
return dc;
|
|
80397
80123
|
}
|
|
80398
|
-
var
|
|
80399
|
-
toolUseIntent:
|
|
80124
|
+
var inputSchema55 = z57.object({
|
|
80125
|
+
toolUseIntent: z57.string().optional().describe(
|
|
80400
80126
|
"Brief description of what you intend to accomplish with this tool call"
|
|
80401
80127
|
),
|
|
80402
|
-
connectionId:
|
|
80403
|
-
method:
|
|
80128
|
+
connectionId: z57.string().describe("ID of the Mailchimp connection to use"),
|
|
80129
|
+
method: z57.enum(["GET", "POST", "PATCH", "PUT", "DELETE"]).describe(
|
|
80404
80130
|
"HTTP method. GET for reading, POST for creating, PATCH/PUT for updating, DELETE for removing."
|
|
80405
80131
|
),
|
|
80406
|
-
path:
|
|
80132
|
+
path: z57.string().describe(
|
|
80407
80133
|
"API path appended to the base URL (e.g., '/lists', '/campaigns', '/lists/{list_id}/members')"
|
|
80408
80134
|
),
|
|
80409
|
-
queryParams:
|
|
80410
|
-
body:
|
|
80135
|
+
queryParams: z57.record(z57.string(), z57.string()).optional().describe("Query parameters to append to the URL (e.g., count, offset)"),
|
|
80136
|
+
body: z57.record(z57.string(), z57.unknown()).optional().describe("Request body (JSON) for POST/PATCH/PUT requests")
|
|
80411
80137
|
});
|
|
80412
|
-
var
|
|
80413
|
-
|
|
80414
|
-
success:
|
|
80415
|
-
status:
|
|
80416
|
-
data:
|
|
80138
|
+
var outputSchema55 = z57.discriminatedUnion("success", [
|
|
80139
|
+
z57.object({
|
|
80140
|
+
success: z57.literal(true),
|
|
80141
|
+
status: z57.number(),
|
|
80142
|
+
data: z57.record(z57.string(), z57.unknown())
|
|
80417
80143
|
}),
|
|
80418
|
-
|
|
80419
|
-
success:
|
|
80420
|
-
error:
|
|
80144
|
+
z57.object({
|
|
80145
|
+
success: z57.literal(false),
|
|
80146
|
+
error: z57.string()
|
|
80421
80147
|
})
|
|
80422
80148
|
]);
|
|
80423
80149
|
var requestTool30 = new ConnectorTool({
|
|
@@ -80426,8 +80152,8 @@ var requestTool30 = new ConnectorTool({
|
|
|
80426
80152
|
Authentication is handled automatically using the API Key (Basic Auth).
|
|
80427
80153
|
Use this tool for all Mailchimp API interactions: managing audiences/lists, campaigns, members/subscribers, templates, automations, and reports.
|
|
80428
80154
|
The datacenter is automatically extracted from the API key suffix.`,
|
|
80429
|
-
inputSchema:
|
|
80430
|
-
outputSchema:
|
|
80155
|
+
inputSchema: inputSchema55,
|
|
80156
|
+
outputSchema: outputSchema55,
|
|
80431
80157
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections) {
|
|
80432
80158
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
80433
80159
|
if (!connection) {
|
|
@@ -80440,7 +80166,7 @@ The datacenter is automatically extracted from the API key suffix.`,
|
|
|
80440
80166
|
`[connector-request] mailchimp/${connection.name}: ${method} ${path4}`
|
|
80441
80167
|
);
|
|
80442
80168
|
try {
|
|
80443
|
-
const apiKey =
|
|
80169
|
+
const apiKey = parameters47.apiKey.getValue(connection);
|
|
80444
80170
|
const dc = extractDatacenter(apiKey);
|
|
80445
80171
|
const baseUrl = `https://${dc}.api.mailchimp.com/3.0`;
|
|
80446
80172
|
let url = `${baseUrl}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
@@ -80477,14 +80203,14 @@ The datacenter is automatically extracted from the API key suffix.`,
|
|
|
80477
80203
|
});
|
|
80478
80204
|
|
|
80479
80205
|
// ../connectors/src/connectors/mailchimp/index.ts
|
|
80480
|
-
var
|
|
80206
|
+
var tools47 = { request: requestTool30 };
|
|
80481
80207
|
var mailchimpConnector = new ConnectorPlugin({
|
|
80482
80208
|
slug: "mailchimp",
|
|
80483
80209
|
authType: null,
|
|
80484
80210
|
name: "Mailchimp",
|
|
80485
80211
|
description: "Connect to Mailchimp for email marketing, audiences, campaigns, and analytics.",
|
|
80486
80212
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/19Rac6B8eGiLpQb4lKMbG3/10f567f85572aeb16f2ee6aaa6602987/mailchimp.png",
|
|
80487
|
-
parameters:
|
|
80213
|
+
parameters: parameters47,
|
|
80488
80214
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
80489
80215
|
onboarding: mailchimpOnboarding,
|
|
80490
80216
|
systemPrompt: {
|
|
@@ -80683,7 +80409,7 @@ export default async function handler(c: Context) {
|
|
|
80683
80409
|
- subscriber_hash\u306F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306E\u5C0F\u6587\u5B57\u306EMD5\u30CF\u30C3\u30B7\u30E5
|
|
80684
80410
|
- \u30A8\u30E9\u30FC\u306F\`type\`, \`title\`, \`status\`, \`detail\`, \`instance\`\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u8FD4\u5374`
|
|
80685
80411
|
},
|
|
80686
|
-
tools:
|
|
80412
|
+
tools: tools47
|
|
80687
80413
|
});
|
|
80688
80414
|
|
|
80689
80415
|
// ../connectors/src/connectors/mailchimp-oauth/setup.ts
|
|
@@ -80701,7 +80427,7 @@ var mailchimpOauthOnboarding = new ConnectorOnboarding({
|
|
|
80701
80427
|
});
|
|
80702
80428
|
|
|
80703
80429
|
// ../connectors/src/connectors/mailchimp-oauth/parameters.ts
|
|
80704
|
-
var
|
|
80430
|
+
var parameters48 = {
|
|
80705
80431
|
serverPrefix: new ParameterDefinition({
|
|
80706
80432
|
slug: "server-prefix",
|
|
80707
80433
|
name: "Server Prefix (Datacenter)",
|
|
@@ -80714,7 +80440,7 @@ var parameters49 = {
|
|
|
80714
80440
|
};
|
|
80715
80441
|
|
|
80716
80442
|
// ../connectors/src/connectors/mailchimp-oauth/tools/request.ts
|
|
80717
|
-
import { z as
|
|
80443
|
+
import { z as z58 } from "zod";
|
|
80718
80444
|
var REQUEST_TIMEOUT_MS41 = 6e4;
|
|
80719
80445
|
var cachedToken20 = null;
|
|
80720
80446
|
async function getProxyToken20(config) {
|
|
@@ -80747,35 +80473,35 @@ async function getProxyToken20(config) {
|
|
|
80747
80473
|
};
|
|
80748
80474
|
return data.token;
|
|
80749
80475
|
}
|
|
80750
|
-
var
|
|
80751
|
-
toolUseIntent:
|
|
80476
|
+
var inputSchema56 = z58.object({
|
|
80477
|
+
toolUseIntent: z58.string().optional().describe(
|
|
80752
80478
|
"Brief description of what you intend to accomplish with this tool call"
|
|
80753
80479
|
),
|
|
80754
|
-
connectionId:
|
|
80755
|
-
method:
|
|
80756
|
-
path:
|
|
80480
|
+
connectionId: z58.string().describe("ID of the Mailchimp OAuth connection to use"),
|
|
80481
|
+
method: z58.enum(["GET", "POST", "PATCH", "PUT", "DELETE"]).describe("HTTP method"),
|
|
80482
|
+
path: z58.string().describe(
|
|
80757
80483
|
"API path appended to the base URL (e.g., '/lists', '/campaigns', '/lists/{list_id}/members')"
|
|
80758
80484
|
),
|
|
80759
|
-
queryParams:
|
|
80760
|
-
body:
|
|
80485
|
+
queryParams: z58.record(z58.string(), z58.string()).optional().describe("Query parameters to append to the URL"),
|
|
80486
|
+
body: z58.record(z58.string(), z58.unknown()).optional().describe("Request body (JSON) for POST/PATCH/PUT requests")
|
|
80761
80487
|
});
|
|
80762
|
-
var
|
|
80763
|
-
|
|
80764
|
-
success:
|
|
80765
|
-
status:
|
|
80766
|
-
data:
|
|
80488
|
+
var outputSchema56 = z58.discriminatedUnion("success", [
|
|
80489
|
+
z58.object({
|
|
80490
|
+
success: z58.literal(true),
|
|
80491
|
+
status: z58.number(),
|
|
80492
|
+
data: z58.record(z58.string(), z58.unknown())
|
|
80767
80493
|
}),
|
|
80768
|
-
|
|
80769
|
-
success:
|
|
80770
|
-
error:
|
|
80494
|
+
z58.object({
|
|
80495
|
+
success: z58.literal(false),
|
|
80496
|
+
error: z58.string()
|
|
80771
80497
|
})
|
|
80772
80498
|
]);
|
|
80773
80499
|
var requestTool31 = new ConnectorTool({
|
|
80774
80500
|
name: "request",
|
|
80775
80501
|
description: `Send authenticated requests to the Mailchimp Marketing API v3.
|
|
80776
80502
|
Authentication is handled automatically via OAuth proxy.`,
|
|
80777
|
-
inputSchema:
|
|
80778
|
-
outputSchema:
|
|
80503
|
+
inputSchema: inputSchema56,
|
|
80504
|
+
outputSchema: outputSchema56,
|
|
80779
80505
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
80780
80506
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
80781
80507
|
if (!connection) {
|
|
@@ -80788,7 +80514,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
80788
80514
|
`[connector-request] mailchimp-oauth/${connection.name}: ${method} ${path4}`
|
|
80789
80515
|
);
|
|
80790
80516
|
try {
|
|
80791
|
-
const serverPrefix =
|
|
80517
|
+
const serverPrefix = parameters48.serverPrefix.getValue(connection);
|
|
80792
80518
|
const baseUrl = `https://${serverPrefix}.api.mailchimp.com/3.0`;
|
|
80793
80519
|
let url = `${baseUrl}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
80794
80520
|
if (queryParams) {
|
|
@@ -80830,14 +80556,14 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
80830
80556
|
});
|
|
80831
80557
|
|
|
80832
80558
|
// ../connectors/src/connectors/mailchimp-oauth/index.ts
|
|
80833
|
-
var
|
|
80559
|
+
var tools48 = { request: requestTool31 };
|
|
80834
80560
|
var mailchimpOauthConnector = new ConnectorPlugin({
|
|
80835
80561
|
slug: "mailchimp",
|
|
80836
80562
|
authType: AUTH_TYPES.OAUTH,
|
|
80837
80563
|
name: "Mailchimp (OAuth)",
|
|
80838
80564
|
description: "Connect to Mailchimp for email marketing, audiences, campaigns, and analytics using OAuth.",
|
|
80839
80565
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/19Rac6B8eGiLpQb4lKMbG3/10f567f85572aeb16f2ee6aaa6602987/mailchimp.png",
|
|
80840
|
-
parameters:
|
|
80566
|
+
parameters: parameters48,
|
|
80841
80567
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
80842
80568
|
onboarding: mailchimpOauthOnboarding,
|
|
80843
80569
|
proxyPolicy: {
|
|
@@ -80966,7 +80692,7 @@ const res = await mailchimp.request("/lists?count=10");
|
|
|
80966
80692
|
const data = await res.json();
|
|
80967
80693
|
\`\`\``
|
|
80968
80694
|
},
|
|
80969
|
-
tools:
|
|
80695
|
+
tools: tools48,
|
|
80970
80696
|
async checkConnection(params, config) {
|
|
80971
80697
|
const { proxyFetch } = config;
|
|
80972
80698
|
const serverPrefix = params["server-prefix"];
|
|
@@ -81007,7 +80733,7 @@ var customerioOnboarding = new ConnectorOnboarding({
|
|
|
81007
80733
|
});
|
|
81008
80734
|
|
|
81009
80735
|
// ../connectors/src/connectors/customerio/parameters.ts
|
|
81010
|
-
var
|
|
80736
|
+
var parameters49 = {
|
|
81011
80737
|
appApiKey: new ParameterDefinition({
|
|
81012
80738
|
slug: "app-api-key",
|
|
81013
80739
|
name: "App API Key",
|
|
@@ -81029,32 +80755,32 @@ var parameters50 = {
|
|
|
81029
80755
|
};
|
|
81030
80756
|
|
|
81031
80757
|
// ../connectors/src/connectors/customerio/tools/request.ts
|
|
81032
|
-
import { z as
|
|
80758
|
+
import { z as z59 } from "zod";
|
|
81033
80759
|
var REQUEST_TIMEOUT_MS42 = 6e4;
|
|
81034
80760
|
function getBaseUrl(region) {
|
|
81035
80761
|
return region === "eu" ? "https://api-eu.customer.io" : "https://api.customer.io";
|
|
81036
80762
|
}
|
|
81037
|
-
var
|
|
81038
|
-
toolUseIntent:
|
|
80763
|
+
var inputSchema57 = z59.object({
|
|
80764
|
+
toolUseIntent: z59.string().optional().describe(
|
|
81039
80765
|
"Brief description of what you intend to accomplish with this tool call"
|
|
81040
80766
|
),
|
|
81041
|
-
connectionId:
|
|
81042
|
-
method:
|
|
81043
|
-
path:
|
|
80767
|
+
connectionId: z59.string().describe("ID of the Customer.io connection to use"),
|
|
80768
|
+
method: z59.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).describe("HTTP method"),
|
|
80769
|
+
path: z59.string().describe(
|
|
81044
80770
|
"API path (e.g., '/v1/customers', '/v1/segments', '/v1/campaigns', '/v1/send/email')"
|
|
81045
80771
|
),
|
|
81046
|
-
queryParams:
|
|
81047
|
-
body:
|
|
80772
|
+
queryParams: z59.record(z59.string(), z59.string()).optional().describe("Query parameters to append to the URL"),
|
|
80773
|
+
body: z59.record(z59.string(), z59.unknown()).optional().describe("Request body (JSON) for POST/PUT/PATCH requests")
|
|
81048
80774
|
});
|
|
81049
|
-
var
|
|
81050
|
-
|
|
81051
|
-
success:
|
|
81052
|
-
status:
|
|
81053
|
-
data:
|
|
80775
|
+
var outputSchema57 = z59.discriminatedUnion("success", [
|
|
80776
|
+
z59.object({
|
|
80777
|
+
success: z59.literal(true),
|
|
80778
|
+
status: z59.number(),
|
|
80779
|
+
data: z59.record(z59.string(), z59.unknown())
|
|
81054
80780
|
}),
|
|
81055
|
-
|
|
81056
|
-
success:
|
|
81057
|
-
error:
|
|
80781
|
+
z59.object({
|
|
80782
|
+
success: z59.literal(false),
|
|
80783
|
+
error: z59.string()
|
|
81058
80784
|
})
|
|
81059
80785
|
]);
|
|
81060
80786
|
var requestTool32 = new ConnectorTool({
|
|
@@ -81063,8 +80789,8 @@ var requestTool32 = new ConnectorTool({
|
|
|
81063
80789
|
Authentication is handled automatically using the App API Key (Bearer token).
|
|
81064
80790
|
Use this tool for reading customer data, managing campaigns, segments, broadcasts, sending transactional messages, and retrieving delivery information.
|
|
81065
80791
|
The App API is the read and management path for Customer.io data.`,
|
|
81066
|
-
inputSchema:
|
|
81067
|
-
outputSchema:
|
|
80792
|
+
inputSchema: inputSchema57,
|
|
80793
|
+
outputSchema: outputSchema57,
|
|
81068
80794
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections) {
|
|
81069
80795
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
81070
80796
|
if (!connection) {
|
|
@@ -81077,8 +80803,8 @@ The App API is the read and management path for Customer.io data.`,
|
|
|
81077
80803
|
`[connector-request] customerio/${connection.name}: ${method} ${path4}`
|
|
81078
80804
|
);
|
|
81079
80805
|
try {
|
|
81080
|
-
const appApiKey =
|
|
81081
|
-
const region =
|
|
80806
|
+
const appApiKey = parameters49.appApiKey.getValue(connection);
|
|
80807
|
+
const region = parameters49.region.tryGetValue(connection);
|
|
81082
80808
|
const baseUrl = getBaseUrl(region);
|
|
81083
80809
|
let url = `${baseUrl}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
81084
80810
|
if (queryParams) {
|
|
@@ -81123,14 +80849,14 @@ The App API is the read and management path for Customer.io data.`,
|
|
|
81123
80849
|
});
|
|
81124
80850
|
|
|
81125
80851
|
// ../connectors/src/connectors/customerio/index.ts
|
|
81126
|
-
var
|
|
80852
|
+
var tools49 = { request: requestTool32 };
|
|
81127
80853
|
var customerioConnector = new ConnectorPlugin({
|
|
81128
80854
|
slug: "customerio",
|
|
81129
80855
|
authType: null,
|
|
81130
80856
|
name: "Customer.io",
|
|
81131
80857
|
description: "Connect to Customer.io App API for reading customer data, managing campaigns, segments, and sending transactional messages.",
|
|
81132
80858
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/nngohabT7oHDIgQYAVBpz/6f6c7662ef4692eb9869e3e69dd57114/customerio.png",
|
|
81133
|
-
parameters:
|
|
80859
|
+
parameters: parameters49,
|
|
81134
80860
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
81135
80861
|
onboarding: customerioOnboarding,
|
|
81136
80862
|
systemPrompt: {
|
|
@@ -81303,11 +81029,11 @@ export default async function handler(c: Context) {
|
|
|
81303
81029
|
- \u5927\u91CF\u30C7\u30FC\u30BF\u53D6\u5F97\u306B\u306Fexports\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u4F7F\u7528
|
|
81304
81030
|
- \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u306F\u9867\u5BA2\u4E00\u89A7\u3067\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u306E\`start\`\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528`
|
|
81305
81031
|
},
|
|
81306
|
-
tools:
|
|
81032
|
+
tools: tools49
|
|
81307
81033
|
});
|
|
81308
81034
|
|
|
81309
81035
|
// ../connectors/src/connectors/gmail-oauth/tools/request.ts
|
|
81310
|
-
import { z as
|
|
81036
|
+
import { z as z60 } from "zod";
|
|
81311
81037
|
var BASE_URL29 = "https://gmail.googleapis.com/gmail/v1/users";
|
|
81312
81038
|
var REQUEST_TIMEOUT_MS43 = 6e4;
|
|
81313
81039
|
var cachedToken21 = null;
|
|
@@ -81341,28 +81067,28 @@ async function getProxyToken21(config) {
|
|
|
81341
81067
|
};
|
|
81342
81068
|
return data.token;
|
|
81343
81069
|
}
|
|
81344
|
-
var
|
|
81345
|
-
toolUseIntent:
|
|
81070
|
+
var inputSchema58 = z60.object({
|
|
81071
|
+
toolUseIntent: z60.string().optional().describe(
|
|
81346
81072
|
"Brief description of what you intend to accomplish with this tool call"
|
|
81347
81073
|
),
|
|
81348
|
-
connectionId:
|
|
81349
|
-
method:
|
|
81350
|
-
path:
|
|
81074
|
+
connectionId: z60.string().describe("ID of the Gmail OAuth connection to use"),
|
|
81075
|
+
method: z60.enum(["GET"]).describe("HTTP method (read-only, GET only)"),
|
|
81076
|
+
path: z60.string().describe(
|
|
81351
81077
|
"API path appended to https://gmail.googleapis.com/gmail/v1/users (e.g., '/me/messages', '/me/messages/{id}', '/me/labels'). Use '/me' as the userId."
|
|
81352
81078
|
),
|
|
81353
|
-
queryParams:
|
|
81079
|
+
queryParams: z60.record(z60.string(), z60.string()).optional().describe(
|
|
81354
81080
|
"Query parameters to append to the URL (e.g., { q: 'from:example@gmail.com', maxResults: '10' })"
|
|
81355
81081
|
)
|
|
81356
81082
|
});
|
|
81357
|
-
var
|
|
81358
|
-
|
|
81359
|
-
success:
|
|
81360
|
-
status:
|
|
81361
|
-
data:
|
|
81083
|
+
var outputSchema58 = z60.discriminatedUnion("success", [
|
|
81084
|
+
z60.object({
|
|
81085
|
+
success: z60.literal(true),
|
|
81086
|
+
status: z60.number(),
|
|
81087
|
+
data: z60.record(z60.string(), z60.unknown())
|
|
81362
81088
|
}),
|
|
81363
|
-
|
|
81364
|
-
success:
|
|
81365
|
-
error:
|
|
81089
|
+
z60.object({
|
|
81090
|
+
success: z60.literal(false),
|
|
81091
|
+
error: z60.string()
|
|
81366
81092
|
})
|
|
81367
81093
|
]);
|
|
81368
81094
|
var requestTool33 = new ConnectorTool({
|
|
@@ -81370,8 +81096,8 @@ var requestTool33 = new ConnectorTool({
|
|
|
81370
81096
|
description: `Send authenticated GET requests to the Gmail API v1.
|
|
81371
81097
|
Authentication is handled automatically via OAuth proxy.
|
|
81372
81098
|
All paths are relative to https://gmail.googleapis.com/gmail/v1/users. Use '/me' as the userId prefix (e.g., '/me/messages').`,
|
|
81373
|
-
inputSchema:
|
|
81374
|
-
outputSchema:
|
|
81099
|
+
inputSchema: inputSchema58,
|
|
81100
|
+
outputSchema: outputSchema58,
|
|
81375
81101
|
async execute({ connectionId, method, path: path4, queryParams }, connections, config) {
|
|
81376
81102
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
81377
81103
|
if (!connection) {
|
|
@@ -81472,17 +81198,17 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
81472
81198
|
});
|
|
81473
81199
|
|
|
81474
81200
|
// ../connectors/src/connectors/gmail-oauth/parameters.ts
|
|
81475
|
-
var
|
|
81201
|
+
var parameters50 = {};
|
|
81476
81202
|
|
|
81477
81203
|
// ../connectors/src/connectors/gmail-oauth/index.ts
|
|
81478
|
-
var
|
|
81204
|
+
var tools50 = { request: requestTool33 };
|
|
81479
81205
|
var gmailOauthConnector = new ConnectorPlugin({
|
|
81480
81206
|
slug: "gmail",
|
|
81481
81207
|
authType: AUTH_TYPES.OAUTH,
|
|
81482
81208
|
name: "Gmail (OAuth)",
|
|
81483
81209
|
description: "Connect to Gmail for email data access using OAuth. Read-only access to messages, threads, and labels.",
|
|
81484
81210
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4V3rfaSc1ksFIt2eHBNIwJ/7f3be41a154a6d96dcf229ed0e5858c9/Gmail_icon__2020_.svg.png",
|
|
81485
|
-
parameters:
|
|
81211
|
+
parameters: parameters50,
|
|
81486
81212
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
81487
81213
|
onboarding: gmailOnboarding,
|
|
81488
81214
|
proxyPolicy: {
|
|
@@ -81641,7 +81367,7 @@ const thread = await gmail.getThread("<threadId>");
|
|
|
81641
81367
|
thread.messages.forEach(m => console.log(m.snippet));
|
|
81642
81368
|
\`\`\``
|
|
81643
81369
|
},
|
|
81644
|
-
tools:
|
|
81370
|
+
tools: tools50,
|
|
81645
81371
|
async checkConnection(_params, config) {
|
|
81646
81372
|
const { proxyFetch } = config;
|
|
81647
81373
|
const url = "https://gmail.googleapis.com/gmail/v1/users/me/profile";
|
|
@@ -81665,10 +81391,10 @@ thread.messages.forEach(m => console.log(m.snippet));
|
|
|
81665
81391
|
});
|
|
81666
81392
|
|
|
81667
81393
|
// ../connectors/src/connectors/linkedin-ads/tools/list-ad-accounts.ts
|
|
81668
|
-
import { z as
|
|
81394
|
+
import { z as z61 } from "zod";
|
|
81669
81395
|
|
|
81670
81396
|
// ../connectors/src/connectors/linkedin-ads/parameters.ts
|
|
81671
|
-
var
|
|
81397
|
+
var parameters51 = {
|
|
81672
81398
|
accessToken: new ParameterDefinition({
|
|
81673
81399
|
slug: "access-token",
|
|
81674
81400
|
name: "Access Token",
|
|
@@ -81692,32 +81418,32 @@ var parameters52 = {
|
|
|
81692
81418
|
// ../connectors/src/connectors/linkedin-ads/tools/list-ad-accounts.ts
|
|
81693
81419
|
var REQUEST_TIMEOUT_MS44 = 6e4;
|
|
81694
81420
|
var LINKEDIN_VERSION = "202603";
|
|
81695
|
-
var
|
|
81696
|
-
toolUseIntent:
|
|
81421
|
+
var inputSchema59 = z61.object({
|
|
81422
|
+
toolUseIntent: z61.string().optional().describe(
|
|
81697
81423
|
"Brief description of what you intend to accomplish with this tool call"
|
|
81698
81424
|
),
|
|
81699
|
-
connectionId:
|
|
81425
|
+
connectionId: z61.string().describe("ID of the LinkedIn Ads connection to use")
|
|
81700
81426
|
});
|
|
81701
|
-
var
|
|
81702
|
-
|
|
81703
|
-
success:
|
|
81704
|
-
adAccounts:
|
|
81705
|
-
|
|
81706
|
-
adAccountId:
|
|
81707
|
-
name:
|
|
81427
|
+
var outputSchema59 = z61.discriminatedUnion("success", [
|
|
81428
|
+
z61.object({
|
|
81429
|
+
success: z61.literal(true),
|
|
81430
|
+
adAccounts: z61.array(
|
|
81431
|
+
z61.object({
|
|
81432
|
+
adAccountId: z61.string(),
|
|
81433
|
+
name: z61.string()
|
|
81708
81434
|
})
|
|
81709
81435
|
)
|
|
81710
81436
|
}),
|
|
81711
|
-
|
|
81712
|
-
success:
|
|
81713
|
-
error:
|
|
81437
|
+
z61.object({
|
|
81438
|
+
success: z61.literal(false),
|
|
81439
|
+
error: z61.string()
|
|
81714
81440
|
})
|
|
81715
81441
|
]);
|
|
81716
81442
|
var listAdAccountsTool3 = new ConnectorTool({
|
|
81717
81443
|
name: "listAdAccounts",
|
|
81718
81444
|
description: "List LinkedIn ad accounts accessible with the current access token.",
|
|
81719
|
-
inputSchema:
|
|
81720
|
-
outputSchema:
|
|
81445
|
+
inputSchema: inputSchema59,
|
|
81446
|
+
outputSchema: outputSchema59,
|
|
81721
81447
|
async execute({ connectionId }, connections) {
|
|
81722
81448
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
81723
81449
|
if (!connection) {
|
|
@@ -81730,7 +81456,7 @@ var listAdAccountsTool3 = new ConnectorTool({
|
|
|
81730
81456
|
`[connector-request] linkedin-ads/${connection.name}: listAdAccounts`
|
|
81731
81457
|
);
|
|
81732
81458
|
try {
|
|
81733
|
-
const accessToken =
|
|
81459
|
+
const accessToken = parameters51.accessToken.getValue(connection);
|
|
81734
81460
|
const url = "https://api.linkedin.com/rest/adAccounts?q=search&search=(status:(values:List(ACTIVE)))&pageSize=100";
|
|
81735
81461
|
const controller = new AbortController();
|
|
81736
81462
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS44);
|
|
@@ -81812,31 +81538,31 @@ var linkedinAdsOnboarding = new ConnectorOnboarding({
|
|
|
81812
81538
|
});
|
|
81813
81539
|
|
|
81814
81540
|
// ../connectors/src/connectors/linkedin-ads/tools/request.ts
|
|
81815
|
-
import { z as
|
|
81541
|
+
import { z as z62 } from "zod";
|
|
81816
81542
|
var BASE_URL30 = "https://api.linkedin.com/rest/";
|
|
81817
81543
|
var LINKEDIN_VERSION2 = "202603";
|
|
81818
81544
|
var REQUEST_TIMEOUT_MS45 = 6e4;
|
|
81819
|
-
var
|
|
81820
|
-
toolUseIntent:
|
|
81545
|
+
var inputSchema60 = z62.object({
|
|
81546
|
+
toolUseIntent: z62.string().optional().describe(
|
|
81821
81547
|
"Brief description of what you intend to accomplish with this tool call"
|
|
81822
81548
|
),
|
|
81823
|
-
connectionId:
|
|
81824
|
-
method:
|
|
81825
|
-
path:
|
|
81549
|
+
connectionId: z62.string().describe("ID of the LinkedIn Ads connection to use"),
|
|
81550
|
+
method: z62.enum(["GET", "POST", "DELETE"]).describe("HTTP method"),
|
|
81551
|
+
path: z62.string().describe(
|
|
81826
81552
|
"API path appended to https://api.linkedin.com/rest/ (e.g., 'adAccounts/{adAccountId}/adCampaigns'). {adAccountId} is automatically replaced with the configured ad account ID."
|
|
81827
81553
|
),
|
|
81828
|
-
queryParams:
|
|
81829
|
-
body:
|
|
81554
|
+
queryParams: z62.record(z62.string(), z62.string()).optional().describe("Query parameters to append to the URL"),
|
|
81555
|
+
body: z62.record(z62.string(), z62.unknown()).optional().describe("Request body (JSON). For partial updates, use the patch format: { patch: { $set: { ... } } }")
|
|
81830
81556
|
});
|
|
81831
|
-
var
|
|
81832
|
-
|
|
81833
|
-
success:
|
|
81834
|
-
status:
|
|
81835
|
-
data:
|
|
81557
|
+
var outputSchema60 = z62.discriminatedUnion("success", [
|
|
81558
|
+
z62.object({
|
|
81559
|
+
success: z62.literal(true),
|
|
81560
|
+
status: z62.number(),
|
|
81561
|
+
data: z62.unknown()
|
|
81836
81562
|
}),
|
|
81837
|
-
|
|
81838
|
-
success:
|
|
81839
|
-
error:
|
|
81563
|
+
z62.object({
|
|
81564
|
+
success: z62.literal(false),
|
|
81565
|
+
error: z62.string()
|
|
81840
81566
|
})
|
|
81841
81567
|
]);
|
|
81842
81568
|
var requestTool34 = new ConnectorTool({
|
|
@@ -81845,8 +81571,8 @@ var requestTool34 = new ConnectorTool({
|
|
|
81845
81571
|
Authentication is handled via the configured access token.
|
|
81846
81572
|
{adAccountId} in the path is automatically replaced with the connection's ad account ID.
|
|
81847
81573
|
Required headers (Authorization, LinkedIn-Version, X-Restli-Protocol-Version) are set automatically.`,
|
|
81848
|
-
inputSchema:
|
|
81849
|
-
outputSchema:
|
|
81574
|
+
inputSchema: inputSchema60,
|
|
81575
|
+
outputSchema: outputSchema60,
|
|
81850
81576
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections) {
|
|
81851
81577
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
81852
81578
|
if (!connection) {
|
|
@@ -81859,8 +81585,8 @@ Required headers (Authorization, LinkedIn-Version, X-Restli-Protocol-Version) ar
|
|
|
81859
81585
|
`[connector-request] linkedin-ads/${connection.name}: ${method} ${path4}`
|
|
81860
81586
|
);
|
|
81861
81587
|
try {
|
|
81862
|
-
const accessToken =
|
|
81863
|
-
const adAccountId =
|
|
81588
|
+
const accessToken = parameters51.accessToken.getValue(connection);
|
|
81589
|
+
const adAccountId = parameters51.adAccountId.tryGetValue(connection) ?? "";
|
|
81864
81590
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
81865
81591
|
let url = `${BASE_URL30}${resolvedPath}`;
|
|
81866
81592
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
@@ -81907,7 +81633,7 @@ Required headers (Authorization, LinkedIn-Version, X-Restli-Protocol-Version) ar
|
|
|
81907
81633
|
});
|
|
81908
81634
|
|
|
81909
81635
|
// ../connectors/src/connectors/linkedin-ads/index.ts
|
|
81910
|
-
var
|
|
81636
|
+
var tools51 = {
|
|
81911
81637
|
request: requestTool34,
|
|
81912
81638
|
listAdAccounts: listAdAccountsTool3
|
|
81913
81639
|
};
|
|
@@ -81917,7 +81643,7 @@ var linkedinAdsConnector = new ConnectorPlugin({
|
|
|
81917
81643
|
name: "LinkedIn Ads",
|
|
81918
81644
|
description: "Connect to LinkedIn Ads (Marketing API) for advertising campaign data and reporting using an access token.",
|
|
81919
81645
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3x7xd9pVJkRFY7ADIg4ycq/b94720e34cb081e9ae45dfde799a59cd/LinkedIn_icon.svg.png",
|
|
81920
|
-
parameters:
|
|
81646
|
+
parameters: parameters51,
|
|
81921
81647
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
81922
81648
|
onboarding: linkedinAdsOnboarding,
|
|
81923
81649
|
systemPrompt: {
|
|
@@ -82132,9 +81858,9 @@ const res = await linkedin.request("adAccounts/{adAccountId}/adCampaigns?q=searc
|
|
|
82132
81858
|
const data = await res.json();
|
|
82133
81859
|
\`\`\``
|
|
82134
81860
|
},
|
|
82135
|
-
tools:
|
|
81861
|
+
tools: tools51,
|
|
82136
81862
|
async checkConnection(params) {
|
|
82137
|
-
const accessToken = params[
|
|
81863
|
+
const accessToken = params[parameters51.accessToken.slug];
|
|
82138
81864
|
if (!accessToken) {
|
|
82139
81865
|
return {
|
|
82140
81866
|
success: false,
|
|
@@ -82169,7 +81895,7 @@ const data = await res.json();
|
|
|
82169
81895
|
});
|
|
82170
81896
|
|
|
82171
81897
|
// ../connectors/src/connectors/linkedin-ads-oauth/tools/list-ad-accounts.ts
|
|
82172
|
-
import { z as
|
|
81898
|
+
import { z as z63 } from "zod";
|
|
82173
81899
|
var BASE_URL31 = "https://api.linkedin.com/rest/";
|
|
82174
81900
|
var LINKEDIN_VERSION3 = "202603";
|
|
82175
81901
|
var REQUEST_TIMEOUT_MS46 = 6e4;
|
|
@@ -82204,32 +81930,32 @@ async function getProxyToken22(config) {
|
|
|
82204
81930
|
};
|
|
82205
81931
|
return data.token;
|
|
82206
81932
|
}
|
|
82207
|
-
var
|
|
82208
|
-
toolUseIntent:
|
|
81933
|
+
var inputSchema61 = z63.object({
|
|
81934
|
+
toolUseIntent: z63.string().optional().describe(
|
|
82209
81935
|
"Brief description of what you intend to accomplish with this tool call"
|
|
82210
81936
|
),
|
|
82211
|
-
connectionId:
|
|
81937
|
+
connectionId: z63.string().describe("ID of the LinkedIn Ads OAuth connection to use")
|
|
82212
81938
|
});
|
|
82213
|
-
var
|
|
82214
|
-
|
|
82215
|
-
success:
|
|
82216
|
-
adAccounts:
|
|
82217
|
-
|
|
82218
|
-
adAccountId:
|
|
82219
|
-
name:
|
|
81939
|
+
var outputSchema61 = z63.discriminatedUnion("success", [
|
|
81940
|
+
z63.object({
|
|
81941
|
+
success: z63.literal(true),
|
|
81942
|
+
adAccounts: z63.array(
|
|
81943
|
+
z63.object({
|
|
81944
|
+
adAccountId: z63.string(),
|
|
81945
|
+
name: z63.string()
|
|
82220
81946
|
})
|
|
82221
81947
|
)
|
|
82222
81948
|
}),
|
|
82223
|
-
|
|
82224
|
-
success:
|
|
82225
|
-
error:
|
|
81949
|
+
z63.object({
|
|
81950
|
+
success: z63.literal(false),
|
|
81951
|
+
error: z63.string()
|
|
82226
81952
|
})
|
|
82227
81953
|
]);
|
|
82228
81954
|
var listAdAccountsTool4 = new ConnectorTool({
|
|
82229
81955
|
name: "listAdAccounts",
|
|
82230
81956
|
description: "List LinkedIn ad accounts accessible with the current OAuth credentials.",
|
|
82231
|
-
inputSchema:
|
|
82232
|
-
outputSchema:
|
|
81957
|
+
inputSchema: inputSchema61,
|
|
81958
|
+
outputSchema: outputSchema61,
|
|
82233
81959
|
async execute({ connectionId }, connections, config) {
|
|
82234
81960
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
82235
81961
|
if (!connection) {
|
|
@@ -82331,7 +82057,7 @@ var linkedinAdsOauthOnboarding = new ConnectorOnboarding({
|
|
|
82331
82057
|
});
|
|
82332
82058
|
|
|
82333
82059
|
// ../connectors/src/connectors/linkedin-ads-oauth/parameters.ts
|
|
82334
|
-
var
|
|
82060
|
+
var parameters52 = {
|
|
82335
82061
|
adAccountId: new ParameterDefinition({
|
|
82336
82062
|
slug: "ad-account-id",
|
|
82337
82063
|
name: "Ad Account ID",
|
|
@@ -82344,7 +82070,7 @@ var parameters53 = {
|
|
|
82344
82070
|
};
|
|
82345
82071
|
|
|
82346
82072
|
// ../connectors/src/connectors/linkedin-ads-oauth/tools/request.ts
|
|
82347
|
-
import { z as
|
|
82073
|
+
import { z as z64 } from "zod";
|
|
82348
82074
|
var BASE_URL32 = "https://api.linkedin.com/rest/";
|
|
82349
82075
|
var LINKEDIN_VERSION4 = "202603";
|
|
82350
82076
|
var REQUEST_TIMEOUT_MS47 = 6e4;
|
|
@@ -82379,27 +82105,27 @@ async function getProxyToken23(config) {
|
|
|
82379
82105
|
};
|
|
82380
82106
|
return data.token;
|
|
82381
82107
|
}
|
|
82382
|
-
var
|
|
82383
|
-
toolUseIntent:
|
|
82108
|
+
var inputSchema62 = z64.object({
|
|
82109
|
+
toolUseIntent: z64.string().optional().describe(
|
|
82384
82110
|
"Brief description of what you intend to accomplish with this tool call"
|
|
82385
82111
|
),
|
|
82386
|
-
connectionId:
|
|
82387
|
-
method:
|
|
82388
|
-
path:
|
|
82112
|
+
connectionId: z64.string().describe("ID of the LinkedIn Ads OAuth connection to use"),
|
|
82113
|
+
method: z64.enum(["GET", "POST", "DELETE"]).describe("HTTP method"),
|
|
82114
|
+
path: z64.string().describe(
|
|
82389
82115
|
"API path appended to https://api.linkedin.com/rest/ (e.g., 'adAccounts/{adAccountId}/adCampaigns'). {adAccountId} is automatically replaced with the connection's ad account ID."
|
|
82390
82116
|
),
|
|
82391
|
-
queryParams:
|
|
82392
|
-
body:
|
|
82117
|
+
queryParams: z64.record(z64.string(), z64.string()).optional().describe("Query parameters to append to the URL"),
|
|
82118
|
+
body: z64.record(z64.string(), z64.unknown()).optional().describe("Request body (JSON). For partial updates, use the patch format: { patch: { $set: { ... } } }")
|
|
82393
82119
|
});
|
|
82394
|
-
var
|
|
82395
|
-
|
|
82396
|
-
success:
|
|
82397
|
-
status:
|
|
82398
|
-
data:
|
|
82120
|
+
var outputSchema62 = z64.discriminatedUnion("success", [
|
|
82121
|
+
z64.object({
|
|
82122
|
+
success: z64.literal(true),
|
|
82123
|
+
status: z64.number(),
|
|
82124
|
+
data: z64.unknown()
|
|
82399
82125
|
}),
|
|
82400
|
-
|
|
82401
|
-
success:
|
|
82402
|
-
error:
|
|
82126
|
+
z64.object({
|
|
82127
|
+
success: z64.literal(false),
|
|
82128
|
+
error: z64.string()
|
|
82403
82129
|
})
|
|
82404
82130
|
]);
|
|
82405
82131
|
var requestTool35 = new ConnectorTool({
|
|
@@ -82408,8 +82134,8 @@ var requestTool35 = new ConnectorTool({
|
|
|
82408
82134
|
Authentication is handled automatically via OAuth proxy.
|
|
82409
82135
|
{adAccountId} in the path is automatically replaced with the connection's ad account ID.
|
|
82410
82136
|
Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatically.`,
|
|
82411
|
-
inputSchema:
|
|
82412
|
-
outputSchema:
|
|
82137
|
+
inputSchema: inputSchema62,
|
|
82138
|
+
outputSchema: outputSchema62,
|
|
82413
82139
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
82414
82140
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
82415
82141
|
if (!connection) {
|
|
@@ -82422,7 +82148,7 @@ Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatic
|
|
|
82422
82148
|
`[connector-request] linkedin-ads-oauth/${connection.name}: ${method} ${path4}`
|
|
82423
82149
|
);
|
|
82424
82150
|
try {
|
|
82425
|
-
const adAccountId =
|
|
82151
|
+
const adAccountId = parameters52.adAccountId.tryGetValue(connection) ?? "";
|
|
82426
82152
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
82427
82153
|
let url = `${BASE_URL32}${resolvedPath}`;
|
|
82428
82154
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
@@ -82477,7 +82203,7 @@ Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatic
|
|
|
82477
82203
|
});
|
|
82478
82204
|
|
|
82479
82205
|
// ../connectors/src/connectors/linkedin-ads-oauth/index.ts
|
|
82480
|
-
var
|
|
82206
|
+
var tools52 = {
|
|
82481
82207
|
request: requestTool35,
|
|
82482
82208
|
listAdAccounts: listAdAccountsTool4
|
|
82483
82209
|
};
|
|
@@ -82487,7 +82213,7 @@ var linkedinAdsOauthConnector = new ConnectorPlugin({
|
|
|
82487
82213
|
name: "LinkedIn Ads (OAuth)",
|
|
82488
82214
|
description: "Connect to LinkedIn Ads (Marketing API) for advertising campaign data and reporting using OAuth.",
|
|
82489
82215
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3x7xd9pVJkRFY7ADIg4ycq/b94720e34cb081e9ae45dfde799a59cd/LinkedIn_icon.svg.png",
|
|
82490
|
-
parameters:
|
|
82216
|
+
parameters: parameters52,
|
|
82491
82217
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
82492
82218
|
onboarding: linkedinAdsOauthOnboarding,
|
|
82493
82219
|
proxyPolicy: {
|
|
@@ -82686,7 +82412,7 @@ const res = await linkedin.request("adAccounts/{adAccountId}/adCampaigns?q=searc
|
|
|
82686
82412
|
const data = await res.json();
|
|
82687
82413
|
\`\`\``
|
|
82688
82414
|
},
|
|
82689
|
-
tools:
|
|
82415
|
+
tools: tools52,
|
|
82690
82416
|
async checkConnection(_params, config) {
|
|
82691
82417
|
const { proxyFetch } = config;
|
|
82692
82418
|
try {
|
|
@@ -82730,7 +82456,7 @@ var zendeskOnboarding = new ConnectorOnboarding({
|
|
|
82730
82456
|
});
|
|
82731
82457
|
|
|
82732
82458
|
// ../connectors/src/connectors/zendesk/parameters.ts
|
|
82733
|
-
var
|
|
82459
|
+
var parameters53 = {
|
|
82734
82460
|
subdomain: new ParameterDefinition({
|
|
82735
82461
|
slug: "subdomain",
|
|
82736
82462
|
name: "Zendesk Subdomain",
|
|
@@ -82761,30 +82487,30 @@ var parameters54 = {
|
|
|
82761
82487
|
};
|
|
82762
82488
|
|
|
82763
82489
|
// ../connectors/src/connectors/zendesk/tools/request.ts
|
|
82764
|
-
import { z as
|
|
82490
|
+
import { z as z65 } from "zod";
|
|
82765
82491
|
var REQUEST_TIMEOUT_MS48 = 6e4;
|
|
82766
|
-
var
|
|
82767
|
-
toolUseIntent:
|
|
82492
|
+
var inputSchema63 = z65.object({
|
|
82493
|
+
toolUseIntent: z65.string().optional().describe(
|
|
82768
82494
|
"Brief description of what you intend to accomplish with this tool call"
|
|
82769
82495
|
),
|
|
82770
|
-
connectionId:
|
|
82771
|
-
method:
|
|
82496
|
+
connectionId: z65.string().describe("ID of the Zendesk connection to use"),
|
|
82497
|
+
method: z65.enum(["GET", "POST", "PUT", "DELETE"]).describe(
|
|
82772
82498
|
"HTTP method. GET for reading, POST for creating/searching, PUT for updating, DELETE for removing."
|
|
82773
82499
|
),
|
|
82774
|
-
path:
|
|
82500
|
+
path: z65.string().describe(
|
|
82775
82501
|
"API path appended to https://{subdomain}.zendesk.com (e.g., '/api/v2/tickets.json', '/api/v2/search.json?query=status:open')"
|
|
82776
82502
|
),
|
|
82777
|
-
body:
|
|
82503
|
+
body: z65.record(z65.string(), z65.unknown()).optional().describe("Request body (JSON) for POST/PUT requests")
|
|
82778
82504
|
});
|
|
82779
|
-
var
|
|
82780
|
-
|
|
82781
|
-
success:
|
|
82782
|
-
status:
|
|
82783
|
-
data:
|
|
82505
|
+
var outputSchema63 = z65.discriminatedUnion("success", [
|
|
82506
|
+
z65.object({
|
|
82507
|
+
success: z65.literal(true),
|
|
82508
|
+
status: z65.number(),
|
|
82509
|
+
data: z65.record(z65.string(), z65.unknown())
|
|
82784
82510
|
}),
|
|
82785
|
-
|
|
82786
|
-
success:
|
|
82787
|
-
error:
|
|
82511
|
+
z65.object({
|
|
82512
|
+
success: z65.literal(false),
|
|
82513
|
+
error: z65.string()
|
|
82788
82514
|
})
|
|
82789
82515
|
]);
|
|
82790
82516
|
var requestTool36 = new ConnectorTool({
|
|
@@ -82793,8 +82519,8 @@ var requestTool36 = new ConnectorTool({
|
|
|
82793
82519
|
Authentication is handled automatically using email/token Basic auth.
|
|
82794
82520
|
Use this tool for all Zendesk API interactions: querying tickets, users, organizations, groups, and searching.
|
|
82795
82521
|
Zendesk uses cursor-based pagination with page[size] and page[after] parameters. All endpoints return .json suffix.`,
|
|
82796
|
-
inputSchema:
|
|
82797
|
-
outputSchema:
|
|
82522
|
+
inputSchema: inputSchema63,
|
|
82523
|
+
outputSchema: outputSchema63,
|
|
82798
82524
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
82799
82525
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
82800
82526
|
if (!connection) {
|
|
@@ -82807,9 +82533,9 @@ Zendesk uses cursor-based pagination with page[size] and page[after] parameters.
|
|
|
82807
82533
|
`[connector-request] zendesk/${connection.name}: ${method} ${path4}`
|
|
82808
82534
|
);
|
|
82809
82535
|
try {
|
|
82810
|
-
const subdomain =
|
|
82811
|
-
const email =
|
|
82812
|
-
const apiToken =
|
|
82536
|
+
const subdomain = parameters53.subdomain.getValue(connection);
|
|
82537
|
+
const email = parameters53.email.getValue(connection);
|
|
82538
|
+
const apiToken = parameters53.apiToken.getValue(connection);
|
|
82813
82539
|
const authToken = Buffer.from(`${email}/token:${apiToken}`).toString(
|
|
82814
82540
|
"base64"
|
|
82815
82541
|
);
|
|
@@ -82843,14 +82569,14 @@ Zendesk uses cursor-based pagination with page[size] and page[after] parameters.
|
|
|
82843
82569
|
});
|
|
82844
82570
|
|
|
82845
82571
|
// ../connectors/src/connectors/zendesk/index.ts
|
|
82846
|
-
var
|
|
82572
|
+
var tools53 = { request: requestTool36 };
|
|
82847
82573
|
var zendeskConnector = new ConnectorPlugin({
|
|
82848
82574
|
slug: "zendesk",
|
|
82849
82575
|
authType: null,
|
|
82850
82576
|
name: "Zendesk",
|
|
82851
82577
|
description: "Connect to Zendesk Support for tickets, users, organizations, and customer service data using an API token.",
|
|
82852
82578
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7e9Q7PwV6MJRJMj543m2gl/55385fae903ccfa1599e35be9d3516aa/zendesk-icon.svg",
|
|
82853
|
-
parameters:
|
|
82579
|
+
parameters: parameters53,
|
|
82854
82580
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
82855
82581
|
onboarding: zendeskOnboarding,
|
|
82856
82582
|
systemPrompt: {
|
|
@@ -83027,11 +82753,11 @@ export default async function handler(c: Context) {
|
|
|
83027
82753
|
- \`type:user role:agent\` \u2014 \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30E6\u30FC\u30B6\u30FC
|
|
83028
82754
|
- \`type:organization {name}\` \u2014 \u540D\u524D\u304C\u4E00\u81F4\u3059\u308B\u7D44\u7E54`
|
|
83029
82755
|
},
|
|
83030
|
-
tools:
|
|
82756
|
+
tools: tools53
|
|
83031
82757
|
});
|
|
83032
82758
|
|
|
83033
82759
|
// ../connectors/src/connectors/zendesk-oauth/tools/request.ts
|
|
83034
|
-
import { z as
|
|
82760
|
+
import { z as z66 } from "zod";
|
|
83035
82761
|
var REQUEST_TIMEOUT_MS49 = 6e4;
|
|
83036
82762
|
var cachedToken24 = null;
|
|
83037
82763
|
async function getProxyToken24(config) {
|
|
@@ -83064,27 +82790,27 @@ async function getProxyToken24(config) {
|
|
|
83064
82790
|
};
|
|
83065
82791
|
return data.token;
|
|
83066
82792
|
}
|
|
83067
|
-
var
|
|
83068
|
-
toolUseIntent:
|
|
82793
|
+
var inputSchema64 = z66.object({
|
|
82794
|
+
toolUseIntent: z66.string().optional().describe(
|
|
83069
82795
|
"Brief description of what you intend to accomplish with this tool call"
|
|
83070
82796
|
),
|
|
83071
|
-
connectionId:
|
|
83072
|
-
method:
|
|
83073
|
-
path:
|
|
82797
|
+
connectionId: z66.string().describe("ID of the Zendesk OAuth connection to use"),
|
|
82798
|
+
method: z66.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
|
|
82799
|
+
path: z66.string().describe(
|
|
83074
82800
|
"API path appended to the Zendesk base URL (e.g., '/api/v2/tickets.json', '/api/v2/search.json?query=status:open')"
|
|
83075
82801
|
),
|
|
83076
|
-
queryParams:
|
|
83077
|
-
body:
|
|
82802
|
+
queryParams: z66.record(z66.string(), z66.string()).optional().describe("Query parameters to append to the URL"),
|
|
82803
|
+
body: z66.record(z66.string(), z66.unknown()).optional().describe("Request body (JSON) for POST/PUT requests")
|
|
83078
82804
|
});
|
|
83079
|
-
var
|
|
83080
|
-
|
|
83081
|
-
success:
|
|
83082
|
-
status:
|
|
83083
|
-
data:
|
|
82805
|
+
var outputSchema64 = z66.discriminatedUnion("success", [
|
|
82806
|
+
z66.object({
|
|
82807
|
+
success: z66.literal(true),
|
|
82808
|
+
status: z66.number(),
|
|
82809
|
+
data: z66.record(z66.string(), z66.unknown())
|
|
83084
82810
|
}),
|
|
83085
|
-
|
|
83086
|
-
success:
|
|
83087
|
-
error:
|
|
82811
|
+
z66.object({
|
|
82812
|
+
success: z66.literal(false),
|
|
82813
|
+
error: z66.string()
|
|
83088
82814
|
})
|
|
83089
82815
|
]);
|
|
83090
82816
|
var requestTool37 = new ConnectorTool({
|
|
@@ -83093,8 +82819,8 @@ var requestTool37 = new ConnectorTool({
|
|
|
83093
82819
|
Authentication is handled automatically via OAuth proxy.
|
|
83094
82820
|
Use this tool for all Zendesk API interactions: querying tickets, users, organizations, groups, and searching.
|
|
83095
82821
|
Zendesk uses cursor-based pagination with page[size] and page[after] parameters. All endpoint paths end with .json.`,
|
|
83096
|
-
inputSchema:
|
|
83097
|
-
outputSchema:
|
|
82822
|
+
inputSchema: inputSchema64,
|
|
82823
|
+
outputSchema: outputSchema64,
|
|
83098
82824
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
83099
82825
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
83100
82826
|
if (!connection) {
|
|
@@ -83191,17 +82917,17 @@ var zendeskOauthOnboarding = new ConnectorOnboarding({
|
|
|
83191
82917
|
});
|
|
83192
82918
|
|
|
83193
82919
|
// ../connectors/src/connectors/zendesk-oauth/parameters.ts
|
|
83194
|
-
var
|
|
82920
|
+
var parameters54 = {};
|
|
83195
82921
|
|
|
83196
82922
|
// ../connectors/src/connectors/zendesk-oauth/index.ts
|
|
83197
|
-
var
|
|
82923
|
+
var tools54 = { request: requestTool37 };
|
|
83198
82924
|
var zendeskOauthConnector = new ConnectorPlugin({
|
|
83199
82925
|
slug: "zendesk",
|
|
83200
82926
|
authType: AUTH_TYPES.OAUTH,
|
|
83201
82927
|
name: "Zendesk (OAuth)",
|
|
83202
82928
|
description: "Connect to Zendesk Support for tickets, users, organizations, and customer service data using OAuth.",
|
|
83203
82929
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7e9Q7PwV6MJRJMj543m2gl/55385fae903ccfa1599e35be9d3516aa/zendesk-icon.svg",
|
|
83204
|
-
parameters:
|
|
82930
|
+
parameters: parameters54,
|
|
83205
82931
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
83206
82932
|
onboarding: zendeskOauthOnboarding,
|
|
83207
82933
|
proxyPolicy: {
|
|
@@ -83330,7 +83056,7 @@ const res = await zendesk.request("/api/v2/tickets.json?page[size]=10");
|
|
|
83330
83056
|
const data = await res.json();
|
|
83331
83057
|
\`\`\``
|
|
83332
83058
|
},
|
|
83333
|
-
tools:
|
|
83059
|
+
tools: tools54,
|
|
83334
83060
|
async checkConnection(_params, config) {
|
|
83335
83061
|
const { proxyFetch } = config;
|
|
83336
83062
|
try {
|
|
@@ -83369,7 +83095,7 @@ var intercomOnboarding = new ConnectorOnboarding({
|
|
|
83369
83095
|
});
|
|
83370
83096
|
|
|
83371
83097
|
// ../connectors/src/connectors/intercom/parameters.ts
|
|
83372
|
-
var
|
|
83098
|
+
var parameters55 = {
|
|
83373
83099
|
accessToken: new ParameterDefinition({
|
|
83374
83100
|
slug: "access-token",
|
|
83375
83101
|
name: "Access Token",
|
|
@@ -83382,32 +83108,32 @@ var parameters56 = {
|
|
|
83382
83108
|
};
|
|
83383
83109
|
|
|
83384
83110
|
// ../connectors/src/connectors/intercom/tools/request.ts
|
|
83385
|
-
import { z as
|
|
83111
|
+
import { z as z67 } from "zod";
|
|
83386
83112
|
var BASE_URL33 = "https://api.intercom.io";
|
|
83387
83113
|
var API_VERSION = "2.11";
|
|
83388
83114
|
var REQUEST_TIMEOUT_MS50 = 6e4;
|
|
83389
|
-
var
|
|
83390
|
-
toolUseIntent:
|
|
83115
|
+
var inputSchema65 = z67.object({
|
|
83116
|
+
toolUseIntent: z67.string().optional().describe(
|
|
83391
83117
|
"Brief description of what you intend to accomplish with this tool call"
|
|
83392
83118
|
),
|
|
83393
|
-
connectionId:
|
|
83394
|
-
method:
|
|
83119
|
+
connectionId: z67.string().describe("ID of the Intercom connection to use"),
|
|
83120
|
+
method: z67.enum(["GET", "POST", "PUT", "DELETE"]).describe(
|
|
83395
83121
|
"HTTP method. GET for reading, POST for creating/searching, PUT for updating, DELETE for removing."
|
|
83396
83122
|
),
|
|
83397
|
-
path:
|
|
83123
|
+
path: z67.string().describe(
|
|
83398
83124
|
"API path appended to https://api.intercom.io (e.g., '/contacts', '/conversations', '/contacts/search')"
|
|
83399
83125
|
),
|
|
83400
|
-
body:
|
|
83126
|
+
body: z67.record(z67.string(), z67.unknown()).optional().describe("Request body (JSON) for POST/PUT requests")
|
|
83401
83127
|
});
|
|
83402
|
-
var
|
|
83403
|
-
|
|
83404
|
-
success:
|
|
83405
|
-
status:
|
|
83406
|
-
data:
|
|
83128
|
+
var outputSchema65 = z67.discriminatedUnion("success", [
|
|
83129
|
+
z67.object({
|
|
83130
|
+
success: z67.literal(true),
|
|
83131
|
+
status: z67.number(),
|
|
83132
|
+
data: z67.record(z67.string(), z67.unknown())
|
|
83407
83133
|
}),
|
|
83408
|
-
|
|
83409
|
-
success:
|
|
83410
|
-
error:
|
|
83134
|
+
z67.object({
|
|
83135
|
+
success: z67.literal(false),
|
|
83136
|
+
error: z67.string()
|
|
83411
83137
|
})
|
|
83412
83138
|
]);
|
|
83413
83139
|
var requestTool38 = new ConnectorTool({
|
|
@@ -83418,8 +83144,8 @@ Use this tool for all Intercom API interactions: querying contacts, conversation
|
|
|
83418
83144
|
Intercom uses cursor-based pagination with the starting_after parameter from pages.next.starting_after in the response.
|
|
83419
83145
|
Search endpoints (contacts/search, conversations/search) use POST with a query object in the body.
|
|
83420
83146
|
The Intercom-Version header is set to 2.11 automatically.`,
|
|
83421
|
-
inputSchema:
|
|
83422
|
-
outputSchema:
|
|
83147
|
+
inputSchema: inputSchema65,
|
|
83148
|
+
outputSchema: outputSchema65,
|
|
83423
83149
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
83424
83150
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
83425
83151
|
if (!connection) {
|
|
@@ -83432,7 +83158,7 @@ The Intercom-Version header is set to 2.11 automatically.`,
|
|
|
83432
83158
|
`[connector-request] intercom/${connection.name}: ${method} ${path4}`
|
|
83433
83159
|
);
|
|
83434
83160
|
try {
|
|
83435
|
-
const accessToken =
|
|
83161
|
+
const accessToken = parameters55.accessToken.getValue(connection);
|
|
83436
83162
|
const url = `${BASE_URL33}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
83437
83163
|
const controller = new AbortController();
|
|
83438
83164
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS50);
|
|
@@ -83466,14 +83192,14 @@ The Intercom-Version header is set to 2.11 automatically.`,
|
|
|
83466
83192
|
});
|
|
83467
83193
|
|
|
83468
83194
|
// ../connectors/src/connectors/intercom/index.ts
|
|
83469
|
-
var
|
|
83195
|
+
var tools55 = { request: requestTool38 };
|
|
83470
83196
|
var intercomConnector = new ConnectorPlugin({
|
|
83471
83197
|
slug: "intercom",
|
|
83472
83198
|
authType: null,
|
|
83473
83199
|
name: "Intercom",
|
|
83474
83200
|
description: "Connect to Intercom for contacts, conversations, companies, and customer engagement data using an Access Token.",
|
|
83475
83201
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/sb2cRMGClpId0LKiSqsok/ae90a0849f21ffe3faf73e04a5676b45/intercom.svg",
|
|
83476
|
-
parameters:
|
|
83202
|
+
parameters: parameters55,
|
|
83477
83203
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
83478
83204
|
onboarding: intercomOnboarding,
|
|
83479
83205
|
systemPrompt: {
|
|
@@ -83670,11 +83396,11 @@ export default async function handler(c: Context) {
|
|
|
83670
83396
|
- \u8AD6\u7406\u6F14\u7B97\u5B50: \`AND\`, \`OR\`\uFF08\u8907\u6570\u30D5\u30A3\u30EB\u30BF\u306E\u7D50\u5408\uFF09
|
|
83671
83397
|
- \u65E5\u4ED8\u30D5\u30A3\u30FC\u30EB\u30C9\u306FUnix\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u4F7F\u7528`
|
|
83672
83398
|
},
|
|
83673
|
-
tools:
|
|
83399
|
+
tools: tools55
|
|
83674
83400
|
});
|
|
83675
83401
|
|
|
83676
83402
|
// ../connectors/src/connectors/intercom-oauth/tools/request.ts
|
|
83677
|
-
import { z as
|
|
83403
|
+
import { z as z68 } from "zod";
|
|
83678
83404
|
var BASE_URL34 = "https://api.intercom.io";
|
|
83679
83405
|
var REQUEST_TIMEOUT_MS51 = 6e4;
|
|
83680
83406
|
var cachedToken25 = null;
|
|
@@ -83708,27 +83434,27 @@ async function getProxyToken25(config) {
|
|
|
83708
83434
|
};
|
|
83709
83435
|
return data.token;
|
|
83710
83436
|
}
|
|
83711
|
-
var
|
|
83712
|
-
toolUseIntent:
|
|
83437
|
+
var inputSchema66 = z68.object({
|
|
83438
|
+
toolUseIntent: z68.string().optional().describe(
|
|
83713
83439
|
"Brief description of what you intend to accomplish with this tool call"
|
|
83714
83440
|
),
|
|
83715
|
-
connectionId:
|
|
83716
|
-
method:
|
|
83717
|
-
path:
|
|
83441
|
+
connectionId: z68.string().describe("ID of the Intercom OAuth connection to use"),
|
|
83442
|
+
method: z68.enum(["GET", "POST", "PUT", "DELETE"]).describe("HTTP method"),
|
|
83443
|
+
path: z68.string().describe(
|
|
83718
83444
|
"API path appended to https://api.intercom.io (e.g., '/contacts', '/conversations', '/contacts/search')"
|
|
83719
83445
|
),
|
|
83720
|
-
queryParams:
|
|
83721
|
-
body:
|
|
83446
|
+
queryParams: z68.record(z68.string(), z68.string()).optional().describe("Query parameters to append to the URL"),
|
|
83447
|
+
body: z68.record(z68.string(), z68.unknown()).optional().describe("Request body (JSON) for POST/PUT requests")
|
|
83722
83448
|
});
|
|
83723
|
-
var
|
|
83724
|
-
|
|
83725
|
-
success:
|
|
83726
|
-
status:
|
|
83727
|
-
data:
|
|
83449
|
+
var outputSchema66 = z68.discriminatedUnion("success", [
|
|
83450
|
+
z68.object({
|
|
83451
|
+
success: z68.literal(true),
|
|
83452
|
+
status: z68.number(),
|
|
83453
|
+
data: z68.record(z68.string(), z68.unknown())
|
|
83728
83454
|
}),
|
|
83729
|
-
|
|
83730
|
-
success:
|
|
83731
|
-
error:
|
|
83455
|
+
z68.object({
|
|
83456
|
+
success: z68.literal(false),
|
|
83457
|
+
error: z68.string()
|
|
83732
83458
|
})
|
|
83733
83459
|
]);
|
|
83734
83460
|
var requestTool39 = new ConnectorTool({
|
|
@@ -83738,8 +83464,8 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
83738
83464
|
The Intercom-Version header (2.11) is set automatically.
|
|
83739
83465
|
Use this tool for all Intercom API interactions: querying contacts, conversations, companies, articles, tags, and segments.
|
|
83740
83466
|
Search endpoints (contacts/search, conversations/search) use POST with a query object in the body.`,
|
|
83741
|
-
inputSchema:
|
|
83742
|
-
outputSchema:
|
|
83467
|
+
inputSchema: inputSchema66,
|
|
83468
|
+
outputSchema: outputSchema66,
|
|
83743
83469
|
async execute({ connectionId, method, path: path4, queryParams, body }, connections, config) {
|
|
83744
83470
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
83745
83471
|
if (!connection) {
|
|
@@ -83837,17 +83563,17 @@ var intercomOauthOnboarding = new ConnectorOnboarding({
|
|
|
83837
83563
|
});
|
|
83838
83564
|
|
|
83839
83565
|
// ../connectors/src/connectors/intercom-oauth/parameters.ts
|
|
83840
|
-
var
|
|
83566
|
+
var parameters56 = {};
|
|
83841
83567
|
|
|
83842
83568
|
// ../connectors/src/connectors/intercom-oauth/index.ts
|
|
83843
|
-
var
|
|
83569
|
+
var tools56 = { request: requestTool39 };
|
|
83844
83570
|
var intercomOauthConnector = new ConnectorPlugin({
|
|
83845
83571
|
slug: "intercom",
|
|
83846
83572
|
authType: AUTH_TYPES.OAUTH,
|
|
83847
83573
|
name: "Intercom (OAuth)",
|
|
83848
83574
|
description: "Connect to Intercom for contacts, conversations, companies, and customer engagement data using OAuth.",
|
|
83849
83575
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/sb2cRMGClpId0LKiSqsok/ae90a0849f21ffe3faf73e04a5676b45/intercom.svg",
|
|
83850
|
-
parameters:
|
|
83576
|
+
parameters: parameters56,
|
|
83851
83577
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
83852
83578
|
onboarding: intercomOauthOnboarding,
|
|
83853
83579
|
proxyPolicy: {
|
|
@@ -83976,7 +83702,7 @@ const res = await intercom.request("/contacts?per_page=10");
|
|
|
83976
83702
|
const data = await res.json();
|
|
83977
83703
|
\`\`\``
|
|
83978
83704
|
},
|
|
83979
|
-
tools:
|
|
83705
|
+
tools: tools56,
|
|
83980
83706
|
async checkConnection(_params, config) {
|
|
83981
83707
|
const { proxyFetch } = config;
|
|
83982
83708
|
try {
|
|
@@ -84021,7 +83747,7 @@ NOTE: The Query API endpoints (insights, funnels, retention) require a bookmark_
|
|
|
84021
83747
|
});
|
|
84022
83748
|
|
|
84023
83749
|
// ../connectors/src/connectors/mixpanel/parameters.ts
|
|
84024
|
-
var
|
|
83750
|
+
var parameters57 = {
|
|
84025
83751
|
serviceAccountUsername: new ParameterDefinition({
|
|
84026
83752
|
slug: "service-account-username",
|
|
84027
83753
|
name: "Service Account Username",
|
|
@@ -84061,35 +83787,35 @@ var parameters58 = {
|
|
|
84061
83787
|
};
|
|
84062
83788
|
|
|
84063
83789
|
// ../connectors/src/connectors/mixpanel/tools/request.ts
|
|
84064
|
-
import { z as
|
|
83790
|
+
import { z as z69 } from "zod";
|
|
84065
83791
|
var REQUEST_TIMEOUT_MS52 = 6e4;
|
|
84066
|
-
var
|
|
84067
|
-
toolUseIntent:
|
|
83792
|
+
var inputSchema67 = z69.object({
|
|
83793
|
+
toolUseIntent: z69.string().optional().describe(
|
|
84068
83794
|
"Brief description of what you intend to accomplish with this tool call"
|
|
84069
83795
|
),
|
|
84070
|
-
connectionId:
|
|
84071
|
-
method:
|
|
83796
|
+
connectionId: z69.string().describe("ID of the Mixpanel connection to use"),
|
|
83797
|
+
method: z69.enum(["GET", "POST"]).describe(
|
|
84072
83798
|
"HTTP method. GET for most Query API and Export endpoints. POST for Engage (profile query) endpoint."
|
|
84073
83799
|
),
|
|
84074
|
-
url:
|
|
83800
|
+
url: z69.string().describe(
|
|
84075
83801
|
"Full URL including query parameters (e.g., 'https://mixpanel.com/api/query/insights?project_id=12345&bookmark_id=67890'). The project_id query parameter is added automatically if not present."
|
|
84076
83802
|
),
|
|
84077
|
-
body:
|
|
83803
|
+
body: z69.string().optional().describe(
|
|
84078
83804
|
"Request body for POST requests. Use application/x-www-form-urlencoded format for the Engage endpoint, or JSON string for other POST endpoints."
|
|
84079
83805
|
),
|
|
84080
|
-
contentType:
|
|
83806
|
+
contentType: z69.enum(["application/json", "application/x-www-form-urlencoded"]).optional().describe(
|
|
84081
83807
|
"Content-Type header. Defaults to application/json. Use application/x-www-form-urlencoded for the Engage endpoint."
|
|
84082
83808
|
)
|
|
84083
83809
|
});
|
|
84084
|
-
var
|
|
84085
|
-
|
|
84086
|
-
success:
|
|
84087
|
-
status:
|
|
84088
|
-
data:
|
|
83810
|
+
var outputSchema67 = z69.discriminatedUnion("success", [
|
|
83811
|
+
z69.object({
|
|
83812
|
+
success: z69.literal(true),
|
|
83813
|
+
status: z69.number(),
|
|
83814
|
+
data: z69.unknown()
|
|
84089
83815
|
}),
|
|
84090
|
-
|
|
84091
|
-
success:
|
|
84092
|
-
error:
|
|
83816
|
+
z69.object({
|
|
83817
|
+
success: z69.literal(false),
|
|
83818
|
+
error: z69.string()
|
|
84093
83819
|
})
|
|
84094
83820
|
]);
|
|
84095
83821
|
var requestTool40 = new ConnectorTool({
|
|
@@ -84110,8 +83836,8 @@ Key endpoints:
|
|
|
84110
83836
|
- GET {exportBase}?from_date=YYYY-MM-DD&to_date=YYYY-MM-DD \u2014 Export raw events (JSONL)
|
|
84111
83837
|
|
|
84112
83838
|
Rate limit: 60 queries/hour, 5 concurrent queries for Query API.`,
|
|
84113
|
-
inputSchema:
|
|
84114
|
-
outputSchema:
|
|
83839
|
+
inputSchema: inputSchema67,
|
|
83840
|
+
outputSchema: outputSchema67,
|
|
84115
83841
|
async execute({ connectionId, method, url, body, contentType }, connections) {
|
|
84116
83842
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
84117
83843
|
if (!connection) {
|
|
@@ -84124,9 +83850,9 @@ Rate limit: 60 queries/hour, 5 concurrent queries for Query API.`,
|
|
|
84124
83850
|
`[connector-request] mixpanel/${connection.name}: ${method} ${url}`
|
|
84125
83851
|
);
|
|
84126
83852
|
try {
|
|
84127
|
-
const username =
|
|
84128
|
-
const secret =
|
|
84129
|
-
const projectId =
|
|
83853
|
+
const username = parameters57.serviceAccountUsername.getValue(connection);
|
|
83854
|
+
const secret = parameters57.serviceAccountSecret.getValue(connection);
|
|
83855
|
+
const projectId = parameters57.projectId.getValue(connection);
|
|
84130
83856
|
const authToken = btoa(`${username}:${secret}`);
|
|
84131
83857
|
let finalUrl = url;
|
|
84132
83858
|
const urlObj = new URL(url);
|
|
@@ -84186,14 +83912,14 @@ Rate limit: 60 queries/hour, 5 concurrent queries for Query API.`,
|
|
|
84186
83912
|
});
|
|
84187
83913
|
|
|
84188
83914
|
// ../connectors/src/connectors/mixpanel/index.ts
|
|
84189
|
-
var
|
|
83915
|
+
var tools57 = { request: requestTool40 };
|
|
84190
83916
|
var mixpanelConnector = new ConnectorPlugin({
|
|
84191
83917
|
slug: "mixpanel",
|
|
84192
83918
|
authType: null,
|
|
84193
83919
|
name: "Mixpanel",
|
|
84194
83920
|
description: "Connect to Mixpanel for product analytics, event tracking, and user behavior analysis.",
|
|
84195
83921
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7ykz0vNRjMqvTVrxS8wsj1/b2cd795be5b373877dee77cc6147c758/images__3_.png",
|
|
84196
|
-
parameters:
|
|
83922
|
+
parameters: parameters57,
|
|
84197
83923
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
84198
83924
|
onboarding: mixpanelOnboarding,
|
|
84199
83925
|
systemPrompt: {
|
|
@@ -84316,7 +84042,7 @@ export default async function handler(c: Context) {
|
|
|
84316
84042
|
|
|
84317
84043
|
\u91CD\u8981: Insights\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306F\u3001Mixpanel UI\u306E\u65E2\u5B58\u30EC\u30DD\u30FC\u30C8\u306Ebookmark_id\u304C\u5FC5\u8981\u3067\u3059\u3002\u30A2\u30C9\u30DB\u30C3\u30AF\u306A\u30A4\u30D9\u30F3\u30C8\u5206\u6790\u306B\u306F\u3001Export API\u3067\u751F\u30A4\u30D9\u30F3\u30C8\u3092\u53D6\u5F97\u3057\u3001\u30B3\u30FC\u30C9\u4E0A\u3067\u96C6\u8A08\u3057\u3066\u304F\u3060\u3055\u3044\u3002Export API\u304C\u6700\u3082\u67D4\u8EDF\u3067\u5E83\u304F\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3067\u3059\u3002`
|
|
84318
84044
|
},
|
|
84319
|
-
tools:
|
|
84045
|
+
tools: tools57
|
|
84320
84046
|
});
|
|
84321
84047
|
|
|
84322
84048
|
// ../connectors/src/connectors/posthog/setup.ts
|
|
@@ -84338,7 +84064,7 @@ var posthogOnboarding = new ConnectorOnboarding({
|
|
|
84338
84064
|
});
|
|
84339
84065
|
|
|
84340
84066
|
// ../connectors/src/connectors/posthog/parameters.ts
|
|
84341
|
-
var
|
|
84067
|
+
var parameters58 = {
|
|
84342
84068
|
personalApiKey: new ParameterDefinition({
|
|
84343
84069
|
slug: "personal-api-key",
|
|
84344
84070
|
name: "Personal API Key",
|
|
@@ -84369,30 +84095,30 @@ var parameters59 = {
|
|
|
84369
84095
|
};
|
|
84370
84096
|
|
|
84371
84097
|
// ../connectors/src/connectors/posthog/tools/request.ts
|
|
84372
|
-
import { z as
|
|
84098
|
+
import { z as z70 } from "zod";
|
|
84373
84099
|
var REQUEST_TIMEOUT_MS53 = 6e4;
|
|
84374
|
-
var
|
|
84375
|
-
toolUseIntent:
|
|
84100
|
+
var inputSchema68 = z70.object({
|
|
84101
|
+
toolUseIntent: z70.string().optional().describe(
|
|
84376
84102
|
"Brief description of what you intend to accomplish with this tool call"
|
|
84377
84103
|
),
|
|
84378
|
-
connectionId:
|
|
84379
|
-
method:
|
|
84104
|
+
connectionId: z70.string().describe("ID of the PostHog connection to use"),
|
|
84105
|
+
method: z70.enum(["GET", "POST", "PATCH", "DELETE"]).describe(
|
|
84380
84106
|
"HTTP method. GET for listing/retrieving resources. POST for creating resources or running queries. PATCH for updating. DELETE for removing."
|
|
84381
84107
|
),
|
|
84382
|
-
path:
|
|
84108
|
+
path: z70.string().describe(
|
|
84383
84109
|
"API path relative to the host (e.g., '/api/projects/12345/query/' or '/api/projects/12345/insights/'). The project ID segment must be included in the path."
|
|
84384
84110
|
),
|
|
84385
|
-
body:
|
|
84111
|
+
body: z70.record(z70.string(), z70.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
84386
84112
|
});
|
|
84387
|
-
var
|
|
84388
|
-
|
|
84389
|
-
success:
|
|
84390
|
-
status:
|
|
84391
|
-
data:
|
|
84113
|
+
var outputSchema68 = z70.discriminatedUnion("success", [
|
|
84114
|
+
z70.object({
|
|
84115
|
+
success: z70.literal(true),
|
|
84116
|
+
status: z70.number(),
|
|
84117
|
+
data: z70.unknown()
|
|
84392
84118
|
}),
|
|
84393
|
-
|
|
84394
|
-
success:
|
|
84395
|
-
error:
|
|
84119
|
+
z70.object({
|
|
84120
|
+
success: z70.literal(false),
|
|
84121
|
+
error: z70.string()
|
|
84396
84122
|
})
|
|
84397
84123
|
]);
|
|
84398
84124
|
var requestTool41 = new ConnectorTool({
|
|
@@ -84413,8 +84139,8 @@ Key endpoints (replace {projectId} with the actual project ID from connection pa
|
|
|
84413
84139
|
|
|
84414
84140
|
The Query API supports multiple query kinds: HogQLQuery, EventsQuery, TrendsQuery, FunnelsQuery, RetentionQuery, PathsQuery, LifecycleQuery.
|
|
84415
84141
|
Rate limit: 240/minute, 1200/hour for analytics endpoints.`,
|
|
84416
|
-
inputSchema:
|
|
84417
|
-
outputSchema:
|
|
84142
|
+
inputSchema: inputSchema68,
|
|
84143
|
+
outputSchema: outputSchema68,
|
|
84418
84144
|
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
84419
84145
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
84420
84146
|
if (!connection) {
|
|
@@ -84427,8 +84153,8 @@ Rate limit: 240/minute, 1200/hour for analytics endpoints.`,
|
|
|
84427
84153
|
`[connector-request] posthog/${connection.name}: ${method} ${path4}`
|
|
84428
84154
|
);
|
|
84429
84155
|
try {
|
|
84430
|
-
const apiKey =
|
|
84431
|
-
const host =
|
|
84156
|
+
const apiKey = parameters58.personalApiKey.getValue(connection);
|
|
84157
|
+
const host = parameters58.host.tryGetValue(connection) ?? "https://us.posthog.com";
|
|
84432
84158
|
const url = `${host.replace(/\/$/, "")}${path4}`;
|
|
84433
84159
|
const controller = new AbortController();
|
|
84434
84160
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS53);
|
|
@@ -84461,14 +84187,14 @@ Rate limit: 240/minute, 1200/hour for analytics endpoints.`,
|
|
|
84461
84187
|
});
|
|
84462
84188
|
|
|
84463
84189
|
// ../connectors/src/connectors/posthog/index.ts
|
|
84464
|
-
var
|
|
84190
|
+
var tools58 = { request: requestTool41 };
|
|
84465
84191
|
var posthogConnector = new ConnectorPlugin({
|
|
84466
84192
|
slug: "posthog",
|
|
84467
84193
|
authType: null,
|
|
84468
84194
|
name: "PostHog",
|
|
84469
84195
|
description: "Connect to PostHog for product analytics, event tracking, and user behavior analysis.",
|
|
84470
84196
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5GbGr8d2ncF746qlkN0Zpr/9bd6635dec75ba738f4afa61cb8dd4f1/posthog.png",
|
|
84471
|
-
parameters:
|
|
84197
|
+
parameters: parameters58,
|
|
84472
84198
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
84473
84199
|
onboarding: posthogOnboarding,
|
|
84474
84200
|
systemPrompt: {
|
|
@@ -84617,7 +84343,7 @@ HogQL\u306FClickHouse SQL\u30D9\u30FC\u30B9\u306ESQL\u30E9\u30A4\u30AF\u306A\u30
|
|
|
84617
84343
|
|
|
84618
84344
|
\u91CD\u8981: \u30A2\u30C9\u30DB\u30C3\u30AF\u5206\u6790\u306B\u306FHogQL\u3092\u4F7F\u7528\u3059\u308BQuery API\u3092\u63A8\u5968\u3057\u307E\u3059\u3002\u6700\u3082\u67D4\u8EDF\u3067\u3001\u3059\u3079\u3066\u306EPostHog\u30C7\u30FC\u30BF\u306B\u5BFE\u3057\u3066SQL\u30E9\u30A4\u30AF\u306A\u30AF\u30A8\u30EA\u304C\u53EF\u80FD\u3067\u3059\u3002\u30AF\u30A8\u30EA\u306B\u306F\u5FC5\u305ALIMIT\u3092\u542B\u3081\u3001\u5927\u898F\u6A21\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3067\u306F\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u30D9\u30FC\u30B9\u306E\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
84619
84345
|
},
|
|
84620
|
-
tools:
|
|
84346
|
+
tools: tools58
|
|
84621
84347
|
});
|
|
84622
84348
|
|
|
84623
84349
|
// ../connectors/src/connectors/registry.ts
|
|
@@ -84660,7 +84386,6 @@ var plugins = {
|
|
|
84660
84386
|
jira: jiraConnector,
|
|
84661
84387
|
linear: linearConnector,
|
|
84662
84388
|
asana: asanaConnector,
|
|
84663
|
-
trino: trinoConnector,
|
|
84664
84389
|
clickhouse: clickhouseConnector,
|
|
84665
84390
|
mongodb: mongodbConnector,
|
|
84666
84391
|
notion: notionConnector,
|
|
@@ -84881,62 +84606,62 @@ function resolveParams2(entry, connectionId, plugin) {
|
|
|
84881
84606
|
var { getQuery, loadConnections, reloadEnvFile, watchConnectionsFile } = createConnectorRegistry();
|
|
84882
84607
|
|
|
84883
84608
|
// src/types/server-logic.ts
|
|
84884
|
-
import { z as
|
|
84885
|
-
var parameterMetaSchema =
|
|
84886
|
-
name:
|
|
84887
|
-
type:
|
|
84888
|
-
description:
|
|
84889
|
-
required:
|
|
84890
|
-
default:
|
|
84891
|
-
});
|
|
84892
|
-
var serverLogicCacheConfigSchema =
|
|
84893
|
-
ttl:
|
|
84894
|
-
staleWhileRevalidate:
|
|
84895
|
-
});
|
|
84896
|
-
var serverLogicSchemaObjectSchema =
|
|
84897
|
-
() =>
|
|
84898
|
-
type:
|
|
84899
|
-
format:
|
|
84900
|
-
description:
|
|
84901
|
-
nullable:
|
|
84902
|
-
enum:
|
|
84609
|
+
import { z as z71 } from "zod";
|
|
84610
|
+
var parameterMetaSchema = z71.object({
|
|
84611
|
+
name: z71.string(),
|
|
84612
|
+
type: z71.enum(["string", "number", "boolean"]),
|
|
84613
|
+
description: z71.string(),
|
|
84614
|
+
required: z71.boolean().optional(),
|
|
84615
|
+
default: z71.union([z71.string(), z71.number(), z71.boolean()]).optional()
|
|
84616
|
+
});
|
|
84617
|
+
var serverLogicCacheConfigSchema = z71.object({
|
|
84618
|
+
ttl: z71.number(),
|
|
84619
|
+
staleWhileRevalidate: z71.boolean().optional()
|
|
84620
|
+
});
|
|
84621
|
+
var serverLogicSchemaObjectSchema = z71.lazy(
|
|
84622
|
+
() => z71.object({
|
|
84623
|
+
type: z71.enum(["string", "number", "integer", "boolean", "object", "array", "null"]).optional(),
|
|
84624
|
+
format: z71.string().optional(),
|
|
84625
|
+
description: z71.string().optional(),
|
|
84626
|
+
nullable: z71.boolean().optional(),
|
|
84627
|
+
enum: z71.array(z71.union([z71.string(), z71.number(), z71.boolean(), z71.null()])).optional(),
|
|
84903
84628
|
items: serverLogicSchemaObjectSchema.optional(),
|
|
84904
|
-
properties:
|
|
84905
|
-
required:
|
|
84906
|
-
additionalProperties:
|
|
84907
|
-
minimum:
|
|
84908
|
-
maximum:
|
|
84909
|
-
minLength:
|
|
84910
|
-
maxLength:
|
|
84911
|
-
pattern:
|
|
84629
|
+
properties: z71.record(z71.string(), serverLogicSchemaObjectSchema).optional(),
|
|
84630
|
+
required: z71.array(z71.string()).optional(),
|
|
84631
|
+
additionalProperties: z71.union([z71.boolean(), serverLogicSchemaObjectSchema]).optional(),
|
|
84632
|
+
minimum: z71.number().optional(),
|
|
84633
|
+
maximum: z71.number().optional(),
|
|
84634
|
+
minLength: z71.number().optional(),
|
|
84635
|
+
maxLength: z71.number().optional(),
|
|
84636
|
+
pattern: z71.string().optional()
|
|
84912
84637
|
})
|
|
84913
84638
|
);
|
|
84914
|
-
var serverLogicMediaTypeSchema =
|
|
84639
|
+
var serverLogicMediaTypeSchema = z71.object({
|
|
84915
84640
|
schema: serverLogicSchemaObjectSchema.optional(),
|
|
84916
|
-
example:
|
|
84641
|
+
example: z71.unknown().optional()
|
|
84917
84642
|
});
|
|
84918
|
-
var serverLogicResponseSchema =
|
|
84919
|
-
description:
|
|
84920
|
-
content:
|
|
84643
|
+
var serverLogicResponseSchema = z71.object({
|
|
84644
|
+
description: z71.string().optional(),
|
|
84645
|
+
content: z71.record(z71.string(), serverLogicMediaTypeSchema).optional()
|
|
84921
84646
|
});
|
|
84922
84647
|
var jsonBaseFields = {
|
|
84923
|
-
description:
|
|
84924
|
-
parameters:
|
|
84648
|
+
description: z71.string(),
|
|
84649
|
+
parameters: z71.array(parameterMetaSchema).optional(),
|
|
84925
84650
|
response: serverLogicResponseSchema.optional(),
|
|
84926
84651
|
cache: serverLogicCacheConfigSchema.optional()
|
|
84927
84652
|
};
|
|
84928
|
-
var jsonSqlServerLogicSchema =
|
|
84653
|
+
var jsonSqlServerLogicSchema = z71.object({
|
|
84929
84654
|
...jsonBaseFields,
|
|
84930
|
-
type:
|
|
84931
|
-
query:
|
|
84932
|
-
connectionId:
|
|
84655
|
+
type: z71.literal("sql").optional(),
|
|
84656
|
+
query: z71.string(),
|
|
84657
|
+
connectionId: z71.string()
|
|
84933
84658
|
});
|
|
84934
|
-
var jsonTypeScriptServerLogicSchema =
|
|
84659
|
+
var jsonTypeScriptServerLogicSchema = z71.object({
|
|
84935
84660
|
...jsonBaseFields,
|
|
84936
|
-
type:
|
|
84937
|
-
handlerPath:
|
|
84661
|
+
type: z71.literal("typescript"),
|
|
84662
|
+
handlerPath: z71.string()
|
|
84938
84663
|
});
|
|
84939
|
-
var anyJsonServerLogicSchema =
|
|
84664
|
+
var anyJsonServerLogicSchema = z71.union([
|
|
84940
84665
|
jsonTypeScriptServerLogicSchema,
|
|
84941
84666
|
jsonSqlServerLogicSchema
|
|
84942
84667
|
]);
|