@squadbase/vite-server 0.1.3-dev.6 → 0.1.3-dev.7

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.
@@ -38,6 +38,35 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
38
38
  ));
39
39
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
 
41
+ // ../connectors/src/connectors/google-sheets/utils.ts
42
+ function extractSpreadsheetId(urlOrId) {
43
+ const trimmed = urlOrId.trim();
44
+ const match = trimmed.match(SPREADSHEET_URL_PATTERN);
45
+ if (match) {
46
+ return match[1];
47
+ }
48
+ return trimmed;
49
+ }
50
+ var SPREADSHEET_URL_PATTERN;
51
+ var init_utils = __esm({
52
+ "../connectors/src/connectors/google-sheets/utils.ts"() {
53
+ "use strict";
54
+ SPREADSHEET_URL_PATTERN = /docs\.google\.com\/spreadsheets\/d\/([a-zA-Z0-9_-]+)/;
55
+ }
56
+ });
57
+
58
+ // ../connectors/src/connectors/google-sheets-oauth/utils.ts
59
+ var utils_exports = {};
60
+ __export(utils_exports, {
61
+ extractSpreadsheetId: () => extractSpreadsheetId
62
+ });
63
+ var init_utils2 = __esm({
64
+ "../connectors/src/connectors/google-sheets-oauth/utils.ts"() {
65
+ "use strict";
66
+ init_utils();
67
+ }
68
+ });
69
+
41
70
  // ../../node_modules/bson/lib/bson.cjs
