@squadbase/vite-server 0.1.3 → 0.1.4-dev.1
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 +265 -71
- 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 +487 -110
- 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 +265 -71
- package/dist/main.js +265 -71
- package/dist/vite-plugin.js +265 -71
- package/package.json +1 -1
|
@@ -516,6 +516,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
516
516
|
import { getContext } from "hono/context-storage";
|
|
517
517
|
import { getCookie } from "hono/cookie";
|
|
518
518
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
519
|
+
function normalizeHeaders(input) {
|
|
520
|
+
const out = {};
|
|
521
|
+
if (!input) return out;
|
|
522
|
+
new Headers(input).forEach((value, key) => {
|
|
523
|
+
out[key] = value;
|
|
524
|
+
});
|
|
525
|
+
return out;
|
|
526
|
+
}
|
|
519
527
|
function createSandboxProxyFetch(connectionId) {
|
|
520
528
|
return async (input, init) => {
|
|
521
529
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -539,6 +547,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
539
547
|
body: JSON.stringify({
|
|
540
548
|
url: originalUrl,
|
|
541
549
|
method: originalMethod,
|
|
550
|
+
headers: normalizeHeaders(init?.headers),
|
|
542
551
|
body: originalBody
|
|
543
552
|
})
|
|
544
553
|
});
|
|
@@ -573,6 +582,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
573
582
|
body: JSON.stringify({
|
|
574
583
|
url: originalUrl,
|
|
575
584
|
method: originalMethod,
|
|
585
|
+
headers: normalizeHeaders(init?.headers),
|
|
576
586
|
body: originalBody
|
|
577
587
|
})
|
|
578
588
|
});
|
|
@@ -640,6 +640,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
640
640
|
import { getContext } from "hono/context-storage";
|
|
641
641
|
import { getCookie } from "hono/cookie";
|
|
642
642
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
643
|
+
function normalizeHeaders(input) {
|
|
644
|
+
const out = {};
|
|
645
|
+
if (!input) return out;
|
|
646
|
+
new Headers(input).forEach((value, key) => {
|
|
647
|
+
out[key] = value;
|
|
648
|
+
});
|
|
649
|
+
return out;
|
|
650
|
+
}
|
|
643
651
|
function createSandboxProxyFetch(connectionId) {
|
|
644
652
|
return async (input, init) => {
|
|
645
653
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -663,6 +671,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
663
671
|
body: JSON.stringify({
|
|
664
672
|
url: originalUrl,
|
|
665
673
|
method: originalMethod,
|
|
674
|
+
headers: normalizeHeaders(init?.headers),
|
|
666
675
|
body: originalBody
|
|
667
676
|
})
|
|
668
677
|
});
|
|
@@ -697,6 +706,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
697
706
|
body: JSON.stringify({
|
|
698
707
|
url: originalUrl,
|
|
699
708
|
method: originalMethod,
|
|
709
|
+
headers: normalizeHeaders(init?.headers),
|
|
700
710
|
body: originalBody
|
|
701
711
|
})
|
|
702
712
|
});
|
package/dist/connectors/dbt.js
CHANGED
|
@@ -821,6 +821,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
821
821
|
import { getContext } from "hono/context-storage";
|
|
822
822
|
import { getCookie } from "hono/cookie";
|
|
823
823
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
824
|
+
function normalizeHeaders(input) {
|
|
825
|
+
const out = {};
|
|
826
|
+
if (!input) return out;
|
|
827
|
+
new Headers(input).forEach((value, key) => {
|
|
828
|
+
out[key] = value;
|
|
829
|
+
});
|
|
830
|
+
return out;
|
|
831
|
+
}
|
|
824
832
|
function createSandboxProxyFetch(connectionId) {
|
|
825
833
|
return async (input, init) => {
|
|
826
834
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -844,6 +852,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
844
852
|
body: JSON.stringify({
|
|
845
853
|
url: originalUrl,
|
|
846
854
|
method: originalMethod,
|
|
855
|
+
headers: normalizeHeaders(init?.headers),
|
|
847
856
|
body: originalBody
|
|
848
857
|
})
|
|
849
858
|
});
|
|
@@ -878,6 +887,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
878
887
|
body: JSON.stringify({
|
|
879
888
|
url: originalUrl,
|
|
880
889
|
method: originalMethod,
|
|
890
|
+
headers: normalizeHeaders(init?.headers),
|
|
881
891
|
body: originalBody
|
|
882
892
|
})
|
|
883
893
|
});
|
package/dist/connectors/gamma.js
CHANGED
|
@@ -753,6 +753,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
753
753
|
import { getContext } from "hono/context-storage";
|
|
754
754
|
import { getCookie } from "hono/cookie";
|
|
755
755
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
756
|
+
function normalizeHeaders(input) {
|
|
757
|
+
const out = {};
|
|
758
|
+
if (!input) return out;
|
|
759
|
+
new Headers(input).forEach((value, key) => {
|
|
760
|
+
out[key] = value;
|
|
761
|
+
});
|
|
762
|
+
return out;
|
|
763
|
+
}
|
|
756
764
|
function createSandboxProxyFetch(connectionId) {
|
|
757
765
|
return async (input, init) => {
|
|
758
766
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -776,6 +784,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
776
784
|
body: JSON.stringify({
|
|
777
785
|
url: originalUrl,
|
|
778
786
|
method: originalMethod,
|
|
787
|
+
headers: normalizeHeaders(init?.headers),
|
|
779
788
|
body: originalBody
|
|
780
789
|
})
|
|
781
790
|
});
|
|
@@ -810,6 +819,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
810
819
|
body: JSON.stringify({
|
|
811
820
|
url: originalUrl,
|
|
812
821
|
method: originalMethod,
|
|
822
|
+
headers: normalizeHeaders(init?.headers),
|
|
813
823
|
body: originalBody
|
|
814
824
|
})
|
|
815
825
|
});
|
|
@@ -252,6 +252,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
252
252
|
import { getContext } from "hono/context-storage";
|
|
253
253
|
import { getCookie } from "hono/cookie";
|
|
254
254
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
255
|
+
function normalizeHeaders(input) {
|
|
256
|
+
const out = {};
|
|
257
|
+
if (!input) return out;
|
|
258
|
+
new Headers(input).forEach((value, key) => {
|
|
259
|
+
out[key] = value;
|
|
260
|
+
});
|
|
261
|
+
return out;
|
|
262
|
+
}
|
|
255
263
|
function createSandboxProxyFetch(connectionId) {
|
|
256
264
|
return async (input, init) => {
|
|
257
265
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -275,6 +283,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
275
283
|
body: JSON.stringify({
|
|
276
284
|
url: originalUrl,
|
|
277
285
|
method: originalMethod,
|
|
286
|
+
headers: normalizeHeaders(init?.headers),
|
|
278
287
|
body: originalBody
|
|
279
288
|
})
|
|
280
289
|
});
|
|
@@ -309,6 +318,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
309
318
|
body: JSON.stringify({
|
|
310
319
|
url: originalUrl,
|
|
311
320
|
method: originalMethod,
|
|
321
|
+
headers: normalizeHeaders(init?.headers),
|
|
312
322
|
body: originalBody
|
|
313
323
|
})
|
|
314
324
|
});
|
|
@@ -657,6 +657,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
657
657
|
import { getContext } from "hono/context-storage";
|
|
658
658
|
import { getCookie } from "hono/cookie";
|
|
659
659
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
660
|
+
function normalizeHeaders(input) {
|
|
661
|
+
const out = {};
|
|
662
|
+
if (!input) return out;
|
|
663
|
+
new Headers(input).forEach((value, key) => {
|
|
664
|
+
out[key] = value;
|
|
665
|
+
});
|
|
666
|
+
return out;
|
|
667
|
+
}
|
|
660
668
|
function createSandboxProxyFetch(connectionId) {
|
|
661
669
|
return async (input, init) => {
|
|
662
670
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -680,6 +688,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
680
688
|
body: JSON.stringify({
|
|
681
689
|
url: originalUrl,
|
|
682
690
|
method: originalMethod,
|
|
691
|
+
headers: normalizeHeaders(init?.headers),
|
|
683
692
|
body: originalBody
|
|
684
693
|
})
|
|
685
694
|
});
|
|
@@ -714,6 +723,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
714
723
|
body: JSON.stringify({
|
|
715
724
|
url: originalUrl,
|
|
716
725
|
method: originalMethod,
|
|
726
|
+
headers: normalizeHeaders(init?.headers),
|
|
717
727
|
body: originalBody
|
|
718
728
|
})
|
|
719
729
|
});
|
package/dist/connectors/gmail.js
CHANGED
|
@@ -517,9 +517,9 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
517
517
|
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
|
|
518
518
|
|
|
519
519
|
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:
|
|
520
|
+
- \`type\`: \`"freeText"\`
|
|
520
521
|
- \`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
|
|
521
|
-
- \`
|
|
522
|
-
- \`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
|
|
522
|
+
- \`placeholder\`: \`"user@example.com"\`
|
|
523
523
|
2. \u53D7\u3051\u53D6\u3063\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092 \`updateConnectionParameters\` \u3067\u4FDD\u5B58\u3059\u308B:
|
|
524
524
|
- \`parameterSlug\`: \`"delegated-user-email"\`
|
|
525
525
|
- \`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
|
|
@@ -544,9 +544,9 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
544
544
|
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.
|
|
545
545
|
|
|
546
546
|
1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
|
|
547
|
+
- \`type\`: \`"freeText"\`
|
|
547
548
|
- \`question\`: "Please enter the email address of the Google Workspace user whose Gmail mailbox you want to access"
|
|
548
|
-
- \`
|
|
549
|
-
- \`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\`)
|
|
549
|
+
- \`placeholder\`: \`"user@example.com"\`
|
|
550
550
|
2. Save the email via \`updateConnectionParameters\`:
|
|
551
551
|
- \`parameterSlug\`: \`"delegated-user-email"\`
|
|
552
552
|
- \`options\`: \`[{ value: <entered email>, label: <same value> }]\` (a single option is auto-selected)
|
|
@@ -822,6 +822,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
822
822
|
import { getContext } from "hono/context-storage";
|
|
823
823
|
import { getCookie } from "hono/cookie";
|
|
824
824
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
825
|
+
function normalizeHeaders(input) {
|
|
826
|
+
const out = {};
|
|
827
|
+
if (!input) return out;
|
|
828
|
+
new Headers(input).forEach((value, key) => {
|
|
829
|
+
out[key] = value;
|
|
830
|
+
});
|
|
831
|
+
return out;
|
|
832
|
+
}
|
|
825
833
|
function createSandboxProxyFetch(connectionId) {
|
|
826
834
|
return async (input, init) => {
|
|
827
835
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -845,6 +853,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
845
853
|
body: JSON.stringify({
|
|
846
854
|
url: originalUrl,
|
|
847
855
|
method: originalMethod,
|
|
856
|
+
headers: normalizeHeaders(init?.headers),
|
|
848
857
|
body: originalBody
|
|
849
858
|
})
|
|
850
859
|
});
|
|
@@ -879,6 +888,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
879
888
|
body: JSON.stringify({
|
|
880
889
|
url: originalUrl,
|
|
881
890
|
method: originalMethod,
|
|
891
|
+
headers: normalizeHeaders(init?.headers),
|
|
882
892
|
body: originalBody
|
|
883
893
|
})
|
|
884
894
|
});
|
|
@@ -832,6 +832,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
832
832
|
import { getContext } from "hono/context-storage";
|
|
833
833
|
import { getCookie } from "hono/cookie";
|
|
834
834
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
835
|
+
function normalizeHeaders(input) {
|
|
836
|
+
const out = {};
|
|
837
|
+
if (!input) return out;
|
|
838
|
+
new Headers(input).forEach((value, key) => {
|
|
839
|
+
out[key] = value;
|
|
840
|
+
});
|
|
841
|
+
return out;
|
|
842
|
+
}
|
|
835
843
|
function createSandboxProxyFetch(connectionId) {
|
|
836
844
|
return async (input, init) => {
|
|
837
845
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -855,6 +863,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
855
863
|
body: JSON.stringify({
|
|
856
864
|
url: originalUrl,
|
|
857
865
|
method: originalMethod,
|
|
866
|
+
headers: normalizeHeaders(init?.headers),
|
|
858
867
|
body: originalBody
|
|
859
868
|
})
|
|
860
869
|
});
|
|
@@ -889,6 +898,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
889
898
|
body: JSON.stringify({
|
|
890
899
|
url: originalUrl,
|
|
891
900
|
method: originalMethod,
|
|
901
|
+
headers: normalizeHeaders(init?.headers),
|
|
892
902
|
body: originalBody
|
|
893
903
|
})
|
|
894
904
|
});
|
|
@@ -912,6 +912,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
912
912
|
import { getContext } from "hono/context-storage";
|
|
913
913
|
import { getCookie } from "hono/cookie";
|
|
914
914
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
915
|
+
function normalizeHeaders(input) {
|
|
916
|
+
const out = {};
|
|
917
|
+
if (!input) return out;
|
|
918
|
+
new Headers(input).forEach((value, key) => {
|
|
919
|
+
out[key] = value;
|
|
920
|
+
});
|
|
921
|
+
return out;
|
|
922
|
+
}
|
|
915
923
|
function createSandboxProxyFetch(connectionId) {
|
|
916
924
|
return async (input, init) => {
|
|
917
925
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -935,6 +943,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
935
943
|
body: JSON.stringify({
|
|
936
944
|
url: originalUrl,
|
|
937
945
|
method: originalMethod,
|
|
946
|
+
headers: normalizeHeaders(init?.headers),
|
|
938
947
|
body: originalBody
|
|
939
948
|
})
|
|
940
949
|
});
|
|
@@ -969,6 +978,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
969
978
|
body: JSON.stringify({
|
|
970
979
|
url: originalUrl,
|
|
971
980
|
method: originalMethod,
|
|
981
|
+
headers: normalizeHeaders(init?.headers),
|
|
972
982
|
body: originalBody
|
|
973
983
|
})
|
|
974
984
|
});
|
|
@@ -639,6 +639,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
639
639
|
import { getContext } from "hono/context-storage";
|
|
640
640
|
import { getCookie } from "hono/cookie";
|
|
641
641
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
642
|
+
function normalizeHeaders(input) {
|
|
643
|
+
const out = {};
|
|
644
|
+
if (!input) return out;
|
|
645
|
+
new Headers(input).forEach((value, key) => {
|
|
646
|
+
out[key] = value;
|
|
647
|
+
});
|
|
648
|
+
return out;
|
|
649
|
+
}
|
|
642
650
|
function createSandboxProxyFetch(connectionId) {
|
|
643
651
|
return async (input, init) => {
|
|
644
652
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -662,6 +670,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
662
670
|
body: JSON.stringify({
|
|
663
671
|
url: originalUrl,
|
|
664
672
|
method: originalMethod,
|
|
673
|
+
headers: normalizeHeaders(init?.headers),
|
|
665
674
|
body: originalBody
|
|
666
675
|
})
|
|
667
676
|
});
|
|
@@ -696,6 +705,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
696
705
|
body: JSON.stringify({
|
|
697
706
|
url: originalUrl,
|
|
698
707
|
method: originalMethod,
|
|
708
|
+
headers: normalizeHeaders(init?.headers),
|
|
699
709
|
body: originalBody
|
|
700
710
|
})
|
|
701
711
|
});
|
|
@@ -757,6 +757,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
757
757
|
import { getContext } from "hono/context-storage";
|
|
758
758
|
import { getCookie } from "hono/cookie";
|
|
759
759
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
760
|
+
function normalizeHeaders(input) {
|
|
761
|
+
const out = {};
|
|
762
|
+
if (!input) return out;
|
|
763
|
+
new Headers(input).forEach((value, key) => {
|
|
764
|
+
out[key] = value;
|
|
765
|
+
});
|
|
766
|
+
return out;
|
|
767
|
+
}
|
|
760
768
|
function createSandboxProxyFetch(connectionId) {
|
|
761
769
|
return async (input, init) => {
|
|
762
770
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -780,6 +788,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
780
788
|
body: JSON.stringify({
|
|
781
789
|
url: originalUrl,
|
|
782
790
|
method: originalMethod,
|
|
791
|
+
headers: normalizeHeaders(init?.headers),
|
|
783
792
|
body: originalBody
|
|
784
793
|
})
|
|
785
794
|
});
|
|
@@ -814,6 +823,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
814
823
|
body: JSON.stringify({
|
|
815
824
|
url: originalUrl,
|
|
816
825
|
method: originalMethod,
|
|
826
|
+
headers: normalizeHeaders(init?.headers),
|
|
817
827
|
body: originalBody
|
|
818
828
|
})
|
|
819
829
|
});
|
|
@@ -561,10 +561,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
|
|
|
561
561
|
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
|
|
562
562
|
|
|
563
563
|
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:
|
|
564
|
+
- \`type\`: \`"freeText"\`
|
|
564
565
|
- \`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
|
|
565
|
-
- \`
|
|
566
|
-
- \`options\`: \`[]\`\uFF08\u9078\u629E\u80A2\u306A\u3057\u30FB\u81EA\u7531\u5165\u529B\u306E\u307F\uFF09
|
|
567
|
-
- \`allowFreeText\`: \`true\`
|
|
566
|
+
- \`placeholder\`: \`"user@example.com, admin@example.com"\`
|
|
568
567
|
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:
|
|
569
568
|
- \`parameterSlug\`: \`"impersonate-email"\`
|
|
570
569
|
- \`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
|
|
@@ -589,10 +588,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
|
|
|
589
588
|
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.
|
|
590
589
|
|
|
591
590
|
1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
|
|
591
|
+
- \`type\`: \`"freeText"\`
|
|
592
592
|
- \`question\`: "Please enter the email address of the user whose calendar you want to access (comma-separated list allowed for multiple users)"
|
|
593
|
-
- \`
|
|
594
|
-
- \`options\`: \`[]\` (no preset choices \u2014 free text only)
|
|
595
|
-
- \`allowFreeText\`: \`true\`
|
|
593
|
+
- \`placeholder\`: \`"user@example.com, admin@example.com"\`
|
|
596
594
|
2. Save the email(s) the user provided (comma-separated supported) via \`updateConnectionParameters\`:
|
|
597
595
|
- \`parameterSlug\`: \`"impersonate-email"\`
|
|
598
596
|
- \`options\`: \`[{ value: <the email string entered>, label: <same value> }]\` (a single option is auto-selected)
|
|
@@ -931,6 +929,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
931
929
|
import { getContext } from "hono/context-storage";
|
|
932
930
|
import { getCookie } from "hono/cookie";
|
|
933
931
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
932
|
+
function normalizeHeaders(input) {
|
|
933
|
+
const out = {};
|
|
934
|
+
if (!input) return out;
|
|
935
|
+
new Headers(input).forEach((value, key) => {
|
|
936
|
+
out[key] = value;
|
|
937
|
+
});
|
|
938
|
+
return out;
|
|
939
|
+
}
|
|
934
940
|
function createSandboxProxyFetch(connectionId) {
|
|
935
941
|
return async (input, init) => {
|
|
936
942
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -954,6 +960,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
954
960
|
body: JSON.stringify({
|
|
955
961
|
url: originalUrl,
|
|
956
962
|
method: originalMethod,
|
|
963
|
+
headers: normalizeHeaders(init?.headers),
|
|
957
964
|
body: originalBody
|
|
958
965
|
})
|
|
959
966
|
});
|
|
@@ -988,6 +995,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
988
995
|
body: JSON.stringify({
|
|
989
996
|
url: originalUrl,
|
|
990
997
|
method: originalMethod,
|
|
998
|
+
headers: normalizeHeaders(init?.headers),
|
|
991
999
|
body: originalBody
|
|
992
1000
|
})
|
|
993
1001
|
});
|
|
@@ -518,6 +518,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
518
518
|
import { getContext } from "hono/context-storage";
|
|
519
519
|
import { getCookie } from "hono/cookie";
|
|
520
520
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
521
|
+
function normalizeHeaders(input) {
|
|
522
|
+
const out = {};
|
|
523
|
+
if (!input) return out;
|
|
524
|
+
new Headers(input).forEach((value, key) => {
|
|
525
|
+
out[key] = value;
|
|
526
|
+
});
|
|
527
|
+
return out;
|
|
528
|
+
}
|
|
521
529
|
function createSandboxProxyFetch(connectionId) {
|
|
522
530
|
return async (input, init) => {
|
|
523
531
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -541,6 +549,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
541
549
|
body: JSON.stringify({
|
|
542
550
|
url: originalUrl,
|
|
543
551
|
method: originalMethod,
|
|
552
|
+
headers: normalizeHeaders(init?.headers),
|
|
544
553
|
body: originalBody
|
|
545
554
|
})
|
|
546
555
|
});
|
|
@@ -575,6 +584,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
575
584
|
body: JSON.stringify({
|
|
576
585
|
url: originalUrl,
|
|
577
586
|
method: originalMethod,
|
|
587
|
+
headers: normalizeHeaders(init?.headers),
|
|
578
588
|
body: originalBody
|
|
579
589
|
})
|
|
580
590
|
});
|
|
@@ -762,6 +762,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
762
762
|
import { getContext } from "hono/context-storage";
|
|
763
763
|
import { getCookie } from "hono/cookie";
|
|
764
764
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
765
|
+
function normalizeHeaders(input) {
|
|
766
|
+
const out = {};
|
|
767
|
+
if (!input) return out;
|
|
768
|
+
new Headers(input).forEach((value, key) => {
|
|
769
|
+
out[key] = value;
|
|
770
|
+
});
|
|
771
|
+
return out;
|
|
772
|
+
}
|
|
765
773
|
function createSandboxProxyFetch(connectionId) {
|
|
766
774
|
return async (input, init) => {
|
|
767
775
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -785,6 +793,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
785
793
|
body: JSON.stringify({
|
|
786
794
|
url: originalUrl,
|
|
787
795
|
method: originalMethod,
|
|
796
|
+
headers: normalizeHeaders(init?.headers),
|
|
788
797
|
body: originalBody
|
|
789
798
|
})
|
|
790
799
|
});
|
|
@@ -819,6 +828,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
819
828
|
body: JSON.stringify({
|
|
820
829
|
url: originalUrl,
|
|
821
830
|
method: originalMethod,
|
|
831
|
+
headers: normalizeHeaders(init?.headers),
|
|
822
832
|
body: originalBody
|
|
823
833
|
})
|
|
824
834
|
});
|
|
@@ -576,6 +576,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
576
576
|
import { getContext } from "hono/context-storage";
|
|
577
577
|
import { getCookie } from "hono/cookie";
|
|
578
578
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
579
|
+
function normalizeHeaders(input) {
|
|
580
|
+
const out = {};
|
|
581
|
+
if (!input) return out;
|
|
582
|
+
new Headers(input).forEach((value, key) => {
|
|
583
|
+
out[key] = value;
|
|
584
|
+
});
|
|
585
|
+
return out;
|
|
586
|
+
}
|
|
579
587
|
function createSandboxProxyFetch(connectionId) {
|
|
580
588
|
return async (input, init) => {
|
|
581
589
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -599,6 +607,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
599
607
|
body: JSON.stringify({
|
|
600
608
|
url: originalUrl,
|
|
601
609
|
method: originalMethod,
|
|
610
|
+
headers: normalizeHeaders(init?.headers),
|
|
602
611
|
body: originalBody
|
|
603
612
|
})
|
|
604
613
|
});
|
|
@@ -633,6 +642,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
633
642
|
body: JSON.stringify({
|
|
634
643
|
url: originalUrl,
|
|
635
644
|
method: originalMethod,
|
|
645
|
+
headers: normalizeHeaders(init?.headers),
|
|
636
646
|
body: originalBody
|
|
637
647
|
})
|
|
638
648
|
});
|
|
@@ -550,6 +550,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
550
550
|
import { getContext } from "hono/context-storage";
|
|
551
551
|
import { getCookie } from "hono/cookie";
|
|
552
552
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
553
|
+
function normalizeHeaders(input) {
|
|
554
|
+
const out = {};
|
|
555
|
+
if (!input) return out;
|
|
556
|
+
new Headers(input).forEach((value, key) => {
|
|
557
|
+
out[key] = value;
|
|
558
|
+
});
|
|
559
|
+
return out;
|
|
560
|
+
}
|
|
553
561
|
function createSandboxProxyFetch(connectionId) {
|
|
554
562
|
return async (input, init) => {
|
|
555
563
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -573,6 +581,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
573
581
|
body: JSON.stringify({
|
|
574
582
|
url: originalUrl,
|
|
575
583
|
method: originalMethod,
|
|
584
|
+
headers: normalizeHeaders(init?.headers),
|
|
576
585
|
body: originalBody
|
|
577
586
|
})
|
|
578
587
|
});
|
|
@@ -607,6 +616,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
607
616
|
body: JSON.stringify({
|
|
608
617
|
url: originalUrl,
|
|
609
618
|
method: originalMethod,
|
|
619
|
+
headers: normalizeHeaders(init?.headers),
|
|
610
620
|
body: originalBody
|
|
611
621
|
})
|
|
612
622
|
});
|
|
@@ -562,6 +562,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
562
562
|
import { getContext } from "hono/context-storage";
|
|
563
563
|
import { getCookie } from "hono/cookie";
|
|
564
564
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
565
|
+
function normalizeHeaders(input) {
|
|
566
|
+
const out = {};
|
|
567
|
+
if (!input) return out;
|
|
568
|
+
new Headers(input).forEach((value, key) => {
|
|
569
|
+
out[key] = value;
|
|
570
|
+
});
|
|
571
|
+
return out;
|
|
572
|
+
}
|
|
565
573
|
function createSandboxProxyFetch(connectionId) {
|
|
566
574
|
return async (input, init) => {
|
|
567
575
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -585,6 +593,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
585
593
|
body: JSON.stringify({
|
|
586
594
|
url: originalUrl,
|
|
587
595
|
method: originalMethod,
|
|
596
|
+
headers: normalizeHeaders(init?.headers),
|
|
588
597
|
body: originalBody
|
|
589
598
|
})
|
|
590
599
|
});
|
|
@@ -619,6 +628,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
619
628
|
body: JSON.stringify({
|
|
620
629
|
url: originalUrl,
|
|
621
630
|
method: originalMethod,
|
|
631
|
+
headers: normalizeHeaders(init?.headers),
|
|
622
632
|
body: originalBody
|
|
623
633
|
})
|
|
624
634
|
});
|
|
@@ -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
|
});
|
|
@@ -548,6 +548,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
548
548
|
import { getContext } from "hono/context-storage";
|
|
549
549
|
import { getCookie } from "hono/cookie";
|
|
550
550
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
551
|
+
function normalizeHeaders(input) {
|
|
552
|
+
const out = {};
|
|
553
|
+
if (!input) return out;
|
|
554
|
+
new Headers(input).forEach((value, key) => {
|
|
555
|
+
out[key] = value;
|
|
556
|
+
});
|
|
557
|
+
return out;
|
|
558
|
+
}
|
|
551
559
|
function createSandboxProxyFetch(connectionId) {
|
|
552
560
|
return async (input, init) => {
|
|
553
561
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -571,6 +579,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
571
579
|
body: JSON.stringify({
|
|
572
580
|
url: originalUrl,
|
|
573
581
|
method: originalMethod,
|
|
582
|
+
headers: normalizeHeaders(init?.headers),
|
|
574
583
|
body: originalBody
|
|
575
584
|
})
|
|
576
585
|
});
|
|
@@ -605,6 +614,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
605
614
|
body: JSON.stringify({
|
|
606
615
|
url: originalUrl,
|
|
607
616
|
method: originalMethod,
|
|
617
|
+
headers: normalizeHeaders(init?.headers),
|
|
608
618
|
body: originalBody
|
|
609
619
|
})
|
|
610
620
|
});
|
|
@@ -508,6 +508,14 @@ function resolveEnvVarOptional(entry, key) {
|
|
|
508
508
|
import { getContext } from "hono/context-storage";
|
|
509
509
|
import { getCookie } from "hono/cookie";
|
|
510
510
|
var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
|
|
511
|
+
function normalizeHeaders(input) {
|
|
512
|
+
const out = {};
|
|
513
|
+
if (!input) return out;
|
|
514
|
+
new Headers(input).forEach((value, key) => {
|
|
515
|
+
out[key] = value;
|
|
516
|
+
});
|
|
517
|
+
return out;
|
|
518
|
+
}
|
|
511
519
|
function createSandboxProxyFetch(connectionId) {
|
|
512
520
|
return async (input, init) => {
|
|
513
521
|
const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
|
|
@@ -531,6 +539,7 @@ function createSandboxProxyFetch(connectionId) {
|
|
|
531
539
|
body: JSON.stringify({
|
|
532
540
|
url: originalUrl,
|
|
533
541
|
method: originalMethod,
|
|
542
|
+
headers: normalizeHeaders(init?.headers),
|
|
534
543
|
body: originalBody
|
|
535
544
|
})
|
|
536
545
|
});
|
|
@@ -565,6 +574,7 @@ function createDeployedAppProxyFetch(connectionId) {
|
|
|
565
574
|
body: JSON.stringify({
|
|
566
575
|
url: originalUrl,
|
|
567
576
|
method: originalMethod,
|
|
577
|
+
headers: normalizeHeaders(init?.headers),
|
|
568
578
|
body: originalBody
|
|
569
579
|
})
|
|
570
580
|
});
|