@squadbase/vite-server 0.1.17-dev.3b633bb → 0.1.17-dev.7408ec4
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 +57 -32
- package/dist/connectors/airtable-oauth.js +0 -6
- package/dist/connectors/airtable.js +0 -6
- package/dist/connectors/amplitude.js +0 -6
- package/dist/connectors/asana.js +0 -6
- package/dist/connectors/attio.js +0 -6
- package/dist/connectors/aws-billing.js +0 -6
- package/dist/connectors/azure-sql.js +0 -6
- package/dist/connectors/backlog-api-key.js +0 -6
- package/dist/connectors/clickup.js +0 -6
- package/dist/connectors/cosmosdb.js +0 -6
- package/dist/connectors/customerio.js +0 -6
- package/dist/connectors/dbt.js +0 -6
- package/dist/connectors/freshdesk.js +0 -6
- package/dist/connectors/freshsales.js +0 -6
- package/dist/connectors/freshservice.js +0 -6
- package/dist/connectors/gamma.js +0 -6
- package/dist/connectors/github.js +0 -6
- package/dist/connectors/gmail-oauth.js +0 -6
- package/dist/connectors/gmail.js +0 -6
- package/dist/connectors/google-ads.js +0 -6
- package/dist/connectors/google-analytics-oauth.js +0 -6
- package/dist/connectors/google-analytics.js +70 -38
- package/dist/connectors/google-audit-log.js +0 -6
- package/dist/connectors/google-calendar-oauth.js +0 -6
- package/dist/connectors/google-calendar.js +0 -6
- package/dist/connectors/google-docs.js +0 -6
- package/dist/connectors/google-drive.js +0 -6
- package/dist/connectors/google-search-console-oauth.js +0 -6
- package/dist/connectors/google-sheets.js +0 -6
- package/dist/connectors/google-slides.js +0 -6
- package/dist/connectors/grafana.js +0 -6
- package/dist/connectors/hubspot-oauth.js +0 -6
- package/dist/connectors/hubspot.js +0 -6
- package/dist/connectors/influxdb.js +0 -6
- package/dist/connectors/intercom-oauth.js +0 -6
- package/dist/connectors/intercom.js +0 -6
- package/dist/connectors/jdbc.js +0 -6
- package/dist/connectors/jira-api-key.js +0 -6
- package/dist/connectors/kintone-api-token.js +0 -6
- package/dist/connectors/kintone.js +0 -6
- package/dist/connectors/linear.js +0 -6
- package/dist/connectors/linkedin-ads.js +0 -6
- package/dist/connectors/mailchimp-oauth.js +0 -6
- package/dist/connectors/mailchimp.js +0 -6
- package/dist/connectors/meta-ads-oauth.js +0 -6
- package/dist/connectors/meta-ads.js +0 -6
- package/dist/connectors/mixpanel.js +0 -6
- package/dist/connectors/monday.js +0 -6
- package/dist/connectors/mongodb.js +0 -6
- package/dist/connectors/notion-oauth.js +0 -6
- package/dist/connectors/notion.js +0 -6
- package/dist/connectors/oracle.js +0 -6
- package/dist/connectors/outlook-oauth.js +0 -6
- package/dist/connectors/powerbi-oauth.js +0 -6
- package/dist/connectors/salesforce.js +0 -6
- package/dist/connectors/semrush.js +0 -6
- package/dist/connectors/sentry.js +0 -6
- package/dist/connectors/shopify-oauth.js +0 -6
- package/dist/connectors/shopify.js +0 -6
- package/dist/connectors/sqlserver.js +0 -6
- package/dist/connectors/stripe-api-key.js +0 -6
- package/dist/connectors/stripe-oauth.js +0 -6
- package/dist/connectors/supabase.js +0 -6
- package/dist/connectors/tableau.js +0 -6
- package/dist/connectors/tiktok-ads.js +0 -6
- package/dist/connectors/wix-store.js +0 -6
- package/dist/connectors/zendesk-oauth.js +0 -6
- package/dist/connectors/zendesk.js +0 -6
- package/dist/index.js +57 -32
- package/dist/main.js +57 -32
- package/dist/vite-plugin.js +57 -32
- package/package.json +1 -1
|
@@ -67,6 +67,15 @@ var parameters = {
|
|
|
67
67
|
type: "base64EncodedJson",
|
|
68
68
|
secret: true,
|
|
69
69
|
required: true
|
|
70
|
+
}),
|
|
71
|
+
propertyId: new ParameterDefinition({
|
|
72
|
+
slug: "property-id",
|
|
73
|
+
name: "Google Analytics Property ID",
|
|
74
|
+
description: "The Google Analytics 4 property ID (e.g., 123456789). Automatically set during the setup flow.",
|
|
75
|
+
envVarBaseKey: "GA_PROPERTY_ID",
|
|
76
|
+
type: "text",
|
|
77
|
+
secret: false,
|
|
78
|
+
required: false
|
|
70
79
|
})
|
|
71
80
|
};
|
|
72
81
|
|
|
@@ -98,9 +107,15 @@ function buildJwt(clientEmail, privateKey, nowSec) {
|
|
|
98
107
|
}
|
|
99
108
|
function createClient(params) {
|
|
100
109
|
const serviceAccountKeyJsonBase64 = params[parameters.serviceAccountKeyJsonBase64.slug];
|
|
101
|
-
|
|
110
|
+
const propertyId = params[parameters.propertyId.slug];
|
|
111
|
+
if (!serviceAccountKeyJsonBase64 || !propertyId) {
|
|
112
|
+
const required = [
|
|
113
|
+
parameters.serviceAccountKeyJsonBase64.slug,
|
|
114
|
+
parameters.propertyId.slug
|
|
115
|
+
];
|
|
116
|
+
const missing = required.filter((s) => !params[s]);
|
|
102
117
|
throw new Error(
|
|
103
|
-
`google-analytics: missing required parameters: ${
|
|
118
|
+
`google-analytics: missing required parameters: ${missing.join(", ")}`
|
|
104
119
|
);
|
|
105
120
|
}
|
|
106
121
|
let serviceAccountKey;
|
|
@@ -154,12 +169,13 @@ function createClient(params) {
|
|
|
154
169
|
return {
|
|
155
170
|
async request(path2, init) {
|
|
156
171
|
const accessToken = await getAccessToken2();
|
|
157
|
-
const
|
|
172
|
+
const resolvedPath = path2.replace(/\{propertyId\}/g, propertyId);
|
|
173
|
+
const url = `${BASE_URL.replace(/\/+$/, "")}/${resolvedPath.replace(/^\/+/, "")}`;
|
|
158
174
|
const headers = new Headers(init?.headers);
|
|
159
175
|
headers.set("Authorization", `Bearer ${accessToken}`);
|
|
160
176
|
return fetch(url, { ...init, headers });
|
|
161
177
|
},
|
|
162
|
-
async runReport(
|
|
178
|
+
async runReport(request) {
|
|
163
179
|
const response = await this.request(
|
|
164
180
|
`properties/${propertyId}:runReport`,
|
|
165
181
|
{
|
|
@@ -180,7 +196,7 @@ function createClient(params) {
|
|
|
180
196
|
rowCount: data.rowCount ?? 0
|
|
181
197
|
};
|
|
182
198
|
},
|
|
183
|
-
async getMetadata(
|
|
199
|
+
async getMetadata() {
|
|
184
200
|
const response = await this.request(
|
|
185
201
|
`properties/${propertyId}/metadata`,
|
|
186
202
|
{ method: "GET" }
|
|
@@ -193,7 +209,7 @@ function createClient(params) {
|
|
|
193
209
|
}
|
|
194
210
|
return await response.json();
|
|
195
211
|
},
|
|
196
|
-
async runRealtimeReport(
|
|
212
|
+
async runRealtimeReport(request) {
|
|
197
213
|
const response = await this.request(
|
|
198
214
|
`properties/${propertyId}:runRealtimeReport`,
|
|
199
215
|
{
|
|
@@ -402,12 +418,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
402
418
|
}
|
|
403
419
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
404
420
|
if (step.type === "text") {
|
|
405
|
-
if (step.fetchOptions) {
|
|
406
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
407
|
-
if (options2.length === 0) {
|
|
408
|
-
continue;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
421
|
return {
|
|
412
422
|
type: "nextQuestion",
|
|
413
423
|
questionSlug: step.slug,
|
|
@@ -704,23 +714,40 @@ var googleAnalyticsSetupFlow = {
|
|
|
704
714
|
return [];
|
|
705
715
|
}
|
|
706
716
|
},
|
|
707
|
-
applyAnswer: (state, answer) => ({ ...state, properties: answer })
|
|
717
|
+
applyAnswer: (state, answer) => ({ ...state, properties: answer }),
|
|
718
|
+
toParameterUpdates: (state) => {
|
|
719
|
+
const first = state.properties?.find((v) => v !== ALL_PROPERTIES);
|
|
720
|
+
return first ? [{ slug: parameters.propertyId.slug, value: first }] : [];
|
|
721
|
+
}
|
|
708
722
|
},
|
|
709
723
|
{
|
|
710
724
|
slug: "manualPropertyId",
|
|
711
|
-
type: "
|
|
725
|
+
type: "select",
|
|
726
|
+
allowFreeText: true,
|
|
712
727
|
question: {
|
|
713
728
|
ja: "GA4 \u30D7\u30ED\u30D1\u30C6\u30A3 ID \u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u4F8B: 123456789\uFF09\u3002GA4 \u7BA1\u7406\u753B\u9762 > \u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3067\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002",
|
|
714
729
|
en: "Enter your GA4 Property ID (e.g., 123456789). Found in GA4 Admin > Property Settings."
|
|
715
730
|
},
|
|
716
|
-
async fetchOptions(state) {
|
|
731
|
+
async fetchOptions(state, rt) {
|
|
717
732
|
if (state.properties?.length) return [];
|
|
718
|
-
|
|
733
|
+
const existing = rt.params[parameters.propertyId.slug];
|
|
734
|
+
return existing ? [{ value: existing, label: existing }] : [
|
|
735
|
+
{
|
|
736
|
+
value: "example",
|
|
737
|
+
label: rt.language === "ja" ? "\u4F8B: 123456789" : "Example: 123456789"
|
|
738
|
+
}
|
|
739
|
+
];
|
|
719
740
|
},
|
|
720
741
|
applyAnswer: (state, answer) => ({
|
|
721
742
|
...state,
|
|
722
743
|
manualPropertyId: answer[0]
|
|
723
|
-
})
|
|
744
|
+
}),
|
|
745
|
+
toParameterUpdates: (state) => state.manualPropertyId ? [
|
|
746
|
+
{
|
|
747
|
+
slug: parameters.propertyId.slug,
|
|
748
|
+
value: state.manualPropertyId
|
|
749
|
+
}
|
|
750
|
+
] : []
|
|
724
751
|
}
|
|
725
752
|
],
|
|
726
753
|
async finalize(state, rt) {
|
|
@@ -776,7 +803,7 @@ var googleAnalyticsSetupFlow = {
|
|
|
776
803
|
}
|
|
777
804
|
return sections.join("\n");
|
|
778
805
|
}
|
|
779
|
-
const propertyId = state.manualPropertyId;
|
|
806
|
+
const propertyId = state.manualPropertyId ?? rt.params[parameters.propertyId.slug];
|
|
780
807
|
if (propertyId) {
|
|
781
808
|
sections.push(`### Property: ${propertyId}`, "");
|
|
782
809
|
const { dimensions, metrics } = await getMetadata(
|
|
@@ -787,7 +814,7 @@ var googleAnalyticsSetupFlow = {
|
|
|
787
814
|
return sections.join("\n");
|
|
788
815
|
}
|
|
789
816
|
sections.push(
|
|
790
|
-
"_Could not list GA4 accounts. Please enable the Google Analytics Admin API in your GCP project
|
|
817
|
+
"_Could not list GA4 accounts. Please enable the Google Analytics Admin API in your GCP project, or set the Property ID parameter manually._",
|
|
791
818
|
""
|
|
792
819
|
);
|
|
793
820
|
return sections.join("\n");
|
|
@@ -801,9 +828,8 @@ var REQUEST_TIMEOUT_MS = 6e4;
|
|
|
801
828
|
var inputSchema = z.object({
|
|
802
829
|
toolUseIntent: z.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
803
830
|
connectionId: z.string().describe("ID of the Google Analytics connection to use"),
|
|
804
|
-
propertyId: z.string().describe("GA4 property ID (e.g., '123456789')"),
|
|
805
831
|
method: z.enum(["GET", "POST"]).describe("HTTP method"),
|
|
806
|
-
path: z.string().describe("API path (e.g., 'properties/{propertyId}:runReport'). {propertyId} is replaced
|
|
832
|
+
path: z.string().describe("API path (e.g., 'properties/{propertyId}:runReport'). {propertyId} is automatically replaced."),
|
|
807
833
|
body: z.record(z.string(), z.unknown()).optional().describe("POST request body (JSON)")
|
|
808
834
|
});
|
|
809
835
|
var outputSchema = z.discriminatedUnion("success", [
|
|
@@ -821,10 +847,10 @@ var requestTool = new ConnectorTool({
|
|
|
821
847
|
name: "request",
|
|
822
848
|
description: `Send authenticated requests to the Google Analytics Data API.
|
|
823
849
|
Authentication is handled automatically using a service account.
|
|
824
|
-
{propertyId} in the path is automatically replaced with the
|
|
850
|
+
{propertyId} in the path is automatically replaced with the connection's property-id.`,
|
|
825
851
|
inputSchema,
|
|
826
852
|
outputSchema,
|
|
827
|
-
async execute({ connectionId,
|
|
853
|
+
async execute({ connectionId, method, path: path2, body }, connections) {
|
|
828
854
|
const connection2 = connections.find((c) => c.id === connectionId);
|
|
829
855
|
if (!connection2) {
|
|
830
856
|
return { success: false, error: `Connection ${connectionId} not found` };
|
|
@@ -833,6 +859,7 @@ Authentication is handled automatically using a service account.
|
|
|
833
859
|
try {
|
|
834
860
|
const { GoogleAuth } = await import("google-auth-library");
|
|
835
861
|
const keyJsonBase64 = parameters.serviceAccountKeyJsonBase64.getValue(connection2);
|
|
862
|
+
const propertyId = parameters.propertyId.getValue(connection2);
|
|
836
863
|
const credentials = JSON.parse(
|
|
837
864
|
Buffer.from(keyJsonBase64, "base64").toString("utf-8")
|
|
838
865
|
);
|
|
@@ -892,16 +919,16 @@ var googleAnalyticsConnector = new ConnectorPlugin({
|
|
|
892
919
|
systemPrompt: {
|
|
893
920
|
en: `### Tools
|
|
894
921
|
|
|
895
|
-
- \`google-analytics-service-account_request\`: The only way to call the GA4 Data API. Use it to fetch metadata, run reports, or run realtime reports.
|
|
922
|
+
- \`google-analytics-service-account_request\`: The only way to call the GA4 Data API. Use it to fetch metadata, run reports, or run realtime reports. See the GA4 Data API Reference below for available endpoints and request bodies.
|
|
896
923
|
|
|
897
924
|
### Business Logic
|
|
898
925
|
|
|
899
926
|
The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
|
|
900
927
|
|
|
901
928
|
SDK methods (client created via \`connection(connectionId)\`):
|
|
902
|
-
- \`client.runReport(
|
|
903
|
-
- \`client.runRealtimeReport(
|
|
904
|
-
- \`client.getMetadata(
|
|
929
|
+
- \`client.runReport(request)\` \u2014 run a GA4 report
|
|
930
|
+
- \`client.runRealtimeReport(request)\` \u2014 run a realtime report
|
|
931
|
+
- \`client.getMetadata()\` \u2014 fetch available dimensions/metrics
|
|
905
932
|
- \`client.request(path, init?)\` \u2014 low-level authenticated fetch
|
|
906
933
|
|
|
907
934
|
\`\`\`ts
|
|
@@ -911,13 +938,12 @@ import { connection } from "@squadbase/vite-server/connectors/google-analytics";
|
|
|
911
938
|
const ga = connection("<connectionId>");
|
|
912
939
|
|
|
913
940
|
export default async function handler(c: Context) {
|
|
914
|
-
const {
|
|
915
|
-
propertyId: string;
|
|
941
|
+
const { startDate = "7daysAgo", endDate = "today" } = await c.req.json<{
|
|
916
942
|
startDate?: string;
|
|
917
943
|
endDate?: string;
|
|
918
944
|
}>();
|
|
919
945
|
|
|
920
|
-
const { rows } = await ga.runReport(
|
|
946
|
+
const { rows } = await ga.runReport({
|
|
921
947
|
dateRanges: [{ startDate, endDate }],
|
|
922
948
|
dimensions: [{ name: "date" }],
|
|
923
949
|
metrics: [{ name: "activeUsers" }, { name: "sessions" }],
|
|
@@ -961,16 +987,16 @@ activeUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conv
|
|
|
961
987
|
- Relative: \`"today"\`, \`"yesterday"\`, \`"7daysAgo"\`, \`"30daysAgo"\``,
|
|
962
988
|
ja: `### \u30C4\u30FC\u30EB
|
|
963
989
|
|
|
964
|
-
- \`google-analytics-service-account_request\`: GA4 Data API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u5B9F\u884C\u3001\u30EA\u30A2\u30EB\u30BF\u30A4\u30E0\u30EC\u30DD\u30FC\u30C8\u306E\u5B9F\u884C\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
990
|
+
- \`google-analytics-service-account_request\`: GA4 Data API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u5B9F\u884C\u3001\u30EA\u30A2\u30EB\u30BF\u30A4\u30E0\u30EC\u30DD\u30FC\u30C8\u306E\u5B9F\u884C\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u5229\u7528\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3068\u30EA\u30AF\u30A8\u30B9\u30C8\u30DC\u30C7\u30A3\u306F\u4E0B\u90E8\u306E\u300CGA4 Data API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
965
991
|
|
|
966
992
|
### Business Logic
|
|
967
993
|
|
|
968
994
|
\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
|
|
969
995
|
|
|
970
996
|
SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
|
|
971
|
-
- \`client.runReport(
|
|
972
|
-
- \`client.runRealtimeReport(
|
|
973
|
-
- \`client.getMetadata(
|
|
997
|
+
- \`client.runReport(request)\` \u2014 GA4\u30EC\u30DD\u30FC\u30C8\u3092\u5B9F\u884C
|
|
998
|
+
- \`client.runRealtimeReport(request)\` \u2014 \u30EA\u30A2\u30EB\u30BF\u30A4\u30E0\u30EC\u30DD\u30FC\u30C8\u3092\u5B9F\u884C
|
|
999
|
+
- \`client.getMetadata()\` \u2014 \u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3/\u30E1\u30C8\u30EA\u30AF\u30B9\u3092\u53D6\u5F97
|
|
974
1000
|
- \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
|
|
975
1001
|
|
|
976
1002
|
\`\`\`ts
|
|
@@ -980,13 +1006,12 @@ import { connection } from "@squadbase/vite-server/connectors/google-analytics";
|
|
|
980
1006
|
const ga = connection("<connectionId>");
|
|
981
1007
|
|
|
982
1008
|
export default async function handler(c: Context) {
|
|
983
|
-
const {
|
|
984
|
-
propertyId: string;
|
|
1009
|
+
const { startDate = "7daysAgo", endDate = "today" } = await c.req.json<{
|
|
985
1010
|
startDate?: string;
|
|
986
1011
|
endDate?: string;
|
|
987
1012
|
}>();
|
|
988
1013
|
|
|
989
|
-
const { rows } = await ga.runReport(
|
|
1014
|
+
const { rows } = await ga.runReport({
|
|
990
1015
|
dateRanges: [{ startDate, endDate }],
|
|
991
1016
|
dimensions: [{ name: "date" }],
|
|
992
1017
|
metrics: [{ name: "activeUsers" }, { name: "sessions" }],
|
|
@@ -1039,8 +1064,15 @@ activeUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conv
|
|
|
1039
1064
|
error: "google-analytics: missing service account key"
|
|
1040
1065
|
};
|
|
1041
1066
|
}
|
|
1067
|
+
const propertyId = params[parameters.propertyId.slug];
|
|
1068
|
+
if (!propertyId) {
|
|
1069
|
+
return { success: true };
|
|
1070
|
+
}
|
|
1042
1071
|
try {
|
|
1043
|
-
const res = await dataFetch(
|
|
1072
|
+
const res = await dataFetch(
|
|
1073
|
+
params,
|
|
1074
|
+
`/properties/${propertyId}/metadata`
|
|
1075
|
+
);
|
|
1044
1076
|
if (!res.ok) {
|
|
1045
1077
|
const body = await res.text().catch(() => res.statusText);
|
|
1046
1078
|
return {
|
|
@@ -303,12 +303,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
303
303
|
}
|
|
304
304
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
305
305
|
if (step.type === "text") {
|
|
306
|
-
if (step.fetchOptions) {
|
|
307
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
308
|
-
if (options2.length === 0) {
|
|
309
|
-
continue;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
306
|
return {
|
|
313
307
|
type: "nextQuestion",
|
|
314
308
|
questionSlug: step.slug,
|
|
@@ -319,12 +319,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
319
319
|
}
|
|
320
320
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
321
321
|
if (step.type === "text") {
|
|
322
|
-
if (step.fetchOptions) {
|
|
323
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
324
|
-
if (options2.length === 0) {
|
|
325
|
-
continue;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
322
|
return {
|
|
329
323
|
type: "nextQuestion",
|
|
330
324
|
questionSlug: step.slug,
|
|
@@ -324,12 +324,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
324
324
|
}
|
|
325
325
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
326
326
|
if (step.type === "text") {
|
|
327
|
-
if (step.fetchOptions) {
|
|
328
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
329
|
-
if (options2.length === 0) {
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
327
|
return {
|
|
334
328
|
type: "nextQuestion",
|
|
335
329
|
questionSlug: step.slug,
|
|
@@ -239,12 +239,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
239
239
|
}
|
|
240
240
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
241
241
|
if (step.type === "text") {
|
|
242
|
-
if (step.fetchOptions) {
|
|
243
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
244
|
-
if (options2.length === 0) {
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
242
|
return {
|
|
249
243
|
type: "nextQuestion",
|
|
250
244
|
questionSlug: step.slug,
|
|
@@ -328,12 +328,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
328
328
|
}
|
|
329
329
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
330
330
|
if (step.type === "text") {
|
|
331
|
-
if (step.fetchOptions) {
|
|
332
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
333
|
-
if (options2.length === 0) {
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
331
|
return {
|
|
338
332
|
type: "nextQuestion",
|
|
339
333
|
questionSlug: step.slug,
|
|
@@ -333,12 +333,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
333
333
|
}
|
|
334
334
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
335
335
|
if (step.type === "text") {
|
|
336
|
-
if (step.fetchOptions) {
|
|
337
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
338
|
-
if (options2.length === 0) {
|
|
339
|
-
continue;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
336
|
return {
|
|
343
337
|
type: "nextQuestion",
|
|
344
338
|
questionSlug: step.slug,
|
|
@@ -320,12 +320,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
320
320
|
}
|
|
321
321
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
322
322
|
if (step.type === "text") {
|
|
323
|
-
if (step.fetchOptions) {
|
|
324
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
325
|
-
if (options2.length === 0) {
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
323
|
return {
|
|
330
324
|
type: "nextQuestion",
|
|
331
325
|
questionSlug: step.slug,
|
|
@@ -251,12 +251,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
251
251
|
}
|
|
252
252
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
253
253
|
if (step.type === "text") {
|
|
254
|
-
if (step.fetchOptions) {
|
|
255
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
256
|
-
if (options2.length === 0) {
|
|
257
|
-
continue;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
254
|
return {
|
|
261
255
|
type: "nextQuestion",
|
|
262
256
|
questionSlug: step.slug,
|
|
@@ -360,12 +360,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
360
360
|
}
|
|
361
361
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
362
362
|
if (step.type === "text") {
|
|
363
|
-
if (step.fetchOptions) {
|
|
364
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
365
|
-
if (options2.length === 0) {
|
|
366
|
-
continue;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
363
|
return {
|
|
370
364
|
type: "nextQuestion",
|
|
371
365
|
questionSlug: step.slug,
|
|
@@ -193,12 +193,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
193
193
|
}
|
|
194
194
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
195
195
|
if (step.type === "text") {
|
|
196
|
-
if (step.fetchOptions) {
|
|
197
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
198
|
-
if (options2.length === 0) {
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
196
|
return {
|
|
203
197
|
type: "nextQuestion",
|
|
204
198
|
questionSlug: step.slug,
|
|
@@ -334,12 +334,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
334
334
|
}
|
|
335
335
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
336
336
|
if (step.type === "text") {
|
|
337
|
-
if (step.fetchOptions) {
|
|
338
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
339
|
-
if (options2.length === 0) {
|
|
340
|
-
continue;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
337
|
return {
|
|
344
338
|
type: "nextQuestion",
|
|
345
339
|
questionSlug: step.slug,
|
|
@@ -393,12 +393,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
393
393
|
}
|
|
394
394
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
395
395
|
if (step.type === "text") {
|
|
396
|
-
if (step.fetchOptions) {
|
|
397
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
398
|
-
if (options2.length === 0) {
|
|
399
|
-
continue;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
396
|
return {
|
|
403
397
|
type: "nextQuestion",
|
|
404
398
|
questionSlug: step.slug,
|
|
@@ -193,12 +193,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
193
193
|
}
|
|
194
194
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
195
195
|
if (step.type === "text") {
|
|
196
|
-
if (step.fetchOptions) {
|
|
197
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
198
|
-
if (options2.length === 0) {
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
196
|
return {
|
|
203
197
|
type: "nextQuestion",
|
|
204
198
|
questionSlug: step.slug,
|
|
@@ -352,12 +352,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
352
352
|
}
|
|
353
353
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
354
354
|
if (step.type === "text") {
|
|
355
|
-
if (step.fetchOptions) {
|
|
356
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
357
|
-
if (options2.length === 0) {
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
355
|
return {
|
|
362
356
|
type: "nextQuestion",
|
|
363
357
|
questionSlug: step.slug,
|
package/dist/connectors/jdbc.js
CHANGED
|
@@ -1100,12 +1100,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
1102
1102
|
if (step.type === "text") {
|
|
1103
|
-
if (step.fetchOptions) {
|
|
1104
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
1105
|
-
if (options2.length === 0) {
|
|
1106
|
-
continue;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
1103
|
return {
|
|
1110
1104
|
type: "nextQuestion",
|
|
1111
1105
|
questionSlug: step.slug,
|
|
@@ -301,12 +301,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
301
301
|
}
|
|
302
302
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
303
303
|
if (step.type === "text") {
|
|
304
|
-
if (step.fetchOptions) {
|
|
305
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
306
|
-
if (options2.length === 0) {
|
|
307
|
-
continue;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
304
|
return {
|
|
311
305
|
type: "nextQuestion",
|
|
312
306
|
questionSlug: step.slug,
|
|
@@ -330,12 +330,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
330
330
|
}
|
|
331
331
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
332
332
|
if (step.type === "text") {
|
|
333
|
-
if (step.fetchOptions) {
|
|
334
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
335
|
-
if (options2.length === 0) {
|
|
336
|
-
continue;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
333
|
return {
|
|
340
334
|
type: "nextQuestion",
|
|
341
335
|
questionSlug: step.slug,
|
|
@@ -339,12 +339,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
339
339
|
}
|
|
340
340
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
341
341
|
if (step.type === "text") {
|
|
342
|
-
if (step.fetchOptions) {
|
|
343
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
344
|
-
if (options2.length === 0) {
|
|
345
|
-
continue;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
342
|
return {
|
|
349
343
|
type: "nextQuestion",
|
|
350
344
|
questionSlug: step.slug,
|
|
@@ -345,12 +345,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
345
345
|
}
|
|
346
346
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
347
347
|
if (step.type === "text") {
|
|
348
|
-
if (step.fetchOptions) {
|
|
349
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
350
|
-
if (options2.length === 0) {
|
|
351
|
-
continue;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
348
|
return {
|
|
355
349
|
type: "nextQuestion",
|
|
356
350
|
questionSlug: step.slug,
|
|
@@ -248,12 +248,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
248
248
|
}
|
|
249
249
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
250
250
|
if (step.type === "text") {
|
|
251
|
-
if (step.fetchOptions) {
|
|
252
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
253
|
-
if (options2.length === 0) {
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
251
|
return {
|
|
258
252
|
type: "nextQuestion",
|
|
259
253
|
questionSlug: step.slug,
|
|
@@ -254,12 +254,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
254
254
|
}
|
|
255
255
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
256
256
|
if (step.type === "text") {
|
|
257
|
-
if (step.fetchOptions) {
|
|
258
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
259
|
-
if (options2.length === 0) {
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
257
|
return {
|
|
264
258
|
type: "nextQuestion",
|
|
265
259
|
questionSlug: step.slug,
|
|
@@ -359,12 +359,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
359
359
|
}
|
|
360
360
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
361
361
|
if (step.type === "text") {
|
|
362
|
-
if (step.fetchOptions) {
|
|
363
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
364
|
-
if (options2.length === 0) {
|
|
365
|
-
continue;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
362
|
return {
|
|
369
363
|
type: "nextQuestion",
|
|
370
364
|
questionSlug: step.slug,
|
|
@@ -248,12 +248,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
248
248
|
}
|
|
249
249
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
250
250
|
if (step.type === "text") {
|
|
251
|
-
if (step.fetchOptions) {
|
|
252
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
253
|
-
if (options2.length === 0) {
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
251
|
return {
|
|
258
252
|
type: "nextQuestion",
|
|
259
253
|
questionSlug: step.slug,
|
|
@@ -319,12 +319,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
319
319
|
}
|
|
320
320
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
321
321
|
if (step.type === "text") {
|
|
322
|
-
if (step.fetchOptions) {
|
|
323
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
324
|
-
if (options2.length === 0) {
|
|
325
|
-
continue;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
322
|
return {
|
|
329
323
|
type: "nextQuestion",
|
|
330
324
|
questionSlug: step.slug,
|
|
@@ -411,12 +411,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
411
411
|
}
|
|
412
412
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
413
413
|
if (step.type === "text") {
|
|
414
|
-
if (step.fetchOptions) {
|
|
415
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
416
|
-
if (options2.length === 0) {
|
|
417
|
-
continue;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
414
|
return {
|
|
421
415
|
type: "nextQuestion",
|
|
422
416
|
questionSlug: step.slug,
|
|
@@ -441,12 +441,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
441
441
|
}
|
|
442
442
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
443
443
|
if (step.type === "text") {
|
|
444
|
-
if (step.fetchOptions) {
|
|
445
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
446
|
-
if (options2.length === 0) {
|
|
447
|
-
continue;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
444
|
return {
|
|
451
445
|
type: "nextQuestion",
|
|
452
446
|
questionSlug: step.slug,
|
|
@@ -346,12 +346,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
346
346
|
}
|
|
347
347
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
348
348
|
if (step.type === "text") {
|
|
349
|
-
if (step.fetchOptions) {
|
|
350
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
351
|
-
if (options2.length === 0) {
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
349
|
return {
|
|
356
350
|
type: "nextQuestion",
|
|
357
351
|
questionSlug: step.slug,
|
|
@@ -197,12 +197,6 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
197
197
|
}
|
|
198
198
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
199
199
|
if (step.type === "text") {
|
|
200
|
-
if (step.fetchOptions) {
|
|
201
|
-
const options2 = await step.fetchOptions(state, runtime);
|
|
202
|
-
if (options2.length === 0) {
|
|
203
|
-
continue;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
200
|
return {
|
|
207
201
|
type: "nextQuestion",
|
|
208
202
|
questionSlug: step.slug,
|