42
71
  var require_bson = __commonJS({
43
72
  "../../node_modules/bson/lib/bson.cjs"(exports2) {
@@ -18863,14 +18892,14 @@ var init_NormalizedSchema = __esm({
18863
18892
  throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
18864
18893
  }
18865
18894
  const struct = this.getSchema();
18866
- const z77 = struct[4].length;
18895
+ const z78 = struct[4].length;
18867
18896
  let it = struct[anno.it];
18868
- if (it && z77 === it.length) {
18897
+ if (it && z78 === it.length) {
18869
18898
  yield* it;
18870
18899
  return;
18871
18900
  }
18872
- it = Array(z77);
18873
- for (let i6 = 0; i6 < z77; ++i6) {
18901
+ it = Array(z78);
18902
+ for (let i6 = 0; i6 < z78; ++i6) {
18874
18903
  const k6 = struct[4][i6];
18875
18904
  const v7 = member([struct[5][i6], 0], k6);
18876
18905
  yield it[i6] = [k6, v7];
@@ -19546,12 +19575,12 @@ var init_split_header = __esm({
19546
19575
  "../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() {
19547
19576
  "use strict";
19548
19577
  splitHeader = (value) => {
19549
- const z77 = value.length;
19578
+ const z78 = value.length;
19550
19579
  const values = [];
19551
19580
  let withinQuotes = false;
19552
19581
  let prevChar = void 0;
19553
19582
  let anchor = 0;
19554
- for (let i6 = 0; i6 < z77; ++i6) {
19583
+ for (let i6 = 0; i6 < z78; ++i6) {
19555
19584
  const char = value[i6];
19556
19585
  switch (char) {
19557
19586
  case `"`:
@@ -19572,12 +19601,12 @@ var init_split_header = __esm({
19572
19601
  values.push(value.slice(anchor));
19573
19602
  return values.map((v7) => {
19574
19603
  v7 = v7.trim();
19575
- const z78 = v7.length;
19576
- if (z78 < 2) {
19604
+ const z79 = v7.length;
19605
+ if (z79 < 2) {
19577
19606
  return v7;
19578
19607
  }
19579
- if (v7[0] === `"` && v7[z78 - 1] === `"`) {
19580
- v7 = v7.slice(1, z78 - 1);
19608
+ if (v7[0] === `"` && v7[z79 - 1] === `"`) {
19609
+ v7 = v7.slice(1, z79 - 1);
19581
19610
  }
19582
19611
  return v7.replace(/\\"/g, '"');
19583
19612
  });
@@ -20975,11 +21004,11 @@ var init_EndpointCache = __esm({
20975
21004
  }
20976
21005
  hash(endpointParams) {
20977
21006
  let buffer = "";
20978
- const { parameters: parameters59 } = this;
20979
- if (parameters59.length === 0) {
21007
+ const { parameters: parameters60 } = this;
21008
+ if (parameters60.length === 0) {
20980
21009
  return false;
20981
21010
  }
20982
- for (const param of parameters59) {
21011
+ for (const param of parameters60) {
20983
21012
  const val = String(endpointParams[param] ?? "");
20984
21013
  if (val.includes("|;")) {
20985
21014
  return false;
@@ -21678,7 +21707,7 @@ var init_evaluateRules = __esm({
21678
21707
  });
21679
21708
 
21680
21709
  // ../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js
21681
- var init_utils = __esm({
21710
+ var init_utils3 = __esm({
21682
21711
  "../../node_modules/@smithy/util-endpoints/dist-es/utils/index.js"() {
21683
21712
  "use strict";
21684
21713
  init_customEndpointFunctions();
@@ -21693,18 +21722,18 @@ var init_resolveEndpoint = __esm({
21693
21722
  "use strict";
21694
21723
  init_debug();
21695
21724
  init_types2();
21696
- init_utils();
21725
+ init_utils3();
21697
21726
  resolveEndpoint = (ruleSetObject, options) => {
21698
21727
  const { endpointParams, logger: logger2 } = options;
21699
- const { parameters: parameters59, rules } = ruleSetObject;
21728
+ const { parameters: parameters60, rules } = ruleSetObject;
21700
21729
  options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
21701
- const paramsWithDefault = Object.entries(parameters59).filter(([, v7]) => v7.default != null).map(([k6, v7]) => [k6, v7.default]);
21730
+ const paramsWithDefault = Object.entries(parameters60).filter(([, v7]) => v7.default != null).map(([k6, v7]) => [k6, v7.default]);
21702
21731
  if (paramsWithDefault.length > 0) {
21703
21732
  for (const [paramKey, paramDefaultValue] of paramsWithDefault) {
21704
21733
  endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
21705
21734
  }
21706
21735
  }
21707
- const requiredParams = Object.entries(parameters59).filter(([, v7]) => v7.required).map(([k6]) => k6);
21736
+ const requiredParams = Object.entries(parameters60).filter(([, v7]) => v7.required).map(([k6]) => k6);
21708
21737
  for (const requiredParam of requiredParams) {
21709
21738
  if (endpointParams[requiredParam] == null) {
21710
21739
  throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
@@ -25224,7 +25253,7 @@ var init_getUpdatedSystemClockOffset = __esm({
25224
25253
  });
25225
25254
 
25226
25255
  // ../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js
25227
- var init_utils2 = __esm({
25256
+ var init_utils4 = __esm({
25228
25257
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js"() {
25229
25258
  "use strict";
25230
25259
  init_getDateHeader();
@@ -25239,7 +25268,7 @@ var init_AwsSdkSigV4Signer = __esm({
25239
25268
  "../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js"() {
25240
25269
  "use strict";
25241
25270
  init_dist_es3();
25242
- init_utils2();
25271
+ init_utils4();
25243
25272
  throwSigningPropertyError = (name, property) => {
25244
25273
  if (!property) {
25245
25274
  throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
@@ -27314,8 +27343,8 @@ var init_ProtocolLib = __esm({
27314
27343
  constructor(queryCompat = false) {
27315
27344
  this.queryCompat = queryCompat;
27316
27345
  }
27317
- resolveRestContentType(defaultContentType, inputSchema74) {
27318
- const members = inputSchema74.getMemberSchemas();
27346
+ resolveRestContentType(defaultContentType, inputSchema75) {
27347
+ const members = inputSchema75.getMemberSchemas();
27319
27348
  const httpPayloadMember = Object.values(members).find((m6) => {
27320
27349
  return !!m6.getMergedTraits().httpPayload;
27321
27350
  });
@@ -27330,7 +27359,7 @@ var init_ProtocolLib = __esm({
27330
27359
  } else {
27331
27360
  return defaultContentType;
27332
27361
  }
27333
- } else if (!inputSchema74.isUnitSchema()) {
27362
+ } else if (!inputSchema75.isUnitSchema()) {
27334
27363
  const hasBody = Object.values(members).find((m6) => {
27335
27364
  const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m6.getMergedTraits();
27336
27365
  const noPrefixHeaders = httpPrefixHeaders === void 0;
@@ -28173,9 +28202,9 @@ var init_AwsRestJsonProtocol = __esm({
28173
28202
  }
28174
28203
  async serializeRequest(operationSchema, input, context) {
28175
28204
  const request2 = await super.serializeRequest(operationSchema, input, context);
28176
- const inputSchema74 = NormalizedSchema.of(operationSchema.input);
28205
+ const inputSchema75 = NormalizedSchema.of(operationSchema.input);
28177
28206
  if (!request2.headers["content-type"]) {
28178
- const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema74);
28207
+ const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema75);
28179
28208
  if (contentType) {
28180
28209
  request2.headers["content-type"] = contentType;
28181
28210
  }
@@ -28187,8 +28216,8 @@ var init_AwsRestJsonProtocol = __esm({
28187
28216
  }
28188
28217
  async deserializeResponse(operationSchema, context, response) {
28189
28218
  const output = await super.deserializeResponse(operationSchema, context, response);
28190
- const outputSchema74 = NormalizedSchema.of(operationSchema.output);
28191
- for (const [name, member2] of outputSchema74.structIterator()) {
28219
+ const outputSchema75 = NormalizedSchema.of(operationSchema.output);
28220
+ for (const [name, member2] of outputSchema75.structIterator()) {
28192
28221
  if (member2.getMemberTraits().httpPayload && !(name in output)) {
28193
28222
  output[name] = null;
28194
28223
  }
@@ -32052,22 +32081,22 @@ var init_loadCognitoIdentity = __esm({
32052
32081
  });
32053
32082
 
32054
32083
  // ../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js
32055
- function fromCognitoIdentity(parameters59) {
32084
+ function fromCognitoIdentity(parameters60) {
32056
32085
  return async (awsIdentityProperties) => {
32057
- parameters59.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");
32086
+ parameters60.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");
32058
32087
  const { GetCredentialsForIdentityCommand: GetCredentialsForIdentityCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));
32059
- const fromConfigs = (property) => parameters59.clientConfig?.[property] ?? parameters59.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property];
32060
- const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters59.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters59.logger), SessionToken } = throwOnMissingCredentials(parameters59.logger) } = await (parameters59.client ?? new CognitoIdentityClient2(Object.assign({}, parameters59.clientConfig ?? {}, {
32088
+ const fromConfigs = (property) => parameters60.clientConfig?.[property] ?? parameters60.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property];
32089
+ const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters60.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters60.logger), SessionToken } = throwOnMissingCredentials(parameters60.logger) } = await (parameters60.client ?? new CognitoIdentityClient2(Object.assign({}, parameters60.clientConfig ?? {}, {
32061
32090
  region: fromConfigs("region"),
32062
32091
  profile: fromConfigs("profile"),
32063
32092
  userAgentAppId: fromConfigs("userAgentAppId")
32064
32093
  }))).send(new GetCredentialsForIdentityCommand2({
32065
- CustomRoleArn: parameters59.customRoleArn,
32066
- IdentityId: parameters59.identityId,
32067
- Logins: parameters59.logins ? await resolveLogins(parameters59.logins) : void 0
32094
+ CustomRoleArn: parameters60.customRoleArn,
32095
+ IdentityId: parameters60.identityId,
32096
+ Logins: parameters60.logins ? await resolveLogins(parameters60.logins) : void 0
32068
32097
  }));
32069
32098
  return {
32070
- identityId: parameters59.identityId,
32099
+ identityId: parameters60.identityId,
32071
32100
  accessKeyId: AccessKeyId,
32072
32101
  secretAccessKey: SecretKey,
32073
32102
  sessionToken: SessionToken,
@@ -44628,11 +44657,11 @@ var require_bignumber = __commonJS({
44628
44657
  return n6 > 0 || n6 === i6 ? i6 : i6 - 1;
44629
44658
  }
44630
44659
  function coeffToString(a6) {
44631
- var s6, z77, i6 = 1, j6 = a6.length, r6 = a6[0] + "";
44660
+ var s6, z78, i6 = 1, j6 = a6.length, r6 = a6[0] + "";
44632
44661
  for (; i6 < j6; ) {
44633
44662
  s6 = a6[i6++] + "";
44634
- z77 = LOG_BASE - s6.length;
44635
- for (; z77--; s6 = "0" + s6) ;
44663
+ z78 = LOG_BASE - s6.length;
44664
+ for (; z78--; s6 = "0" + s6) ;
44636
44665
  r6 += s6;
44637
44666
  }
44638
44667
  for (j6 = r6.length; r6.charCodeAt(--j6) === 48; ) ;
@@ -44665,15 +44694,15 @@ var require_bignumber = __commonJS({
44665
44694
  function toExponential(str, e6) {
44666
44695
  return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e6 < 0 ? "e" : "e+") + e6;
44667
44696
  }
44668
- function toFixedPoint(str, e6, z77) {
44697
+ function toFixedPoint(str, e6, z78) {
44669
44698
  var len, zs;
44670
44699
  if (e6 < 0) {
44671
- for (zs = z77 + "."; ++e6; zs += z77) ;
44700
+ for (zs = z78 + "."; ++e6; zs += z78) ;
44672
44701
  str = zs + str;
44673
44702
  } else {
44674
44703
  len = str.length;
44675
44704
  if (++e6 > len) {
44676
- for (zs = z77, e6 -= len; --e6; zs += z77) ;
44705
+ for (zs = z78, e6 -= len; --e6; zs += z78) ;
44677
44706
  str += zs;
44678
44707
  } else if (e6 < len) {
44679
44708
  str = str.slice(0, e6) + "." + str.slice(e6);
@@ -70439,17 +70468,9 @@ var parameters13 = {
70439
70468
  type: "base64EncodedJson",
70440
70469
  secret: true,
70441
70470
  required: true
70442
- }),
70443
- propertyId: new ParameterDefinition({
70444
- slug: "property-id",
70445
- name: "Google Analytics Property ID",
70446
- description: "The Google Analytics 4 property ID (e.g., 123456789). Set during connection setup.",
70447
- envVarBaseKey: "GA_PROPERTY_ID",
70448
- type: "text",
70449
- secret: false,
70450
- required: false
70451
70471
  })
70452
70472
  };
70473
+ var PROPERTY_ID_SLUG = "property-id";
70453
70474
 
70454
70475
  // ../connectors/src/connectors/google-analytics/tools/auth.ts
70455
70476
  var SCOPES = [
@@ -70718,7 +70739,9 @@ Authentication is handled automatically using a service account.
70718
70739
  try {
70719
70740
  const { GoogleAuth } = await import("google-auth-library");
70720
70741
  const keyJsonBase64 = parameters13.serviceAccountKeyJsonBase64.getValue(connection);
70721
- const propertyId = parameters13.propertyId.tryGetValue(connection);
70742
+ const propertyId = connection.parameters.find(
70743
+ (p6) => p6.parameterSlug === PROPERTY_ID_SLUG
70744
+ )?.value ?? void 0;
70722
70745
  const credentials = JSON.parse(
70723
70746
  Buffer.from(keyJsonBase64, "base64").toString("utf-8")
70724
70747
  );
@@ -71518,6 +71541,34 @@ const realtime = await ga.runRealtimeReport({
71518
71541
 
71519
71542
  // ../connectors/src/connectors/google-calendar/setup.ts
71520
71543
  var googleCalendarOnboarding = new ConnectorOnboarding({
71544
+ connectionSetupInstructions: {
71545
+ ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Google Calendar\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
71546
+
71547
+ 1. \u30E6\u30FC\u30B6\u30FC\u306B\u300C\u30AB\u30EC\u30F3\u30C0\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u305F\u3044Google Workspace\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u6559\u3048\u3066\u304F\u3060\u3055\u3044\uFF08\u4F8B: user@example.com\uFF09\u300D\u3068\u4F1D\u3048\u308B
71548
+ 2. \u30E6\u30FC\u30B6\u30FC\u304C\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u63D0\u4F9B\u3057\u305F\u3089\u3001\`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
71549
+ - \`parameterSlug\`: \`"impersonate-email"\`
71550
+ - \`value\`: \u30E6\u30FC\u30B6\u30FC\u304C\u63D0\u4F9B\u3057\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9
71551
+ 3. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u5BFE\u8C61\u30E6\u30FC\u30B6\u30FC\u306E\u60C5\u5831\u3092\u8A18\u9332\u3059\u308B:
71552
+ - \`user\`: \u8A2D\u5B9A\u3057\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9
71553
+ - \`note\`: \u300CDomain-wide Delegation\u3067 {email} \u306E\u30AB\u30EC\u30F3\u30C0\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u300D\u306A\u3069\u306E\u8AAC\u660E
71554
+
71555
+ #### \u5236\u7D04
71556
+ - **\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C9\u30E1\u30A4\u30F3\u5168\u4F53\u306E\u59D4\u4EFB\u8A2D\u5B9A\u304C\u5FC5\u8981\u3067\u3059**\u3002\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u30A8\u30E9\u30FC\u304C\u51FA\u308B\u5834\u5408\u3001Google Workspace\u7BA1\u7406\u8005\u306BDomain-wide Delegation\u306E\u8A2D\u5B9A\u78BA\u8A8D\u3092\u4FC3\u3057\u3066\u304F\u3060\u3055\u3044
71557
+ - \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`,
71558
+ en: `Follow these steps to set up the Google Calendar connection.
71559
+
71560
+ 1. Ask the user for the Google Workspace email address whose calendar should be accessed (e.g., user@example.com)
71561
+ 2. When the user provides an email, call \`updateConnectionParameters\`:
71562
+ - \`parameterSlug\`: \`"impersonate-email"\`
71563
+ - \`value\`: The email provided by the user
71564
+ 3. Call \`updateConnectionContext\` to record the target user:
71565
+ - \`user\`: The configured email address
71566
+ - \`note\`: A description such as "Accessing {email}'s calendar via Domain-wide Delegation"
71567
+
71568
+ #### Constraints
71569
+ - **Domain-wide Delegation must be configured on the service account**. If access errors occur, ask the user to verify the Domain-wide Delegation setup with their Google Workspace administrator
71570
+ - Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
71571
+ },
71521
71572
  dataOverviewInstructions: {
71522
71573
  en: `1. Call google-calendar_request with GET /calendars/{calendarId} to get the default calendar's metadata
71523
71574
  2. Call google-calendar_request with GET /users/me/calendarList to list all accessible calendars
@@ -71539,6 +71590,15 @@ var parameters15 = {
71539
71590
  secret: true,
71540
71591
  required: true
71541
71592
  }),
71593
+ impersonateEmail: new ParameterDefinition({
71594
+ slug: "impersonate-email",
71595
+ name: "User Email Address",
71596
+ description: "The email address of the Google Workspace user whose calendar will be accessed via Domain-wide Delegation (e.g., 'user@example.com'). The service account will act on behalf of this user.",
71597
+ envVarBaseKey: "GOOGLE_CALENDAR_IMPERSONATE_EMAIL",
71598
+ type: "text",
71599
+ secret: false,
71600
+ required: true
71601
+ }),
71542
71602
  calendarId: new ParameterDefinition({
71543
71603
  slug: "calendar-id",
71544
71604
  name: "Default Calendar ID",
@@ -71566,7 +71626,7 @@ var inputSchema25 = z25.object({
71566
71626
  queryParams: z25.record(z25.string(), z25.string()).optional().describe("Query parameters to append to the URL"),
71567
71627
  body: z25.record(z25.string(), z25.unknown()).optional().describe("Request body (JSON) for POST/PUT/PATCH methods"),
71568
71628
  subject: z25.string().optional().describe(
71569
- "Email address of the user to impersonate via Domain-wide Delegation. When set, the service account acts on behalf of this user."
71629
+ "Override the email address of the user to impersonate via Domain-wide Delegation. If omitted, the connection's configured user email is used."
71570
71630
  )
71571
71631
  });
71572
71632
  var outputSchema25 = z25.discriminatedUnion("success", [
@@ -71601,7 +71661,15 @@ Authentication is handled automatically using a service account.
71601
71661
  try {
71602
71662
  const { GoogleAuth } = await import("google-auth-library");
71603
71663
  const keyJsonBase64 = parameters15.serviceAccountKeyJsonBase64.getValue(connection);
71664
+ const impersonateEmail = parameters15.impersonateEmail.tryGetValue(connection);
71604
71665
  const calendarId = parameters15.calendarId.tryGetValue(connection) ?? "primary";
71666
+ const resolvedSubject = subject ?? impersonateEmail;
71667
+ if (!resolvedSubject) {
71668
+ return {
71669
+ success: false,
71670
+ error: `Missing required parameter: ${parameters15.impersonateEmail.slug}. Configure the user email for this connection.`
71671
+ };
71672
+ }
71605
71673
  const credentials = JSON.parse(
71606
71674
  Buffer.from(keyJsonBase64, "base64").toString("utf-8")
71607
71675
  );
@@ -71611,7 +71679,7 @@ Authentication is handled automatically using a service account.
71611
71679
  "https://www.googleapis.com/auth/calendar.readonly",
71612
71680
  "https://www.googleapis.com/auth/calendar.events.readonly"
71613
71681
  ],
71614
- ...subject ? { clientOptions: { subject } } : {}
71682
+ clientOptions: { subject: resolvedSubject }
71615
71683
  });
71616
71684
  const token = await auth.getAccessToken();
71617
71685
  if (!token) {
@@ -71671,20 +71739,20 @@ var googleCalendarConnector = new ConnectorPlugin({
71671
71739
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
71672
71740
  name: "Google Calendar",
71673
71741
  description: "Connect to Google Calendar for calendar and event data access using a service account.",
71674
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5D9eTiMxiL7MaezWXyAaLG/dbcf25e1d51ab877548b3d77e4b02c6d/google-calendar.svg",
71742
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2YsqoBEpdELmfDeFcyGHyE/4494c633b5ae15e562cb739cd85442c1/google-calendar.png",
71675
71743
  parameters: parameters15,
71676
71744
  releaseFlag: { dev1: true, dev2: true, prod: true },
71677
71745
  onboarding: googleCalendarOnboarding,
71678
71746
  systemPrompt: {
71679
71747
  en: `### Tools
71680
71748
 
71681
- - \`google-calendar_request\`: The only way to call the Google Calendar API. Use it to list calendars, get events, and manage calendar data. Authentication is handled automatically using a service account. The {calendarId} placeholder in paths is automatically replaced with the configured default calendar ID. Supports Domain-wide Delegation via the optional \`subject\` parameter to impersonate a user.
71749
+ - \`google-calendar_request\`: The only way to call the Google Calendar API. Use it to list calendars, get events, and manage calendar data. Authentication is handled automatically using a service account with Domain-wide Delegation \u2014 the service account impersonates the user configured on the connection (\`impersonate-email\` parameter). The {calendarId} placeholder in paths is automatically replaced with the configured default calendar ID. Pass an optional \`subject\` only if you need to override the configured user for a specific request.
71682
71750
 
71683
71751
  ### Business Logic
71684
71752
 
71685
71753
  The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
71686
71754
 
71687
- SDK methods (client created via \`connection(connectionId)\` or \`connection(connectionId, { subject })\`):
71755
+ SDK methods (client created via \`connection(connectionId)\` \u2014 the connection's \`impersonate-email\` parameter is used automatically for Domain-wide Delegation):
71688
71756
  - \`client.listCalendars()\` \u2014 list all accessible calendars
71689
71757
  - \`client.listEvents(options?, calendarId?)\` \u2014 list events with optional filters
71690
71758
  - \`client.getEvent(eventId, calendarId?)\` \u2014 get a single event by ID
@@ -71692,10 +71760,10 @@ SDK methods (client created via \`connection(connectionId)\` or \`connection(con
71692
71760
 
71693
71761
  #### Domain-wide Delegation
71694
71762
 
71695
- To access a user's calendar via Domain-wide Delegation, pass \`subject\` (the user's email) as the second argument to \`connection()\`:
71763
+ The target user email is configured on the connection (\`impersonate-email\` parameter), so \`connection()\` automatically uses it. Pass \`subject\` only to override it:
71696
71764
 
71697
71765
  \`\`\`ts
71698
- const calendar = connection("<connectionId>", { subject: "user@example.com" });
71766
+ const calendar = connection("<connectionId>", { subject: "other-user@example.com" });
71699
71767
  \`\`\`
71700
71768
 
71701
71769
  \`\`\`ts
@@ -71749,13 +71817,13 @@ export default async function handler(c: Context) {
71749
71817
  - The default calendar ID is "primary" if not configured`,
71750
71818
  ja: `### \u30C4\u30FC\u30EB
71751
71819
 
71752
- - \`google-calendar_request\`: Google Calendar API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30AB\u30EC\u30F3\u30C0\u30FC\u306E\u4E00\u89A7\u53D6\u5F97\u3001\u30A4\u30D9\u30F3\u30C8\u306E\u53D6\u5F97\u3001\u30AB\u30EC\u30F3\u30C0\u30FC\u30C7\u30FC\u30BF\u306E\u7BA1\u7406\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F7F\u7528\u3057\u3066\u8A8D\u8A3C\u306F\u81EA\u52D5\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{calendarId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u8A2D\u5B9A\u6E08\u307F\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30AB\u30EC\u30F3\u30C0\u30FCID\u3067\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002Domain-wide Delegation\u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u3001\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\`subject\`\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u30E6\u30FC\u30B6\u30FC\u3092\u507D\u88C5\u3067\u304D\u307E\u3059\u3002
71820
+ - \`google-calendar_request\`: Google Calendar API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30AB\u30EC\u30F3\u30C0\u30FC\u306E\u4E00\u89A7\u53D6\u5F97\u3001\u30A4\u30D9\u30F3\u30C8\u306E\u53D6\u5F97\u3001\u30AB\u30EC\u30F3\u30C0\u30FC\u30C7\u30FC\u30BF\u306E\u7BA1\u7406\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\uFF0BDomain-wide Delegation\u3067\u8A8D\u8A3C\u304C\u81EA\u52D5\u7684\u306B\u51E6\u7406\u3055\u308C\u3001\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306B\u8A2D\u5B9A\u3055\u308C\u305F\u30E6\u30FC\u30B6\u30FC\uFF08\`impersonate-email\`\u30D1\u30E9\u30E1\u30FC\u30BF\uFF09\u3068\u3057\u3066\u52D5\u4F5C\u3057\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{calendarId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u8A2D\u5B9A\u6E08\u307F\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30AB\u30EC\u30F3\u30C0\u30FCID\u3067\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002\u7279\u5B9A\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u8A2D\u5B9A\u30E6\u30FC\u30B6\u30FC\u3092\u4E0A\u66F8\u304D\u3057\u305F\u3044\u5834\u5408\u306E\u307F\u3001\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\`subject\`\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
71753
71821
 
71754
71822
  ### Business Logic
71755
71823
 
71756
71824
  \u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u30CF\u30F3\u30C9\u30E9\u5185\u3067\u306F\u30B3\u30CD\u30AF\u30BFSDK\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u74B0\u5883\u5909\u6570\u304B\u3089\u8A8D\u8A3C\u60C5\u5831\u3092\u8AAD\u307F\u53D6\u3089\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
71757
71825
 
71758
- SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u307E\u305F\u306F \`connection(connectionId, { subject })\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
71826
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8 \u2014 \u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\`impersonate-email\`\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u81EA\u52D5\u7684\u306BDomain-wide Delegation\u306Esubject\u3068\u3057\u3066\u4F7F\u308F\u308C\u307E\u3059):
71759
71827
  - \`client.listCalendars()\` \u2014 \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u5168\u30AB\u30EC\u30F3\u30C0\u30FC\u306E\u4E00\u89A7\u53D6\u5F97
71760
71828
  - \`client.listEvents(options?, calendarId?)\` \u2014 \u30D5\u30A3\u30EB\u30BF\u30FC\u4ED8\u304D\u30A4\u30D9\u30F3\u30C8\u4E00\u89A7\u53D6\u5F97
71761
71829
  - \`client.getEvent(eventId, calendarId?)\` \u2014 ID\u306B\u3088\u308B\u5358\u4E00\u30A4\u30D9\u30F3\u30C8\u53D6\u5F97
@@ -71763,10 +71831,10 @@ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u307E\u305F\u306F \`c
71763
71831
 
71764
71832
  #### Domain-wide Delegation
71765
71833
 
71766
- Domain-wide Delegation\u3067\u30E6\u30FC\u30B6\u30FC\u306E\u30AB\u30EC\u30F3\u30C0\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u306B\u306F\u3001\`connection()\`\u306E\u7B2C2\u5F15\u6570\u306B\`subject\`\uFF08\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\uFF09\u3092\u6E21\u3057\u307E\u3059\uFF1A
71834
+ \u5BFE\u8C61\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\uFF08\`impersonate-email\`\u30D1\u30E9\u30E1\u30FC\u30BF\uFF09\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\`connection()\`\u306F\u81EA\u52D5\u7684\u306B\u305D\u308C\u3092\u4F7F\u3044\u307E\u3059\u3002\u4E0A\u66F8\u304D\u3057\u305F\u3044\u5834\u5408\u306E\u307F\`subject\`\u3092\u6E21\u3057\u307E\u3059\uFF1A
71767
71835
 
71768
71836
  \`\`\`ts
71769
- const calendar = connection("<connectionId>", { subject: "user@example.com" });
71837
+ const calendar = connection("<connectionId>", { subject: "other-user@example.com" });
71770
71838
  \`\`\`
71771
71839
 
71772
71840
  \`\`\`ts
@@ -72129,7 +72197,7 @@ var googleCalendarOauthConnector = new ConnectorPlugin({
72129
72197
  authType: AUTH_TYPES.OAUTH,
72130
72198
  name: "Google Calendar",
72131
72199
  description: "Connect to Google Calendar for calendar and event data access using OAuth.",
72132
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5D9eTiMxiL7MaezWXyAaLG/dbcf25e1d51ab877548b3d77e4b02c6d/google-calendar.svg",
72200
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2YsqoBEpdELmfDeFcyGHyE/4494c633b5ae15e562cb739cd85442c1/google-calendar.png",
72133
72201
  parameters: parameters16,
72134
72202
  releaseFlag: { dev1: true, dev2: false, prod: false },
72135
72203
  onboarding: googleCalendarOauthOnboarding,
@@ -72302,11 +72370,11 @@ var parameters17 = {
72302
72370
  secret: true,
72303
72371
  required: true
72304
72372
  }),
72305
- spreadsheetId: new ParameterDefinition({
72306
- slug: "spreadsheet-id",
72307
- name: "Default Spreadsheet ID",
72308
- description: "The ID of the default Google Spreadsheet. Can be found in the spreadsheet URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit",
72309
- envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
72373
+ spreadsheetUrl: new ParameterDefinition({
72374
+ slug: "spreadsheet-url",
72375
+ name: "Google Spreadsheet URL",
72376
+ description: "The URL of the Google Spreadsheet (e.g., https://docs.google.com/spreadsheets/d/xxxxx/edit). The spreadsheet ID is automatically extracted from the URL.",
72377
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_URL",
72310
72378
  type: "text",
72311
72379
  secret: false,
72312
72380
  required: false
@@ -72315,6 +72383,7 @@ var parameters17 = {
72315
72383
 
72316
72384
  // ../connectors/src/connectors/google-sheets/tools/request.ts
72317
72385
  import { z as z28 } from "zod";
72386
+ init_utils();
72318
72387
  var BASE_URL11 = "https://sheets.googleapis.com/v4/spreadsheets";
72319
72388
  var REQUEST_TIMEOUT_MS18 = 6e4;
72320
72389
  var inputSchema28 = z28.object({
@@ -72360,7 +72429,8 @@ Authentication is handled automatically using a service account.
72360
72429
  try {
72361
72430
  const { GoogleAuth } = await import("google-auth-library");
72362
72431
  const keyJsonBase64 = parameters17.serviceAccountKeyJsonBase64.getValue(connection);
72363
- const spreadsheetId = parameters17.spreadsheetId.tryGetValue(connection);
72432
+ const spreadsheetUrl = parameters17.spreadsheetUrl.tryGetValue(connection);
72433
+ const spreadsheetId = spreadsheetUrl ? extractSpreadsheetId(spreadsheetUrl) : void 0;
72364
72434
  const credentials = JSON.parse(
72365
72435
  Buffer.from(keyJsonBase64, "base64").toString("utf-8")
72366
72436
  );
@@ -72527,11 +72597,11 @@ import { z as z29 } from "zod";
72527
72597
 
72528
72598
  // ../connectors/src/connectors/google-sheets-oauth/parameters.ts
72529
72599
  var parameters18 = {
72530
- spreadsheetId: new ParameterDefinition({
72531
- slug: "spreadsheet-id",
72532
- name: "Default Spreadsheet ID",
72533
- description: "The ID of the default Google Spreadsheet. Can be found in the spreadsheet URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit",
72534
- envVarBaseKey: "GOOGLE_SHEETS_OAUTH_SPREADSHEET_ID",
72600
+ spreadsheetUrl: new ParameterDefinition({
72601
+ slug: "spreadsheet-url",
72602
+ name: "Google Spreadsheet URL",
72603
+ description: "The URL of the Google Spreadsheet (e.g., https://docs.google.com/spreadsheets/d/xxxxx/edit). The spreadsheet ID is automatically extracted from the URL.",
72604
+ envVarBaseKey: "GOOGLE_SHEETS_OAUTH_SPREADSHEET_URL",
72535
72605
  type: "text",
72536
72606
  secret: false,
72537
72607
  required: false
@@ -72539,6 +72609,7 @@ var parameters18 = {
72539
72609
  };
72540
72610
 
72541
72611
  // ../connectors/src/connectors/google-sheets-oauth/tools/request.ts
72612
+ init_utils2();
72542
72613
  var BASE_URL12 = "https://sheets.googleapis.com/v4/spreadsheets";
72543
72614
  var REQUEST_TIMEOUT_MS19 = 6e4;
72544
72615
  var cachedToken11 = null;
@@ -72613,7 +72684,8 @@ Authentication is handled automatically via OAuth proxy.
72613
72684
  `[connector-request] google-sheets-oauth/${connection.name}: ${method} ${path4}`
72614
72685
  );
72615
72686
  try {
72616
- const spreadsheetId = parameters18.spreadsheetId.tryGetValue(connection);
72687
+ const spreadsheetUrl = parameters18.spreadsheetUrl.tryGetValue(connection);
72688
+ const spreadsheetId = spreadsheetUrl ? extractSpreadsheetId(spreadsheetUrl) : void 0;
72617
72689
  const resolvedPath = spreadsheetId ? path4.replace(/\{spreadsheetId\}/g, spreadsheetId) : path4;
72618
72690
  let url = `${BASE_URL12}${resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
72619
72691
  if (queryParams) {
@@ -72660,15 +72732,14 @@ var googleSheetsOnboarding2 = new ConnectorOnboarding({
72660
72732
  ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Google Sheets\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002
72661
72733
 
72662
72734
  1. \u30E6\u30FC\u30B6\u30FC\u306B\u300C\u4F7F\u7528\u3059\u308BGoogle Sheets\u306EURL\u3092\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044\uFF08\u4F8B: https://docs.google.com/spreadsheets/d/xxxxx/edit\uFF09\u300D\u3068\u4F1D\u3048\u308B
72663
- 2. \u30E6\u30FC\u30B6\u30FC\u304CURL\u307E\u305F\u306F\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID\u3092\u63D0\u4F9B\u3057\u305F\u3089\u3001URL\u304B\u3089ID\u3092\u62BD\u51FA\u3059\u308B\uFF08\`/d/\` \u3068 \`/edit\` \u306E\u9593\u306E\u6587\u5B57\u5217\uFF09
72664
- 3. \`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
72665
- - \`parameterSlug\`: \`"spreadsheet-id"\`
72666
- - \`value\`: \u62BD\u51FA\u3057\u305F\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID
72667
- 4. \`${requestToolName}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3059\u308B:
72735
+ 2. \u30E6\u30FC\u30B6\u30FC\u304CURL\u3092\u63D0\u4F9B\u3057\u305F\u3089\u3001\`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
72736
+ - \`parameterSlug\`: \`"spreadsheet-url"\`
72737
+ - \`value\`: \u30E6\u30FC\u30B6\u30FC\u304C\u63D0\u4F9B\u3057\u305FURL\uFF08\u305D\u306E\u307E\u307E\u4FDD\u5B58\u3002ID\u306E\u62BD\u51FA\u306F\u81EA\u52D5\u3067\u884C\u308F\u308C\u307E\u3059\uFF09
72738
+ 3. \`${requestToolName}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3059\u308B:
72668
72739
  - \`method\`: \`"GET"\`
72669
72740
  - \`path\`: \`"/{spreadsheetId}?fields=spreadsheetId,properties.title,sheets.properties.title"\`
72670
- 5. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306B\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u5171\u6709\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
72671
- 6. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3059:
72741
+ 4. \u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30E6\u30FC\u30B6\u30FC\u306B\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u5171\u6709\u8A2D\u5B9A\u3092\u78BA\u8A8D\u3059\u308B\u3088\u3046\u4F1D\u3048\u308B
72742
+ 5. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3059:
72672
72743
  - \`spreadsheet\`: \u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30BF\u30A4\u30C8\u30EB
72673
72744
  - \`sheets\`: \u30B7\u30FC\u30C8\u540D\u4E00\u89A7\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09
72674
72745
  - \`note\`: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5185\u5BB9\u306E\u7C21\u5358\u306A\u8AAC\u660E
@@ -72679,15 +72750,14 @@ var googleSheetsOnboarding2 = new ConnectorOnboarding({
72679
72750
  en: `Follow these steps to set up the Google Sheets connection.
72680
72751
 
72681
72752
  1. Ask the user to paste the Google Sheets URL (e.g., https://docs.google.com/spreadsheets/d/xxxxx/edit)
72682
- 2. When the user provides a URL or spreadsheet ID, extract the ID from the URL (the string between \`/d/\` and \`/edit\`)
72683
- 3. Call \`updateConnectionParameters\`:
72684
- - \`parameterSlug\`: \`"spreadsheet-id"\`
72685
- - \`value\`: The extracted spreadsheet ID
72686
- 4. Call \`${requestToolName}\` to fetch spreadsheet metadata:
72753
+ 2. When the user provides a URL, call \`updateConnectionParameters\`:
72754
+ - \`parameterSlug\`: \`"spreadsheet-url"\`
72755
+ - \`value\`: The URL provided by the user (save as-is; the spreadsheet ID is extracted automatically)
72756
+ 3. Call \`${requestToolName}\` to fetch spreadsheet metadata:
72687
72757
  - \`method\`: \`"GET"\`
72688
72758
  - \`path\`: \`"/{spreadsheetId}?fields=spreadsheetId,properties.title,sheets.properties.title"\`
72689
- 5. If an error is returned, ask the user to check the spreadsheet sharing settings
72690
- 6. Call \`updateConnectionContext\`:
72759
+ 4. If an error is returned, ask the user to check the spreadsheet sharing settings
72760
+ 5. Call \`updateConnectionContext\`:
72691
72761
  - \`spreadsheet\`: The spreadsheet title
72692
72762
  - \`sheets\`: Sheet names (comma-separated)
72693
72763
  - \`note\`: Brief description of the setup
@@ -72824,10 +72894,12 @@ batch.valueRanges.forEach(vr => console.log(vr.range, vr.values));
72824
72894
  tools: tools18,
72825
72895
  async checkConnection(params, config) {
72826
72896
  const { proxyFetch } = config;
72827
- const spreadsheetId = params[parameters18.spreadsheetId.slug];
72828
- if (!spreadsheetId) {
72897
+ const spreadsheetUrl = params[parameters18.spreadsheetUrl.slug];
72898
+ if (!spreadsheetUrl) {
72829
72899
  return { success: true };
72830
72900
  }
72901
+ const { extractSpreadsheetId: extractSpreadsheetId2 } = await Promise.resolve().then(() => (init_utils2(), utils_exports));
72902
+ const spreadsheetId = extractSpreadsheetId2(spreadsheetUrl);
72831
72903
  const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}?fields=spreadsheetId,properties.title`;
72832
72904
  try {
72833
72905
  const res = await proxyFetch(url, { method: "GET" });
@@ -85064,6 +85136,254 @@ export default async function handler(c: Context) {
85064
85136
  tools: tools58
85065
85137
  });
85066
85138
 
85139
+ // ../connectors/src/connectors/grafana/setup.ts
85140
+ var grafanaOnboarding = new ConnectorOnboarding({
85141
+ dataOverviewInstructions: {
85142
+ en: `1. Call grafana_request with GET /api/datasources to list all configured datasources
85143
+ 2. Call grafana_request with GET /api/search?type=dash-db&limit=10 to list dashboards
85144
+ 3. For a specific datasource, call grafana_request with POST /api/ds/query to run a test query`,
85145
+ ja: `1. grafana_request \u3067 GET /api/datasources \u3092\u547C\u3073\u51FA\u3057\u3001\u8A2D\u5B9A\u6E08\u307F\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u4E00\u89A7\u3092\u53D6\u5F97
85146
+ 2. grafana_request \u3067 GET /api/search?type=dash-db&limit=10 \u3092\u547C\u3073\u51FA\u3057\u3001\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u4E00\u89A7\u3092\u53D6\u5F97
85147
+ 3. \u7279\u5B9A\u306E\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306B\u5BFE\u3057\u3066 grafana_request \u3067 POST /api/ds/query \u3092\u547C\u3073\u51FA\u3057\u3001\u30C6\u30B9\u30C8\u30AF\u30A8\u30EA\u3092\u5B9F\u884C`
85148
+ }
85149
+ });
85150
+
85151
+ // ../connectors/src/connectors/grafana/parameters.ts
85152
+ var parameters59 = {
85153
+ url: new ParameterDefinition({
85154
+ slug: "url",
85155
+ name: "Grafana URL",
85156
+ description: "The base URL of the Grafana instance (e.g., https://your-org.grafana.net).",
85157
+ envVarBaseKey: "GRAFANA_URL",
85158
+ type: "text",
85159
+ secret: false,
85160
+ required: true
85161
+ }),
85162
+ apiKey: new ParameterDefinition({
85163
+ slug: "api-key",
85164
+ name: "Grafana API Key",
85165
+ description: "A Grafana API Key or Service Account Token. Create one in Grafana under Administration > Service Accounts.",
85166
+ envVarBaseKey: "GRAFANA_API_KEY",
85167
+ type: "text",
85168
+ secret: true,
85169
+ required: true
85170
+ })
85171
+ };
85172
+
85173
+ // ../connectors/src/connectors/grafana/tools/request.ts
85174
+ import { z as z76 } from "zod";
85175
+ var REQUEST_TIMEOUT_MS59 = 6e4;
85176
+ var inputSchema74 = z76.object({
85177
+ toolUseIntent: z76.string().optional().describe(
85178
+ "Brief description of what you intend to accomplish with this tool call"
85179
+ ),
85180
+ connectionId: z76.string().describe("ID of the Grafana connection to use"),
85181
+ method: z76.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).describe(
85182
+ "HTTP method. GET for reading resources (datasources, dashboards, alerts). POST for queries and creating resources. PUT/PATCH for updates. DELETE for removal."
85183
+ ),
85184
+ path: z76.string().describe(
85185
+ "API path relative to the Grafana base URL (e.g., '/api/datasources', '/api/search', '/api/ds/query'). Must start with '/'."
85186
+ ),
85187
+ body: z76.record(z76.string(), z76.unknown()).optional().describe("Request body (JSON). Required for POST/PUT/PATCH requests.")
85188
+ });
85189
+ var outputSchema74 = z76.discriminatedUnion("success", [
85190
+ z76.object({
85191
+ success: z76.literal(true),
85192
+ status: z76.number(),
85193
+ data: z76.unknown()
85194
+ }),
85195
+ z76.object({
85196
+ success: z76.literal(false),
85197
+ error: z76.string()
85198
+ })
85199
+ ]);
85200
+ var requestTool44 = new ConnectorTool({
85201
+ name: "request",
85202
+ description: `Send authenticated requests to the Grafana HTTP API.
85203
+ Authentication is handled automatically using the configured API Key or Service Account Token via Bearer token.
85204
+ Use this tool to interact with Grafana resources: datasources, dashboards, alerts, annotations, and to execute datasource queries via the unified query API (/api/ds/query).
85205
+ The path must start with '/' and is appended to the configured Grafana instance URL.`,
85206
+ inputSchema: inputSchema74,
85207
+ outputSchema: outputSchema74,
85208
+ async execute({ connectionId, method, path: path4, body }, connections) {
85209
+ const connection = connections.find((c6) => c6.id === connectionId);
85210
+ if (!connection) {
85211
+ return {
85212
+ success: false,
85213
+ error: `Connection ${connectionId} not found`
85214
+ };
85215
+ }
85216
+ console.log(
85217
+ `[connector-request] grafana/${connection.name}: ${method} ${path4}`
85218
+ );
85219
+ try {
85220
+ const baseUrl = parameters59.url.getValue(connection).replace(/\/+$/, "");
85221
+ const apiKey = parameters59.apiKey.getValue(connection);
85222
+ const url = `${baseUrl}${path4}`;
85223
+ const controller = new AbortController();
85224
+ const timeout = setTimeout(
85225
+ () => controller.abort(),
85226
+ REQUEST_TIMEOUT_MS59
85227
+ );
85228
+ try {
85229
+ const response = await fetch(url, {
85230
+ method,
85231
+ headers: {
85232
+ Authorization: `Bearer ${apiKey}`,
85233
+ "Content-Type": "application/json",
85234
+ Accept: "application/json"
85235
+ },
85236
+ body: body ? JSON.stringify(body) : void 0,
85237
+ signal: controller.signal
85238
+ });
85239
+ const data = await response.json();
85240
+ if (!response.ok) {
85241
+ const errorMessage = typeof data === "object" && data !== null && "message" in data ? String(data.message) : `HTTP ${response.status} ${response.statusText}`;
85242
+ return { success: false, error: errorMessage };
85243
+ }
85244
+ return { success: true, status: response.status, data };
85245
+ } finally {
85246
+ clearTimeout(timeout);
85247
+ }
85248
+ } catch (err) {
85249
+ const msg = err instanceof Error ? err.message : String(err);
85250
+ return { success: false, error: msg };
85251
+ }
85252
+ }
85253
+ });
85254
+
85255
+ // ../connectors/src/connectors/grafana/index.ts
85256
+ var tools59 = { request: requestTool44 };
85257
+ var grafanaConnector = new ConnectorPlugin({
85258
+ slug: "grafana",
85259
+ authType: AUTH_TYPES.API_KEY,
85260
+ name: "Grafana",
85261
+ description: "Connect to Grafana for monitoring dashboards, datasource queries, and alerting.",
85262
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3nGaPhV94lXQsHcCtv4mXz/0559d42f83066e8ba79e78410806750c/grafana-icon.webp",
85263
+ parameters: parameters59,
85264
+ releaseFlag: { dev1: true, dev2: false, prod: false },
85265
+ onboarding: grafanaOnboarding,
85266
+ systemPrompt: {
85267
+ en: `### Tools
85268
+
85269
+ - \`grafana_request\`: The only way to call the Grafana HTTP API. Use it to list datasources, search dashboards, execute datasource queries, manage alerts, and read annotations. Authentication is handled automatically via Bearer token. The path must start with \`/\`.
85270
+
85271
+ ### Business Logic
85272
+
85273
+ The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
85274
+
85275
+ SDK methods (client created via \`connection(connectionId)\`):
85276
+ - \`client.request(path, init?)\` \u2014 low-level authenticated fetch
85277
+ - \`client.listDatasources()\` \u2014 list all datasources
85278
+ - \`client.getDatasource(uid)\` \u2014 get datasource by UID
85279
+ - \`client.queryDatasource({ queries, from?, to? })\` \u2014 execute queries via unified query API
85280
+ - \`client.searchDashboards({ query?, tag?, type?, limit? })\` \u2014 search dashboards
85281
+ - \`client.getDashboard(uid)\` \u2014 get dashboard by UID
85282
+
85283
+ \`\`\`ts
85284
+ import type { Context } from "hono";
85285
+ import { connection } from "@squadbase/vite-server/connectors/grafana";
85286
+
85287
+ const grafana = connection("<connectionId>");
85288
+
85289
+ export default async function handler(c: Context) {
85290
+ const datasources = await grafana.listDatasources();
85291
+ return c.json(
85292
+ datasources.map((ds) => ({
85293
+ uid: ds.uid,
85294
+ name: ds.name,
85295
+ type: ds.type,
85296
+ })),
85297
+ );
85298
+ }
85299
+ \`\`\`
85300
+
85301
+ ### Grafana HTTP API Reference
85302
+
85303
+ #### Datasources
85304
+ - \`GET /api/datasources\` \u2014 List all datasources
85305
+ - \`GET /api/datasources/uid/{uid}\` \u2014 Get a datasource by UID
85306
+
85307
+ #### Unified Query API
85308
+ - \`POST /api/ds/query\` \u2014 Execute queries against datasources
85309
+ - Body: \`{ "queries": [{ "refId": "A", "datasource": { "type": "prometheus", "uid": "..." }, "expr": "up" }], "from": "now-1h", "to": "now" }\`
85310
+
85311
+ #### Dashboard Search
85312
+ - \`GET /api/search\` \u2014 Search dashboards and folders
85313
+ - Query params: \`?query=keyword&tag=tagname&type=dash-db&limit=10\`
85314
+
85315
+ #### Dashboards
85316
+ - \`GET /api/dashboards/uid/{uid}\` \u2014 Get dashboard by UID (includes panels and metadata)
85317
+
85318
+ #### Alerts
85319
+ - \`GET /api/v1/provisioning/alert-rules\` \u2014 List alert rules
85320
+ - \`GET /api/annotations\` \u2014 List annotations (filter with \`?from=timestamp&to=timestamp\`)
85321
+
85322
+ #### Organizations & Health
85323
+ - \`GET /api/org\` \u2014 Get current organization
85324
+ - \`GET /api/health\` \u2014 Health check`,
85325
+ ja: `### \u30C4\u30FC\u30EB
85326
+
85327
+ - \`grafana_request\`: Grafana HTTP API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306E\u4E00\u89A7\u53D6\u5F97\u3001\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u691C\u7D22\u3001\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u30AF\u30A8\u30EA\u306E\u5B9F\u884C\u3001\u30A2\u30E9\u30FC\u30C8\u7BA1\u7406\u3001\u30A2\u30CE\u30C6\u30FC\u30B7\u30E7\u30F3\u306E\u8AAD\u307F\u53D6\u308A\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\u306FBearer\u30C8\u30FC\u30AF\u30F3\u3067\u81EA\u52D5\u51E6\u7406\u3055\u308C\u307E\u3059\u3002\u30D1\u30B9\u306F \`/\` \u3067\u59CB\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
85328
+
85329
+ ### Business Logic
85330
+
85331
+ \u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u30CF\u30F3\u30C9\u30E9\u5185\u3067\u306F\u30B3\u30CD\u30AF\u30BFSDK\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u74B0\u5883\u5909\u6570\u304B\u3089\u8A8D\u8A3C\u60C5\u5831\u3092\u8AAD\u307F\u53D6\u3089\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
85332
+
85333
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
85334
+ - \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
85335
+ - \`client.listDatasources()\` \u2014 \u5168\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306E\u4E00\u89A7\u53D6\u5F97
85336
+ - \`client.getDatasource(uid)\` \u2014 UID\u3067\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u53D6\u5F97
85337
+ - \`client.queryDatasource({ queries, from?, to? })\` \u2014 \u7D71\u5408\u30AF\u30A8\u30EAAPI\u3067\u30AF\u30A8\u30EA\u5B9F\u884C
85338
+ - \`client.searchDashboards({ query?, tag?, type?, limit? })\` \u2014 \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u691C\u7D22
85339
+ - \`client.getDashboard(uid)\` \u2014 UID\u3067\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3092\u53D6\u5F97
85340
+
85341
+ \`\`\`ts
85342
+ import type { Context } from "hono";
85343
+ import { connection } from "@squadbase/vite-server/connectors/grafana";
85344
+
85345
+ const grafana = connection("<connectionId>");
85346
+
85347
+ export default async function handler(c: Context) {
85348
+ const datasources = await grafana.listDatasources();
85349
+ return c.json(
85350
+ datasources.map((ds) => ({
85351
+ uid: ds.uid,
85352
+ name: ds.name,
85353
+ type: ds.type,
85354
+ })),
85355
+ );
85356
+ }
85357
+ \`\`\`
85358
+
85359
+ ### Grafana HTTP API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
85360
+
85361
+ #### \u30C7\u30FC\u30BF\u30BD\u30FC\u30B9
85362
+ - \`GET /api/datasources\` \u2014 \u5168\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306E\u4E00\u89A7\u53D6\u5F97
85363
+ - \`GET /api/datasources/uid/{uid}\` \u2014 UID\u3067\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u53D6\u5F97
85364
+
85365
+ #### \u7D71\u5408\u30AF\u30A8\u30EAAPI
85366
+ - \`POST /api/ds/query\` \u2014 \u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306B\u5BFE\u3057\u3066\u30AF\u30A8\u30EA\u3092\u5B9F\u884C
85367
+ - Body: \`{ "queries": [{ "refId": "A", "datasource": { "type": "prometheus", "uid": "..." }, "expr": "up" }], "from": "now-1h", "to": "now" }\`
85368
+
85369
+ #### \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u691C\u7D22
85370
+ - \`GET /api/search\` \u2014 \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3068\u30D5\u30A9\u30EB\u30C0\u3092\u691C\u7D22
85371
+ - \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF: \`?query=keyword&tag=tagname&type=dash-db&limit=10\`
85372
+
85373
+ #### \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9
85374
+ - \`GET /api/dashboards/uid/{uid}\` \u2014 UID\u3067\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3092\u53D6\u5F97\uFF08\u30D1\u30CD\u30EB\u3068\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u542B\u3080\uFF09
85375
+
85376
+ #### \u30A2\u30E9\u30FC\u30C8
85377
+ - \`GET /api/v1/provisioning/alert-rules\` \u2014 \u30A2\u30E9\u30FC\u30C8\u30EB\u30FC\u30EB\u4E00\u89A7
85378
+ - \`GET /api/annotations\` \u2014 \u30A2\u30CE\u30C6\u30FC\u30B7\u30E7\u30F3\u4E00\u89A7\uFF08\`?from=timestamp&to=timestamp\` \u3067\u30D5\u30A3\u30EB\u30BF\uFF09
85379
+
85380
+ #### \u7D44\u7E54 & \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF
85381
+ - \`GET /api/org\` \u2014 \u73FE\u5728\u306E\u7D44\u7E54\u3092\u53D6\u5F97
85382
+ - \`GET /api/health\` \u2014 \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF`
85383
+ },
85384
+ tools: tools59
85385
+ });
85386
+
85067
85387
  // ../connectors/src/connectors/registry.ts
85068
85388
  var plugins = {
85069
85389
  snowflake: snowflakeConnector,
@@ -85123,7 +85443,8 @@ var plugins = {
85123
85443
  zendeskOauth: zendeskOauthConnector,
85124
85444
  intercom: intercomConnector,
85125
85445
  intercomOauth: intercomOauthConnector,
85126
- mixpanel: mixpanelConnector
85446
+ mixpanel: mixpanelConnector,
85447
+ grafana: grafanaConnector
85127
85448
  };
85128
85449
  var connectors = {
85129
85450
  ...plugins,
@@ -85324,62 +85645,62 @@ function resolveParams2(entry, connectionId, plugin) {
85324
85645
  var { getQuery, loadConnections, reloadEnvFile, watchConnectionsFile } = createConnectorRegistry();
85325
85646
 
85326
85647
  // src/types/server-logic.ts
85327
- import { z as z76 } from "zod";
85328
- var parameterMetaSchema = z76.object({
85329
- name: z76.string(),
85330
- type: z76.enum(["string", "number", "boolean"]),
85331
- description: z76.string(),
85332
- required: z76.boolean().optional(),
85333
- default: z76.union([z76.string(), z76.number(), z76.boolean()]).optional()
85334
- });
85335
- var serverLogicCacheConfigSchema = z76.object({
85336
- ttl: z76.number(),
85337
- staleWhileRevalidate: z76.boolean().optional()
85338
- });
85339
- var serverLogicSchemaObjectSchema = z76.lazy(
85340
- () => z76.object({
85341
- type: z76.enum(["string", "number", "integer", "boolean", "object", "array", "null"]).optional(),
85342
- format: z76.string().optional(),
85343
- description: z76.string().optional(),
85344
- nullable: z76.boolean().optional(),
85345
- enum: z76.array(z76.union([z76.string(), z76.number(), z76.boolean(), z76.null()])).optional(),
85648
+ import { z as z77 } from "zod";
85649
+ var parameterMetaSchema = z77.object({
85650
+ name: z77.string(),
85651
+ type: z77.enum(["string", "number", "boolean"]),
85652
+ description: z77.string(),
85653
+ required: z77.boolean().optional(),
85654
+ default: z77.union([z77.string(), z77.number(), z77.boolean()]).optional()
85655
+ });
85656
+ var serverLogicCacheConfigSchema = z77.object({
85657
+ ttl: z77.number(),
85658
+ staleWhileRevalidate: z77.boolean().optional()
85659
+ });
85660
+ var serverLogicSchemaObjectSchema = z77.lazy(
85661
+ () => z77.object({
85662
+ type: z77.enum(["string", "number", "integer", "boolean", "object", "array", "null"]).optional(),
85663
+ format: z77.string().optional(),
85664
+ description: z77.string().optional(),
85665
+ nullable: z77.boolean().optional(),
85666
+ enum: z77.array(z77.union([z77.string(), z77.number(), z77.boolean(), z77.null()])).optional(),
85346
85667
  items: serverLogicSchemaObjectSchema.optional(),
85347
- properties: z76.record(z76.string(), serverLogicSchemaObjectSchema).optional(),
85348
- required: z76.array(z76.string()).optional(),
85349
- additionalProperties: z76.union([z76.boolean(), serverLogicSchemaObjectSchema]).optional(),
85350
- minimum: z76.number().optional(),
85351
- maximum: z76.number().optional(),
85352
- minLength: z76.number().optional(),
85353
- maxLength: z76.number().optional(),
85354
- pattern: z76.string().optional()
85668
+ properties: z77.record(z77.string(), serverLogicSchemaObjectSchema).optional(),
85669
+ required: z77.array(z77.string()).optional(),
85670
+ additionalProperties: z77.union([z77.boolean(), serverLogicSchemaObjectSchema]).optional(),
85671
+ minimum: z77.number().optional(),
85672
+ maximum: z77.number().optional(),
85673
+ minLength: z77.number().optional(),
85674
+ maxLength: z77.number().optional(),
85675
+ pattern: z77.string().optional()
85355
85676
  })
85356
85677
  );
85357
- var serverLogicMediaTypeSchema = z76.object({
85678
+ var serverLogicMediaTypeSchema = z77.object({
85358
85679
  schema: serverLogicSchemaObjectSchema.optional(),
85359
- example: z76.unknown().optional()
85680
+ example: z77.unknown().optional()
85360
85681
  });
85361
- var serverLogicResponseSchema = z76.object({
85362
- description: z76.string().optional(),
85363
- content: z76.record(z76.string(), serverLogicMediaTypeSchema).optional()
85682
+ var serverLogicResponseSchema = z77.object({
85683
+ description: z77.string().optional(),
85684
+ content: z77.record(z77.string(), serverLogicMediaTypeSchema).optional()
85364
85685
  });
85365
85686
  var jsonBaseFields = {
85366
- description: z76.string(),
85367
- parameters: z76.array(parameterMetaSchema).optional(),
85687
+ description: z77.string(),
85688
+ parameters: z77.array(parameterMetaSchema).optional(),
85368
85689
  response: serverLogicResponseSchema.optional(),
85369
85690
  cache: serverLogicCacheConfigSchema.optional()
85370
85691
  };
85371
- var jsonSqlServerLogicSchema = z76.object({
85692
+ var jsonSqlServerLogicSchema = z77.object({
85372
85693
  ...jsonBaseFields,
85373
- type: z76.literal("sql").optional(),
85374
- query: z76.string(),
85375
- connectionId: z76.string()
85694
+ type: z77.literal("sql").optional(),
85695
+ query: z77.string(),
85696
+ connectionId: z77.string()
85376
85697
  });
85377
- var jsonTypeScriptServerLogicSchema = z76.object({
85698
+ var jsonTypeScriptServerLogicSchema = z77.object({
85378
85699
  ...jsonBaseFields,
85379
- type: z76.literal("typescript"),
85380
- handlerPath: z76.string()
85700
+ type: z77.literal("typescript"),
85701
+ handlerPath: z77.string()
85381
85702
  });
85382
- var anyJsonServerLogicSchema = z76.union([
85703
+ var anyJsonServerLogicSchema = z77.union([
85383
85704
  jsonTypeScriptServerLogicSchema,
85384
85705
  jsonSqlServerLogicSchema
85385
85706
  ]);