@tangle-network/agent-integrations 0.53.26 → 0.53.28

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.
@@ -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 segment of pathname.split("/")) {
745
- if (segment.length === 0 || segment === ".") continue;
746
- if (segment === "..") segments.pop();
747
- else segments.push(segment);
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((segment) => segment === "." || segment === "..")) {
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(segment) {
12884
- if (segment === "$Resources" || segment === "$DeadLetterQueue") return segment;
12885
- return encodeURIComponent(segment);
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 title = xmlValue(xml, "title");
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 MAX_RESPONSE_BYTES3 = 8 * 1024 * 1024;
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
- readCapability3("topics.list", "List topics in the service account project.", {
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
- readCapability3("topics.get", "Get one topic and its server-side configuration.", {
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
- readCapability3("subscriptions.list", "List subscriptions in the service account project.", {
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
- readCapability3("subscriptions.get", "Get one subscription and its delivery configuration.", {
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 readCapability3(name, description, properties, required = []) {
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, MAX_RESPONSE_BYTES3);
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 (!title || typeof title !== "string") {
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 (!title) throw new Error("google-forms create_form: title is required");
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 DEFAULT_TIMEOUT_MS = 15e3;
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 ${DEFAULT_TIMEOUT_MS}, capped at ${MAX_TIMEOUT_MS}.`
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 ${DEFAULT_TIMEOUT_MS}, capped at ${MAX_TIMEOUT_MS}.`
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 DEFAULT_TIMEOUT_MS;
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 (title !== void 0) body.title = "{title}";
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 DEFAULT_TIMEOUT_MS2 = 15e3;
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(DEFAULT_TIMEOUT_MS2)
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 title = firstTagText(item, "title");
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(title),
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 title = decodeXml3(firstTagText(item, "title"));
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 readBoundedBody(response, MAX_INLINE_FILE_BYTES);
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 readBoundedBody(response, limitBytes) {
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
- readCapability4("workspaces.list", "List Zoho Bookings workspaces.", {}),
53543
- readCapability4("services.list", "List services, optionally within one workspace.", {
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
- readCapability4("resources.list", "List bookable resources, optionally for one service.", {
53797
+ readCapability5("resources.list", "List bookable resources, optionally for one service.", {
53547
53798
  service_id: { type: "string" }
53548
53799
  }),
53549
- readCapability4("staff.list", "List staff, optionally for one service.", {
53800
+ readCapability5("staff.list", "List staff, optionally for one service.", {
53550
53801
  service_id: { type: "string" }
53551
53802
  }),
53552
- readCapability4("appointments.list", "List appointments from a required start time.", {
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
- readCapability4("appointments.get", "Read one appointment by booking id.", {
53813
+ readCapability5("appointments.get", "Read one appointment by booking id.", {
53563
53814
  booking_id: { type: "string" }
53564
53815
  }, ["booking_id"]),
53565
- readCapability4("availability.fetch", "Fetch open time slots for a service and date.", {
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 readCapability4(name, description, properties, required = []) {
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, {}),
@@ -68594,11 +68846,15 @@ var figmaConnector = declarativeRestConnector({
68594
68846
  authorizationUrl: "https://www.figma.com/oauth",
68595
68847
  tokenUrl: "https://api.figma.com/v1/oauth/token",
68596
68848
  scopes: [
68597
- "files:read",
68598
- "file_variables:read",
68849
+ "current_user:read",
68850
+ "file_comments:read",
68599
68851
  "file_comments:write",
68852
+ "file_content:read",
68600
68853
  "file_dev_resources:read",
68601
- "library_analytics:read",
68854
+ "file_versions:read",
68855
+ "library_content:read",
68856
+ "projects:read",
68857
+ "team_library_content:read",
68602
68858
  "webhooks:write"
68603
68859
  ],
68604
68860
  clientIdEnv: "FIGMA_OAUTH_CLIENT_ID",
@@ -68615,7 +68871,7 @@ var figmaConnector = declarativeRestConnector({
68615
68871
  description: "Return the authenticated Figma user.",
68616
68872
  parameters: { type: "object", properties: {}, required: [] },
68617
68873
  request: { method: "GET", path: "/v1/me" },
68618
- requiredScopes: ["files:read"]
68874
+ requiredScopes: ["current_user:read"]
68619
68875
  },
68620
68876
  {
68621
68877
  name: "files.get",
@@ -68646,7 +68902,7 @@ var figmaConnector = declarativeRestConnector({
68646
68902
  branch_data: "{branch_data}"
68647
68903
  }
68648
68904
  },
68649
- requiredScopes: ["files:read"]
68905
+ requiredScopes: ["file_content:read"]
68650
68906
  },
68651
68907
  {
68652
68908
  name: "files.nodes",
@@ -68668,7 +68924,7 @@ var figmaConnector = declarativeRestConnector({
68668
68924
  path: "/v1/files/{file_key}/nodes",
68669
68925
  query: { ids: "{ids}", version: "{version}", depth: "{depth}", geometry: "{geometry}" }
68670
68926
  },
68671
- requiredScopes: ["files:read"]
68927
+ requiredScopes: ["file_content:read"]
68672
68928
  },
68673
68929
  {
68674
68930
  name: "files.images",
@@ -68703,7 +68959,7 @@ var figmaConnector = declarativeRestConnector({
68703
68959
  version: "{version}"
68704
68960
  }
68705
68961
  },
68706
- requiredScopes: ["files:read"]
68962
+ requiredScopes: ["file_content:read"]
68707
68963
  },
68708
68964
  {
68709
68965
  name: "files.image_fills",
@@ -68715,7 +68971,7 @@ var figmaConnector = declarativeRestConnector({
68715
68971
  required: ["file_key"]
68716
68972
  },
68717
68973
  request: { method: "GET", path: "/v1/files/{file_key}/images" },
68718
- requiredScopes: ["files:read"]
68974
+ requiredScopes: ["file_content:read"]
68719
68975
  },
68720
68976
  {
68721
68977
  name: "files.versions.list",
@@ -68736,7 +68992,7 @@ var figmaConnector = declarativeRestConnector({
68736
68992
  path: "/v1/files/{file_key}/versions",
68737
68993
  query: { page_size: "{page_size}", before: "{before}", after: "{after}" }
68738
68994
  },
68739
- requiredScopes: ["files:read"]
68995
+ requiredScopes: ["file_versions:read"]
68740
68996
  },
68741
68997
  {
68742
68998
  name: "files.components.list",
@@ -68748,7 +69004,7 @@ var figmaConnector = declarativeRestConnector({
68748
69004
  required: ["file_key"]
68749
69005
  },
68750
69006
  request: { method: "GET", path: "/v1/files/{file_key}/components" },
68751
- requiredScopes: ["files:read"]
69007
+ requiredScopes: ["library_content:read"]
68752
69008
  },
68753
69009
  {
68754
69010
  name: "files.component_sets.list",
@@ -68760,7 +69016,7 @@ var figmaConnector = declarativeRestConnector({
68760
69016
  required: ["file_key"]
68761
69017
  },
68762
69018
  request: { method: "GET", path: "/v1/files/{file_key}/component_sets" },
68763
- requiredScopes: ["files:read"]
69019
+ requiredScopes: ["library_content:read"]
68764
69020
  },
68765
69021
  {
68766
69022
  name: "files.styles.list",
@@ -68772,31 +69028,7 @@ var figmaConnector = declarativeRestConnector({
68772
69028
  required: ["file_key"]
68773
69029
  },
68774
69030
  request: { method: "GET", path: "/v1/files/{file_key}/styles" },
68775
- requiredScopes: ["files:read"]
68776
- },
68777
- {
68778
- name: "files.variables.local",
68779
- class: "read",
68780
- description: "List locally defined variables and variable collections in a file (Enterprise-only).",
68781
- parameters: {
68782
- type: "object",
68783
- properties: { file_key: { type: "string" } },
68784
- required: ["file_key"]
68785
- },
68786
- request: { method: "GET", path: "/v1/files/{file_key}/variables/local" },
68787
- requiredScopes: ["file_variables:read"]
68788
- },
68789
- {
68790
- name: "files.variables.published",
68791
- class: "read",
68792
- description: "List variables published from a Figma library file (Enterprise-only).",
68793
- parameters: {
68794
- type: "object",
68795
- properties: { file_key: { type: "string" } },
68796
- required: ["file_key"]
68797
- },
68798
- request: { method: "GET", path: "/v1/files/{file_key}/variables/published" },
68799
- requiredScopes: ["file_variables:read"]
69031
+ requiredScopes: ["library_content:read"]
68800
69032
  },
68801
69033
  {
68802
69034
  name: "files.dev_resources.list",
@@ -68834,7 +69066,7 @@ var figmaConnector = declarativeRestConnector({
68834
69066
  path: "/v1/files/{file_key}/comments",
68835
69067
  query: { as_md: "{as_md}" }
68836
69068
  },
68837
- requiredScopes: ["files:read"]
69069
+ requiredScopes: ["file_comments:read"]
68838
69070
  },
68839
69071
  {
68840
69072
  name: "teams.projects.list",
@@ -68846,7 +69078,7 @@ var figmaConnector = declarativeRestConnector({
68846
69078
  required: ["team_id"]
68847
69079
  },
68848
69080
  request: { method: "GET", path: "/v1/teams/{team_id}/projects" },
68849
- requiredScopes: ["files:read"]
69081
+ requiredScopes: ["projects:read"]
68850
69082
  },
68851
69083
  {
68852
69084
  name: "projects.files.list",
@@ -68865,7 +69097,7 @@ var figmaConnector = declarativeRestConnector({
68865
69097
  path: "/v1/projects/{project_id}/files",
68866
69098
  query: { branch_data: "{branch_data}" }
68867
69099
  },
68868
- requiredScopes: ["files:read"]
69100
+ requiredScopes: ["projects:read"]
68869
69101
  },
68870
69102
  {
68871
69103
  name: "teams.components.list",
@@ -68886,7 +69118,7 @@ var figmaConnector = declarativeRestConnector({
68886
69118
  path: "/v1/teams/{team_id}/components",
68887
69119
  query: { page_size: "{page_size}", after: "{after}", before: "{before}" }
68888
69120
  },
68889
- requiredScopes: ["files:read"]
69121
+ requiredScopes: ["team_library_content:read"]
68890
69122
  },
68891
69123
  {
68892
69124
  name: "teams.styles.list",
@@ -68907,27 +69139,7 @@ var figmaConnector = declarativeRestConnector({
68907
69139
  path: "/v1/teams/{team_id}/styles",
68908
69140
  query: { page_size: "{page_size}", after: "{after}", before: "{before}" }
68909
69141
  },
68910
- requiredScopes: ["files:read"]
68911
- },
68912
- {
68913
- name: "analytics.library.component_usages",
68914
- class: "read",
68915
- description: "Read library analytics: component usage rollup for a library file.",
68916
- parameters: {
68917
- type: "object",
68918
- properties: {
68919
- file_key: { type: "string" },
68920
- group_by: { type: "string", enum: ["component", "file"] },
68921
- cursor: { type: "string" }
68922
- },
68923
- required: ["file_key", "group_by"]
68924
- },
68925
- request: {
68926
- method: "GET",
68927
- path: "/v1/analytics/libraries/{file_key}/component/usages",
68928
- query: { group_by: "{group_by}", cursor: "{cursor}" }
68929
- },
68930
- requiredScopes: ["library_analytics:read"]
69142
+ requiredScopes: ["team_library_content:read"]
68931
69143
  },
68932
69144
  {
68933
69145
  name: "files.comments.create",
@@ -69058,8 +69270,12 @@ var figjamConnector = declarativeRestConnector({
69058
69270
  authorizationUrl: "https://www.figma.com/oauth",
69059
69271
  tokenUrl: "https://api.figma.com/v1/oauth/token",
69060
69272
  scopes: [
69061
- "files:read",
69273
+ "current_user:read",
69274
+ "file_comments:read",
69062
69275
  "file_comments:write",
69276
+ "file_content:read",
69277
+ "file_versions:read",
69278
+ "projects:read",
69063
69279
  "webhooks:write"
69064
69280
  ],
69065
69281
  clientIdEnv: "FIGMA_OAUTH_CLIENT_ID",
@@ -69076,7 +69292,7 @@ var figjamConnector = declarativeRestConnector({
69076
69292
  description: "Return the authenticated Figma/FigJam user.",
69077
69293
  parameters: { type: "object", properties: {}, required: [] },
69078
69294
  request: { method: "GET", path: "/v1/me" },
69079
- requiredScopes: ["files:read"]
69295
+ requiredScopes: ["current_user:read"]
69080
69296
  },
69081
69297
  {
69082
69298
  name: "files.get",
@@ -69105,7 +69321,7 @@ var figjamConnector = declarativeRestConnector({
69105
69321
  plugin_data: "{plugin_data}"
69106
69322
  }
69107
69323
  },
69108
- requiredScopes: ["files:read"]
69324
+ requiredScopes: ["file_content:read"]
69109
69325
  },
69110
69326
  {
69111
69327
  name: "files.nodes",
@@ -69127,7 +69343,7 @@ var figjamConnector = declarativeRestConnector({
69127
69343
  path: "/v1/files/{file_key}/nodes",
69128
69344
  query: { ids: "{ids}", version: "{version}", depth: "{depth}", geometry: "{geometry}" }
69129
69345
  },
69130
- requiredScopes: ["files:read"]
69346
+ requiredScopes: ["file_content:read"]
69131
69347
  },
69132
69348
  {
69133
69349
  name: "files.images",
@@ -69162,7 +69378,7 @@ var figjamConnector = declarativeRestConnector({
69162
69378
  version: "{version}"
69163
69379
  }
69164
69380
  },
69165
- requiredScopes: ["files:read"]
69381
+ requiredScopes: ["file_content:read"]
69166
69382
  },
69167
69383
  {
69168
69384
  name: "files.image_fills",
@@ -69174,7 +69390,7 @@ var figjamConnector = declarativeRestConnector({
69174
69390
  required: ["file_key"]
69175
69391
  },
69176
69392
  request: { method: "GET", path: "/v1/files/{file_key}/images" },
69177
- requiredScopes: ["files:read"]
69393
+ requiredScopes: ["file_content:read"]
69178
69394
  },
69179
69395
  {
69180
69396
  name: "files.versions.list",
@@ -69195,7 +69411,7 @@ var figjamConnector = declarativeRestConnector({
69195
69411
  path: "/v1/files/{file_key}/versions",
69196
69412
  query: { page_size: "{page_size}", before: "{before}", after: "{after}" }
69197
69413
  },
69198
- requiredScopes: ["files:read"]
69414
+ requiredScopes: ["file_versions:read"]
69199
69415
  },
69200
69416
  {
69201
69417
  name: "files.comments.list",
@@ -69214,7 +69430,7 @@ var figjamConnector = declarativeRestConnector({
69214
69430
  path: "/v1/files/{file_key}/comments",
69215
69431
  query: { as_md: "{as_md}" }
69216
69432
  },
69217
- requiredScopes: ["files:read"]
69433
+ requiredScopes: ["file_comments:read"]
69218
69434
  },
69219
69435
  {
69220
69436
  name: "teams.projects.list",
@@ -69226,7 +69442,7 @@ var figjamConnector = declarativeRestConnector({
69226
69442
  required: ["team_id"]
69227
69443
  },
69228
69444
  request: { method: "GET", path: "/v1/teams/{team_id}/projects" },
69229
- requiredScopes: ["files:read"]
69445
+ requiredScopes: ["projects:read"]
69230
69446
  },
69231
69447
  {
69232
69448
  name: "projects.files.list",
@@ -69243,7 +69459,7 @@ var figjamConnector = declarativeRestConnector({
69243
69459
  method: "GET",
69244
69460
  path: "/v1/projects/{project_id}/files"
69245
69461
  },
69246
- requiredScopes: ["files:read"]
69462
+ requiredScopes: ["projects:read"]
69247
69463
  },
69248
69464
  {
69249
69465
  name: "files.comments.create",
@@ -142588,6 +142804,7 @@ export {
142588
142804
  cashfreePaymentsConnector,
142589
142805
  circleConnector,
142590
142806
  checkoutConnector,
142807
+ chessComConnector,
142591
142808
  docuseal,
142592
142809
  docusignConnector,
142593
142810
  dialpadConnector,
@@ -143132,4 +143349,4 @@ export {
143132
143349
  demandbaseConnector,
143133
143350
  adapters_exports
143134
143351
  };
143135
- //# sourceMappingURL=chunk-XZL47RBS.js.map
143352
+ //# sourceMappingURL=chunk-UC7J6GZF.js.map