@squadbase/vite-server 0.1.10-dev.5aa0720 → 0.1.10-dev.9dac57b
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 +204 -196
- package/dist/connectors/google-ads.js +114 -112
- package/dist/index.js +192 -184
- package/dist/main.js +192 -184
- package/dist/vite-plugin.js +204 -196
- package/package.json +1 -1
package/dist/vite-plugin.js
CHANGED
|
@@ -62168,7 +62168,7 @@ __export(lib_exports, {
|
|
|
62168
62168
|
FetchError: () => FetchError,
|
|
62169
62169
|
Headers: () => Headers2,
|
|
62170
62170
|
Request: () => Request2,
|
|
62171
|
-
Response: () =>
|
|
62171
|
+
Response: () => Response2,
|
|
62172
62172
|
default: () => lib_default
|
|
62173
62173
|
});
|
|
62174
62174
|
import Stream from "stream";
|
|
@@ -62694,7 +62694,7 @@ function fetch2(url, opts) {
|
|
|
62694
62694
|
};
|
|
62695
62695
|
const codings = headers.get("Content-Encoding");
|
|
62696
62696
|
if (!request2.compress || request2.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
62697
|
-
response = new
|
|
62697
|
+
response = new Response2(body, response_options);
|
|
62698
62698
|
resolve(response);
|
|
62699
62699
|
return;
|
|
62700
62700
|
}
|
|
@@ -62704,7 +62704,7 @@ function fetch2(url, opts) {
|
|
|
62704
62704
|
};
|
|
62705
62705
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
62706
62706
|
body = body.pipe(zlib.createGunzip(zlibOptions));
|
|
62707
|
-
response = new
|
|
62707
|
+
response = new Response2(body, response_options);
|
|
62708
62708
|
resolve(response);
|
|
62709
62709
|
return;
|
|
62710
62710
|
}
|
|
@@ -62716,12 +62716,12 @@ function fetch2(url, opts) {
|
|
|
62716
62716
|
} else {
|
|
62717
62717
|
body = body.pipe(zlib.createInflateRaw());
|
|
62718
62718
|
}
|
|
62719
|
-
response = new
|
|
62719
|
+
response = new Response2(body, response_options);
|
|
62720
62720
|
resolve(response);
|
|
62721
62721
|
});
|
|
62722
62722
|
raw.on("end", function() {
|
|
62723
62723
|
if (!response) {
|
|
62724
|
-
response = new
|
|
62724
|
+
response = new Response2(body, response_options);
|
|
62725
62725
|
resolve(response);
|
|
62726
62726
|
}
|
|
62727
62727
|
});
|
|
@@ -62729,11 +62729,11 @@ function fetch2(url, opts) {
|
|
|
62729
62729
|
}
|
|
62730
62730
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
|
62731
62731
|
body = body.pipe(zlib.createBrotliDecompress());
|
|
62732
|
-
response = new
|
|
62732
|
+
response = new Response2(body, response_options);
|
|
62733
62733
|
resolve(response);
|
|
62734
62734
|
return;
|
|
62735
62735
|
}
|
|
62736
|
-
response = new
|
|
62736
|
+
response = new Response2(body, response_options);
|
|
62737
62737
|
resolve(response);
|
|
62738
62738
|
});
|
|
62739
62739
|
writeToStream(req, request2);
|
|
@@ -62766,7 +62766,7 @@ function destroyStream(stream, err) {
|
|
|
62766
62766
|
stream.end();
|
|
62767
62767
|
}
|
|
62768
62768
|
}
|
|
62769
|
-
var import_whatwg_url, Readable6, BUFFER, TYPE, Blob2, convert, INTERNALS, PassThrough, invalidTokenRegex, invalidHeaderCharRegex, MAP, Headers2, INTERNAL, HeadersIteratorPrototype, INTERNALS$1, STATUS_CODES,
|
|
62769
|
+
var import_whatwg_url, Readable6, BUFFER, TYPE, Blob2, convert, INTERNALS, PassThrough, invalidTokenRegex, invalidHeaderCharRegex, MAP, Headers2, INTERNAL, HeadersIteratorPrototype, INTERNALS$1, STATUS_CODES, Response2, INTERNALS$2, URL2, parse_url, format_url, streamDestructionSupported, Request2, URL$1, PassThrough$1, isDomainOrSubdomain, isSameProtocol, lib_default;
|
|
62770
62770
|
var init_lib2 = __esm({
|
|
62771
62771
|
"../../node_modules/node-fetch/lib/index.mjs"() {
|
|
62772
62772
|
"use strict";
|
|
@@ -63209,7 +63209,7 @@ var init_lib2 = __esm({
|
|
|
63209
63209
|
});
|
|
63210
63210
|
INTERNALS$1 = /* @__PURE__ */ Symbol("Response internals");
|
|
63211
63211
|
STATUS_CODES = http.STATUS_CODES;
|
|
63212
|
-
|
|
63212
|
+
Response2 = class _Response {
|
|
63213
63213
|
constructor() {
|
|
63214
63214
|
let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
63215
63215
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -63267,8 +63267,8 @@ var init_lib2 = __esm({
|
|
|
63267
63267
|
});
|
|
63268
63268
|
}
|
|
63269
63269
|
};
|
|
63270
|
-
Body.mixIn(
|
|
63271
|
-
Object.defineProperties(
|
|
63270
|
+
Body.mixIn(Response2.prototype);
|
|
63271
|
+
Object.defineProperties(Response2.prototype, {
|
|
63272
63272
|
url: { enumerable: true },
|
|
63273
63273
|
status: { enumerable: true },
|
|
63274
63274
|
ok: { enumerable: true },
|
|
@@ -63277,7 +63277,7 @@ var init_lib2 = __esm({
|
|
|
63277
63277
|
headers: { enumerable: true },
|
|
63278
63278
|
clone: { enumerable: true }
|
|
63279
63279
|
});
|
|
63280
|
-
Object.defineProperty(
|
|
63280
|
+
Object.defineProperty(Response2.prototype, Symbol.toStringTag, {
|
|
63281
63281
|
value: "Response",
|
|
63282
63282
|
writable: false,
|
|
63283
63283
|
enumerable: false,
|
|
@@ -92876,33 +92876,41 @@ export default async function handler(c: Context) {
|
|
|
92876
92876
|
tools: tools11
|
|
92877
92877
|
});
|
|
92878
92878
|
|
|
92879
|
-
// ../connectors/src/connectors/google-ads/
|
|
92880
|
-
|
|
92881
|
-
|
|
92882
|
-
|
|
92883
|
-
|
|
92884
|
-
customerId: new ParameterDefinition({
|
|
92885
|
-
slug: "customer-id",
|
|
92886
|
-
name: "Google Ads Customer ID",
|
|
92887
|
-
description: "The Google Ads customer ID (e.g., 123-456-7890 or 1234567890). Can be found in the top-right corner of your Google Ads account.",
|
|
92888
|
-
envVarBaseKey: "GOOGLE_ADS_CUSTOMER_ID",
|
|
92889
|
-
type: "text",
|
|
92890
|
-
secret: false,
|
|
92891
|
-
required: false
|
|
92892
|
-
}),
|
|
92893
|
-
developerToken: new ParameterDefinition({
|
|
92894
|
-
slug: "developer-token",
|
|
92895
|
-
name: "Google Ads Developer Token",
|
|
92896
|
-
description: "The developer token for accessing the Google Ads API. Required for all API requests.",
|
|
92897
|
-
envVarBaseKey: "GOOGLE_ADS_DEVELOPER_TOKEN",
|
|
92898
|
-
type: "text",
|
|
92899
|
-
secret: true,
|
|
92900
|
-
required: true
|
|
92901
|
-
})
|
|
92879
|
+
// ../connectors/src/connectors/google-ads/constants.ts
|
|
92880
|
+
var VERSION_FALLBACK_ORDER = ["v22", "v23", "v24"];
|
|
92881
|
+
var cachedWorkingVersion = VERSION_FALLBACK_ORDER[0];
|
|
92882
|
+
var looksSunset = (contentType) => {
|
|
92883
|
+
return contentType != null && contentType.toLowerCase().includes("text/html");
|
|
92902
92884
|
};
|
|
92885
|
+
async function fetchGoogleAdsWithVersionFallback(attempt) {
|
|
92886
|
+
const order = [
|
|
92887
|
+
cachedWorkingVersion,
|
|
92888
|
+
...VERSION_FALLBACK_ORDER.filter((v) => v !== cachedWorkingVersion)
|
|
92889
|
+
];
|
|
92890
|
+
let lastResponse = null;
|
|
92891
|
+
for (let i6 = 0; i6 < order.length; i6++) {
|
|
92892
|
+
const version2 = order[i6];
|
|
92893
|
+
const baseUrl = `https://googleads.googleapis.com/${version2}/`;
|
|
92894
|
+
const response = await attempt(baseUrl);
|
|
92895
|
+
const contentType = response.headers.get("content-type");
|
|
92896
|
+
if (looksSunset(contentType) && i6 < order.length - 1) {
|
|
92897
|
+
console.warn(
|
|
92898
|
+
`[google-ads] version ${version2} returned a sunset/HTML response (status ${response.status}); retrying with newer version`
|
|
92899
|
+
);
|
|
92900
|
+
lastResponse = response;
|
|
92901
|
+
continue;
|
|
92902
|
+
}
|
|
92903
|
+
cachedWorkingVersion = version2;
|
|
92904
|
+
return response;
|
|
92905
|
+
}
|
|
92906
|
+
return lastResponse ?? new Response(null, {
|
|
92907
|
+
status: 502,
|
|
92908
|
+
statusText: "All Google Ads API versions returned sunset responses"
|
|
92909
|
+
});
|
|
92910
|
+
}
|
|
92903
92911
|
|
|
92904
92912
|
// ../connectors/src/connectors/google-ads/tools/list-customers.ts
|
|
92905
|
-
|
|
92913
|
+
import { z as z18 } from "zod";
|
|
92906
92914
|
var REQUEST_TIMEOUT_MS8 = 6e4;
|
|
92907
92915
|
var cachedToken4 = null;
|
|
92908
92916
|
async function getProxyToken4(config) {
|
|
@@ -92973,27 +92981,25 @@ var listCustomersTool = new ConnectorTool({
|
|
|
92973
92981
|
`[connector-request] google-ads/${connection.name}: listCustomers`
|
|
92974
92982
|
);
|
|
92975
92983
|
try {
|
|
92976
|
-
const developerToken = parameters12.developerToken.getValue(connection);
|
|
92977
92984
|
const token = await getProxyToken4(config.oauthProxy);
|
|
92978
92985
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
92979
92986
|
const controller = new AbortController();
|
|
92980
92987
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS8);
|
|
92981
92988
|
try {
|
|
92982
|
-
const response = await
|
|
92983
|
-
|
|
92984
|
-
|
|
92985
|
-
"Content-Type": "application/json",
|
|
92986
|
-
Authorization: `Bearer ${token}`
|
|
92987
|
-
},
|
|
92988
|
-
body: JSON.stringify({
|
|
92989
|
-
url: `${BASE_URL2}customers:listAccessibleCustomers`,
|
|
92990
|
-
method: "GET",
|
|
92989
|
+
const response = await fetchGoogleAdsWithVersionFallback(
|
|
92990
|
+
(baseUrl) => fetch(proxyUrl, {
|
|
92991
|
+
method: "POST",
|
|
92991
92992
|
headers: {
|
|
92992
|
-
"
|
|
92993
|
-
|
|
92994
|
-
|
|
92995
|
-
|
|
92996
|
-
|
|
92993
|
+
"Content-Type": "application/json",
|
|
92994
|
+
Authorization: `Bearer ${token}`
|
|
92995
|
+
},
|
|
92996
|
+
body: JSON.stringify({
|
|
92997
|
+
url: `${baseUrl}customers:listAccessibleCustomers`,
|
|
92998
|
+
method: "GET"
|
|
92999
|
+
}),
|
|
93000
|
+
signal: controller.signal
|
|
93001
|
+
})
|
|
93002
|
+
);
|
|
92997
93003
|
const data = await response.json();
|
|
92998
93004
|
if (!response.ok) {
|
|
92999
93005
|
const errorMessage = typeof data?.error === "string" ? data.error : typeof data?.message === "string" ? data.message : `HTTP ${response.status} ${response.statusText}`;
|
|
@@ -93005,26 +93011,27 @@ var listCustomersTool = new ConnectorTool({
|
|
|
93005
93011
|
const customers = [];
|
|
93006
93012
|
for (const cid of customerIds) {
|
|
93007
93013
|
try {
|
|
93008
|
-
const detailResponse = await
|
|
93009
|
-
|
|
93010
|
-
headers: {
|
|
93011
|
-
"Content-Type": "application/json",
|
|
93012
|
-
Authorization: `Bearer ${token}`
|
|
93013
|
-
},
|
|
93014
|
-
body: JSON.stringify({
|
|
93015
|
-
url: `${BASE_URL2}customers/${cid}/googleAds:searchStream`,
|
|
93014
|
+
const detailResponse = await fetchGoogleAdsWithVersionFallback(
|
|
93015
|
+
(baseUrl) => fetch(proxyUrl, {
|
|
93016
93016
|
method: "POST",
|
|
93017
93017
|
headers: {
|
|
93018
93018
|
"Content-Type": "application/json",
|
|
93019
|
-
|
|
93020
|
-
"login-customer-id": cid
|
|
93019
|
+
Authorization: `Bearer ${token}`
|
|
93021
93020
|
},
|
|
93022
93021
|
body: JSON.stringify({
|
|
93023
|
-
|
|
93024
|
-
|
|
93025
|
-
|
|
93026
|
-
|
|
93027
|
-
|
|
93022
|
+
url: `${baseUrl}customers/${cid}/googleAds:searchStream`,
|
|
93023
|
+
method: "POST",
|
|
93024
|
+
headers: {
|
|
93025
|
+
"Content-Type": "application/json",
|
|
93026
|
+
"login-customer-id": cid
|
|
93027
|
+
},
|
|
93028
|
+
body: JSON.stringify({
|
|
93029
|
+
query: "SELECT customer.id, customer.descriptive_name FROM customer LIMIT 1"
|
|
93030
|
+
})
|
|
93031
|
+
}),
|
|
93032
|
+
signal: controller.signal
|
|
93033
|
+
})
|
|
93034
|
+
);
|
|
93028
93035
|
if (detailResponse.ok) {
|
|
93029
93036
|
const detailData = await detailResponse.json();
|
|
93030
93037
|
const customer = detailData?.[0]?.results?.[0]?.customer;
|
|
@@ -93062,30 +93069,24 @@ var googleAdsOnboarding = new ConnectorOnboarding({
|
|
|
93062
93069
|
connectionSetupInstructions: {
|
|
93063
93070
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Google Ads (OAuth) \u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
|
|
93064
93071
|
|
|
93065
|
-
1. \
|
|
93072
|
+
1. \`${listCustomersToolName}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001OAuth\u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306AGoogle Ads\u30AB\u30B9\u30BF\u30DE\u30FC\u30A2\u30AB\u30A6\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B
|
|
93066
93073
|
2. \`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
|
|
93067
|
-
- \`parameterSlug\`: \`"developer-token"\`
|
|
93068
|
-
- \`value\`: \u30E6\u30FC\u30B6\u30FC\u304C\u63D0\u4F9B\u3057\u305F Developer Token
|
|
93069
|
-
3. \`${listCustomersToolName}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001OAuth\u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306AGoogle Ads\u30AB\u30B9\u30BF\u30DE\u30FC\u30A2\u30AB\u30A6\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B
|
|
93070
|
-
4. \`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
|
|
93071
93074
|
- \`parameterSlug\`: \`"customer-id"\`
|
|
93072
93075
|
- \`options\`: \u30AB\u30B9\u30BF\u30DE\u30FC\u4E00\u89A7\u3002\u5404 option \u306E \`label\` \u306F \`\u30A2\u30AB\u30A6\u30F3\u30C8\u540D (id: \u30AB\u30B9\u30BF\u30DE\u30FCID)\` \u306E\u5F62\u5F0F\u3001\`value\` \u306F\u30AB\u30B9\u30BF\u30DE\u30FCID
|
|
93073
|
-
|
|
93076
|
+
- \u30AB\u30B9\u30BF\u30DE\u30FC\u304C **0\u4EF6** \u306E\u5834\u5408\u306F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u4E2D\u65AD\u3057\u3001\u30E6\u30FC\u30B6\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u306A\u3044\u65E8\u3092\u4F1D\u3048\u308B
|
|
93077
|
+
3. \u30E6\u30FC\u30B6\u30FC\u304C\u9078\u629E\u3057\u305F\u30AB\u30B9\u30BF\u30DE\u30FC\u306E \`label\` \u304C\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u3057\u3066\u5C4A\u304F\u306E\u3067\u3001\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u306B\u9032\u3080
|
|
93074
93078
|
|
|
93075
93079
|
#### \u5236\u7D04
|
|
93076
93080
|
- **\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u30EC\u30DD\u30FC\u30C8\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3057\u306A\u3044\u3053\u3068**\u3002\u5B9F\u884C\u3057\u3066\u3088\u3044\u306E\u306F\u4E0A\u8A18\u624B\u9806\u3067\u6307\u5B9A\u3055\u308C\u305F\u30E1\u30BF\u30C7\u30FC\u30BF\u53D6\u5F97\u306E\u307F
|
|
93077
93081
|
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
93078
93082
|
en: `Follow these steps to set up the Google Ads (OAuth) connection.
|
|
93079
93083
|
|
|
93080
|
-
1.
|
|
93084
|
+
1. Call \`${listCustomersToolName}\` to get the list of Google Ads customer accounts accessible with the OAuth credentials
|
|
93081
93085
|
2. Call \`updateConnectionParameters\`:
|
|
93082
|
-
- \`parameterSlug\`: \`"developer-token"\`
|
|
93083
|
-
- \`value\`: The Developer Token provided by the user
|
|
93084
|
-
3. Call \`${listCustomersToolName}\` to get the list of Google Ads customer accounts accessible with the OAuth credentials
|
|
93085
|
-
4. Call \`updateConnectionParameters\`:
|
|
93086
93086
|
- \`parameterSlug\`: \`"customer-id"\`
|
|
93087
93087
|
- \`options\`: The customer list. Each option's \`label\` should be \`Account Name (id: customerId)\`, \`value\` should be the customer ID
|
|
93088
|
-
|
|
93088
|
+
- If **0 customers** are returned, abort setup and inform the user that no accessible accounts are available
|
|
93089
|
+
3. The \`label\` of the user's selected customer will arrive as a message. Proceed to the next step
|
|
93089
93090
|
|
|
93090
93091
|
#### Constraints
|
|
93091
93092
|
- **Do NOT fetch report data during setup**. Only the metadata requests specified in the steps above are allowed
|
|
@@ -93099,9 +93100,21 @@ var googleAdsOnboarding = new ConnectorOnboarding({
|
|
|
93099
93100
|
}
|
|
93100
93101
|
});
|
|
93101
93102
|
|
|
93103
|
+
// ../connectors/src/connectors/google-ads/parameters.ts
|
|
93104
|
+
var parameters12 = {
|
|
93105
|
+
customerId: new ParameterDefinition({
|
|
93106
|
+
slug: "customer-id",
|
|
93107
|
+
name: "Google Ads Customer ID",
|
|
93108
|
+
description: "The Google Ads customer ID (e.g., 123-456-7890 or 1234567890). Can be found in the top-right corner of your Google Ads account.",
|
|
93109
|
+
envVarBaseKey: "GOOGLE_ADS_CUSTOMER_ID",
|
|
93110
|
+
type: "text",
|
|
93111
|
+
secret: false,
|
|
93112
|
+
required: false
|
|
93113
|
+
})
|
|
93114
|
+
};
|
|
93115
|
+
|
|
93102
93116
|
// ../connectors/src/connectors/google-ads/tools/request.ts
|
|
93103
93117
|
import { z as z19 } from "zod";
|
|
93104
|
-
var BASE_URL3 = "https://googleads.googleapis.com/v18/";
|
|
93105
93118
|
var REQUEST_TIMEOUT_MS9 = 6e4;
|
|
93106
93119
|
var cachedToken5 = null;
|
|
93107
93120
|
async function getProxyToken5(config) {
|
|
@@ -93141,7 +93154,7 @@ var inputSchema19 = z19.object({
|
|
|
93141
93154
|
connectionId: z19.string().describe("ID of the Google Ads OAuth connection to use"),
|
|
93142
93155
|
method: z19.enum(["GET", "POST"]).describe("HTTP method"),
|
|
93143
93156
|
path: z19.string().describe(
|
|
93144
|
-
"API path appended to https://googleads.googleapis.com
|
|
93157
|
+
"API path appended to https://googleads.googleapis.com/<version>/ (e.g., 'customers/{customerId}/googleAds:searchStream'). The API version is auto-managed and {customerId} is automatically replaced."
|
|
93145
93158
|
),
|
|
93146
93159
|
body: z19.record(z19.string(), z19.unknown()).optional().describe("POST request body (JSON)")
|
|
93147
93160
|
});
|
|
@@ -93158,7 +93171,7 @@ var outputSchema19 = z19.discriminatedUnion("success", [
|
|
|
93158
93171
|
]);
|
|
93159
93172
|
var requestTool2 = new ConnectorTool({
|
|
93160
93173
|
name: "request",
|
|
93161
|
-
description: `Send authenticated requests to the Google Ads API
|
|
93174
|
+
description: `Send authenticated requests to the Google Ads API.
|
|
93162
93175
|
Authentication is handled automatically via OAuth proxy.
|
|
93163
93176
|
{customerId} in the path is automatically replaced with the connection's customer ID (hyphens removed).`,
|
|
93164
93177
|
inputSchema: inputSchema19,
|
|
@@ -93178,31 +93191,30 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
93178
93191
|
const rawCustomerId = parameters12.customerId.tryGetValue(connection);
|
|
93179
93192
|
const customerId = rawCustomerId?.replace(/-/g, "") ?? "";
|
|
93180
93193
|
const resolvedPath = customerId ? path4.replace(/\{customerId\}/g, customerId) : path4;
|
|
93181
|
-
const url = `${BASE_URL3}${resolvedPath}`;
|
|
93182
93194
|
const token = await getProxyToken5(config.oauthProxy);
|
|
93183
93195
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
93184
93196
|
const controller = new AbortController();
|
|
93185
93197
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS9);
|
|
93186
93198
|
try {
|
|
93187
|
-
const
|
|
93188
|
-
|
|
93189
|
-
|
|
93190
|
-
headers: {
|
|
93191
|
-
"Content-Type": "application/json",
|
|
93192
|
-
Authorization: `Bearer ${token}`
|
|
93193
|
-
},
|
|
93194
|
-
body: JSON.stringify({
|
|
93195
|
-
url,
|
|
93196
|
-
method,
|
|
93199
|
+
const response = await fetchGoogleAdsWithVersionFallback(
|
|
93200
|
+
(baseUrl) => fetch(proxyUrl, {
|
|
93201
|
+
method: "POST",
|
|
93197
93202
|
headers: {
|
|
93198
93203
|
"Content-Type": "application/json",
|
|
93199
|
-
|
|
93200
|
-
...customerId ? { "login-customer-id": customerId } : {}
|
|
93204
|
+
Authorization: `Bearer ${token}`
|
|
93201
93205
|
},
|
|
93202
|
-
|
|
93203
|
-
|
|
93204
|
-
|
|
93205
|
-
|
|
93206
|
+
body: JSON.stringify({
|
|
93207
|
+
url: `${baseUrl}${resolvedPath}`,
|
|
93208
|
+
method,
|
|
93209
|
+
headers: {
|
|
93210
|
+
"Content-Type": "application/json",
|
|
93211
|
+
...customerId ? { "login-customer-id": customerId } : {}
|
|
93212
|
+
},
|
|
93213
|
+
...method === "POST" && body ? { body: JSON.stringify(body) } : {}
|
|
93214
|
+
}),
|
|
93215
|
+
signal: controller.signal
|
|
93216
|
+
})
|
|
93217
|
+
);
|
|
93206
93218
|
const data = await response.json();
|
|
93207
93219
|
if (!response.ok) {
|
|
93208
93220
|
const dataObj = data;
|
|
@@ -93377,26 +93389,22 @@ const customerIds = await ads.listAccessibleCustomers();
|
|
|
93377
93389
|
if (!customerId) {
|
|
93378
93390
|
return { success: true };
|
|
93379
93391
|
}
|
|
93380
|
-
const developerToken = params[parameters12.developerToken.slug];
|
|
93381
|
-
if (!developerToken) {
|
|
93382
|
-
return {
|
|
93383
|
-
success: false,
|
|
93384
|
-
error: "Developer token is required"
|
|
93385
|
-
};
|
|
93386
|
-
}
|
|
93387
|
-
const url = `https://googleads.googleapis.com/v18/customers/${customerId}/googleAds:searchStream`;
|
|
93388
93392
|
try {
|
|
93389
|
-
const res = await
|
|
93390
|
-
|
|
93391
|
-
|
|
93392
|
-
|
|
93393
|
-
|
|
93394
|
-
|
|
93395
|
-
|
|
93396
|
-
|
|
93397
|
-
|
|
93398
|
-
|
|
93399
|
-
|
|
93393
|
+
const res = await fetchGoogleAdsWithVersionFallback(
|
|
93394
|
+
(baseUrl) => proxyFetch(
|
|
93395
|
+
`${baseUrl}customers/${customerId}/googleAds:searchStream`,
|
|
93396
|
+
{
|
|
93397
|
+
method: "POST",
|
|
93398
|
+
headers: {
|
|
93399
|
+
"Content-Type": "application/json",
|
|
93400
|
+
"login-customer-id": customerId
|
|
93401
|
+
},
|
|
93402
|
+
body: JSON.stringify({
|
|
93403
|
+
query: "SELECT customer.id FROM customer LIMIT 1"
|
|
93404
|
+
})
|
|
93405
|
+
}
|
|
93406
|
+
)
|
|
93407
|
+
);
|
|
93400
93408
|
if (!res.ok) {
|
|
93401
93409
|
const errorText = await res.text().catch(() => res.statusText);
|
|
93402
93410
|
return {
|
|
@@ -93448,7 +93456,7 @@ var parameters13 = {
|
|
|
93448
93456
|
|
|
93449
93457
|
// ../connectors/src/connectors/google-analytics/tools/request.ts
|
|
93450
93458
|
import { z as z20 } from "zod";
|
|
93451
|
-
var
|
|
93459
|
+
var BASE_URL2 = "https://analyticsdata.googleapis.com/v1beta/";
|
|
93452
93460
|
var REQUEST_TIMEOUT_MS10 = 6e4;
|
|
93453
93461
|
var inputSchema20 = z20.object({
|
|
93454
93462
|
toolUseIntent: z20.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
@@ -93497,7 +93505,7 @@ Authentication is handled automatically using a service account.
|
|
|
93497
93505
|
return { success: false, error: "Failed to obtain access token" };
|
|
93498
93506
|
}
|
|
93499
93507
|
const resolvedPath = path4.replace(/\{propertyId\}/g, propertyId);
|
|
93500
|
-
const url = `${
|
|
93508
|
+
const url = `${BASE_URL2}${resolvedPath}`;
|
|
93501
93509
|
const controller = new AbortController();
|
|
93502
93510
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS10);
|
|
93503
93511
|
try {
|
|
@@ -93977,7 +93985,7 @@ var parameters14 = {
|
|
|
93977
93985
|
|
|
93978
93986
|
// ../connectors/src/connectors/google-analytics-oauth/tools/request.ts
|
|
93979
93987
|
import { z as z23 } from "zod";
|
|
93980
|
-
var
|
|
93988
|
+
var BASE_URL3 = "https://analyticsdata.googleapis.com/v1beta/";
|
|
93981
93989
|
var REQUEST_TIMEOUT_MS13 = 6e4;
|
|
93982
93990
|
var cachedToken8 = null;
|
|
93983
93991
|
async function getProxyToken8(config) {
|
|
@@ -94053,7 +94061,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
94053
94061
|
try {
|
|
94054
94062
|
const propertyId = parameters14.propertyId.tryGetValue(connection);
|
|
94055
94063
|
const resolvedPath = propertyId ? path4.replace(/\{propertyId\}/g, propertyId) : path4;
|
|
94056
|
-
const url = `${
|
|
94064
|
+
const url = `${BASE_URL3}${resolvedPath}`;
|
|
94057
94065
|
const token = await getProxyToken8(config.oauthProxy);
|
|
94058
94066
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
94059
94067
|
const controller = new AbortController();
|
|
@@ -94321,7 +94329,7 @@ var parameters15 = {
|
|
|
94321
94329
|
// ../connectors/src/connectors/google-calendar/tools/request.ts
|
|
94322
94330
|
var BASE_HOST = "https://www.googleapis.com";
|
|
94323
94331
|
var BASE_PATH_SEGMENT = "/calendar/v3";
|
|
94324
|
-
var
|
|
94332
|
+
var BASE_URL4 = `${BASE_HOST}${BASE_PATH_SEGMENT}`;
|
|
94325
94333
|
var REQUEST_TIMEOUT_MS14 = 6e4;
|
|
94326
94334
|
function decodeServiceAccount(keyJsonBase64) {
|
|
94327
94335
|
const decoded = Buffer.from(keyJsonBase64, "base64").toString("utf-8");
|
|
@@ -94401,7 +94409,7 @@ var requestTool5 = new ConnectorTool({
|
|
|
94401
94409
|
};
|
|
94402
94410
|
}
|
|
94403
94411
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT);
|
|
94404
|
-
let url = `${
|
|
94412
|
+
let url = `${BASE_URL4}${normalizedPath}`;
|
|
94405
94413
|
if (queryParams) {
|
|
94406
94414
|
const searchParams = new URLSearchParams(queryParams);
|
|
94407
94415
|
url += `?${searchParams.toString()}`;
|
|
@@ -94453,7 +94461,7 @@ var requestTool5 = new ConnectorTool({
|
|
|
94453
94461
|
import { z as z25 } from "zod";
|
|
94454
94462
|
var BASE_HOST2 = "https://www.googleapis.com";
|
|
94455
94463
|
var BASE_PATH_SEGMENT2 = "/calendar/v3";
|
|
94456
|
-
var
|
|
94464
|
+
var BASE_URL5 = `${BASE_HOST2}${BASE_PATH_SEGMENT2}`;
|
|
94457
94465
|
var REQUEST_TIMEOUT_MS15 = 6e4;
|
|
94458
94466
|
function decodeServiceAccount2(keyJsonBase64) {
|
|
94459
94467
|
const decoded = Buffer.from(keyJsonBase64, "base64").toString("utf-8");
|
|
@@ -94539,7 +94547,7 @@ var requestWithDelegationTool = new ConnectorTool({
|
|
|
94539
94547
|
};
|
|
94540
94548
|
}
|
|
94541
94549
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT2);
|
|
94542
|
-
let url = `${
|
|
94550
|
+
let url = `${BASE_URL5}${normalizedPath}`;
|
|
94543
94551
|
if (queryParams) {
|
|
94544
94552
|
const searchParams = new URLSearchParams(queryParams);
|
|
94545
94553
|
url += `?${searchParams.toString()}`;
|
|
@@ -95019,7 +95027,7 @@ export default async function handler(c: Context) {
|
|
|
95019
95027
|
|
|
95020
95028
|
// ../connectors/src/connectors/google-calendar-oauth/tools/list-calendars.ts
|
|
95021
95029
|
import { z as z26 } from "zod";
|
|
95022
|
-
var
|
|
95030
|
+
var BASE_URL6 = "https://www.googleapis.com/calendar/v3";
|
|
95023
95031
|
var REQUEST_TIMEOUT_MS16 = 6e4;
|
|
95024
95032
|
var cachedToken9 = null;
|
|
95025
95033
|
async function getProxyToken9(config) {
|
|
@@ -95092,7 +95100,7 @@ var listCalendarsTool = new ConnectorTool({
|
|
|
95092
95100
|
`[connector-request] google-calendar-oauth/${connection.name}: listCalendars`
|
|
95093
95101
|
);
|
|
95094
95102
|
try {
|
|
95095
|
-
const url = `${
|
|
95103
|
+
const url = `${BASE_URL6}/users/me/calendarList`;
|
|
95096
95104
|
const token = await getProxyToken9(config.oauthProxy);
|
|
95097
95105
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
95098
95106
|
const controller = new AbortController();
|
|
@@ -95189,7 +95197,7 @@ var parameters16 = {
|
|
|
95189
95197
|
import { z as z27 } from "zod";
|
|
95190
95198
|
var BASE_HOST3 = "https://www.googleapis.com";
|
|
95191
95199
|
var BASE_PATH_SEGMENT3 = "/calendar/v3";
|
|
95192
|
-
var
|
|
95200
|
+
var BASE_URL7 = `${BASE_HOST3}${BASE_PATH_SEGMENT3}`;
|
|
95193
95201
|
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
95194
95202
|
var cachedToken10 = null;
|
|
95195
95203
|
async function getProxyToken10(config) {
|
|
@@ -95270,7 +95278,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
95270
95278
|
resolvedPath,
|
|
95271
95279
|
BASE_PATH_SEGMENT3
|
|
95272
95280
|
);
|
|
95273
|
-
let url = `${
|
|
95281
|
+
let url = `${BASE_URL7}${normalizedPath}`;
|
|
95274
95282
|
if (queryParams) {
|
|
95275
95283
|
const searchParams = new URLSearchParams(queryParams);
|
|
95276
95284
|
url += `?${searchParams.toString()}`;
|
|
@@ -95808,7 +95816,7 @@ var parameters18 = {};
|
|
|
95808
95816
|
import { z as z29 } from "zod";
|
|
95809
95817
|
var BASE_HOST4 = "https://www.googleapis.com";
|
|
95810
95818
|
var BASE_PATH_SEGMENT4 = "/drive/v3";
|
|
95811
|
-
var
|
|
95819
|
+
var BASE_URL8 = `${BASE_HOST4}${BASE_PATH_SEGMENT4}`;
|
|
95812
95820
|
var REQUEST_TIMEOUT_MS19 = 6e4;
|
|
95813
95821
|
var cachedToken12 = null;
|
|
95814
95822
|
async function getProxyToken12(config) {
|
|
@@ -95884,7 +95892,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
95884
95892
|
);
|
|
95885
95893
|
try {
|
|
95886
95894
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT4);
|
|
95887
|
-
let url = `${
|
|
95895
|
+
let url = `${BASE_URL8}${normalizedPath}`;
|
|
95888
95896
|
if (queryParams) {
|
|
95889
95897
|
const searchParams = new URLSearchParams(queryParams);
|
|
95890
95898
|
url += `?${searchParams.toString()}`;
|
|
@@ -96925,7 +96933,7 @@ await slides.batchUpdate(presentationId, [
|
|
|
96925
96933
|
|
|
96926
96934
|
// ../connectors/src/connectors/hubspot-oauth/tools/request.ts
|
|
96927
96935
|
import { z as z32 } from "zod";
|
|
96928
|
-
var
|
|
96936
|
+
var BASE_URL9 = "https://api.hubapi.com";
|
|
96929
96937
|
var REQUEST_TIMEOUT_MS22 = 6e4;
|
|
96930
96938
|
var cachedToken15 = null;
|
|
96931
96939
|
async function getProxyToken15(config) {
|
|
@@ -96999,7 +97007,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
96999
97007
|
`[connector-request] hubspot-oauth/${connection.name}: ${method} ${path4}`
|
|
97000
97008
|
);
|
|
97001
97009
|
try {
|
|
97002
|
-
let url = `${
|
|
97010
|
+
let url = `${BASE_URL9}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
97003
97011
|
if (queryParams) {
|
|
97004
97012
|
const searchParams = new URLSearchParams(queryParams);
|
|
97005
97013
|
url += `?${searchParams.toString()}`;
|
|
@@ -97215,7 +97223,7 @@ const data = await res.json();
|
|
|
97215
97223
|
|
|
97216
97224
|
// ../connectors/src/connectors/stripe-oauth/tools/request.ts
|
|
97217
97225
|
import { z as z33 } from "zod";
|
|
97218
|
-
var
|
|
97226
|
+
var BASE_URL10 = "https://api.stripe.com";
|
|
97219
97227
|
var REQUEST_TIMEOUT_MS23 = 6e4;
|
|
97220
97228
|
var cachedToken16 = null;
|
|
97221
97229
|
async function getProxyToken16(config) {
|
|
@@ -97289,7 +97297,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
97289
97297
|
`[connector-request] stripe-oauth/${connection.name}: ${method} ${path4}`
|
|
97290
97298
|
);
|
|
97291
97299
|
try {
|
|
97292
|
-
let url = `${
|
|
97300
|
+
let url = `${BASE_URL10}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
97293
97301
|
if (queryParams) {
|
|
97294
97302
|
const searchParams = new URLSearchParams(queryParams);
|
|
97295
97303
|
url += `?${searchParams.toString()}`;
|
|
@@ -97527,7 +97535,7 @@ var parameters23 = {
|
|
|
97527
97535
|
};
|
|
97528
97536
|
|
|
97529
97537
|
// ../connectors/src/connectors/stripe-api-key/tools/request.ts
|
|
97530
|
-
var
|
|
97538
|
+
var BASE_URL11 = "https://api.stripe.com";
|
|
97531
97539
|
var REQUEST_TIMEOUT_MS24 = 6e4;
|
|
97532
97540
|
var inputSchema34 = z34.object({
|
|
97533
97541
|
toolUseIntent: z34.string().optional().describe(
|
|
@@ -97576,7 +97584,7 @@ Use this tool for all Stripe API interactions: querying charges, customers, invo
|
|
|
97576
97584
|
);
|
|
97577
97585
|
try {
|
|
97578
97586
|
const apiKey = parameters23.apiKey.getValue(connection);
|
|
97579
|
-
let url = `${
|
|
97587
|
+
let url = `${BASE_URL11}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
97580
97588
|
if (queryParams) {
|
|
97581
97589
|
const searchParams = new URLSearchParams(queryParams);
|
|
97582
97590
|
url += `?${searchParams.toString()}`;
|
|
@@ -97818,7 +97826,7 @@ var parameters24 = {
|
|
|
97818
97826
|
};
|
|
97819
97827
|
|
|
97820
97828
|
// ../connectors/src/connectors/airtable-oauth/tools/request.ts
|
|
97821
|
-
var
|
|
97829
|
+
var BASE_URL12 = "https://api.airtable.com/v0";
|
|
97822
97830
|
var REQUEST_TIMEOUT_MS25 = 6e4;
|
|
97823
97831
|
var cachedToken17 = null;
|
|
97824
97832
|
async function getProxyToken17(config) {
|
|
@@ -97895,7 +97903,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
97895
97903
|
try {
|
|
97896
97904
|
const baseId = parameters24.baseId.tryGetValue(connection);
|
|
97897
97905
|
const resolvedPath = baseId ? path4.replace(/\{baseId\}/g, baseId) : path4;
|
|
97898
|
-
let url = `${
|
|
97906
|
+
let url = `${BASE_URL12}${resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
|
|
97899
97907
|
if (queryParams) {
|
|
97900
97908
|
const searchParams = new URLSearchParams(queryParams);
|
|
97901
97909
|
url += `?${searchParams.toString()}`;
|
|
@@ -98748,7 +98756,7 @@ var parameters27 = {
|
|
|
98748
98756
|
|
|
98749
98757
|
// ../connectors/src/connectors/wix-store/tools/request.ts
|
|
98750
98758
|
import { z as z38 } from "zod";
|
|
98751
|
-
var
|
|
98759
|
+
var BASE_URL13 = "https://www.wixapis.com/";
|
|
98752
98760
|
var REQUEST_TIMEOUT_MS28 = 6e4;
|
|
98753
98761
|
var inputSchema38 = z38.object({
|
|
98754
98762
|
toolUseIntent: z38.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
@@ -98783,7 +98791,7 @@ Authentication is handled automatically using the API Key and Site ID.`,
|
|
|
98783
98791
|
try {
|
|
98784
98792
|
const apiKey = parameters27.apiKey.getValue(connection);
|
|
98785
98793
|
const siteId = parameters27.siteId.getValue(connection);
|
|
98786
|
-
const url = `${
|
|
98794
|
+
const url = `${BASE_URL13}${path4}`;
|
|
98787
98795
|
const controller = new AbortController();
|
|
98788
98796
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS28);
|
|
98789
98797
|
try {
|
|
@@ -100063,7 +100071,7 @@ var parameters34 = {
|
|
|
100063
100071
|
|
|
100064
100072
|
// ../connectors/src/connectors/attio/tools/request.ts
|
|
100065
100073
|
import { z as z42 } from "zod";
|
|
100066
|
-
var
|
|
100074
|
+
var BASE_URL14 = "https://api.attio.com/v2";
|
|
100067
100075
|
var REQUEST_TIMEOUT_MS31 = 6e4;
|
|
100068
100076
|
var inputSchema42 = z42.object({
|
|
100069
100077
|
toolUseIntent: z42.string().optional().describe(
|
|
@@ -100110,7 +100118,7 @@ Record queries use POST /objects/{object}/records/query with a JSON body contain
|
|
|
100110
100118
|
);
|
|
100111
100119
|
try {
|
|
100112
100120
|
const apiKey = parameters34.apiKey.getValue(connection);
|
|
100113
|
-
const url = `${
|
|
100121
|
+
const url = `${BASE_URL14}${path4}`;
|
|
100114
100122
|
const controller = new AbortController();
|
|
100115
100123
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS31);
|
|
100116
100124
|
try {
|
|
@@ -101078,7 +101086,7 @@ var parameters37 = {
|
|
|
101078
101086
|
|
|
101079
101087
|
// ../connectors/src/connectors/hubspot/tools/request.ts
|
|
101080
101088
|
import { z as z45 } from "zod";
|
|
101081
|
-
var
|
|
101089
|
+
var BASE_URL15 = "https://api.hubapi.com";
|
|
101082
101090
|
var REQUEST_TIMEOUT_MS34 = 6e4;
|
|
101083
101091
|
var inputSchema45 = z45.object({
|
|
101084
101092
|
toolUseIntent: z45.string().optional().describe(
|
|
@@ -101125,7 +101133,7 @@ Use the search endpoint (POST /crm/v3/objects/{objectType}/search) for complex q
|
|
|
101125
101133
|
);
|
|
101126
101134
|
try {
|
|
101127
101135
|
const apiKey = parameters37.apiKey.getValue(connection);
|
|
101128
|
-
const url = `${
|
|
101136
|
+
const url = `${BASE_URL15}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
101129
101137
|
const controller = new AbortController();
|
|
101130
101138
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS34);
|
|
101131
101139
|
try {
|
|
@@ -101611,7 +101619,7 @@ var parameters39 = {
|
|
|
101611
101619
|
|
|
101612
101620
|
// ../connectors/src/connectors/linear/tools/request.ts
|
|
101613
101621
|
import { z as z47 } from "zod";
|
|
101614
|
-
var
|
|
101622
|
+
var BASE_URL16 = "https://api.linear.app/graphql";
|
|
101615
101623
|
var REQUEST_TIMEOUT_MS36 = 6e4;
|
|
101616
101624
|
var inputSchema47 = z47.object({
|
|
101617
101625
|
toolUseIntent: z47.string().optional().describe(
|
|
@@ -101661,7 +101669,7 @@ Archived resources are hidden by default; pass includeArchived: true in query ar
|
|
|
101661
101669
|
try {
|
|
101662
101670
|
const body = { query };
|
|
101663
101671
|
if (variables) body.variables = variables;
|
|
101664
|
-
const response = await fetch(
|
|
101672
|
+
const response = await fetch(BASE_URL16, {
|
|
101665
101673
|
method: "POST",
|
|
101666
101674
|
headers: {
|
|
101667
101675
|
Authorization: apiKey,
|
|
@@ -101869,7 +101877,7 @@ var parameters40 = {
|
|
|
101869
101877
|
import { z as z48 } from "zod";
|
|
101870
101878
|
var BASE_HOST5 = "https://app.asana.com";
|
|
101871
101879
|
var BASE_PATH_SEGMENT5 = "/api/1.0";
|
|
101872
|
-
var
|
|
101880
|
+
var BASE_URL17 = `${BASE_HOST5}${BASE_PATH_SEGMENT5}`;
|
|
101873
101881
|
var REQUEST_TIMEOUT_MS37 = 6e4;
|
|
101874
101882
|
var inputSchema48 = z48.object({
|
|
101875
101883
|
toolUseIntent: z48.string().optional().describe(
|
|
@@ -101934,7 +101942,7 @@ Pagination: Use limit (1-100) and offset query parameters. The response includes
|
|
|
101934
101942
|
try {
|
|
101935
101943
|
const token = parameters40.personalAccessToken.getValue(connection);
|
|
101936
101944
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT5);
|
|
101937
|
-
const url = `${
|
|
101945
|
+
const url = `${BASE_URL17}${normalizedPath}`;
|
|
101938
101946
|
const controller = new AbortController();
|
|
101939
101947
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS37);
|
|
101940
101948
|
try {
|
|
@@ -102807,7 +102815,7 @@ var parameters43 = {
|
|
|
102807
102815
|
|
|
102808
102816
|
// ../connectors/src/connectors/notion/tools/request.ts
|
|
102809
102817
|
import { z as z53 } from "zod";
|
|
102810
|
-
var
|
|
102818
|
+
var BASE_URL18 = "https://api.notion.com/v1";
|
|
102811
102819
|
var NOTION_VERSION = "2022-06-28";
|
|
102812
102820
|
var REQUEST_TIMEOUT_MS38 = 6e4;
|
|
102813
102821
|
var inputSchema53 = z53.object({
|
|
@@ -102855,7 +102863,7 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
102855
102863
|
);
|
|
102856
102864
|
try {
|
|
102857
102865
|
const apiKey = parameters43.apiKey.getValue(connection);
|
|
102858
|
-
const url = `${
|
|
102866
|
+
const url = `${BASE_URL18}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
102859
102867
|
const controller = new AbortController();
|
|
102860
102868
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS38);
|
|
102861
102869
|
try {
|
|
@@ -103044,7 +103052,7 @@ export default async function handler(c: Context) {
|
|
|
103044
103052
|
|
|
103045
103053
|
// ../connectors/src/connectors/notion-oauth/tools/request.ts
|
|
103046
103054
|
import { z as z54 } from "zod";
|
|
103047
|
-
var
|
|
103055
|
+
var BASE_URL19 = "https://api.notion.com/v1";
|
|
103048
103056
|
var NOTION_VERSION2 = "2022-06-28";
|
|
103049
103057
|
var REQUEST_TIMEOUT_MS39 = 6e4;
|
|
103050
103058
|
var cachedToken19 = null;
|
|
@@ -103120,7 +103128,7 @@ Pagination uses cursor-based start_cursor and page_size (max 100).`,
|
|
|
103120
103128
|
`[connector-request] notion-oauth/${connection.name}: ${method} ${path4}`
|
|
103121
103129
|
);
|
|
103122
103130
|
try {
|
|
103123
|
-
const url = `${
|
|
103131
|
+
const url = `${BASE_URL19}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
103124
103132
|
const token = await getProxyToken19(config.oauthProxy);
|
|
103125
103133
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
103126
103134
|
const controller = new AbortController();
|
|
@@ -103369,7 +103377,7 @@ var parameters45 = {
|
|
|
103369
103377
|
};
|
|
103370
103378
|
|
|
103371
103379
|
// ../connectors/src/connectors/meta-ads/tools/list-ad-accounts.ts
|
|
103372
|
-
var
|
|
103380
|
+
var BASE_URL20 = "https://graph.facebook.com/v21.0/";
|
|
103373
103381
|
var REQUEST_TIMEOUT_MS40 = 6e4;
|
|
103374
103382
|
var inputSchema55 = z55.object({
|
|
103375
103383
|
toolUseIntent: z55.string().optional().describe(
|
|
@@ -103410,7 +103418,7 @@ var listAdAccountsTool = new ConnectorTool({
|
|
|
103410
103418
|
);
|
|
103411
103419
|
try {
|
|
103412
103420
|
const accessToken = parameters45.accessToken.getValue(connection);
|
|
103413
|
-
const url = `${
|
|
103421
|
+
const url = `${BASE_URL20}me/adaccounts?fields=account_id,name,account_status&access_token=${encodeURIComponent(accessToken)}`;
|
|
103414
103422
|
const controller = new AbortController();
|
|
103415
103423
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS40);
|
|
103416
103424
|
try {
|
|
@@ -103479,7 +103487,7 @@ var metaAdsOnboarding = new ConnectorOnboarding({
|
|
|
103479
103487
|
|
|
103480
103488
|
// ../connectors/src/connectors/meta-ads/tools/request.ts
|
|
103481
103489
|
import { z as z56 } from "zod";
|
|
103482
|
-
var
|
|
103490
|
+
var BASE_URL21 = "https://graph.facebook.com/v21.0/";
|
|
103483
103491
|
var REQUEST_TIMEOUT_MS41 = 6e4;
|
|
103484
103492
|
var inputSchema56 = z56.object({
|
|
103485
103493
|
toolUseIntent: z56.string().optional().describe(
|
|
@@ -103526,7 +103534,7 @@ Authentication is handled via the configured access token.
|
|
|
103526
103534
|
const accessToken = parameters45.accessToken.getValue(connection);
|
|
103527
103535
|
const adAccountId = parameters45.adAccountId.tryGetValue(connection) ?? "";
|
|
103528
103536
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
103529
|
-
let url = `${
|
|
103537
|
+
let url = `${BASE_URL21}${resolvedPath}`;
|
|
103530
103538
|
const params = new URLSearchParams(queryParams ?? {});
|
|
103531
103539
|
params.set("access_token", accessToken);
|
|
103532
103540
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -103732,7 +103740,7 @@ const accounts = await meta.listAdAccounts();
|
|
|
103732
103740
|
|
|
103733
103741
|
// ../connectors/src/connectors/meta-ads-oauth/tools/list-ad-accounts.ts
|
|
103734
103742
|
import { z as z57 } from "zod";
|
|
103735
|
-
var
|
|
103743
|
+
var BASE_URL22 = "https://graph.facebook.com/v21.0/";
|
|
103736
103744
|
var REQUEST_TIMEOUT_MS42 = 6e4;
|
|
103737
103745
|
var cachedToken20 = null;
|
|
103738
103746
|
async function getProxyToken20(config) {
|
|
@@ -103815,7 +103823,7 @@ var listAdAccountsTool2 = new ConnectorTool({
|
|
|
103815
103823
|
Authorization: `Bearer ${token}`
|
|
103816
103824
|
},
|
|
103817
103825
|
body: JSON.stringify({
|
|
103818
|
-
url: `${
|
|
103826
|
+
url: `${BASE_URL22}me/adaccounts?fields=account_id,name,account_status`,
|
|
103819
103827
|
method: "GET"
|
|
103820
103828
|
}),
|
|
103821
103829
|
signal: controller.signal
|
|
@@ -103894,7 +103902,7 @@ var parameters46 = {
|
|
|
103894
103902
|
|
|
103895
103903
|
// ../connectors/src/connectors/meta-ads-oauth/tools/request.ts
|
|
103896
103904
|
import { z as z58 } from "zod";
|
|
103897
|
-
var
|
|
103905
|
+
var BASE_URL23 = "https://graph.facebook.com/v21.0/";
|
|
103898
103906
|
var REQUEST_TIMEOUT_MS43 = 6e4;
|
|
103899
103907
|
var cachedToken21 = null;
|
|
103900
103908
|
async function getProxyToken21(config) {
|
|
@@ -103971,7 +103979,7 @@ Authentication is handled automatically via OAuth proxy.
|
|
|
103971
103979
|
try {
|
|
103972
103980
|
const adAccountId = parameters46.adAccountId.tryGetValue(connection) ?? "";
|
|
103973
103981
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
103974
|
-
let url = `${
|
|
103982
|
+
let url = `${BASE_URL23}${resolvedPath}`;
|
|
103975
103983
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
103976
103984
|
const params = new URLSearchParams(queryParams);
|
|
103977
103985
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -104177,7 +104185,7 @@ const data = await res.json();
|
|
|
104177
104185
|
|
|
104178
104186
|
// ../connectors/src/connectors/tiktok-ads/tools/list-advertisers.ts
|
|
104179
104187
|
import { z as z59 } from "zod";
|
|
104180
|
-
var
|
|
104188
|
+
var BASE_URL24 = "https://business-api.tiktok.com/open_api/v1.3/";
|
|
104181
104189
|
var REQUEST_TIMEOUT_MS44 = 6e4;
|
|
104182
104190
|
var cachedToken22 = null;
|
|
104183
104191
|
async function getProxyToken22(config) {
|
|
@@ -104260,7 +104268,7 @@ var listAdvertisersTool = new ConnectorTool({
|
|
|
104260
104268
|
Authorization: `Bearer ${token}`
|
|
104261
104269
|
},
|
|
104262
104270
|
body: JSON.stringify({
|
|
104263
|
-
url: `${
|
|
104271
|
+
url: `${BASE_URL24}oauth2/advertiser/get/`,
|
|
104264
104272
|
method: "GET"
|
|
104265
104273
|
}),
|
|
104266
104274
|
signal: controller.signal
|
|
@@ -104351,7 +104359,7 @@ var parameters47 = {
|
|
|
104351
104359
|
import { z as z60 } from "zod";
|
|
104352
104360
|
var BASE_HOST6 = "https://business-api.tiktok.com";
|
|
104353
104361
|
var BASE_PATH_SEGMENT6 = "/open_api/v1.3";
|
|
104354
|
-
var
|
|
104362
|
+
var BASE_URL25 = `${BASE_HOST6}${BASE_PATH_SEGMENT6}`;
|
|
104355
104363
|
var REQUEST_TIMEOUT_MS45 = 6e4;
|
|
104356
104364
|
var cachedToken23 = null;
|
|
104357
104365
|
async function getProxyToken23(config) {
|
|
@@ -104428,7 +104436,7 @@ The advertiser_id is automatically injected if configured.`,
|
|
|
104428
104436
|
try {
|
|
104429
104437
|
const advertiserId = parameters47.advertiserId.tryGetValue(connection) ?? "";
|
|
104430
104438
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT6);
|
|
104431
|
-
let url = `${
|
|
104439
|
+
let url = `${BASE_URL25}${normalizedPath}`;
|
|
104432
104440
|
if (method === "GET") {
|
|
104433
104441
|
const params = new URLSearchParams(queryParams ?? {});
|
|
104434
104442
|
if (advertiserId && !params.has("advertiser_id")) {
|
|
@@ -105644,7 +105652,7 @@ var parameters51 = {
|
|
|
105644
105652
|
// ../connectors/src/connectors/gmail/tools/request-with-delegation.ts
|
|
105645
105653
|
var BASE_HOST7 = "https://gmail.googleapis.com";
|
|
105646
105654
|
var BASE_PATH_SEGMENT7 = "/gmail/v1/users";
|
|
105647
|
-
var
|
|
105655
|
+
var BASE_URL26 = `${BASE_HOST7}${BASE_PATH_SEGMENT7}`;
|
|
105648
105656
|
var REQUEST_TIMEOUT_MS49 = 6e4;
|
|
105649
105657
|
function decodeServiceAccount3(keyJsonBase64) {
|
|
105650
105658
|
const decoded = Buffer.from(keyJsonBase64, "base64").toString("utf-8");
|
|
@@ -105730,7 +105738,7 @@ var requestWithDelegationTool2 = new ConnectorTool({
|
|
|
105730
105738
|
};
|
|
105731
105739
|
}
|
|
105732
105740
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT7);
|
|
105733
|
-
let url = `${
|
|
105741
|
+
let url = `${BASE_URL26}${normalizedPath}`;
|
|
105734
105742
|
if (queryParams) {
|
|
105735
105743
|
const searchParams = new URLSearchParams(queryParams);
|
|
105736
105744
|
url += `?${searchParams.toString()}`;
|
|
@@ -106051,7 +106059,7 @@ for (const msg of messages.messages ?? []) {
|
|
|
106051
106059
|
import { z as z65 } from "zod";
|
|
106052
106060
|
var BASE_HOST8 = "https://gmail.googleapis.com";
|
|
106053
106061
|
var BASE_PATH_SEGMENT8 = "/gmail/v1/users";
|
|
106054
|
-
var
|
|
106062
|
+
var BASE_URL27 = `${BASE_HOST8}${BASE_PATH_SEGMENT8}`;
|
|
106055
106063
|
var REQUEST_TIMEOUT_MS50 = 6e4;
|
|
106056
106064
|
var cachedToken25 = null;
|
|
106057
106065
|
async function getProxyToken25(config) {
|
|
@@ -106128,7 +106136,7 @@ All paths are relative to https://gmail.googleapis.com/gmail/v1/users. Use '/me'
|
|
|
106128
106136
|
);
|
|
106129
106137
|
try {
|
|
106130
106138
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT8);
|
|
106131
|
-
let url = `${
|
|
106139
|
+
let url = `${BASE_URL27}${normalizedPath}`;
|
|
106132
106140
|
if (queryParams) {
|
|
106133
106141
|
const searchParams = new URLSearchParams(queryParams);
|
|
106134
106142
|
url += `?${searchParams.toString()}`;
|
|
@@ -106440,7 +106448,7 @@ var parameters53 = {
|
|
|
106440
106448
|
// ../connectors/src/connectors/google-audit-log/tools/request-with-delegation.ts
|
|
106441
106449
|
var BASE_HOST9 = "https://admin.googleapis.com";
|
|
106442
106450
|
var BASE_PATH_SEGMENT9 = "/admin/reports/v1";
|
|
106443
|
-
var
|
|
106451
|
+
var BASE_URL28 = `${BASE_HOST9}${BASE_PATH_SEGMENT9}`;
|
|
106444
106452
|
var REQUEST_TIMEOUT_MS51 = 6e4;
|
|
106445
106453
|
function decodeServiceAccount4(keyJsonBase64) {
|
|
106446
106454
|
const decoded = Buffer.from(keyJsonBase64, "base64").toString("utf-8");
|
|
@@ -106527,7 +106535,7 @@ var requestWithDelegationTool3 = new ConnectorTool({
|
|
|
106527
106535
|
};
|
|
106528
106536
|
}
|
|
106529
106537
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT9);
|
|
106530
|
-
let url = `${
|
|
106538
|
+
let url = `${BASE_URL28}${normalizedPath}`;
|
|
106531
106539
|
if (queryParams) {
|
|
106532
106540
|
const searchParams = new URLSearchParams(queryParams);
|
|
106533
106541
|
url += `?${searchParams.toString()}`;
|
|
@@ -106837,7 +106845,7 @@ export default async function handler(c: Context) {
|
|
|
106837
106845
|
|
|
106838
106846
|
// ../connectors/src/connectors/linkedin-ads/tools/list-ad-accounts.ts
|
|
106839
106847
|
import { z as z67 } from "zod";
|
|
106840
|
-
var
|
|
106848
|
+
var BASE_URL29 = "https://api.linkedin.com/rest/";
|
|
106841
106849
|
var LINKEDIN_VERSION = "202603";
|
|
106842
106850
|
var REQUEST_TIMEOUT_MS52 = 6e4;
|
|
106843
106851
|
var cachedToken26 = null;
|
|
@@ -106921,7 +106929,7 @@ var listAdAccountsTool3 = new ConnectorTool({
|
|
|
106921
106929
|
Authorization: `Bearer ${token}`
|
|
106922
106930
|
},
|
|
106923
106931
|
body: JSON.stringify({
|
|
106924
|
-
url: `${
|
|
106932
|
+
url: `${BASE_URL29}adAccounts?q=search&search=(status:(values:List(ACTIVE)))&pageSize=100`,
|
|
106925
106933
|
method: "GET",
|
|
106926
106934
|
headers: {
|
|
106927
106935
|
"LinkedIn-Version": LINKEDIN_VERSION,
|
|
@@ -107004,7 +107012,7 @@ var parameters54 = {
|
|
|
107004
107012
|
|
|
107005
107013
|
// ../connectors/src/connectors/linkedin-ads/tools/request.ts
|
|
107006
107014
|
import { z as z68 } from "zod";
|
|
107007
|
-
var
|
|
107015
|
+
var BASE_URL30 = "https://api.linkedin.com/rest/";
|
|
107008
107016
|
var LINKEDIN_VERSION2 = "202603";
|
|
107009
107017
|
var REQUEST_TIMEOUT_MS53 = 6e4;
|
|
107010
107018
|
var cachedToken27 = null;
|
|
@@ -107083,7 +107091,7 @@ Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatic
|
|
|
107083
107091
|
try {
|
|
107084
107092
|
const adAccountId = parameters54.adAccountId.tryGetValue(connection) ?? "";
|
|
107085
107093
|
const resolvedPath = adAccountId ? path4.replace(/\{adAccountId\}/g, adAccountId) : path4;
|
|
107086
|
-
let url = `${
|
|
107094
|
+
let url = `${BASE_URL30}${resolvedPath}`;
|
|
107087
107095
|
if (queryParams && Object.keys(queryParams).length > 0) {
|
|
107088
107096
|
const params = new URLSearchParams(queryParams);
|
|
107089
107097
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -108039,7 +108047,7 @@ var parameters57 = {
|
|
|
108039
108047
|
|
|
108040
108048
|
// ../connectors/src/connectors/intercom/tools/request.ts
|
|
108041
108049
|
import { z as z71 } from "zod";
|
|
108042
|
-
var
|
|
108050
|
+
var BASE_URL31 = "https://api.intercom.io";
|
|
108043
108051
|
var API_VERSION = "2.11";
|
|
108044
108052
|
var REQUEST_TIMEOUT_MS56 = 6e4;
|
|
108045
108053
|
var inputSchema71 = z71.object({
|
|
@@ -108089,7 +108097,7 @@ The Intercom-Version header is set to 2.11 automatically.`,
|
|
|
108089
108097
|
);
|
|
108090
108098
|
try {
|
|
108091
108099
|
const accessToken = parameters57.accessToken.getValue(connection);
|
|
108092
|
-
const url = `${
|
|
108100
|
+
const url = `${BASE_URL31}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
108093
108101
|
const controller = new AbortController();
|
|
108094
108102
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS56);
|
|
108095
108103
|
try {
|
|
@@ -108332,7 +108340,7 @@ export default async function handler(c: Context) {
|
|
|
108332
108340
|
|
|
108333
108341
|
// ../connectors/src/connectors/intercom-oauth/tools/request.ts
|
|
108334
108342
|
import { z as z72 } from "zod";
|
|
108335
|
-
var
|
|
108343
|
+
var BASE_URL32 = "https://api.intercom.io";
|
|
108336
108344
|
var REQUEST_TIMEOUT_MS57 = 6e4;
|
|
108337
108345
|
var cachedToken29 = null;
|
|
108338
108346
|
async function getProxyToken29(config) {
|
|
@@ -108409,7 +108417,7 @@ Search endpoints (contacts/search, conversations/search) use POST with a query o
|
|
|
108409
108417
|
`[connector-request] intercom-oauth/${connection.name}: ${method} ${path4}`
|
|
108410
108418
|
);
|
|
108411
108419
|
try {
|
|
108412
|
-
let url = `${
|
|
108420
|
+
let url = `${BASE_URL32}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
108413
108421
|
if (queryParams) {
|
|
108414
108422
|
const searchParams = new URLSearchParams(queryParams);
|
|
108415
108423
|
const separator = url.includes("?") ? "&" : "?";
|
|
@@ -109522,7 +109530,7 @@ var parameters62 = {
|
|
|
109522
109530
|
|
|
109523
109531
|
// ../connectors/src/connectors/gamma/tools/request.ts
|
|
109524
109532
|
import { z as z76 } from "zod";
|
|
109525
|
-
var
|
|
109533
|
+
var BASE_URL33 = "https://public-api.gamma.app/v1.0";
|
|
109526
109534
|
var REQUEST_TIMEOUT_MS61 = 6e4;
|
|
109527
109535
|
var inputSchema76 = z76.object({
|
|
109528
109536
|
toolUseIntent: z76.string().optional().describe(
|
|
@@ -109567,7 +109575,7 @@ For creating presentations/documents, prefer the gamma_generate tool instead.`,
|
|
|
109567
109575
|
);
|
|
109568
109576
|
try {
|
|
109569
109577
|
const apiKey = parameters62.apiKey.getValue(connection);
|
|
109570
|
-
const url = `${
|
|
109578
|
+
const url = `${BASE_URL33}${path4}`;
|
|
109571
109579
|
const controller = new AbortController();
|
|
109572
109580
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS61);
|
|
109573
109581
|
try {
|
|
@@ -109599,7 +109607,7 @@ For creating presentations/documents, prefer the gamma_generate tool instead.`,
|
|
|
109599
109607
|
|
|
109600
109608
|
// ../connectors/src/connectors/gamma/tools/generate.ts
|
|
109601
109609
|
import { z as z77 } from "zod";
|
|
109602
|
-
var
|
|
109610
|
+
var BASE_URL34 = "https://public-api.gamma.app/v1.0";
|
|
109603
109611
|
var POLL_INTERVAL_MS3 = 5e3;
|
|
109604
109612
|
var MAX_POLL_DURATION_MS = 3e5;
|
|
109605
109613
|
var inputSchema77 = z77.object({
|
|
@@ -109716,7 +109724,7 @@ Gamma does NOT support image uploads. To visualize data, embed raw numbers direc
|
|
|
109716
109724
|
if (textAmount) textOptions.amount = textAmount;
|
|
109717
109725
|
if (Object.keys(textOptions).length > 0) body.textOptions = textOptions;
|
|
109718
109726
|
if (imageSource) body.imageOptions = { source: imageSource };
|
|
109719
|
-
const createRes = await fetch(`${
|
|
109727
|
+
const createRes = await fetch(`${BASE_URL34}/generations`, {
|
|
109720
109728
|
method: "POST",
|
|
109721
109729
|
headers,
|
|
109722
109730
|
body: JSON.stringify(body)
|
|
@@ -109736,7 +109744,7 @@ Gamma does NOT support image uploads. To visualize data, embed raw numbers direc
|
|
|
109736
109744
|
const deadline = Date.now() + MAX_POLL_DURATION_MS;
|
|
109737
109745
|
while (Date.now() < deadline) {
|
|
109738
109746
|
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS3));
|
|
109739
|
-
const pollRes = await fetch(`${
|
|
109747
|
+
const pollRes = await fetch(`${BASE_URL34}/generations/${generationId}`, {
|
|
109740
109748
|
method: "GET",
|
|
109741
109749
|
headers
|
|
109742
109750
|
});
|
|
@@ -109974,7 +109982,7 @@ var parameters63 = {
|
|
|
109974
109982
|
|
|
109975
109983
|
// ../connectors/src/connectors/sentry/tools/request.ts
|
|
109976
109984
|
import { z as z78 } from "zod";
|
|
109977
|
-
var
|
|
109985
|
+
var BASE_URL35 = "https://sentry.io/api/0";
|
|
109978
109986
|
var REQUEST_TIMEOUT_MS62 = 6e4;
|
|
109979
109987
|
var inputSchema78 = z78.object({
|
|
109980
109988
|
toolUseIntent: z78.string().optional().describe(
|
|
@@ -110024,7 +110032,7 @@ Authentication is handled automatically via Bearer token.
|
|
|
110024
110032
|
/\{organizationSlug\}/g,
|
|
110025
110033
|
organizationSlug
|
|
110026
110034
|
);
|
|
110027
|
-
const url = `${
|
|
110035
|
+
const url = `${BASE_URL35}${resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
|
|
110028
110036
|
const controller = new AbortController();
|
|
110029
110037
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS62);
|
|
110030
110038
|
try {
|
|
@@ -111037,7 +111045,7 @@ var parameters66 = {
|
|
|
111037
111045
|
|
|
111038
111046
|
// ../connectors/src/connectors/monday/tools/request.ts
|
|
111039
111047
|
import { z as z81 } from "zod";
|
|
111040
|
-
var
|
|
111048
|
+
var BASE_URL36 = "https://api.monday.com/v2";
|
|
111041
111049
|
var REQUEST_TIMEOUT_MS65 = 6e4;
|
|
111042
111050
|
var inputSchema81 = z81.object({
|
|
111043
111051
|
toolUseIntent: z81.string().optional().describe(
|
|
@@ -111095,7 +111103,7 @@ Items are paginated with a cursor-based \`items_page(limit, cursor)\` field on a
|
|
|
111095
111103
|
"Content-Type": "application/json"
|
|
111096
111104
|
};
|
|
111097
111105
|
if (apiVersion) headers["API-Version"] = apiVersion;
|
|
111098
|
-
const response = await fetch(
|
|
111106
|
+
const response = await fetch(BASE_URL36, {
|
|
111099
111107
|
method: "POST",
|
|
111100
111108
|
headers,
|
|
111101
111109
|
body: JSON.stringify(body),
|
|
@@ -112161,7 +112169,7 @@ var parameters68 = {
|
|
|
112161
112169
|
};
|
|
112162
112170
|
|
|
112163
112171
|
// ../connectors/src/connectors/semrush/tools/request.ts
|
|
112164
|
-
var
|
|
112172
|
+
var BASE_URL37 = "https://api.semrush.com";
|
|
112165
112173
|
var REQUEST_TIMEOUT_MS66 = 6e4;
|
|
112166
112174
|
var inputSchema83 = z83.object({
|
|
112167
112175
|
toolUseIntent: z83.string().optional().describe(
|
|
@@ -112241,7 +112249,7 @@ Errors from the Standard API are returned as a plain text body starting with "ER
|
|
|
112241
112249
|
}
|
|
112242
112250
|
}
|
|
112243
112251
|
const url = new URL(
|
|
112244
|
-
isAbsolute ? path4 : `${
|
|
112252
|
+
isAbsolute ? path4 : `${BASE_URL37}${path4.startsWith("/") ? "" : "/"}${path4}`
|
|
112245
112253
|
);
|
|
112246
112254
|
if (queryParams) {
|
|
112247
112255
|
for (const [k6, v] of Object.entries(queryParams)) {
|
|
@@ -112599,7 +112607,7 @@ API \u30E6\u30CB\u30C3\u30C8\u6B8B\u91CF\u306E\u78BA\u8A8D\uFF08\u7121\u6599\u30
|
|
|
112599
112607
|
|
|
112600
112608
|
// ../connectors/src/connectors/google-search-console-oauth/tools/list-sites.ts
|
|
112601
112609
|
import { z as z84 } from "zod";
|
|
112602
|
-
var
|
|
112610
|
+
var BASE_URL38 = "https://searchconsole.googleapis.com/webmasters/v3";
|
|
112603
112611
|
var REQUEST_TIMEOUT_MS67 = 6e4;
|
|
112604
112612
|
var cachedToken30 = null;
|
|
112605
112613
|
async function getProxyToken30(config) {
|
|
@@ -112670,7 +112678,7 @@ var listSitesTool = new ConnectorTool({
|
|
|
112670
112678
|
`[connector-request] google-search-console-oauth/${connection.name}: listSites`
|
|
112671
112679
|
);
|
|
112672
112680
|
try {
|
|
112673
|
-
const url = `${
|
|
112681
|
+
const url = `${BASE_URL38}/sites`;
|
|
112674
112682
|
const token = await getProxyToken30(config.oauthProxy);
|
|
112675
112683
|
const proxyUrl = `https://${config.oauthProxy.sandboxId}.${config.oauthProxy.previewBaseDomain}/_sqcore/connections/${connectionId}/request`;
|
|
112676
112684
|
const controller = new AbortController();
|
|
@@ -112769,7 +112777,7 @@ var parameters69 = {
|
|
|
112769
112777
|
import { z as z85 } from "zod";
|
|
112770
112778
|
var BASE_HOST10 = "https://searchconsole.googleapis.com";
|
|
112771
112779
|
var BASE_PATH_SEGMENT10 = "/webmasters/v3";
|
|
112772
|
-
var
|
|
112780
|
+
var BASE_URL39 = `${BASE_HOST10}${BASE_PATH_SEGMENT10}`;
|
|
112773
112781
|
var REQUEST_TIMEOUT_MS68 = 6e4;
|
|
112774
112782
|
var cachedToken31 = null;
|
|
112775
112783
|
async function getProxyToken31(config) {
|
|
@@ -112854,7 +112862,7 @@ For URL Inspection API requests, use the absolute path '/v1/urlInspection/index:
|
|
|
112854
112862
|
resolvedPath,
|
|
112855
112863
|
BASE_PATH_SEGMENT10
|
|
112856
112864
|
);
|
|
112857
|
-
let url = `${
|
|
112865
|
+
let url = `${BASE_URL39}${normalizedPath}`;
|
|
112858
112866
|
if (queryParams) {
|
|
112859
112867
|
const searchParams = new URLSearchParams(queryParams);
|
|
112860
112868
|
url += `?${searchParams.toString()}`;
|
|
@@ -113344,7 +113352,7 @@ var parameters71 = {
|
|
|
113344
113352
|
import { z as z87 } from "zod";
|
|
113345
113353
|
var BASE_HOST11 = "https://api.clickup.com";
|
|
113346
113354
|
var BASE_PATH_SEGMENT11 = "/api/v2";
|
|
113347
|
-
var
|
|
113355
|
+
var BASE_URL40 = `${BASE_HOST11}${BASE_PATH_SEGMENT11}`;
|
|
113348
113356
|
var REQUEST_TIMEOUT_MS69 = 6e4;
|
|
113349
113357
|
var inputSchema87 = z87.object({
|
|
113350
113358
|
toolUseIntent: z87.string().optional().describe(
|
|
@@ -113417,7 +113425,7 @@ Pagination: ClickUp uses zero-indexed \`page\` query parameter on list endpoints
|
|
|
113417
113425
|
try {
|
|
113418
113426
|
const token = parameters71.apiToken.getValue(connection);
|
|
113419
113427
|
const normalizedPath = normalizeRequestPath(path4, BASE_PATH_SEGMENT11);
|
|
113420
|
-
const url = `${
|
|
113428
|
+
const url = `${BASE_URL40}${normalizedPath}`;
|
|
113421
113429
|
const controller = new AbortController();
|
|
113422
113430
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS69);
|
|
113423
113431
|
try {
|