@squadbase/vite-server 0.1.4-dev.0 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +26 -16
- package/dist/connectors/airtable-oauth.js +10 -0
- package/dist/connectors/airtable.js +10 -0
- package/dist/connectors/amplitude.js +10 -0
- package/dist/connectors/anthropic.js +10 -0
- package/dist/connectors/asana.js +10 -0
- package/dist/connectors/attio.js +10 -0
- package/dist/connectors/backlog-api-key.js +10 -0
- package/dist/connectors/customerio.js +10 -0
- package/dist/connectors/dbt.js +10 -0
- package/dist/connectors/gamma.js +10 -0
- package/dist/connectors/gemini.js +10 -0
- package/dist/connectors/gmail-oauth.js +10 -0
- package/dist/connectors/gmail.js +14 -4
- package/dist/connectors/google-ads.js +10 -0
- package/dist/connectors/google-analytics-oauth.js +10 -0
- package/dist/connectors/google-analytics.js +10 -0
- package/dist/connectors/google-calendar-oauth.js +10 -0
- package/dist/connectors/google-calendar.js +14 -6
- package/dist/connectors/google-docs.js +10 -0
- package/dist/connectors/google-drive.js +10 -0
- package/dist/connectors/google-sheets.js +10 -0
- package/dist/connectors/google-slides.js +10 -0
- package/dist/connectors/grafana.js +10 -0
- package/dist/connectors/hubspot-oauth.js +10 -0
- package/dist/connectors/hubspot.js +10 -0
- package/dist/connectors/intercom-oauth.js +10 -0
- package/dist/connectors/intercom.js +10 -0
- package/dist/connectors/jira-api-key.js +10 -0
- package/dist/connectors/kintone-api-token.js +10 -0
- package/dist/connectors/kintone.js +10 -0
- package/dist/connectors/linkedin-ads.js +10 -0
- package/dist/connectors/mailchimp-oauth.js +10 -0
- package/dist/connectors/mailchimp.js +10 -0
- package/dist/connectors/mixpanel.js +10 -0
- package/dist/connectors/notion-oauth.js +10 -0
- package/dist/connectors/notion.js +10 -0
- package/dist/connectors/openai.js +10 -0
- package/dist/connectors/sentry.js +10 -0
- package/dist/connectors/shopify-oauth.js +10 -0
- package/dist/connectors/shopify.js +10 -0
- package/dist/connectors/stripe-api-key.js +10 -0
- package/dist/connectors/stripe-oauth.js +10 -0
- package/dist/connectors/wix-store.js +10 -0
- package/dist/connectors/zendesk-oauth.js +10 -0
- package/dist/connectors/zendesk.js +10 -0
- package/dist/index.js +26 -16
- package/dist/main.js +26 -16
- package/dist/vite-plugin.js +26 -16
- package/package.json +1 -1
|
@@ -648,6 +648,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
648
648
|
import { getContext } from "hono/context-storage";
|
|
649
649
|
import { getCookie } from "hono/cookie";
|
|
650
650
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
651
|
+
function normalizeHeaders(input) {
|
|
652
|
+
const out = {};
|
|
653
|
+
if (!input) return out;
|
|
654
|
+
new Headers(input).forEach((value, key) => {
|
|
655
|
+
out[key] = value;
|
|
656
|
+
});
|
|
657
|
+
return out;
|
|
658
|
+
}
|
|
651
659
|
function createSandboxProxyFetch(connectionId) {
|
|
652
660
|
return async (input, init) => {
|
|
653
661
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -671,6 +679,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
671
679
|
body: JSON.stringify({
|
|
672
680
|
url: originalUrl,
|
|
673
681
|
method: originalMethod,
|
|
682
|
+
headers: normalizeHeaders(init?.headers),
|
|
674
683
|
body: originalBody
|
|
675
684
|
})
|
|
676
685
|
});
|
|
@@ -705,6 +714,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
705
714
|
body: JSON.stringify({
|
|
706
715
|
url: originalUrl,
|
|
707
716
|
method: originalMethod,
|
|
717
|
+
headers: normalizeHeaders(init?.headers),
|
|
708
718
|
body: originalBody
|
|
709
719
|
})
|
|
710
720
|
});
|
|
@@ -476,6 +476,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
476
476
|
import { getContext } from "hono/context-storage";
|
|
477
477
|
import { getCookie } from "hono/cookie";
|
|
478
478
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
479
|
+
function normalizeHeaders(input) {
|
|
480
|
+
const out = {};
|
|
481
|
+
if (!input) return out;
|
|
482
|
+
new Headers(input).forEach((value, key) => {
|
|
483
|
+
out[key] = value;
|
|
484
|
+
});
|
|
485
|
+
return out;
|
|
486
|
+
}
|
|
479
487
|
function createSandboxProxyFetch(connectionId) {
|
|
480
488
|
return async (input, init) => {
|
|
481
489
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -499,6 +507,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
499
507
|
body: JSON.stringify({
|
|
500
508
|
url: originalUrl,
|
|
501
509
|
method: originalMethod,
|
|
510
|
+
headers: normalizeHeaders(init?.headers),
|
|
502
511
|
body: originalBody
|
|
503
512
|
})
|
|
504
513
|
});
|
|
@@ -533,6 +542,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
533
542
|
body: JSON.stringify({
|
|
534
543
|
url: originalUrl,
|
|
535
544
|
method: originalMethod,
|
|
545
|
+
headers: normalizeHeaders(init?.headers),
|
|
536
546
|
body: originalBody
|
|
537
547
|
})
|
|
538
548
|
});
|
|
@@ -729,6 +729,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
729
729
|
import { getContext } from "hono/context-storage";
|
|
730
730
|
import { getCookie } from "hono/cookie";
|
|
731
731
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
732
|
+
function normalizeHeaders(input) {
|
|
733
|
+
const out = {};
|
|
734
|
+
if (!input) return out;
|
|
735
|
+
new Headers(input).forEach((value, key) => {
|
|
736
|
+
out[key] = value;
|
|
737
|
+
});
|
|
738
|
+
return out;
|
|
739
|
+
}
|
|
732
740
|
function createSandboxProxyFetch(connectionId) {
|
|
733
741
|
return async (input, init) => {
|
|
734
742
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -752,6 +760,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
752
760
|
body: JSON.stringify({
|
|
753
761
|
url: originalUrl,
|
|
754
762
|
method: originalMethod,
|
|
763
|
+
headers: normalizeHeaders(init?.headers),
|
|
755
764
|
body: originalBody
|
|
756
765
|
})
|
|
757
766
|
});
|
|
@@ -786,6 +795,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
786
795
|
body: JSON.stringify({
|
|
787
796
|
url: originalUrl,
|
|
788
797
|
method: originalMethod,
|
|
798
|
+
headers: normalizeHeaders(init?.headers),
|
|
789
799
|
body: originalBody
|
|
790
800
|
})
|
|
791
801
|
});
|
|
@@ -526,6 +526,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
526
526
|
import { getContext } from "hono/context-storage";
|
|
527
527
|
import { getCookie } from "hono/cookie";
|
|
528
528
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
529
|
+
function normalizeHeaders(input) {
|
|
530
|
+
const out = {};
|
|
531
|
+
if (!input) return out;
|
|
532
|
+
new Headers(input).forEach((value, key) => {
|
|
533
|
+
out[key] = value;
|
|
534
|
+
});
|
|
535
|
+
return out;
|
|
536
|
+
}
|
|
529
537
|
function createSandboxProxyFetch(connectionId) {
|
|
530
538
|
return async (input, init) => {
|
|
531
539
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -549,6 +557,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
549
557
|
body: JSON.stringify({
|
|
550
558
|
url: originalUrl,
|
|
551
559
|
method: originalMethod,
|
|
560
|
+
headers: normalizeHeaders(init?.headers),
|
|
552
561
|
body: originalBody
|
|
553
562
|
})
|
|
554
563
|
});
|
|
@@ -583,6 +592,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
583
592
|
body: JSON.stringify({
|
|
584
593
|
url: originalUrl,
|
|
585
594
|
method: originalMethod,
|
|
595
|
+
headers: normalizeHeaders(init?.headers),
|
|
586
596
|
body: originalBody
|
|
587
597
|
})
|
|
588
598
|
});
|
|
@@ -483,6 +483,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
483
483
|
import { getContext } from "hono/context-storage";
|
|
484
484
|
import { getCookie } from "hono/cookie";
|
|
485
485
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
486
|
+
function normalizeHeaders(input) {
|
|
487
|
+
const out = {};
|
|
488
|
+
if (!input) return out;
|
|
489
|
+
new Headers(input).forEach((value, key) => {
|
|
490
|
+
out[key] = value;
|
|
491
|
+
});
|
|
492
|
+
return out;
|
|
493
|
+
}
|
|
486
494
|
function createSandboxProxyFetch(connectionId) {
|
|
487
495
|
return async (input, init) => {
|
|
488
496
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -506,6 +514,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
506
514
|
body: JSON.stringify({
|
|
507
515
|
url: originalUrl,
|
|
508
516
|
method: originalMethod,
|
|
517
|
+
headers: normalizeHeaders(init?.headers),
|
|
509
518
|
body: originalBody
|
|
510
519
|
})
|
|
511
520
|
});
|
|
@@ -540,6 +549,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
540
549
|
body: JSON.stringify({
|
|
541
550
|
url: originalUrl,
|
|
542
551
|
method: originalMethod,
|
|
552
|
+
headers: normalizeHeaders(init?.headers),
|
|
543
553
|
body: originalBody
|
|
544
554
|
})
|
|
545
555
|
});
|
|
@@ -618,6 +618,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
618
618
|
import { getContext } from "hono/context-storage";
|
|
619
619
|
import { getCookie } from "hono/cookie";
|
|
620
620
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
621
|
+
function normalizeHeaders(input) {
|
|
622
|
+
const out = {};
|
|
623
|
+
if (!input) return out;
|
|
624
|
+
new Headers(input).forEach((value, key) => {
|
|
625
|
+
out[key] = value;
|
|
626
|
+
});
|
|
627
|
+
return out;
|
|
628
|
+
}
|
|
621
629
|
function createSandboxProxyFetch(connectionId) {
|
|
622
630
|
return async (input, init) => {
|
|
623
631
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -641,6 +649,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
641
649
|
body: JSON.stringify({
|
|
642
650
|
url: originalUrl,
|
|
643
651
|
method: originalMethod,
|
|
652
|
+
headers: normalizeHeaders(init?.headers),
|
|
644
653
|
body: originalBody
|
|
645
654
|
})
|
|
646
655
|
});
|
|
@@ -675,6 +684,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
675
684
|
body: JSON.stringify({
|
|
676
685
|
url: originalUrl,
|
|
677
686
|
method: originalMethod,
|
|
687
|
+
headers: normalizeHeaders(init?.headers),
|
|
678
688
|
body: originalBody
|
|
679
689
|
})
|
|
680
690
|
});
|
|
@@ -503,6 +503,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
503
503
|
import { getContext } from "hono/context-storage";
|
|
504
504
|
import { getCookie } from "hono/cookie";
|
|
505
505
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
506
|
+
function normalizeHeaders(input) {
|
|
507
|
+
const out = {};
|
|
508
|
+
if (!input) return out;
|
|
509
|
+
new Headers(input).forEach((value, key) => {
|
|
510
|
+
out[key] = value;
|
|
511
|
+
});
|
|
512
|
+
return out;
|
|
513
|
+
}
|
|
506
514
|
function createSandboxProxyFetch(connectionId) {
|
|
507
515
|
return async (input, init) => {
|
|
508
516
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -526,6 +534,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
526
534
|
body: JSON.stringify({
|
|
527
535
|
url: originalUrl,
|
|
528
536
|
method: originalMethod,
|
|
537
|
+
headers: normalizeHeaders(init?.headers),
|
|
529
538
|
body: originalBody
|
|
530
539
|
})
|
|
531
540
|
});
|
|
@@ -560,6 +569,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
560
569
|
body: JSON.stringify({
|
|
561
570
|
url: originalUrl,
|
|
562
571
|
method: originalMethod,
|
|
572
|
+
headers: normalizeHeaders(init?.headers),
|
|
563
573
|
body: originalBody
|
|
564
574
|
})
|
|
565
575
|
});
|
|
@@ -638,6 +638,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
638
638
|
import { getContext } from "hono/context-storage";
|
|
639
639
|
import { getCookie } from "hono/cookie";
|
|
640
640
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
641
|
+
function normalizeHeaders(input) {
|
|
642
|
+
const out = {};
|
|
643
|
+
if (!input) return out;
|
|
644
|
+
new Headers(input).forEach((value, key) => {
|
|
645
|
+
out[key] = value;
|
|
646
|
+
});
|
|
647
|
+
return out;
|
|
648
|
+
}
|
|
641
649
|
function createSandboxProxyFetch(connectionId) {
|
|
642
650
|
return async (input, init) => {
|
|
643
651
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -661,6 +669,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
661
669
|
body: JSON.stringify({
|
|
662
670
|
url: originalUrl,
|
|
663
671
|
method: originalMethod,
|
|
672
|
+
headers: normalizeHeaders(init?.headers),
|
|
664
673
|
body: originalBody
|
|
665
674
|
})
|
|
666
675
|
});
|
|
@@ -695,6 +704,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
695
704
|
body: JSON.stringify({
|
|
696
705
|
url: originalUrl,
|
|
697
706
|
method: originalMethod,
|
|
707
|
+
headers: normalizeHeaders(init?.headers),
|
|
698
708
|
body: originalBody
|
|
699
709
|
})
|
|
700
710
|
});
|
package/dist/index.js
CHANGED
|
@@ -67234,7 +67234,8 @@ The business logic type for this connector is "sql".
|
|
|
67234
67234
|
},
|
|
67235
67235
|
async query(params, sql, namedParams) {
|
|
67236
67236
|
const { Pool } = await import("pg");
|
|
67237
|
-
const
|
|
67237
|
+
const cleanSql = sql.replace(/;\s*$/, "");
|
|
67238
|
+
const { text, values } = buildPositionalParams(cleanSql, namedParams);
|
|
67238
67239
|
const pool = new Pool({
|
|
67239
67240
|
connectionString: params[parameters3.connectionUrl.slug],
|
|
67240
67241
|
ssl: { rejectUnauthorized: false },
|
|
@@ -67586,7 +67587,7 @@ var bigqueryOnboarding = new ConnectorOnboarding({
|
|
|
67586
67587
|
- \`options\`: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7\u3002\u5404 option \u306E \`label\` \u306F \`\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D (id: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID)\` \u306E\u5F62\u5F0F\u3001\`value\` \u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID
|
|
67587
67588
|
3. \u30E6\u30FC\u30B6\u30FC\u304C\u9078\u629E\u3057\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E \`label\` \u304C\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u3057\u3066\u5C4A\u304F\u306E\u3067\u3001\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u306B\u9032\u3080
|
|
67588
67589
|
4. \`${listDatasetsToolName}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u9078\u629E\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B
|
|
67589
|
-
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\
|
|
67590
|
+
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\uFF08type: "select", multiSelect: true, allowFreeText: true\uFF09:
|
|
67590
67591
|
- \`question\`: \u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u9078\u629E\u3059\u308B\u3088\u3046\u4FC3\u3059\u3002\u300C\u4E0A\u8A18\u4EE5\u5916\u306E\u30D1\u30D6\u30EA\u30C3\u30AF\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F \`bigquery-public-data.{\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u540D}\` \u306E\u5F62\u5F0F\u3067\u81EA\u7531\u5165\u529B\u3067\u304D\u307E\u3059\u300D\u3068\u660E\u8A18\u3059\u308B
|
|
67591
67592
|
- \`options\`: \u4EE5\u4E0B\u3092\u9806\u756A\u306B\u7D50\u5408\u3059\u308B
|
|
67592
67593
|
1. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8: \u5404 \`{ label: datasetId, description: location }\`
|
|
@@ -67618,7 +67619,7 @@ var bigqueryOnboarding = new ConnectorOnboarding({
|
|
|
67618
67619
|
- \`options\`: The project list. Each option's \`label\` should be \`Project Name (id: project-id)\`, \`value\` should be the project ID
|
|
67619
67620
|
3. The \`label\` of the user's selected project will arrive as a message. Proceed to the next step
|
|
67620
67621
|
4. Call \`${listDatasetsToolName}\` to get the list of datasets in the selected project
|
|
67621
|
-
5. Call \`askUserQuestion\` (multiSelect: true):
|
|
67622
|
+
5. Call \`askUserQuestion\` (type: "select", multiSelect: true, allowFreeText: true):
|
|
67622
67623
|
- \`question\`: Ask the user to select datasets. State that other public datasets can be entered freely in the format \`bigquery-public-data.{dataset_name}\`
|
|
67623
67624
|
- \`options\`: Concatenate in order:
|
|
67624
67625
|
1. Project datasets: each \`{ label: datasetId, description: location }\`
|
|
@@ -68048,7 +68049,7 @@ var bigqueryOnboarding2 = new ConnectorOnboarding({
|
|
|
68048
68049
|
- \`options\`: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7\u3002\u5404 option \u306E \`label\` \u306F \`\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D (id: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID)\` \u306E\u5F62\u5F0F\u3001\`value\` \u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID
|
|
68049
68050
|
3. \u30E6\u30FC\u30B6\u30FC\u304C\u9078\u629E\u3057\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E \`label\` \u304C\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u3057\u3066\u5C4A\u304F\u306E\u3067\u3001\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u306B\u9032\u3080
|
|
68050
68051
|
4. \`${listDatasetsToolName2}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u9078\u629E\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B
|
|
68051
|
-
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\
|
|
68052
|
+
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\uFF08type: "select", multiSelect: true, allowFreeText: true\uFF09:
|
|
68052
68053
|
- \`question\`: \u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u9078\u629E\u3059\u308B\u3088\u3046\u4FC3\u3059\u3002\u300C\u4E0A\u8A18\u4EE5\u5916\u306E\u30D1\u30D6\u30EA\u30C3\u30AF\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F \`bigquery-public-data.{\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u540D}\` \u306E\u5F62\u5F0F\u3067\u81EA\u7531\u5165\u529B\u3067\u304D\u307E\u3059\u300D\u3068\u660E\u8A18\u3059\u308B
|
|
68053
68054
|
- \`options\`: \u4EE5\u4E0B\u3092\u9806\u756A\u306B\u7D50\u5408\u3059\u308B
|
|
68054
68055
|
1. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8: \u5404 \`{ label: datasetId, description: location }\`
|
|
@@ -68080,7 +68081,7 @@ var bigqueryOnboarding2 = new ConnectorOnboarding({
|
|
|
68080
68081
|
- \`options\`: The project list. Each option's \`label\` should be \`Project Name (id: project-id)\`, \`value\` should be the project ID
|
|
68081
68082
|
3. The \`label\` of the user's selected project will arrive as a message. Proceed to the next step
|
|
68082
68083
|
4. Call \`${listDatasetsToolName2}\` to get the list of datasets in the selected project
|
|
68083
|
-
5. Call \`askUserQuestion\` (multiSelect: true):
|
|
68084
|
+
5. Call \`askUserQuestion\` (type: "select", multiSelect: true, allowFreeText: true):
|
|
68084
68085
|
- \`question\`: Ask the user to select datasets. State that other public datasets can be entered freely in the format \`bigquery-public-data.{dataset_name}\`
|
|
68085
68086
|
- \`options\`: Concatenate in order:
|
|
68086
68087
|
1. Project datasets: each \`{ label: datasetId, description: location }\`
|
|
@@ -71166,10 +71167,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
|
|
|
71166
71167
|
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\u63A5\u7D9A\u4F5C\u6210\u6642\u306B\u306F\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8JSON\u306E\u307F\u304C\u8A2D\u5B9A\u6E08\u307F\u3067\u3001\u5BFE\u8C61\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3084\u30AB\u30EC\u30F3\u30C0\u30FCID\u306F\u3053\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u53D6\u5F97\u3057\u307E\u3059\u3002
|
|
71167
71168
|
|
|
71168
71169
|
1. \`askUserQuestion\` \u3067\u30E6\u30FC\u30B6\u30FC\u306B\u3001\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304CDomain-wide Delegation\u3067\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u30D2\u30A2\u30EA\u30F3\u30B0\u3059\u308B:
|
|
71170
|
+
- \`type\`: \`"freeText"\`
|
|
71169
71171
|
- \`question\`: \u300C\u30A2\u30AF\u30BB\u30B9\u3057\u305F\u3044\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u6301\u3064\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u3042\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u5165\u529B\u53EF\uFF09\u300D
|
|
71170
|
-
- \`
|
|
71171
|
-
- \`options\`: \`[]\`\uFF08\u9078\u629E\u80A2\u306A\u3057\u30FB\u81EA\u7531\u5165\u529B\u306E\u307F\uFF09
|
|
71172
|
-
- \`allowFreeText\`: \`true\`
|
|
71172
|
+
- \`placeholder\`: \`"user@example.com, admin@example.com"\`
|
|
71173
71173
|
2. \u30E6\u30FC\u30B6\u30FC\u304B\u3089\u53D7\u3051\u53D6\u3063\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\u5BFE\u5FDC\uFF09\u3092 \`updateConnectionParameters\` \u3067\u4FDD\u5B58\u3059\u308B:
|
|
71174
71174
|
- \`parameterSlug\`: \`"impersonate-email"\`
|
|
71175
71175
|
- \`options\`: \`[{ value: <\u5165\u529B\u3055\u308C\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u6587\u5B57\u5217>, label: <\u540C\u3058\u5024> }]\`\uFF081\u4EF6\u306E\u307F\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u81EA\u52D5\u9078\u629E\u3055\u308C\u308B\uFF09
|
|
@@ -71194,10 +71194,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
|
|
|
71194
71194
|
en: `Follow these steps to set up the Google Calendar connection. Only the service account JSON is provided at connection creation time \u2014 the target user email and calendar ID are collected during this setup flow.
|
|
71195
71195
|
|
|
71196
71196
|
1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
|
|
71197
|
+
- \`type\`: \`"freeText"\`
|
|
71197
71198
|
- \`question\`: "Please enter the email address of the user whose calendar you want to access (comma-separated list allowed for multiple users)"
|
|
71198
|
-
- \`
|
|
71199
|
-
- \`options\`: \`[]\` (no preset choices \u2014 free text only)
|
|
71200
|
-
- \`allowFreeText\`: \`true\`
|
|
71199
|
+
- \`placeholder\`: \`"user@example.com, admin@example.com"\`
|
|
71201
71200
|
2. Save the email(s) the user provided (comma-separated supported) via \`updateConnectionParameters\`:
|
|
71202
71201
|
- \`parameterSlug\`: \`"impersonate-email"\`
|
|
71203
71202
|
- \`options\`: \`[{ value: <the email string entered>, label: <same value> }]\` (a single option is auto-selected)
|
|
@@ -75940,7 +75939,8 @@ The business logic type for this connector is "sql".
|
|
|
75940
75939
|
},
|
|
75941
75940
|
async query(params, sql, namedParams) {
|
|
75942
75941
|
const { Pool } = await import("pg");
|
|
75943
|
-
const
|
|
75942
|
+
const cleanSql = sql.replace(/;\s*$/, "");
|
|
75943
|
+
const { text, values } = buildPositionalParams(cleanSql, namedParams);
|
|
75944
75944
|
const pool = new Pool({
|
|
75945
75945
|
connectionString: params[parameters28.connectionUrl.slug],
|
|
75946
75946
|
ssl: { rejectUnauthorized: false },
|
|
@@ -82188,9 +82188,9 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
82188
82188
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Gmail\uFF08\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\uFF09\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u63A5\u7D9A\u4F5C\u6210\u6642\u306B\u306F\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8JSON\u306E\u307F\u304C\u8A2D\u5B9A\u6E08\u307F\u3067\u3001\u59D4\u4EFB\u5BFE\u8C61\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u3053\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u53D6\u5F97\u3057\u307E\u3059\u3002
|
|
82189
82189
|
|
|
82190
82190
|
1. \`askUserQuestion\` \u3067\u3001\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304CDomain-wide Delegation\u3067\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u30D2\u30A2\u30EA\u30F3\u30B0\u3059\u308B:
|
|
82191
|
+
- \`type\`: \`"freeText"\`
|
|
82191
82192
|
- \`question\`: \u300CGmail\u3092\u53C2\u7167\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u300D
|
|
82192
|
-
- \`
|
|
82193
|
-
- \`options\`: \`[{ label: "\u4F8B: user@example.com", description: "\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B" }, { label: "\u5225\u306E\u4F8B: admin@example.com", description: "\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u3084\u5171\u6709\u30E1\u30FC\u30EB\u30DC\u30C3\u30AF\u30B9\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u3082\u53EF" }]\` \uFF08\`allowFreeText: true\` \u306E\u305F\u3081\u81EA\u7531\u5165\u529B\u53EF\uFF09
|
|
82193
|
+
- \`placeholder\`: \`"user@example.com"\`
|
|
82194
82194
|
2. \u53D7\u3051\u53D6\u3063\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092 \`updateConnectionParameters\` \u3067\u4FDD\u5B58\u3059\u308B:
|
|
82195
82195
|
- \`parameterSlug\`: \`"delegated-user-email"\`
|
|
82196
82196
|
- \`options\`: \`[{ value: <\u5165\u529B\u3055\u308C\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9>, label: <\u540C\u3058\u5024> }]\`\uFF081\u4EF6\u306E\u307F\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u81EA\u52D5\u9078\u629E\u3055\u308C\u308B\uFF09
|
|
@@ -82215,9 +82215,9 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
82215
82215
|
en: `Follow these steps to set up the Gmail (Service Account) connection. Only the service account JSON is provided at connection creation time \u2014 the delegated user email is collected during this setup flow.
|
|
82216
82216
|
|
|
82217
82217
|
1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
|
|
82218
|
+
- \`type\`: \`"freeText"\`
|
|
82218
82219
|
- \`question\`: "Please enter the email address of the Google Workspace user whose Gmail mailbox you want to access"
|
|
82219
|
-
- \`
|
|
82220
|
-
- \`options\`: \`[{ label: "e.g., user@example.com", description: "The user whose mailbox the service account will impersonate" }, { label: "e.g., admin@example.com", description: "An admin user or shared mailbox is also fine" }]\` (free text entry is allowed because \`allowFreeText: true\`)
|
|
82220
|
+
- \`placeholder\`: \`"user@example.com"\`
|
|
82221
82221
|
2. Save the email via \`updateConnectionParameters\`:
|
|
82222
82222
|
- \`parameterSlug\`: \`"delegated-user-email"\`
|
|
82223
82223
|
- \`options\`: \`[{ value: <entered email>, label: <same value> }]\` (a single option is auto-selected)
|
|
@@ -86396,6 +86396,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
86396
86396
|
import { getContext } from "hono/context-storage";
|
|
86397
86397
|
import { getCookie } from "hono/cookie";
|
|
86398
86398
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
86399
|
+
function normalizeHeaders(input) {
|
|
86400
|
+
const out = {};
|
|
86401
|
+
if (!input) return out;
|
|
86402
|
+
new Headers(input).forEach((value, key) => {
|
|
86403
|
+
out[key] = value;
|
|
86404
|
+
});
|
|
86405
|
+
return out;
|
|
86406
|
+
}
|
|
86399
86407
|
function createSandboxProxyFetch(connectionId) {
|
|
86400
86408
|
return async (input, init) => {
|
|
86401
86409
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -86419,6 +86427,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
86419
86427
|
body: JSON.stringify({
|
|
86420
86428
|
url: originalUrl,
|
|
86421
86429
|
method: originalMethod,
|
|
86430
|
+
headers: normalizeHeaders(init?.headers),
|
|
86422
86431
|
body: originalBody
|
|
86423
86432
|
})
|
|
86424
86433
|
});
|
|
@@ -86453,6 +86462,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
86453
86462
|
body: JSON.stringify({
|
|
86454
86463
|
url: originalUrl,
|
|
86455
86464
|
method: originalMethod,
|
|
86465
|
+
headers: normalizeHeaders(init?.headers),
|
|
86456
86466
|
body: originalBody
|
|
86457
86467
|
})
|
|
86458
86468
|
});
|
package/dist/main.js
CHANGED
|
@@ -67234,7 +67234,8 @@ The business logic type for this connector is "sql".
|
|
|
67234
67234
|
},
|
|
67235
67235
|
async query(params, sql, namedParams) {
|
|
67236
67236
|
const { Pool } = await import("pg");
|
|
67237
|
-
const
|
|
67237
|
+
const cleanSql = sql.replace(/;\s*$/, "");
|
|
67238
|
+
const { text, values } = buildPositionalParams(cleanSql, namedParams);
|
|
67238
67239
|
const pool = new Pool({
|
|
67239
67240
|
connectionString: params[parameters3.connectionUrl.slug],
|
|
67240
67241
|
ssl: { rejectUnauthorized: false },
|
|
@@ -67586,7 +67587,7 @@ var bigqueryOnboarding = new ConnectorOnboarding({
|
|
|
67586
67587
|
- \`options\`: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7\u3002\u5404 option \u306E \`label\` \u306F \`\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D (id: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID)\` \u306E\u5F62\u5F0F\u3001\`value\` \u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID
|
|
67587
67588
|
3. \u30E6\u30FC\u30B6\u30FC\u304C\u9078\u629E\u3057\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E \`label\` \u304C\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u3057\u3066\u5C4A\u304F\u306E\u3067\u3001\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u306B\u9032\u3080
|
|
67588
67589
|
4. \`${listDatasetsToolName}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u9078\u629E\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B
|
|
67589
|
-
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\
|
|
67590
|
+
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\uFF08type: "select", multiSelect: true, allowFreeText: true\uFF09:
|
|
67590
67591
|
- \`question\`: \u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u9078\u629E\u3059\u308B\u3088\u3046\u4FC3\u3059\u3002\u300C\u4E0A\u8A18\u4EE5\u5916\u306E\u30D1\u30D6\u30EA\u30C3\u30AF\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F \`bigquery-public-data.{\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u540D}\` \u306E\u5F62\u5F0F\u3067\u81EA\u7531\u5165\u529B\u3067\u304D\u307E\u3059\u300D\u3068\u660E\u8A18\u3059\u308B
|
|
67591
67592
|
- \`options\`: \u4EE5\u4E0B\u3092\u9806\u756A\u306B\u7D50\u5408\u3059\u308B
|
|
67592
67593
|
1. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8: \u5404 \`{ label: datasetId, description: location }\`
|
|
@@ -67618,7 +67619,7 @@ var bigqueryOnboarding = new ConnectorOnboarding({
|
|
|
67618
67619
|
- \`options\`: The project list. Each option's \`label\` should be \`Project Name (id: project-id)\`, \`value\` should be the project ID
|
|
67619
67620
|
3. The \`label\` of the user's selected project will arrive as a message. Proceed to the next step
|
|
67620
67621
|
4. Call \`${listDatasetsToolName}\` to get the list of datasets in the selected project
|
|
67621
|
-
5. Call \`askUserQuestion\` (multiSelect: true):
|
|
67622
|
+
5. Call \`askUserQuestion\` (type: "select", multiSelect: true, allowFreeText: true):
|
|
67622
67623
|
- \`question\`: Ask the user to select datasets. State that other public datasets can be entered freely in the format \`bigquery-public-data.{dataset_name}\`
|
|
67623
67624
|
- \`options\`: Concatenate in order:
|
|
67624
67625
|
1. Project datasets: each \`{ label: datasetId, description: location }\`
|
|
@@ -68048,7 +68049,7 @@ var bigqueryOnboarding2 = new ConnectorOnboarding({
|
|
|
68048
68049
|
- \`options\`: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7\u3002\u5404 option \u306E \`label\` \u306F \`\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D (id: \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID)\` \u306E\u5F62\u5F0F\u3001\`value\` \u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8ID
|
|
68049
68050
|
3. \u30E6\u30FC\u30B6\u30FC\u304C\u9078\u629E\u3057\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E \`label\` \u304C\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u3057\u3066\u5C4A\u304F\u306E\u3067\u3001\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u306B\u9032\u3080
|
|
68050
68051
|
4. \`${listDatasetsToolName2}\` \u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u9078\u629E\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\u3059\u308B
|
|
68051
|
-
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\
|
|
68052
|
+
5. \`askUserQuestion\` \u3092\u547C\u3073\u51FA\u3059\uFF08type: "select", multiSelect: true, allowFreeText: true\uFF09:
|
|
68052
68053
|
- \`question\`: \u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3092\u9078\u629E\u3059\u308B\u3088\u3046\u4FC3\u3059\u3002\u300C\u4E0A\u8A18\u4EE5\u5916\u306E\u30D1\u30D6\u30EA\u30C3\u30AF\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306F \`bigquery-public-data.{\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u540D}\` \u306E\u5F62\u5F0F\u3067\u81EA\u7531\u5165\u529B\u3067\u304D\u307E\u3059\u300D\u3068\u660E\u8A18\u3059\u308B
|
|
68053
68054
|
- \`options\`: \u4EE5\u4E0B\u3092\u9806\u756A\u306B\u7D50\u5408\u3059\u308B
|
|
68054
68055
|
1. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8: \u5404 \`{ label: datasetId, description: location }\`
|
|
@@ -68080,7 +68081,7 @@ var bigqueryOnboarding2 = new ConnectorOnboarding({
|
|
|
68080
68081
|
- \`options\`: The project list. Each option's \`label\` should be \`Project Name (id: project-id)\`, \`value\` should be the project ID
|
|
68081
68082
|
3. The \`label\` of the user's selected project will arrive as a message. Proceed to the next step
|
|
68082
68083
|
4. Call \`${listDatasetsToolName2}\` to get the list of datasets in the selected project
|
|
68083
|
-
5. Call \`askUserQuestion\` (multiSelect: true):
|
|
68084
|
+
5. Call \`askUserQuestion\` (type: "select", multiSelect: true, allowFreeText: true):
|
|
68084
68085
|
- \`question\`: Ask the user to select datasets. State that other public datasets can be entered freely in the format \`bigquery-public-data.{dataset_name}\`
|
|
68085
68086
|
- \`options\`: Concatenate in order:
|
|
68086
68087
|
1. Project datasets: each \`{ label: datasetId, description: location }\`
|
|
@@ -71166,10 +71167,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
|
|
|
71166
71167
|
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\u63A5\u7D9A\u4F5C\u6210\u6642\u306B\u306F\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8JSON\u306E\u307F\u304C\u8A2D\u5B9A\u6E08\u307F\u3067\u3001\u5BFE\u8C61\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3084\u30AB\u30EC\u30F3\u30C0\u30FCID\u306F\u3053\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u53D6\u5F97\u3057\u307E\u3059\u3002
|
|
71167
71168
|
|
|
71168
71169
|
1. \`askUserQuestion\` \u3067\u30E6\u30FC\u30B6\u30FC\u306B\u3001\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304CDomain-wide Delegation\u3067\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u30D2\u30A2\u30EA\u30F3\u30B0\u3059\u308B:
|
|
71170
|
+
- \`type\`: \`"freeText"\`
|
|
71169
71171
|
- \`question\`: \u300C\u30A2\u30AF\u30BB\u30B9\u3057\u305F\u3044\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u6301\u3064\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u3042\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u5165\u529B\u53EF\uFF09\u300D
|
|
71170
|
-
- \`
|
|
71171
|
-
- \`options\`: \`[]\`\uFF08\u9078\u629E\u80A2\u306A\u3057\u30FB\u81EA\u7531\u5165\u529B\u306E\u307F\uFF09
|
|
71172
|
-
- \`allowFreeText\`: \`true\`
|
|
71172
|
+
- \`placeholder\`: \`"user@example.com, admin@example.com"\`
|
|
71173
71173
|
2. \u30E6\u30FC\u30B6\u30FC\u304B\u3089\u53D7\u3051\u53D6\u3063\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\u5BFE\u5FDC\uFF09\u3092 \`updateConnectionParameters\` \u3067\u4FDD\u5B58\u3059\u308B:
|
|
71174
71174
|
- \`parameterSlug\`: \`"impersonate-email"\`
|
|
71175
71175
|
- \`options\`: \`[{ value: <\u5165\u529B\u3055\u308C\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u6587\u5B57\u5217>, label: <\u540C\u3058\u5024> }]\`\uFF081\u4EF6\u306E\u307F\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u81EA\u52D5\u9078\u629E\u3055\u308C\u308B\uFF09
|
|
@@ -71194,10 +71194,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
|
|
|
71194
71194
|
en: `Follow these steps to set up the Google Calendar connection. Only the service account JSON is provided at connection creation time \u2014 the target user email and calendar ID are collected during this setup flow.
|
|
71195
71195
|
|
|
71196
71196
|
1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
|
|
71197
|
+
- \`type\`: \`"freeText"\`
|
|
71197
71198
|
- \`question\`: "Please enter the email address of the user whose calendar you want to access (comma-separated list allowed for multiple users)"
|
|
71198
|
-
- \`
|
|
71199
|
-
- \`options\`: \`[]\` (no preset choices \u2014 free text only)
|
|
71200
|
-
- \`allowFreeText\`: \`true\`
|
|
71199
|
+
- \`placeholder\`: \`"user@example.com, admin@example.com"\`
|
|
71201
71200
|
2. Save the email(s) the user provided (comma-separated supported) via \`updateConnectionParameters\`:
|
|
71202
71201
|
- \`parameterSlug\`: \`"impersonate-email"\`
|
|
71203
71202
|
- \`options\`: \`[{ value: <the email string entered>, label: <same value> }]\` (a single option is auto-selected)
|
|
@@ -75940,7 +75939,8 @@ The business logic type for this connector is "sql".
|
|
|
75940
75939
|
},
|
|
75941
75940
|
async query(params, sql, namedParams) {
|
|
75942
75941
|
const { Pool } = await import("pg");
|
|
75943
|
-
const
|
|
75942
|
+
const cleanSql = sql.replace(/;\s*$/, "");
|
|
75943
|
+
const { text, values } = buildPositionalParams(cleanSql, namedParams);
|
|
75944
75944
|
const pool = new Pool({
|
|
75945
75945
|
connectionString: params[parameters28.connectionUrl.slug],
|
|
75946
75946
|
ssl: { rejectUnauthorized: false },
|
|
@@ -82188,9 +82188,9 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
82188
82188
|
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Gmail\uFF08\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\uFF09\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u63A5\u7D9A\u4F5C\u6210\u6642\u306B\u306F\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8JSON\u306E\u307F\u304C\u8A2D\u5B9A\u6E08\u307F\u3067\u3001\u59D4\u4EFB\u5BFE\u8C61\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306F\u3053\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u53D6\u5F97\u3057\u307E\u3059\u3002
|
|
82189
82189
|
|
|
82190
82190
|
1. \`askUserQuestion\` \u3067\u3001\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304CDomain-wide Delegation\u3067\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u30D2\u30A2\u30EA\u30F3\u30B0\u3059\u308B:
|
|
82191
|
+
- \`type\`: \`"freeText"\`
|
|
82191
82192
|
- \`question\`: \u300CGmail\u3092\u53C2\u7167\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u300D
|
|
82192
|
-
- \`
|
|
82193
|
-
- \`options\`: \`[{ label: "\u4F8B: user@example.com", description: "\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B" }, { label: "\u5225\u306E\u4F8B: admin@example.com", description: "\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u3084\u5171\u6709\u30E1\u30FC\u30EB\u30DC\u30C3\u30AF\u30B9\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u3082\u53EF" }]\` \uFF08\`allowFreeText: true\` \u306E\u305F\u3081\u81EA\u7531\u5165\u529B\u53EF\uFF09
|
|
82193
|
+
- \`placeholder\`: \`"user@example.com"\`
|
|
82194
82194
|
2. \u53D7\u3051\u53D6\u3063\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092 \`updateConnectionParameters\` \u3067\u4FDD\u5B58\u3059\u308B:
|
|
82195
82195
|
- \`parameterSlug\`: \`"delegated-user-email"\`
|
|
82196
82196
|
- \`options\`: \`[{ value: <\u5165\u529B\u3055\u308C\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9>, label: <\u540C\u3058\u5024> }]\`\uFF081\u4EF6\u306E\u307F\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u81EA\u52D5\u9078\u629E\u3055\u308C\u308B\uFF09
|
|
@@ -82215,9 +82215,9 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
82215
82215
|
en: `Follow these steps to set up the Gmail (Service Account) connection. Only the service account JSON is provided at connection creation time \u2014 the delegated user email is collected during this setup flow.
|
|
82216
82216
|
|
|
82217
82217
|
1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
|
|
82218
|
+
- \`type\`: \`"freeText"\`
|
|
82218
82219
|
- \`question\`: "Please enter the email address of the Google Workspace user whose Gmail mailbox you want to access"
|
|
82219
|
-
- \`
|
|
82220
|
-
- \`options\`: \`[{ label: "e.g., user@example.com", description: "The user whose mailbox the service account will impersonate" }, { label: "e.g., admin@example.com", description: "An admin user or shared mailbox is also fine" }]\` (free text entry is allowed because \`allowFreeText: true\`)
|
|
82220
|
+
- \`placeholder\`: \`"user@example.com"\`
|
|
82221
82221
|
2. Save the email via \`updateConnectionParameters\`:
|
|
82222
82222
|
- \`parameterSlug\`: \`"delegated-user-email"\`
|
|
82223
82223
|
- \`options\`: \`[{ value: <entered email>, label: <same value> }]\` (a single option is auto-selected)
|
|
@@ -86396,6 +86396,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
86396
86396
|
import { getContext } from "hono/context-storage";
|
|
86397
86397
|
import { getCookie } from "hono/cookie";
|
|
86398
86398
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
86399
|
+
function normalizeHeaders(input) {
|
|
86400
|
+
const out = {};
|
|
86401
|
+
if (!input) return out;
|
|
86402
|
+
new Headers(input).forEach((value, key) => {
|
|
86403
|
+
out[key] = value;
|
|
86404
|
+
});
|
|
86405
|
+
return out;
|
|
86406
|
+
}
|
|
86399
86407
|
function createSandboxProxyFetch(connectionId) {
|
|
86400
86408
|
return async (input, init) => {
|
|
86401
86409
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -86419,6 +86427,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
86419
86427
|
body: JSON.stringify({
|
|
86420
86428
|
url: originalUrl,
|
|
86421
86429
|
method: originalMethod,
|
|
86430
|
+
headers: normalizeHeaders(init?.headers),
|
|
86422
86431
|
body: originalBody
|
|
86423
86432
|
})
|
|
86424
86433
|
});
|
|
@@ -86453,6 +86462,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
86453
86462
|
body: JSON.stringify({
|
|
86454
86463
|
url: originalUrl,
|
|
86455
86464
|
method: originalMethod,
|
|
86465
|
+
headers: normalizeHeaders(init?.headers),
|
|
86456
86466
|
body: originalBody
|
|
86457
86467
|
})
|
|
86458
86468
|
});
|