@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.
package/dist/main.js CHANGED
@@ -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);
@@ -70438,17 +70467,9 @@ var parameters13 = {
70438
70467
  type: "base64EncodedJson",
70439
70468
  secret: true,
70440
70469
  required: true
70441
- }),
70442
- propertyId: new ParameterDefinition({
70443
- slug: "property-id",
70444
- name: "Google Analytics Property ID",
70445
- description: "The Google Analytics 4 property ID (e.g., 123456789). Set during connection setup.",
70446
- envVarBaseKey: "GA_PROPERTY_ID",
70447
- type: "text",
70448
- secret: false,
70449
- required: false
70450
70470
  })
70451
70471
  };
70472
+ var PROPERTY_ID_SLUG = "property-id";
70452
70473
 
70453
70474
  // ../connectors/src/connectors/google-analytics/tools/auth.ts
70454
70475
  var SCOPES = [
@@ -70717,7 +70738,9 @@ Authentication is handled automatically using a service account.
70717
70738
  try {
70718
70739
  const { GoogleAuth } = await import("google-auth-library");
70719
70740
  const keyJsonBase64 = parameters13.serviceAccountKeyJsonBase64.getValue(connection2);
70720
- const propertyId = parameters13.propertyId.tryGetValue(connection2);
70741
+ const propertyId = connection2.parameters.find(
70742
+ (p6) => p6.parameterSlug === PROPERTY_ID_SLUG
70743
+ )?.value ?? void 0;
70721
70744
  const credentials = JSON.parse(
70722
70745
  Buffer.from(keyJsonBase64, "base64").toString("utf-8")
70723
70746
  );
@@ -71517,6 +71540,34 @@ const realtime = await ga.runRealtimeReport({
71517
71540
 
71518
71541
  // ../connectors/src/connectors/google-calendar/setup.ts
71519
71542
  var googleCalendarOnboarding = new ConnectorOnboarding({
71543
+ connectionSetupInstructions: {
71544
+ 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
71545
+
71546
+ 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
71547
+ 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:
71548
+ - \`parameterSlug\`: \`"impersonate-email"\`
71549
+ - \`value\`: \u30E6\u30FC\u30B6\u30FC\u304C\u63D0\u4F9B\u3057\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9
71550
+ 3. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u5BFE\u8C61\u30E6\u30FC\u30B6\u30FC\u306E\u60C5\u5831\u3092\u8A18\u9332\u3059\u308B:
71551
+ - \`user\`: \u8A2D\u5B9A\u3057\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9
71552
+ - \`note\`: \u300CDomain-wide Delegation\u3067 {email} \u306E\u30AB\u30EC\u30F3\u30C0\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u300D\u306A\u3069\u306E\u8AAC\u660E
71553
+
71554
+ #### \u5236\u7D04
71555
+ - **\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
71556
+ - \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`,
71557
+ en: `Follow these steps to set up the Google Calendar connection.
71558
+
71559
+ 1. Ask the user for the Google Workspace email address whose calendar should be accessed (e.g., user@example.com)
71560
+ 2. When the user provides an email, call \`updateConnectionParameters\`:
71561
+ - \`parameterSlug\`: \`"impersonate-email"\`
71562
+ - \`value\`: The email provided by the user
71563
+ 3. Call \`updateConnectionContext\` to record the target user:
71564
+ - \`user\`: The configured email address
71565
+ - \`note\`: A description such as "Accessing {email}'s calendar via Domain-wide Delegation"
71566
+
71567
+ #### Constraints
71568
+ - **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
71569
+ - Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
71570
+ },
71520
71571
  dataOverviewInstructions: {
71521
71572
  en: `1. Call google-calendar_request with GET /calendars/{calendarId} to get the default calendar's metadata
71522
71573
  2. Call google-calendar_request with GET /users/me/calendarList to list all accessible calendars
@@ -71538,6 +71589,15 @@ var parameters15 = {
71538
71589
  secret: true,
71539
71590
  required: true
71540
71591
  }),
71592
+ impersonateEmail: new ParameterDefinition({
71593
+ slug: "impersonate-email",
71594
+ name: "User Email Address",
71595
+ 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.",
71596
+ envVarBaseKey: "GOOGLE_CALENDAR_IMPERSONATE_EMAIL",
71597
+ type: "text",
71598
+ secret: false,
71599
+ required: true
71600
+ }),
71541
71601
  calendarId: new ParameterDefinition({
71542
71602
  slug: "calendar-id",
71543
71603
  name: "Default Calendar ID",
@@ -71565,7 +71625,7 @@ var inputSchema25 = z25.object({
71565
71625
  queryParams: z25.record(z25.string(), z25.string()).optional().describe("Query parameters to append to the URL"),
71566
71626
  body: z25.record(z25.string(), z25.unknown()).optional().describe("Request body (JSON) for POST/PUT/PATCH methods"),
71567
71627
  subject: z25.string().optional().describe(
71568
- "Email address of the user to impersonate via Domain-wide Delegation. When set, the service account acts on behalf of this user."
71628
+ "Override the email address of the user to impersonate via Domain-wide Delegation. If omitted, the connection's configured user email is used."
71569
71629
  )
71570
71630
  });
71571
71631
  var outputSchema25 = z25.discriminatedUnion("success", [
@@ -71600,7 +71660,15 @@ Authentication is handled automatically using a service account.
71600
71660
  try {
71601
71661
  const { GoogleAuth } = await import("google-auth-library");
71602
71662
  const keyJsonBase64 = parameters15.serviceAccountKeyJsonBase64.getValue(connection2);
71663
+ const impersonateEmail = parameters15.impersonateEmail.tryGetValue(connection2);
71603
71664
  const calendarId = parameters15.calendarId.tryGetValue(connection2) ?? "primary";
71665
+ const resolvedSubject = subject ?? impersonateEmail;
71666
+ if (!resolvedSubject) {
71667
+ return {
71668
+ success: false,
71669
+ error: `Missing required parameter: ${parameters15.impersonateEmail.slug}. Configure the user email for this connection.`
71670
+ };
71671
+ }
71604
71672
  const credentials = JSON.parse(
71605
71673
  Buffer.from(keyJsonBase64, "base64").toString("utf-8")
71606
71674
  );
@@ -71610,7 +71678,7 @@ Authentication is handled automatically using a service account.
71610
71678
  "https://www.googleapis.com/auth/calendar.readonly",
71611
71679
  "https://www.googleapis.com/auth/calendar.events.readonly"
71612
71680
  ],
71613
- ...subject ? { clientOptions: { subject } } : {}
71681
+ clientOptions: { subject: resolvedSubject }
71614
71682
  });
71615
71683
  const token = await auth.getAccessToken();
71616
71684
  if (!token) {
@@ -71670,20 +71738,20 @@ var googleCalendarConnector = new ConnectorPlugin({
71670
71738
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
71671
71739
  name: "Google Calendar",
71672
71740
  description: "Connect to Google Calendar for calendar and event data access using a service account.",
71673
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5D9eTiMxiL7MaezWXyAaLG/dbcf25e1d51ab877548b3d77e4b02c6d/google-calendar.svg",
71741
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2YsqoBEpdELmfDeFcyGHyE/4494c633b5ae15e562cb739cd85442c1/google-calendar.png",
71674
71742
  parameters: parameters15,
71675
71743
  releaseFlag: { dev1: true, dev2: true, prod: true },
71676
71744
  onboarding: googleCalendarOnboarding,
71677
71745
  systemPrompt: {
71678
71746
  en: `### Tools
71679
71747
 
71680
- - \`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.
71748
+ - \`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.
71681
71749
 
71682
71750
  ### Business Logic
71683
71751
 
71684
71752
  The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
71685
71753
 
71686
- SDK methods (client created via \`connection(connectionId)\` or \`connection(connectionId, { subject })\`):
71754
+ SDK methods (client created via \`connection(connectionId)\` \u2014 the connection's \`impersonate-email\` parameter is used automatically for Domain-wide Delegation):
71687
71755
  - \`client.listCalendars()\` \u2014 list all accessible calendars
71688
71756
  - \`client.listEvents(options?, calendarId?)\` \u2014 list events with optional filters
71689
71757
  - \`client.getEvent(eventId, calendarId?)\` \u2014 get a single event by ID
@@ -71691,10 +71759,10 @@ SDK methods (client created via \`connection(connectionId)\` or \`connection(con
71691
71759
 
71692
71760
  #### Domain-wide Delegation
71693
71761
 
71694
- To access a user's calendar via Domain-wide Delegation, pass \`subject\` (the user's email) as the second argument to \`connection()\`:
71762
+ The target user email is configured on the connection (\`impersonate-email\` parameter), so \`connection()\` automatically uses it. Pass \`subject\` only to override it:
71695
71763
 
71696
71764
  \`\`\`ts
71697
- const calendar = connection("<connectionId>", { subject: "user@example.com" });
71765
+ const calendar = connection("<connectionId>", { subject: "other-user@example.com" });
71698
71766
  \`\`\`
71699
71767
 
71700
71768
  \`\`\`ts
@@ -71748,13 +71816,13 @@ export default async function handler(c: Context) {
71748
71816
  - The default calendar ID is "primary" if not configured`,
71749
71817
  ja: `### \u30C4\u30FC\u30EB
71750
71818
 
71751
- - \`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
71819
+ - \`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
71752
71820
 
71753
71821
  ### Business Logic
71754
71822
 
71755
71823
  \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
71756
71824
 
71757
- SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u307E\u305F\u306F \`connection(connectionId, { subject })\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
71825
+ 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):
71758
71826
  - \`client.listCalendars()\` \u2014 \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u5168\u30AB\u30EC\u30F3\u30C0\u30FC\u306E\u4E00\u89A7\u53D6\u5F97
71759
71827
  - \`client.listEvents(options?, calendarId?)\` \u2014 \u30D5\u30A3\u30EB\u30BF\u30FC\u4ED8\u304D\u30A4\u30D9\u30F3\u30C8\u4E00\u89A7\u53D6\u5F97
71760
71828
  - \`client.getEvent(eventId, calendarId?)\` \u2014 ID\u306B\u3088\u308B\u5358\u4E00\u30A4\u30D9\u30F3\u30C8\u53D6\u5F97
@@ -71762,10 +71830,10 @@ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u307E\u305F\u306F \`c
71762
71830
 
71763
71831
  #### Domain-wide Delegation
71764
71832
 
71765
- 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
71833
+ \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
71766
71834
 
71767
71835
  \`\`\`ts
71768
- const calendar = connection("<connectionId>", { subject: "user@example.com" });
71836
+ const calendar = connection("<connectionId>", { subject: "other-user@example.com" });
71769
71837
  \`\`\`
71770
71838
 
71771
71839
  \`\`\`ts
@@ -72128,7 +72196,7 @@ var googleCalendarOauthConnector = new ConnectorPlugin({
72128
72196
  authType: AUTH_TYPES.OAUTH,
72129
72197
  name: "Google Calendar",
72130
72198
  description: "Connect to Google Calendar for calendar and event data access using OAuth.",
72131
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5D9eTiMxiL7MaezWXyAaLG/dbcf25e1d51ab877548b3d77e4b02c6d/google-calendar.svg",
72199
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2YsqoBEpdELmfDeFcyGHyE/4494c633b5ae15e562cb739cd85442c1/google-calendar.png",
72132
72200
  parameters: parameters16,
72133
72201
  releaseFlag: { dev1: true, dev2: false, prod: false },
72134
72202
  onboarding: googleCalendarOauthOnboarding,
@@ -72301,11 +72369,11 @@ var parameters17 = {
72301
72369
  secret: true,
72302
72370
  required: true
72303
72371
  }),
72304
- spreadsheetId: new ParameterDefinition({
72305
- slug: "spreadsheet-id",
72306
- name: "Default Spreadsheet ID",
72307
- description: "The ID of the default Google Spreadsheet. Can be found in the spreadsheet URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit",
72308
- envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
72372
+ spreadsheetUrl: new ParameterDefinition({
72373
+ slug: "spreadsheet-url",
72374
+ name: "Google Spreadsheet URL",
72375
+ 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.",
72376
+ envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_URL",
72309
72377
  type: "text",
72310
72378
  secret: false,
72311
72379
  required: false
@@ -72314,6 +72382,7 @@ var parameters17 = {
72314
72382
 
72315
72383
  // ../connectors/src/connectors/google-sheets/tools/request.ts
72316
72384
  import { z as z28 } from "zod";
72385
+ init_utils();
72317
72386
  var BASE_URL11 = "https://sheets.googleapis.com/v4/spreadsheets";
72318
72387
  var REQUEST_TIMEOUT_MS18 = 6e4;
72319
72388
  var inputSchema28 = z28.object({
@@ -72359,7 +72428,8 @@ Authentication is handled automatically using a service account.
72359
72428
  try {
72360
72429
  const { GoogleAuth } = await import("google-auth-library");
72361
72430
  const keyJsonBase64 = parameters17.serviceAccountKeyJsonBase64.getValue(connection2);
72362
- const spreadsheetId = parameters17.spreadsheetId.tryGetValue(connection2);
72431
+ const spreadsheetUrl = parameters17.spreadsheetUrl.tryGetValue(connection2);
72432
+ const spreadsheetId = spreadsheetUrl ? extractSpreadsheetId(spreadsheetUrl) : void 0;
72363
72433
  const credentials = JSON.parse(
72364
72434
  Buffer.from(keyJsonBase64, "base64").toString("utf-8")
72365
72435
  );
@@ -72526,11 +72596,11 @@ import { z as z29 } from "zod";
72526
72596
 
72527
72597
  // ../connectors/src/connectors/google-sheets-oauth/parameters.ts
72528
72598
  var parameters18 = {
72529
- spreadsheetId: new ParameterDefinition({
72530
- slug: "spreadsheet-id",
72531
- name: "Default Spreadsheet ID",
72532
- description: "The ID of the default Google Spreadsheet. Can be found in the spreadsheet URL: https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit",
72533
- envVarBaseKey: "GOOGLE_SHEETS_OAUTH_SPREADSHEET_ID",
72599
+ spreadsheetUrl: new ParameterDefinition({
72600
+ slug: "spreadsheet-url",
72601
+ name: "Google Spreadsheet URL",
72602
+ 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.",
72603
+ envVarBaseKey: "GOOGLE_SHEETS_OAUTH_SPREADSHEET_URL",
72534
72604
  type: "text",
72535
72605
  secret: false,
72536
72606
  required: false
@@ -72538,6 +72608,7 @@ var parameters18 = {
72538
72608
  };
72539
72609
 
72540
72610
  // ../connectors/src/connectors/google-sheets-oauth/tools/request.ts
72611
+ init_utils2();
72541
72612
  var BASE_URL12 = "https://sheets.googleapis.com/v4/spreadsheets";
72542
72613
  var REQUEST_TIMEOUT_MS19 = 6e4;
72543
72614
  var cachedToken11 = null;
@@ -72612,7 +72683,8 @@ Authentication is handled automatically via OAuth proxy.
72612
72683
  `[connector-request] google-sheets-oauth/${connection2.name}: ${method} ${path6}`
72613
72684
  );
72614
72685
  try {
72615
- const spreadsheetId = parameters18.spreadsheetId.tryGetValue(connection2);
72686
+ const spreadsheetUrl = parameters18.spreadsheetUrl.tryGetValue(connection2);
72687
+ const spreadsheetId = spreadsheetUrl ? extractSpreadsheetId(spreadsheetUrl) : void 0;
72616
72688
  const resolvedPath = spreadsheetId ? path6.replace(/\{spreadsheetId\}/g, spreadsheetId) : path6;
72617
72689
  let url = `${BASE_URL12}${resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
72618
72690
  if (queryParams) {
@@ -72659,15 +72731,14 @@ var googleSheetsOnboarding2 = new ConnectorOnboarding({
72659
72731
  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
72660
72732
 
72661
72733
  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
72662
- 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
72663
- 3. \`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
72664
- - \`parameterSlug\`: \`"spreadsheet-id"\`
72665
- - \`value\`: \u62BD\u51FA\u3057\u305F\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID
72666
- 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:
72734
+ 2. \u30E6\u30FC\u30B6\u30FC\u304CURL\u3092\u63D0\u4F9B\u3057\u305F\u3089\u3001\`updateConnectionParameters\` \u3092\u547C\u3073\u51FA\u3059:
72735
+ - \`parameterSlug\`: \`"spreadsheet-url"\`
72736
+ - \`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
72737
+ 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:
72667
72738
  - \`method\`: \`"GET"\`
72668
72739
  - \`path\`: \`"/{spreadsheetId}?fields=spreadsheetId,properties.title,sheets.properties.title"\`
72669
- 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
72670
- 6. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3059:
72740
+ 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
72741
+ 5. \`updateConnectionContext\` \u3092\u547C\u3073\u51FA\u3059:
72671
72742
  - \`spreadsheet\`: \u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30BF\u30A4\u30C8\u30EB
72672
72743
  - \`sheets\`: \u30B7\u30FC\u30C8\u540D\u4E00\u89A7\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09
72673
72744
  - \`note\`: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5185\u5BB9\u306E\u7C21\u5358\u306A\u8AAC\u660E
@@ -72678,15 +72749,14 @@ var googleSheetsOnboarding2 = new ConnectorOnboarding({
72678
72749
  en: `Follow these steps to set up the Google Sheets connection.
72679
72750
 
72680
72751
  1. Ask the user to paste the Google Sheets URL (e.g., https://docs.google.com/spreadsheets/d/xxxxx/edit)
72681
- 2. When the user provides a URL or spreadsheet ID, extract the ID from the URL (the string between \`/d/\` and \`/edit\`)
72682
- 3. Call \`updateConnectionParameters\`:
72683
- - \`parameterSlug\`: \`"spreadsheet-id"\`
72684
- - \`value\`: The extracted spreadsheet ID
72685
- 4. Call \`${requestToolName}\` to fetch spreadsheet metadata:
72752
+ 2. When the user provides a URL, call \`updateConnectionParameters\`:
72753
+ - \`parameterSlug\`: \`"spreadsheet-url"\`
72754
+ - \`value\`: The URL provided by the user (save as-is; the spreadsheet ID is extracted automatically)
72755
+ 3. Call \`${requestToolName}\` to fetch spreadsheet metadata:
72686
72756
  - \`method\`: \`"GET"\`
72687
72757
  - \`path\`: \`"/{spreadsheetId}?fields=spreadsheetId,properties.title,sheets.properties.title"\`
72688
- 5. If an error is returned, ask the user to check the spreadsheet sharing settings
72689
- 6. Call \`updateConnectionContext\`:
72758
+ 4. If an error is returned, ask the user to check the spreadsheet sharing settings
72759
+ 5. Call \`updateConnectionContext\`:
72690
72760
  - \`spreadsheet\`: The spreadsheet title
72691
72761
  - \`sheets\`: Sheet names (comma-separated)
72692
72762
  - \`note\`: Brief description of the setup
@@ -72823,10 +72893,12 @@ batch.valueRanges.forEach(vr => console.log(vr.range, vr.values));
72823
72893
  tools: tools18,
72824
72894
  async checkConnection(params, config) {
72825
72895
  const { proxyFetch } = config;
72826
- const spreadsheetId = params[parameters18.spreadsheetId.slug];
72827
- if (!spreadsheetId) {
72896
+ const spreadsheetUrl = params[parameters18.spreadsheetUrl.slug];
72897
+ if (!spreadsheetUrl) {
72828
72898
  return { success: true };
72829
72899
  }
72900
+ const { extractSpreadsheetId: extractSpreadsheetId2 } = await Promise.resolve().then(() => (init_utils2(), utils_exports));
72901
+ const spreadsheetId = extractSpreadsheetId2(spreadsheetUrl);
72830
72902
  const url = `https://sheets.googleapis.com/v4/spreadsheets/${spreadsheetId}?fields=spreadsheetId,properties.title`;
72831
72903
  try {
72832
72904
  const res = await proxyFetch(url, { method: "GET" });
@@ -85063,6 +85135,254 @@ export default async function handler(c: Context) {
85063
85135
  tools: tools58
85064
85136
  });
85065
85137
 
85138
+ // ../connectors/src/connectors/grafana/setup.ts
85139
+ var grafanaOnboarding = new ConnectorOnboarding({
85140
+ dataOverviewInstructions: {
85141
+ en: `1. Call grafana_request with GET /api/datasources to list all configured datasources
85142
+ 2. Call grafana_request with GET /api/search?type=dash-db&limit=10 to list dashboards
85143
+ 3. For a specific datasource, call grafana_request with POST /api/ds/query to run a test query`,
85144
+ 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
85145
+ 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
85146
+ 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`
85147
+ }
85148
+ });
85149
+
85150
+ // ../connectors/src/connectors/grafana/parameters.ts
85151
+ var parameters59 = {
85152
+ url: new ParameterDefinition({
85153
+ slug: "url",
85154
+ name: "Grafana URL",
85155
+ description: "The base URL of the Grafana instance (e.g., https://your-org.grafana.net).",
85156
+ envVarBaseKey: "GRAFANA_URL",
85157
+ type: "text",
85158
+ secret: false,
85159
+ required: true
85160
+ }),
85161
+ apiKey: new ParameterDefinition({
85162
+ slug: "api-key",
85163
+ name: "Grafana API Key",
85164
+ description: "A Grafana API Key or Service Account Token. Create one in Grafana under Administration > Service Accounts.",
85165
+ envVarBaseKey: "GRAFANA_API_KEY",
85166
+ type: "text",
85167
+ secret: true,
85168
+ required: true
85169
+ })
85170
+ };
85171
+
85172
+ // ../connectors/src/connectors/grafana/tools/request.ts
85173
+ import { z as z76 } from "zod";
85174
+ var REQUEST_TIMEOUT_MS59 = 6e4;
85175
+ var inputSchema74 = z76.object({
85176
+ toolUseIntent: z76.string().optional().describe(
85177
+ "Brief description of what you intend to accomplish with this tool call"
85178
+ ),
85179
+ connectionId: z76.string().describe("ID of the Grafana connection to use"),
85180
+ method: z76.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).describe(
85181
+ "HTTP method. GET for reading resources (datasources, dashboards, alerts). POST for queries and creating resources. PUT/PATCH for updates. DELETE for removal."
85182
+ ),
85183
+ path: z76.string().describe(
85184
+ "API path relative to the Grafana base URL (e.g., '/api/datasources', '/api/search', '/api/ds/query'). Must start with '/'."
85185
+ ),
85186
+ body: z76.record(z76.string(), z76.unknown()).optional().describe("Request body (JSON). Required for POST/PUT/PATCH requests.")
85187
+ });
85188
+ var outputSchema74 = z76.discriminatedUnion("success", [
85189
+ z76.object({
85190
+ success: z76.literal(true),
85191
+ status: z76.number(),
85192
+ data: z76.unknown()
85193
+ }),
85194
+ z76.object({
85195
+ success: z76.literal(false),
85196
+ error: z76.string()
85197
+ })
85198
+ ]);
85199
+ var requestTool44 = new ConnectorTool({
85200
+ name: "request",
85201
+ description: `Send authenticated requests to the Grafana HTTP API.
85202
+ Authentication is handled automatically using the configured API Key or Service Account Token via Bearer token.
85203
+ 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).
85204
+ The path must start with '/' and is appended to the configured Grafana instance URL.`,
85205
+ inputSchema: inputSchema74,
85206
+ outputSchema: outputSchema74,
85207
+ async execute({ connectionId, method, path: path6, body }, connections) {
85208
+ const connection2 = connections.find((c6) => c6.id === connectionId);
85209
+ if (!connection2) {
85210
+ return {
85211
+ success: false,
85212
+ error: `Connection ${connectionId} not found`
85213
+ };
85214
+ }
85215
+ console.log(
85216
+ `[connector-request] grafana/${connection2.name}: ${method} ${path6}`
85217
+ );
85218
+ try {
85219
+ const baseUrl = parameters59.url.getValue(connection2).replace(/\/+$/, "");
85220
+ const apiKey = parameters59.apiKey.getValue(connection2);
85221
+ const url = `${baseUrl}${path6}`;
85222
+ const controller = new AbortController();
85223
+ const timeout = setTimeout(
85224
+ () => controller.abort(),
85225
+ REQUEST_TIMEOUT_MS59
85226
+ );
85227
+ try {
85228
+ const response = await fetch(url, {
85229
+ method,
85230
+ headers: {
85231
+ Authorization: `Bearer ${apiKey}`,
85232
+ "Content-Type": "application/json",
85233
+ Accept: "application/json"
85234
+ },
85235
+ body: body ? JSON.stringify(body) : void 0,
85236
+ signal: controller.signal
85237
+ });
85238
+ const data = await response.json();
85239
+ if (!response.ok) {
85240
+ const errorMessage = typeof data === "object" && data !== null && "message" in data ? String(data.message) : `HTTP ${response.status} ${response.statusText}`;
85241
+ return { success: false, error: errorMessage };
85242
+ }
85243
+ return { success: true, status: response.status, data };
85244
+ } finally {
85245
+ clearTimeout(timeout);
85246
+ }
85247
+ } catch (err) {
85248
+ const msg = err instanceof Error ? err.message : String(err);
85249
+ return { success: false, error: msg };
85250
+ }
85251
+ }
85252
+ });
85253
+
85254
+ // ../connectors/src/connectors/grafana/index.ts
85255
+ var tools59 = { request: requestTool44 };
85256
+ var grafanaConnector = new ConnectorPlugin({
85257
+ slug: "grafana",
85258
+ authType: AUTH_TYPES.API_KEY,
85259
+ name: "Grafana",
85260
+ description: "Connect to Grafana for monitoring dashboards, datasource queries, and alerting.",
85261
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3nGaPhV94lXQsHcCtv4mXz/0559d42f83066e8ba79e78410806750c/grafana-icon.webp",
85262
+ parameters: parameters59,
85263
+ releaseFlag: { dev1: true, dev2: false, prod: false },
85264
+ onboarding: grafanaOnboarding,
85265
+ systemPrompt: {
85266
+ en: `### Tools
85267
+
85268
+ - \`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 \`/\`.
85269
+
85270
+ ### Business Logic
85271
+
85272
+ The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
85273
+
85274
+ SDK methods (client created via \`connection(connectionId)\`):
85275
+ - \`client.request(path, init?)\` \u2014 low-level authenticated fetch
85276
+ - \`client.listDatasources()\` \u2014 list all datasources
85277
+ - \`client.getDatasource(uid)\` \u2014 get datasource by UID
85278
+ - \`client.queryDatasource({ queries, from?, to? })\` \u2014 execute queries via unified query API
85279
+ - \`client.searchDashboards({ query?, tag?, type?, limit? })\` \u2014 search dashboards
85280
+ - \`client.getDashboard(uid)\` \u2014 get dashboard by UID
85281
+
85282
+ \`\`\`ts
85283
+ import type { Context } from "hono";
85284
+ import { connection } from "@squadbase/vite-server/connectors/grafana";
85285
+
85286
+ const grafana = connection("<connectionId>");
85287
+
85288
+ export default async function handler(c: Context) {
85289
+ const datasources = await grafana.listDatasources();
85290
+ return c.json(
85291
+ datasources.map((ds) => ({
85292
+ uid: ds.uid,
85293
+ name: ds.name,
85294
+ type: ds.type,
85295
+ })),
85296
+ );
85297
+ }
85298
+ \`\`\`
85299
+
85300
+ ### Grafana HTTP API Reference
85301
+
85302
+ #### Datasources
85303
+ - \`GET /api/datasources\` \u2014 List all datasources
85304
+ - \`GET /api/datasources/uid/{uid}\` \u2014 Get a datasource by UID
85305
+
85306
+ #### Unified Query API
85307
+ - \`POST /api/ds/query\` \u2014 Execute queries against datasources
85308
+ - Body: \`{ "queries": [{ "refId": "A", "datasource": { "type": "prometheus", "uid": "..." }, "expr": "up" }], "from": "now-1h", "to": "now" }\`
85309
+
85310
+ #### Dashboard Search
85311
+ - \`GET /api/search\` \u2014 Search dashboards and folders
85312
+ - Query params: \`?query=keyword&tag=tagname&type=dash-db&limit=10\`
85313
+
85314
+ #### Dashboards
85315
+ - \`GET /api/dashboards/uid/{uid}\` \u2014 Get dashboard by UID (includes panels and metadata)
85316
+
85317
+ #### Alerts
85318
+ - \`GET /api/v1/provisioning/alert-rules\` \u2014 List alert rules
85319
+ - \`GET /api/annotations\` \u2014 List annotations (filter with \`?from=timestamp&to=timestamp\`)
85320
+
85321
+ #### Organizations & Health
85322
+ - \`GET /api/org\` \u2014 Get current organization
85323
+ - \`GET /api/health\` \u2014 Health check`,
85324
+ ja: `### \u30C4\u30FC\u30EB
85325
+
85326
+ - \`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
85327
+
85328
+ ### Business Logic
85329
+
85330
+ \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
85331
+
85332
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
85333
+ - \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
85334
+ - \`client.listDatasources()\` \u2014 \u5168\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306E\u4E00\u89A7\u53D6\u5F97
85335
+ - \`client.getDatasource(uid)\` \u2014 UID\u3067\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u53D6\u5F97
85336
+ - \`client.queryDatasource({ queries, from?, to? })\` \u2014 \u7D71\u5408\u30AF\u30A8\u30EAAPI\u3067\u30AF\u30A8\u30EA\u5B9F\u884C
85337
+ - \`client.searchDashboards({ query?, tag?, type?, limit? })\` \u2014 \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u691C\u7D22
85338
+ - \`client.getDashboard(uid)\` \u2014 UID\u3067\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3092\u53D6\u5F97
85339
+
85340
+ \`\`\`ts
85341
+ import type { Context } from "hono";
85342
+ import { connection } from "@squadbase/vite-server/connectors/grafana";
85343
+
85344
+ const grafana = connection("<connectionId>");
85345
+
85346
+ export default async function handler(c: Context) {
85347
+ const datasources = await grafana.listDatasources();
85348
+ return c.json(
85349
+ datasources.map((ds) => ({
85350
+ uid: ds.uid,
85351
+ name: ds.name,
85352
+ type: ds.type,
85353
+ })),
85354
+ );
85355
+ }
85356
+ \`\`\`
85357
+
85358
+ ### Grafana HTTP API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
85359
+
85360
+ #### \u30C7\u30FC\u30BF\u30BD\u30FC\u30B9
85361
+ - \`GET /api/datasources\` \u2014 \u5168\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306E\u4E00\u89A7\u53D6\u5F97
85362
+ - \`GET /api/datasources/uid/{uid}\` \u2014 UID\u3067\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u3092\u53D6\u5F97
85363
+
85364
+ #### \u7D71\u5408\u30AF\u30A8\u30EAAPI
85365
+ - \`POST /api/ds/query\` \u2014 \u30C7\u30FC\u30BF\u30BD\u30FC\u30B9\u306B\u5BFE\u3057\u3066\u30AF\u30A8\u30EA\u3092\u5B9F\u884C
85366
+ - Body: \`{ "queries": [{ "refId": "A", "datasource": { "type": "prometheus", "uid": "..." }, "expr": "up" }], "from": "now-1h", "to": "now" }\`
85367
+
85368
+ #### \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u691C\u7D22
85369
+ - \`GET /api/search\` \u2014 \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3068\u30D5\u30A9\u30EB\u30C0\u3092\u691C\u7D22
85370
+ - \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF: \`?query=keyword&tag=tagname&type=dash-db&limit=10\`
85371
+
85372
+ #### \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9
85373
+ - \`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
85374
+
85375
+ #### \u30A2\u30E9\u30FC\u30C8
85376
+ - \`GET /api/v1/provisioning/alert-rules\` \u2014 \u30A2\u30E9\u30FC\u30C8\u30EB\u30FC\u30EB\u4E00\u89A7
85377
+ - \`GET /api/annotations\` \u2014 \u30A2\u30CE\u30C6\u30FC\u30B7\u30E7\u30F3\u4E00\u89A7\uFF08\`?from=timestamp&to=timestamp\` \u3067\u30D5\u30A3\u30EB\u30BF\uFF09
85378
+
85379
+ #### \u7D44\u7E54 & \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF
85380
+ - \`GET /api/org\` \u2014 \u73FE\u5728\u306E\u7D44\u7E54\u3092\u53D6\u5F97
85381
+ - \`GET /api/health\` \u2014 \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF`
85382
+ },
85383
+ tools: tools59
85384
+ });
85385
+
85066
85386
  // ../connectors/src/connectors/registry.ts
85067
85387
  var plugins = {
85068
85388
  snowflake: snowflakeConnector,
@@ -85122,7 +85442,8 @@ var plugins = {
85122
85442
  zendeskOauth: zendeskOauthConnector,
85123
85443
  intercom: intercomConnector,
85124
85444
  intercomOauth: intercomOauthConnector,
85125
- mixpanel: mixpanelConnector
85445
+ mixpanel: mixpanelConnector,
85446
+ grafana: grafanaConnector
85126
85447
  };
85127
85448
  var connectors = {
85128
85449
  ...plugins,
@@ -85323,62 +85644,62 @@ function resolveParams2(entry, connectionId, plugin) {
85323
85644
  var { getQuery, loadConnections, reloadEnvFile, watchConnectionsFile } = createConnectorRegistry();
85324
85645
 
85325
85646
  // src/types/server-logic.ts
85326
- import { z as z76 } from "zod";
85327
- var parameterMetaSchema = z76.object({
85328
- name: z76.string(),
85329
- type: z76.enum(["string", "number", "boolean"]),
85330
- description: z76.string(),
85331
- required: z76.boolean().optional(),
85332
- default: z76.union([z76.string(), z76.number(), z76.boolean()]).optional()
85333
- });
85334
- var serverLogicCacheConfigSchema = z76.object({
85335
- ttl: z76.number(),
85336
- staleWhileRevalidate: z76.boolean().optional()
85337
- });
85338
- var serverLogicSchemaObjectSchema = z76.lazy(
85339
- () => z76.object({
85340
- type: z76.enum(["string", "number", "integer", "boolean", "object", "array", "null"]).optional(),
85341
- format: z76.string().optional(),
85342
- description: z76.string().optional(),
85343
- nullable: z76.boolean().optional(),
85344
- enum: z76.array(z76.union([z76.string(), z76.number(), z76.boolean(), z76.null()])).optional(),
85647
+ import { z as z77 } from "zod";
85648
+ var parameterMetaSchema = z77.object({
85649
+ name: z77.string(),
85650
+ type: z77.enum(["string", "number", "boolean"]),
85651
+ description: z77.string(),
85652
+ required: z77.boolean().optional(),
85653
+ default: z77.union([z77.string(), z77.number(), z77.boolean()]).optional()
85654
+ });
85655
+ var serverLogicCacheConfigSchema = z77.object({
85656
+ ttl: z77.number(),
85657
+ staleWhileRevalidate: z77.boolean().optional()
85658
+ });
85659
+ var serverLogicSchemaObjectSchema = z77.lazy(
85660
+ () => z77.object({
85661
+ type: z77.enum(["string", "number", "integer", "boolean", "object", "array", "null"]).optional(),
85662
+ format: z77.string().optional(),
85663
+ description: z77.string().optional(),
85664
+ nullable: z77.boolean().optional(),
85665
+ enum: z77.array(z77.union([z77.string(), z77.number(), z77.boolean(), z77.null()])).optional(),
85345
85666
  items: serverLogicSchemaObjectSchema.optional(),
85346
- properties: z76.record(z76.string(), serverLogicSchemaObjectSchema).optional(),
85347
- required: z76.array(z76.string()).optional(),
85348
- additionalProperties: z76.union([z76.boolean(), serverLogicSchemaObjectSchema]).optional(),
85349
- minimum: z76.number().optional(),
85350
- maximum: z76.number().optional(),
85351
- minLength: z76.number().optional(),
85352
- maxLength: z76.number().optional(),
85353
- pattern: z76.string().optional()
85667
+ properties: z77.record(z77.string(), serverLogicSchemaObjectSchema).optional(),
85668
+ required: z77.array(z77.string()).optional(),
85669
+ additionalProperties: z77.union([z77.boolean(), serverLogicSchemaObjectSchema]).optional(),
85670
+ minimum: z77.number().optional(),
85671
+ maximum: z77.number().optional(),
85672
+ minLength: z77.number().optional(),
85673
+ maxLength: z77.number().optional(),
85674
+ pattern: z77.string().optional()
85354
85675
  })
85355
85676
  );
85356
- var serverLogicMediaTypeSchema = z76.object({
85677
+ var serverLogicMediaTypeSchema = z77.object({
85357
85678
  schema: serverLogicSchemaObjectSchema.optional(),
85358
- example: z76.unknown().optional()
85679
+ example: z77.unknown().optional()
85359
85680
  });
85360
- var serverLogicResponseSchema = z76.object({
85361
- description: z76.string().optional(),
85362
- content: z76.record(z76.string(), serverLogicMediaTypeSchema).optional()
85681
+ var serverLogicResponseSchema = z77.object({
85682
+ description: z77.string().optional(),
85683
+ content: z77.record(z77.string(), serverLogicMediaTypeSchema).optional()
85363
85684
  });
85364
85685
  var jsonBaseFields = {
85365
- description: z76.string(),
85366
- parameters: z76.array(parameterMetaSchema).optional(),
85686
+ description: z77.string(),
85687
+ parameters: z77.array(parameterMetaSchema).optional(),
85367
85688
  response: serverLogicResponseSchema.optional(),
85368
85689
  cache: serverLogicCacheConfigSchema.optional()
85369
85690
  };
85370
- var jsonSqlServerLogicSchema = z76.object({
85691
+ var jsonSqlServerLogicSchema = z77.object({
85371
85692
  ...jsonBaseFields,
85372
- type: z76.literal("sql").optional(),
85373
- query: z76.string(),
85374
- connectionId: z76.string()
85693
+ type: z77.literal("sql").optional(),
85694
+ query: z77.string(),
85695
+ connectionId: z77.string()
85375
85696
  });
85376
- var jsonTypeScriptServerLogicSchema = z76.object({
85697
+ var jsonTypeScriptServerLogicSchema = z77.object({
85377
85698
  ...jsonBaseFields,
85378
- type: z76.literal("typescript"),
85379
- handlerPath: z76.string()
85699
+ type: z77.literal("typescript"),
85700
+ handlerPath: z77.string()
85380
85701
  });
85381
- var anyJsonServerLogicSchema = z76.union([
85702
+ var anyJsonServerLogicSchema = z77.union([
85382
85703
  jsonTypeScriptServerLogicSchema,
85383
85704
  jsonSqlServerLogicSchema
85384
85705
  ]);