@tangle-network/agent-integrations 0.53.26 → 0.53.27
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/catalog.js +5 -5
- package/dist/{chunk-XZL47RBS.js → chunk-4H5F6E7W.js} +299 -46
- package/dist/{chunk-XZL47RBS.js.map → chunk-4H5F6E7W.js.map} +1 -1
- package/dist/{chunk-M4AXWKHK.js → chunk-J7CBKM7C.js} +2 -2
- package/dist/{chunk-OZWBZGDN.js → chunk-LBJJMBVE.js} +2 -1
- package/dist/chunk-LBJJMBVE.js.map +1 -0
- package/dist/{chunk-ZR55ERGY.js → chunk-RUHXNRQU.js} +3 -3
- package/dist/{chunk-WSRMGVHS.js → chunk-TMYH36VV.js} +3 -3
- package/dist/connectors/adapters/index.d.ts +3 -1
- package/dist/connectors/adapters/index.js +3 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +4 -2
- package/dist/coverage-catalog.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -5
- package/dist/mcp.js +5 -5
- package/dist/registry.js +5 -5
- package/dist/runtime.js +5 -5
- package/dist/specs.js +4 -4
- package/docs/integration-execution-audit.md +18 -17
- package/docs/integration-execution-matrix.json +9 -9
- package/package.json +1 -1
- package/dist/chunk-OZWBZGDN.js.map +0 -1
- /package/dist/{chunk-M4AXWKHK.js.map → chunk-J7CBKM7C.js.map} +0 -0
- /package/dist/{chunk-ZR55ERGY.js.map → chunk-RUHXNRQU.js.map} +0 -0
- /package/dist/{chunk-WSRMGVHS.js.map → chunk-TMYH36VV.js.map} +0 -0
package/dist/catalog.js
CHANGED
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
parseIntegrationToolName,
|
|
8
8
|
searchIntegrationTools,
|
|
9
9
|
toMcpTools
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TMYH36VV.js";
|
|
11
11
|
import "./chunk-XGL345YX.js";
|
|
12
12
|
import "./chunk-ANWNXGVV.js";
|
|
13
13
|
import "./chunk-H4XYLS7T.js";
|
|
14
14
|
import "./chunk-FK4ENHCP.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-RUHXNRQU.js";
|
|
16
|
+
import "./chunk-LBJJMBVE.js";
|
|
17
17
|
import "./chunk-P4FFI752.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-J7CBKM7C.js";
|
|
19
|
+
import "./chunk-4H5F6E7W.js";
|
|
20
20
|
import "./chunk-XC54EOUQ.js";
|
|
21
21
|
import "./chunk-JXFPIZ3O.js";
|
|
22
22
|
import "./chunk-PZ5AY32C.js";
|
|
@@ -143,6 +143,7 @@ __export(adapters_exports, {
|
|
|
143
143
|
chatsistantConnector: () => chatsistantConnector,
|
|
144
144
|
chatwootConnector: () => chatwootConnector,
|
|
145
145
|
checkoutConnector: () => checkoutConnector,
|
|
146
|
+
chessComConnector: () => chessComConnector,
|
|
146
147
|
circleConnector: () => circleConnector,
|
|
147
148
|
classifyGoogleError: () => classifyGoogleError,
|
|
148
149
|
classifyGoogleReason: () => classifyGoogleReason,
|
|
@@ -741,10 +742,10 @@ function canonicalUri(pathname, service) {
|
|
|
741
742
|
if (!pathname) return "/";
|
|
742
743
|
if (service === "s3") return pathname;
|
|
743
744
|
const segments = [];
|
|
744
|
-
for (const
|
|
745
|
-
if (
|
|
746
|
-
if (
|
|
747
|
-
else segments.push(
|
|
745
|
+
for (const segment2 of pathname.split("/")) {
|
|
746
|
+
if (segment2.length === 0 || segment2 === ".") continue;
|
|
747
|
+
if (segment2 === "..") segments.pop();
|
|
748
|
+
else segments.push(segment2);
|
|
748
749
|
}
|
|
749
750
|
const normalized = `/${segments.join("/")}${segments.length > 0 && pathname.endsWith("/") ? "/" : ""}`;
|
|
750
751
|
return awsUriEncode(normalized).replace(/%2F/g, "/");
|
|
@@ -12080,7 +12081,7 @@ function requiredContainer(value, allowSystem = true) {
|
|
|
12080
12081
|
function requiredBlobName(value) {
|
|
12081
12082
|
const name = requiredString3(value, "blobName");
|
|
12082
12083
|
if (name.length > 1024) throw new Error("blobName cannot exceed 1024 characters");
|
|
12083
|
-
if (name.split("/").some((
|
|
12084
|
+
if (name.split("/").some((segment2) => segment2 === "." || segment2 === "..")) {
|
|
12084
12085
|
throw new Error("blobName cannot contain dot path segments");
|
|
12085
12086
|
}
|
|
12086
12087
|
return name;
|
|
@@ -12880,9 +12881,9 @@ ${expiry}`, "utf8").digest("base64");
|
|
|
12880
12881
|
}
|
|
12881
12882
|
throw new Error(`Azure Service Bus request failed with HTTP ${response.status}: ${redactProviderText(text).slice(0, 500)}`);
|
|
12882
12883
|
}
|
|
12883
|
-
function encodePathSegment2(
|
|
12884
|
-
if (
|
|
12885
|
-
return encodeURIComponent(
|
|
12884
|
+
function encodePathSegment2(segment2) {
|
|
12885
|
+
if (segment2 === "$Resources" || segment2 === "$DeadLetterQueue") return segment2;
|
|
12886
|
+
return encodeURIComponent(segment2);
|
|
12886
12887
|
}
|
|
12887
12888
|
function entityName(value, field) {
|
|
12888
12889
|
const name = requiredString5(value, field);
|
|
@@ -12980,7 +12981,7 @@ function parseAtomFeed(xml) {
|
|
|
12980
12981
|
};
|
|
12981
12982
|
}
|
|
12982
12983
|
function parseAtomEntry(xml) {
|
|
12983
|
-
const
|
|
12984
|
+
const title2 = xmlValue(xml, "title");
|
|
12984
12985
|
const id2 = xmlValue(xml, "id");
|
|
12985
12986
|
const updated = xmlValue(xml, "updated");
|
|
12986
12987
|
const properties = {};
|
|
@@ -12990,7 +12991,7 @@ function parseAtomEntry(xml) {
|
|
|
12990
12991
|
const raw = decodeXml2(match[2]);
|
|
12991
12992
|
properties[key] = xmlScalar(raw);
|
|
12992
12993
|
}
|
|
12993
|
-
return { title, id: id2, updated, properties };
|
|
12994
|
+
return { title: title2, id: id2, updated, properties };
|
|
12994
12995
|
}
|
|
12995
12996
|
function xmlValue(xml, tag) {
|
|
12996
12997
|
const match = xml.match(new RegExp(`<(?:[A-Za-z0-9]+:)?${tag}\\b[^>]*>([^<]*)<\\/(?:[A-Za-z0-9]+:)?${tag}>`, "i"));
|
|
@@ -19608,6 +19609,256 @@ var checkoutConnector = declarativeRestConnector({
|
|
|
19608
19609
|
]
|
|
19609
19610
|
});
|
|
19610
19611
|
|
|
19612
|
+
// src/connectors/adapters/chess-com.ts
|
|
19613
|
+
var API_ORIGIN = "https://api.chess.com";
|
|
19614
|
+
var DEFAULT_TIMEOUT_MS = 15e3;
|
|
19615
|
+
var MAX_RESPONSE_BYTES3 = 5 * 1024 * 1024;
|
|
19616
|
+
var USERNAME_PATTERN = /^[A-Za-z0-9_-]{3,25}$/;
|
|
19617
|
+
var SLUG_PATTERN = /^[A-Za-z0-9_-]{1,100}$/;
|
|
19618
|
+
var TITLES = ["GM", "WGM", "IM", "WIM", "FM", "WFM", "NM", "WNM", "CM", "WCM"];
|
|
19619
|
+
var usernameProperty = {
|
|
19620
|
+
type: "string",
|
|
19621
|
+
description: "Chess.com username, without a profile URL.",
|
|
19622
|
+
pattern: USERNAME_PATTERN.source
|
|
19623
|
+
};
|
|
19624
|
+
var slugProperty = {
|
|
19625
|
+
type: "string",
|
|
19626
|
+
description: "Chess.com URL id (the final path segment of the public page URL).",
|
|
19627
|
+
pattern: SLUG_PATTERN.source
|
|
19628
|
+
};
|
|
19629
|
+
var CAPABILITIES = [
|
|
19630
|
+
readCapability3("get.player.profile", "Get the public profile for a Chess.com player.", { username: usernameProperty }, ["username"]),
|
|
19631
|
+
readCapability3("get.player.stats", "Get ratings and game statistics for a Chess.com player.", { username: usernameProperty }, ["username"]),
|
|
19632
|
+
readCapability3("player.current-games", "List a player\u2019s currently ongoing daily games.", { username: usernameProperty }, ["username"]),
|
|
19633
|
+
readCapability3("player.game-archives", "List the monthly game archive URLs available for a player.", { username: usernameProperty }, ["username"]),
|
|
19634
|
+
readCapability3("player.monthly-games", "Get a player\u2019s games for one calendar month as structured JSON.", {
|
|
19635
|
+
username: usernameProperty,
|
|
19636
|
+
year: { type: "integer", minimum: 2007, maximum: 2100 },
|
|
19637
|
+
month: { type: "integer", minimum: 1, maximum: 12 }
|
|
19638
|
+
}, ["username", "year", "month"]),
|
|
19639
|
+
readCapability3("player.monthly-pgn", "Get a player\u2019s games for one calendar month as a PGN document.", {
|
|
19640
|
+
username: usernameProperty,
|
|
19641
|
+
year: { type: "integer", minimum: 2007, maximum: 2100 },
|
|
19642
|
+
month: { type: "integer", minimum: 1, maximum: 12 }
|
|
19643
|
+
}, ["username", "year", "month"]),
|
|
19644
|
+
readCapability3("player.clubs", "List the public clubs a player belongs to.", { username: usernameProperty }, ["username"]),
|
|
19645
|
+
readCapability3("player.matches", "List a player\u2019s current and finished team matches.", { username: usernameProperty }, ["username"]),
|
|
19646
|
+
readCapability3("player.tournaments", "List a player\u2019s current, registered, and finished tournaments.", { username: usernameProperty }, ["username"]),
|
|
19647
|
+
readCapability3("get.daily.puzzle", "Get the current Chess.com daily puzzle.", {}),
|
|
19648
|
+
readCapability3("puzzle.random", "Get a random Chess.com puzzle.", {}),
|
|
19649
|
+
readCapability3("players.titled", "List usernames holding a FIDE or national chess title.", {
|
|
19650
|
+
title: { type: "string", enum: [...TITLES] }
|
|
19651
|
+
}, ["title"]),
|
|
19652
|
+
readCapability3("leaderboards.get", "Get current Chess.com leaderboards.", {}),
|
|
19653
|
+
readCapability3("streamers.list", "List Chess.com streamers and their public channels.", {}),
|
|
19654
|
+
readCapability3("country.get", "Get public information for a country.", {
|
|
19655
|
+
country: { type: "string", description: "Two-letter ISO 3166 country code.", pattern: "^[A-Za-z]{2}$" }
|
|
19656
|
+
}, ["country"]),
|
|
19657
|
+
readCapability3("country.players", "List Chess.com players registered to a country.", {
|
|
19658
|
+
country: { type: "string", description: "Two-letter ISO 3166 country code.", pattern: "^[A-Za-z]{2}$" }
|
|
19659
|
+
}, ["country"]),
|
|
19660
|
+
readCapability3("country.clubs", "List Chess.com clubs registered to a country.", {
|
|
19661
|
+
country: { type: "string", description: "Two-letter ISO 3166 country code.", pattern: "^[A-Za-z]{2}$" }
|
|
19662
|
+
}, ["country"]),
|
|
19663
|
+
readCapability3("club.get", "Get public information for a Chess.com club.", { club: slugProperty }, ["club"]),
|
|
19664
|
+
readCapability3("club.members", "List members of a Chess.com club, grouped by activity.", { club: slugProperty }, ["club"]),
|
|
19665
|
+
readCapability3("club.matches", "List a Chess.com club\u2019s current and finished team matches.", { club: slugProperty }, ["club"]),
|
|
19666
|
+
readCapability3("club.admins", "List public administrators for a Chess.com club.", { club: slugProperty }, ["club"]),
|
|
19667
|
+
readCapability3("tournament.get", "Get public details for a Chess.com tournament.", { tournament: slugProperty }, ["tournament"]),
|
|
19668
|
+
readCapability3("tournament.round", "Get one round of a Chess.com tournament.", {
|
|
19669
|
+
tournament: slugProperty,
|
|
19670
|
+
round: { type: "integer", minimum: 1 }
|
|
19671
|
+
}, ["tournament", "round"]),
|
|
19672
|
+
readCapability3("tournament.group", "Get one group within a Chess.com tournament round.", {
|
|
19673
|
+
tournament: slugProperty,
|
|
19674
|
+
round: { type: "integer", minimum: 1 },
|
|
19675
|
+
group: { type: "integer", minimum: 1 }
|
|
19676
|
+
}, ["tournament", "round", "group"])
|
|
19677
|
+
];
|
|
19678
|
+
var chessComConnector = {
|
|
19679
|
+
manifest: {
|
|
19680
|
+
kind: "chess-com",
|
|
19681
|
+
displayName: "Chess.com",
|
|
19682
|
+
description: "Read public Chess.com profiles, ratings, games, puzzles, leaderboards, clubs, countries, tournaments, and streaming data without credentials.",
|
|
19683
|
+
auth: { kind: "none" },
|
|
19684
|
+
category: "other",
|
|
19685
|
+
defaultConsistencyModel: "cache",
|
|
19686
|
+
rateLimit: { requests: 60, windowMs: 6e4, scope: "data-source" },
|
|
19687
|
+
capabilities: CAPABILITIES
|
|
19688
|
+
},
|
|
19689
|
+
async executeRead(inv) {
|
|
19690
|
+
const path = route(inv.capabilityName, inv.args);
|
|
19691
|
+
const response = await fetch(`${API_ORIGIN}${path}`, {
|
|
19692
|
+
method: "GET",
|
|
19693
|
+
headers: {
|
|
19694
|
+
accept: inv.capabilityName === "player.monthly-pgn" ? "application/x-chess-pgn, text/plain;q=0.9" : "application/json",
|
|
19695
|
+
"user-agent": "Tangle-Integrations/1.0 (+https://tangle.tools)"
|
|
19696
|
+
},
|
|
19697
|
+
signal: AbortSignal.timeout(DEFAULT_TIMEOUT_MS)
|
|
19698
|
+
});
|
|
19699
|
+
const body = await readBoundedBody(response);
|
|
19700
|
+
if (!response.ok) {
|
|
19701
|
+
const detail = body.length > 200 ? `${body.slice(0, 200)}\u2026` : body;
|
|
19702
|
+
throw new Error(`Chess.com ${inv.capabilityName} failed: ${response.status} ${detail || response.statusText}`);
|
|
19703
|
+
}
|
|
19704
|
+
return {
|
|
19705
|
+
data: parseBody(body, response.headers.get("content-type")),
|
|
19706
|
+
etag: response.headers.get("etag") ?? response.headers.get("last-modified") ?? void 0,
|
|
19707
|
+
fetchedAt: Date.now()
|
|
19708
|
+
};
|
|
19709
|
+
},
|
|
19710
|
+
async test() {
|
|
19711
|
+
try {
|
|
19712
|
+
const response = await fetch(`${API_ORIGIN}/pub/leaderboards`, {
|
|
19713
|
+
method: "GET",
|
|
19714
|
+
headers: {
|
|
19715
|
+
accept: "application/json",
|
|
19716
|
+
"user-agent": "Tangle-Integrations/1.0 (+https://tangle.tools)"
|
|
19717
|
+
},
|
|
19718
|
+
signal: AbortSignal.timeout(DEFAULT_TIMEOUT_MS)
|
|
19719
|
+
});
|
|
19720
|
+
return response.ok ? { ok: true } : { ok: false, reason: `Chess.com public API returned ${response.status}` };
|
|
19721
|
+
} catch (error) {
|
|
19722
|
+
return { ok: false, reason: error instanceof Error ? error.message : String(error) };
|
|
19723
|
+
}
|
|
19724
|
+
}
|
|
19725
|
+
};
|
|
19726
|
+
function readCapability3(name, description, properties, required = []) {
|
|
19727
|
+
return {
|
|
19728
|
+
name,
|
|
19729
|
+
class: "read",
|
|
19730
|
+
description,
|
|
19731
|
+
parameters: {
|
|
19732
|
+
type: "object",
|
|
19733
|
+
properties,
|
|
19734
|
+
...required.length > 0 ? { required } : {},
|
|
19735
|
+
additionalProperties: false
|
|
19736
|
+
}
|
|
19737
|
+
};
|
|
19738
|
+
}
|
|
19739
|
+
function route(capabilityName, args) {
|
|
19740
|
+
const username = () => segment(args.username, "username", USERNAME_PATTERN);
|
|
19741
|
+
const club = () => segment(args.club, "club", SLUG_PATTERN);
|
|
19742
|
+
const tournament = () => segment(args.tournament, "tournament", SLUG_PATTERN);
|
|
19743
|
+
switch (capabilityName) {
|
|
19744
|
+
case "get.player.profile":
|
|
19745
|
+
return `/pub/player/${username()}`;
|
|
19746
|
+
case "get.player.stats":
|
|
19747
|
+
return `/pub/player/${username()}/stats`;
|
|
19748
|
+
case "player.current-games":
|
|
19749
|
+
return `/pub/player/${username()}/games/current`;
|
|
19750
|
+
case "player.game-archives":
|
|
19751
|
+
return `/pub/player/${username()}/games/archives`;
|
|
19752
|
+
case "player.monthly-games":
|
|
19753
|
+
return `/pub/player/${username()}/games/${integer(args.year, "year", 2007, 2100)}/${month(args.month)}`;
|
|
19754
|
+
case "player.monthly-pgn":
|
|
19755
|
+
return `/pub/player/${username()}/games/${integer(args.year, "year", 2007, 2100)}/${month(args.month)}/pgn`;
|
|
19756
|
+
case "player.clubs":
|
|
19757
|
+
return `/pub/player/${username()}/clubs`;
|
|
19758
|
+
case "player.matches":
|
|
19759
|
+
return `/pub/player/${username()}/matches`;
|
|
19760
|
+
case "player.tournaments":
|
|
19761
|
+
return `/pub/player/${username()}/tournaments`;
|
|
19762
|
+
case "get.daily.puzzle":
|
|
19763
|
+
return "/pub/puzzle";
|
|
19764
|
+
case "puzzle.random":
|
|
19765
|
+
return "/pub/puzzle/random";
|
|
19766
|
+
case "players.titled":
|
|
19767
|
+
return `/pub/titled/${title(args.title)}`;
|
|
19768
|
+
case "leaderboards.get":
|
|
19769
|
+
return "/pub/leaderboards";
|
|
19770
|
+
case "streamers.list":
|
|
19771
|
+
return "/pub/streamers";
|
|
19772
|
+
case "country.get":
|
|
19773
|
+
return `/pub/country/${country(args.country)}`;
|
|
19774
|
+
case "country.players":
|
|
19775
|
+
return `/pub/country/${country(args.country)}/players`;
|
|
19776
|
+
case "country.clubs":
|
|
19777
|
+
return `/pub/country/${country(args.country)}/clubs`;
|
|
19778
|
+
case "club.get":
|
|
19779
|
+
return `/pub/club/${club()}`;
|
|
19780
|
+
case "club.members":
|
|
19781
|
+
return `/pub/club/${club()}/members`;
|
|
19782
|
+
case "club.matches":
|
|
19783
|
+
return `/pub/club/${club()}/matches`;
|
|
19784
|
+
case "club.admins":
|
|
19785
|
+
return `/pub/club/${club()}/admin`;
|
|
19786
|
+
case "tournament.get":
|
|
19787
|
+
return `/pub/tournament/${tournament()}`;
|
|
19788
|
+
case "tournament.round":
|
|
19789
|
+
return `/pub/tournament/${tournament()}/${integer(args.round, "round", 1, 1e6)}`;
|
|
19790
|
+
case "tournament.group":
|
|
19791
|
+
return `/pub/tournament/${tournament()}/${integer(args.round, "round", 1, 1e6)}/${integer(args.group, "group", 1, 1e6)}`;
|
|
19792
|
+
default:
|
|
19793
|
+
throw new Error(`Chess.com does not support capability ${capabilityName}`);
|
|
19794
|
+
}
|
|
19795
|
+
}
|
|
19796
|
+
function segment(value, label, pattern) {
|
|
19797
|
+
if (typeof value !== "string" || !pattern.test(value)) {
|
|
19798
|
+
throw new Error(`${label} has an invalid Chess.com path value`);
|
|
19799
|
+
}
|
|
19800
|
+
return encodeURIComponent(value.toLowerCase());
|
|
19801
|
+
}
|
|
19802
|
+
function integer(value, label, minimum, maximum) {
|
|
19803
|
+
if (!Number.isInteger(value) || value < minimum || value > maximum) {
|
|
19804
|
+
throw new Error(`${label} must be an integer from ${minimum} to ${maximum}`);
|
|
19805
|
+
}
|
|
19806
|
+
return value;
|
|
19807
|
+
}
|
|
19808
|
+
function month(value) {
|
|
19809
|
+
return String(integer(value, "month", 1, 12)).padStart(2, "0");
|
|
19810
|
+
}
|
|
19811
|
+
function country(value) {
|
|
19812
|
+
if (typeof value !== "string" || !/^[A-Za-z]{2}$/.test(value)) {
|
|
19813
|
+
throw new Error("country must be a two-letter ISO 3166 code");
|
|
19814
|
+
}
|
|
19815
|
+
return value.toUpperCase();
|
|
19816
|
+
}
|
|
19817
|
+
function title(value) {
|
|
19818
|
+
if (typeof value !== "string" || !TITLES.includes(value.toUpperCase())) {
|
|
19819
|
+
throw new Error(`title must be one of ${TITLES.join(", ")}`);
|
|
19820
|
+
}
|
|
19821
|
+
return value.toUpperCase();
|
|
19822
|
+
}
|
|
19823
|
+
async function readBoundedBody(response) {
|
|
19824
|
+
const declaredLength = Number(response.headers.get("content-length"));
|
|
19825
|
+
if (Number.isFinite(declaredLength) && declaredLength > MAX_RESPONSE_BYTES3) {
|
|
19826
|
+
throw new Error(`Chess.com response exceeds ${MAX_RESPONSE_BYTES3} bytes`);
|
|
19827
|
+
}
|
|
19828
|
+
if (!response.body) return "";
|
|
19829
|
+
const reader = response.body.getReader();
|
|
19830
|
+
const chunks = [];
|
|
19831
|
+
let total = 0;
|
|
19832
|
+
while (true) {
|
|
19833
|
+
const { done, value } = await reader.read();
|
|
19834
|
+
if (done) break;
|
|
19835
|
+
total += value.byteLength;
|
|
19836
|
+
if (total > MAX_RESPONSE_BYTES3) {
|
|
19837
|
+
await reader.cancel();
|
|
19838
|
+
throw new Error(`Chess.com response exceeds ${MAX_RESPONSE_BYTES3} bytes`);
|
|
19839
|
+
}
|
|
19840
|
+
chunks.push(value);
|
|
19841
|
+
}
|
|
19842
|
+
const bytes = new Uint8Array(total);
|
|
19843
|
+
let offset = 0;
|
|
19844
|
+
for (const chunk of chunks) {
|
|
19845
|
+
bytes.set(chunk, offset);
|
|
19846
|
+
offset += chunk.byteLength;
|
|
19847
|
+
}
|
|
19848
|
+
return new TextDecoder().decode(bytes);
|
|
19849
|
+
}
|
|
19850
|
+
function parseBody(body, contentType) {
|
|
19851
|
+
if (body.length === 0) return null;
|
|
19852
|
+
if (contentType?.includes("json")) {
|
|
19853
|
+
try {
|
|
19854
|
+
return JSON.parse(body);
|
|
19855
|
+
} catch {
|
|
19856
|
+
throw new Error("Chess.com returned malformed JSON");
|
|
19857
|
+
}
|
|
19858
|
+
}
|
|
19859
|
+
return body;
|
|
19860
|
+
}
|
|
19861
|
+
|
|
19611
19862
|
// src/connectors/adapters/docuseal.ts
|
|
19612
19863
|
import { createHmac as createHmac4, timingSafeEqual as timingSafeEqual2 } from "crypto";
|
|
19613
19864
|
var DEFAULT_BASE = "https://api.docuseal.com";
|
|
@@ -25307,7 +25558,7 @@ import { createHash as createHash5, createSign } from "crypto";
|
|
|
25307
25558
|
var TOKEN_URL3 = "https://oauth2.googleapis.com/token";
|
|
25308
25559
|
var API_ROOT = "https://pubsub.googleapis.com/v1";
|
|
25309
25560
|
var PUBSUB_SCOPE = "https://www.googleapis.com/auth/pubsub";
|
|
25310
|
-
var
|
|
25561
|
+
var MAX_RESPONSE_BYTES4 = 8 * 1024 * 1024;
|
|
25311
25562
|
var MAX_REQUEST_BYTES = 1e7;
|
|
25312
25563
|
var MAX_TOKEN_CACHE_ENTRIES = 256;
|
|
25313
25564
|
var tokenCache = /* @__PURE__ */ new Map();
|
|
@@ -25328,11 +25579,11 @@ var googlePubSubConnector = {
|
|
|
25328
25579
|
defaultConsistencyModel: "advisory",
|
|
25329
25580
|
rateLimit: { requests: 600, windowMs: 6e4, scope: "data-source" },
|
|
25330
25581
|
capabilities: [
|
|
25331
|
-
|
|
25582
|
+
readCapability4("topics.list", "List topics in the service account project.", {
|
|
25332
25583
|
pageSize: { type: "integer", minimum: 1, maximum: 1e3 },
|
|
25333
25584
|
pageToken: { type: "string" }
|
|
25334
25585
|
}),
|
|
25335
|
-
|
|
25586
|
+
readCapability4("topics.get", "Get one topic and its server-side configuration.", {
|
|
25336
25587
|
topic: { type: "string", description: "Topic ID in the service account project." }
|
|
25337
25588
|
}, ["topic"]),
|
|
25338
25589
|
mutationCapability4("topics.create", "Create a topic in the service account project.", {
|
|
@@ -25355,11 +25606,11 @@ var googlePubSubConnector = {
|
|
|
25355
25606
|
description: "Messages with either text (UTF-8) or data (base64), plus optional string attributes and orderingKey."
|
|
25356
25607
|
}
|
|
25357
25608
|
}, ["topic", "messages"]),
|
|
25358
|
-
|
|
25609
|
+
readCapability4("subscriptions.list", "List subscriptions in the service account project.", {
|
|
25359
25610
|
pageSize: { type: "integer", minimum: 1, maximum: 1e3 },
|
|
25360
25611
|
pageToken: { type: "string" }
|
|
25361
25612
|
}),
|
|
25362
|
-
|
|
25613
|
+
readCapability4("subscriptions.get", "Get one subscription and its delivery configuration.", {
|
|
25363
25614
|
subscription: { type: "string" }
|
|
25364
25615
|
}, ["subscription"]),
|
|
25365
25616
|
mutationCapability4("subscriptions.create", "Create a pull subscription for a topic.", {
|
|
@@ -25521,7 +25772,7 @@ var googlePubSubConnector = {
|
|
|
25521
25772
|
}
|
|
25522
25773
|
}
|
|
25523
25774
|
};
|
|
25524
|
-
function
|
|
25775
|
+
function readCapability4(name, description, properties, required = []) {
|
|
25525
25776
|
return {
|
|
25526
25777
|
name,
|
|
25527
25778
|
class: "read",
|
|
@@ -25646,7 +25897,7 @@ async function pubSubRequest(credentials, inv, method, path, query2, body) {
|
|
|
25646
25897
|
},
|
|
25647
25898
|
body: serialized
|
|
25648
25899
|
});
|
|
25649
|
-
const responseBody = await readJson(response,
|
|
25900
|
+
const responseBody = await readJson(response, MAX_RESPONSE_BYTES4);
|
|
25650
25901
|
if (response.ok) return responseBody;
|
|
25651
25902
|
const providerError = isRecord3(responseBody) && isRecord3(responseBody.error) ? responseBody.error : void 0;
|
|
25652
25903
|
const reason = providerError && typeof providerError.status === "string" ? providerError.status : void 0;
|
|
@@ -26496,8 +26747,8 @@ async function getDocument(inv, accessToken4, timeoutMs) {
|
|
|
26496
26747
|
};
|
|
26497
26748
|
}
|
|
26498
26749
|
async function createDocument(inv, accessToken4, timeoutMs) {
|
|
26499
|
-
const { title, body } = inv.args ?? {};
|
|
26500
|
-
if (!
|
|
26750
|
+
const { title: title2, body } = inv.args ?? {};
|
|
26751
|
+
if (!title2 || typeof title2 !== "string") {
|
|
26501
26752
|
throw new Error("google-docs create_document: title is required");
|
|
26502
26753
|
}
|
|
26503
26754
|
const createRes = await fetch(`${API2}/documents`, {
|
|
@@ -26506,7 +26757,7 @@ async function createDocument(inv, accessToken4, timeoutMs) {
|
|
|
26506
26757
|
authorization: `Bearer ${accessToken4}`,
|
|
26507
26758
|
"content-type": "application/json"
|
|
26508
26759
|
},
|
|
26509
|
-
body: JSON.stringify({ title }),
|
|
26760
|
+
body: JSON.stringify({ title: title2 }),
|
|
26510
26761
|
signal: AbortSignal.timeout(timeoutMs)
|
|
26511
26762
|
});
|
|
26512
26763
|
if (!createRes.ok) {
|
|
@@ -27535,9 +27786,9 @@ async function getResponse(inv, accessToken4, timeoutMs) {
|
|
|
27535
27786
|
};
|
|
27536
27787
|
}
|
|
27537
27788
|
async function createForm(inv, accessToken4, timeoutMs) {
|
|
27538
|
-
const { title, documentTitle } = inv.args ?? {};
|
|
27539
|
-
if (!
|
|
27540
|
-
const info = { title };
|
|
27789
|
+
const { title: title2, documentTitle } = inv.args ?? {};
|
|
27790
|
+
if (!title2) throw new Error("google-forms create_form: title is required");
|
|
27791
|
+
const info = { title: title2 };
|
|
27541
27792
|
if (documentTitle) info.documentTitle = documentTitle;
|
|
27542
27793
|
const res = await fetch(`${API4}/forms`, {
|
|
27543
27794
|
method: "POST",
|
|
@@ -29994,7 +30245,7 @@ var ALLOWED_SCHEMES = /* @__PURE__ */ new Set(["http:", "https:"]);
|
|
|
29994
30245
|
var READ_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
|
|
29995
30246
|
var MUTATION_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
29996
30247
|
var MAX_TIMEOUT_MS = 6e4;
|
|
29997
|
-
var
|
|
30248
|
+
var DEFAULT_TIMEOUT_MS2 = 15e3;
|
|
29998
30249
|
var httpConnector = {
|
|
29999
30250
|
manifest: {
|
|
30000
30251
|
kind: "http",
|
|
@@ -30029,7 +30280,7 @@ var httpConnector = {
|
|
|
30029
30280
|
},
|
|
30030
30281
|
timeoutMs: {
|
|
30031
30282
|
type: "number",
|
|
30032
|
-
description: `Per-request timeout in milliseconds. Defaults to ${
|
|
30283
|
+
description: `Per-request timeout in milliseconds. Defaults to ${DEFAULT_TIMEOUT_MS2}, capped at ${MAX_TIMEOUT_MS}.`
|
|
30033
30284
|
}
|
|
30034
30285
|
},
|
|
30035
30286
|
required: ["url"]
|
|
@@ -30063,7 +30314,7 @@ var httpConnector = {
|
|
|
30063
30314
|
},
|
|
30064
30315
|
timeoutMs: {
|
|
30065
30316
|
type: "number",
|
|
30066
|
-
description: `Per-request timeout in milliseconds. Defaults to ${
|
|
30317
|
+
description: `Per-request timeout in milliseconds. Defaults to ${DEFAULT_TIMEOUT_MS2}, capped at ${MAX_TIMEOUT_MS}.`
|
|
30067
30318
|
}
|
|
30068
30319
|
},
|
|
30069
30320
|
required: ["url"]
|
|
@@ -30164,7 +30415,7 @@ function readMethod(value, fallback, allowed, capability) {
|
|
|
30164
30415
|
return upper;
|
|
30165
30416
|
}
|
|
30166
30417
|
function readTimeout(value) {
|
|
30167
|
-
if (value === void 0 || value === null) return
|
|
30418
|
+
if (value === void 0 || value === null) return DEFAULT_TIMEOUT_MS2;
|
|
30168
30419
|
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
30169
30420
|
throw new Error("http.timeoutMs must be a positive finite number");
|
|
30170
30421
|
}
|
|
@@ -38718,9 +38969,9 @@ var NOTION_SPEC = {
|
|
|
38718
38969
|
]
|
|
38719
38970
|
};
|
|
38720
38971
|
async function databasesUpdate(inv) {
|
|
38721
|
-
const { title, properties } = inv.args;
|
|
38972
|
+
const { title: title2, properties } = inv.args;
|
|
38722
38973
|
const body = {};
|
|
38723
|
-
if (
|
|
38974
|
+
if (title2 !== void 0) body.title = "{title}";
|
|
38724
38975
|
if (properties !== void 0) body.properties = "{properties}";
|
|
38725
38976
|
const response = await executeRestRequest(
|
|
38726
38977
|
NOTION_SPEC,
|
|
@@ -43387,7 +43638,7 @@ var ringcentralConnector = declarativeRestConnector({
|
|
|
43387
43638
|
var ALLOWED_SCHEMES2 = /* @__PURE__ */ new Set(["http:", "https:"]);
|
|
43388
43639
|
var DEFAULT_LIMIT = 20;
|
|
43389
43640
|
var MAX_LIMIT = 200;
|
|
43390
|
-
var
|
|
43641
|
+
var DEFAULT_TIMEOUT_MS3 = 15e3;
|
|
43391
43642
|
var MAX_BODY_BYTES = 5 * 1024 * 1024;
|
|
43392
43643
|
var READ_CAPABILITIES = [
|
|
43393
43644
|
{
|
|
@@ -43450,7 +43701,7 @@ var rssConnector = {
|
|
|
43450
43701
|
accept: "application/rss+xml, application/atom+xml, application/xml;q=0.9, text/xml;q=0.8, */*;q=0.1",
|
|
43451
43702
|
"user-agent": "tangle-agent-integrations-rss/1.0"
|
|
43452
43703
|
},
|
|
43453
|
-
signal: AbortSignal.timeout(
|
|
43704
|
+
signal: AbortSignal.timeout(DEFAULT_TIMEOUT_MS3)
|
|
43454
43705
|
});
|
|
43455
43706
|
if (!res.ok) {
|
|
43456
43707
|
throw new Error(`rss fetch ${res.status} ${res.statusText} for ${url.toString()}`);
|
|
@@ -43594,7 +43845,7 @@ function parseRss(text) {
|
|
|
43594
43845
|
const entries = items.map((item) => {
|
|
43595
43846
|
const guid = firstTagText(item, "guid");
|
|
43596
43847
|
const link = firstTagText(item, "link");
|
|
43597
|
-
const
|
|
43848
|
+
const title2 = firstTagText(item, "title");
|
|
43598
43849
|
const description = firstTagText(item, "description");
|
|
43599
43850
|
const contentEncoded = firstTagText(item, "content:encoded");
|
|
43600
43851
|
const pubDate = firstTagText(item, "pubDate");
|
|
@@ -43603,7 +43854,7 @@ function parseRss(text) {
|
|
|
43603
43854
|
const id2 = decodeXml3(guid) ?? decodeXml3(link) ?? hash(item);
|
|
43604
43855
|
return {
|
|
43605
43856
|
id: id2,
|
|
43606
|
-
title: decodeXml3(
|
|
43857
|
+
title: decodeXml3(title2),
|
|
43607
43858
|
link: decodeXml3(link),
|
|
43608
43859
|
summary: decodeXml3(description),
|
|
43609
43860
|
content: decodeXml3(contentEncoded),
|
|
@@ -43623,7 +43874,7 @@ function parseAtom(text, feedUrl) {
|
|
|
43623
43874
|
const items = collectElements(feedOuter, "entry");
|
|
43624
43875
|
const entries = items.map((item) => {
|
|
43625
43876
|
const id2 = decodeXml3(firstTagText(item, "id"));
|
|
43626
|
-
const
|
|
43877
|
+
const title2 = decodeXml3(firstTagText(item, "title"));
|
|
43627
43878
|
const summary = decodeXml3(firstTagText(item, "summary"));
|
|
43628
43879
|
const contentNode = firstTagText(item, "content");
|
|
43629
43880
|
const published = normalizeDate(decodeXml3(firstTagText(item, "published")));
|
|
@@ -43633,7 +43884,7 @@ function parseAtom(text, feedUrl) {
|
|
|
43633
43884
|
const categories = collectAtomCategories(item);
|
|
43634
43885
|
return {
|
|
43635
43886
|
id: id2 ?? link ?? hash(item),
|
|
43636
|
-
title,
|
|
43887
|
+
title: title2,
|
|
43637
43888
|
link,
|
|
43638
43889
|
summary,
|
|
43639
43890
|
content: decodeXml3(contentNode),
|
|
@@ -46336,7 +46587,7 @@ async function downloadFile(inv, accessToken4) {
|
|
|
46336
46587
|
`slack download_file: file exceeds the ${MAX_INLINE_FILE_BYTES} byte inline limit`
|
|
46337
46588
|
);
|
|
46338
46589
|
}
|
|
46339
|
-
const bytes = await
|
|
46590
|
+
const bytes = await readBoundedBody2(response, MAX_INLINE_FILE_BYTES);
|
|
46340
46591
|
return {
|
|
46341
46592
|
data: {
|
|
46342
46593
|
id: fileId,
|
|
@@ -46356,7 +46607,7 @@ function isSlackPrivateFileUrl(value) {
|
|
|
46356
46607
|
return false;
|
|
46357
46608
|
}
|
|
46358
46609
|
}
|
|
46359
|
-
async function
|
|
46610
|
+
async function readBoundedBody2(response, limitBytes) {
|
|
46360
46611
|
if (!response.body) return new Uint8Array();
|
|
46361
46612
|
const reader = response.body.getReader();
|
|
46362
46613
|
const chunks = [];
|
|
@@ -53539,17 +53790,17 @@ var zohoBookingsConnector = {
|
|
|
53539
53790
|
category: "calendar",
|
|
53540
53791
|
defaultConsistencyModel: "authoritative",
|
|
53541
53792
|
capabilities: [
|
|
53542
|
-
|
|
53543
|
-
|
|
53793
|
+
readCapability5("workspaces.list", "List Zoho Bookings workspaces.", {}),
|
|
53794
|
+
readCapability5("services.list", "List services, optionally within one workspace.", {
|
|
53544
53795
|
workspace_id: { type: "string" }
|
|
53545
53796
|
}),
|
|
53546
|
-
|
|
53797
|
+
readCapability5("resources.list", "List bookable resources, optionally for one service.", {
|
|
53547
53798
|
service_id: { type: "string" }
|
|
53548
53799
|
}),
|
|
53549
|
-
|
|
53800
|
+
readCapability5("staff.list", "List staff, optionally for one service.", {
|
|
53550
53801
|
service_id: { type: "string" }
|
|
53551
53802
|
}),
|
|
53552
|
-
|
|
53803
|
+
readCapability5("appointments.list", "List appointments from a required start time.", {
|
|
53553
53804
|
from_time: {
|
|
53554
53805
|
type: "string",
|
|
53555
53806
|
description: "Zoho timestamp in dd-MMM-yyyy HH:mm:ss format."
|
|
@@ -53559,10 +53810,10 @@ var zohoBookingsConnector = {
|
|
|
53559
53810
|
staff_id: { type: "string" },
|
|
53560
53811
|
status: { type: "string" }
|
|
53561
53812
|
}, ["from_time"]),
|
|
53562
|
-
|
|
53813
|
+
readCapability5("appointments.get", "Read one appointment by booking id.", {
|
|
53563
53814
|
booking_id: { type: "string" }
|
|
53564
53815
|
}, ["booking_id"]),
|
|
53565
|
-
|
|
53816
|
+
readCapability5("availability.fetch", "Fetch open time slots for a service and date.", {
|
|
53566
53817
|
service_id: { type: "string" },
|
|
53567
53818
|
selected_date: { type: "string", description: "Date in YYYY-MM-DD format." },
|
|
53568
53819
|
staff_id: { type: "string" },
|
|
@@ -53708,7 +53959,7 @@ var zohoBookingsConnector = {
|
|
|
53708
53959
|
}
|
|
53709
53960
|
}
|
|
53710
53961
|
};
|
|
53711
|
-
function
|
|
53962
|
+
function readCapability5(name, description, properties, required = []) {
|
|
53712
53963
|
return {
|
|
53713
53964
|
name,
|
|
53714
53965
|
class: "read",
|
|
@@ -62613,6 +62864,7 @@ var CONNECTOR_ADAPTER_FACTORIES = [
|
|
|
62613
62864
|
defineFactoryAdapter(() => amazonSqsConnector, {}),
|
|
62614
62865
|
defineFactoryAdapter(() => httpConnector, {}),
|
|
62615
62866
|
defineFactoryAdapter(() => rssConnector, {}),
|
|
62867
|
+
defineFactoryAdapter(() => chessComConnector, {}),
|
|
62616
62868
|
defineFactoryAdapter(() => zapierConnector, {}),
|
|
62617
62869
|
defineFactoryAdapter(() => makeConnector, {}),
|
|
62618
62870
|
defineFactoryAdapter(() => n8nConnector, {}),
|
|
@@ -142588,6 +142840,7 @@ export {
|
|
|
142588
142840
|
cashfreePaymentsConnector,
|
|
142589
142841
|
circleConnector,
|
|
142590
142842
|
checkoutConnector,
|
|
142843
|
+
chessComConnector,
|
|
142591
142844
|
docuseal,
|
|
142592
142845
|
docusignConnector,
|
|
142593
142846
|
dialpadConnector,
|
|
@@ -143132,4 +143385,4 @@ export {
|
|
|
143132
143385
|
demandbaseConnector,
|
|
143133
143386
|
adapters_exports
|
|
143134
143387
|
};
|
|
143135
|
-
//# sourceMappingURL=chunk-
|
|
143388
|
+
//# sourceMappingURL=chunk-4H5F6E7W.js.map
|