@squadbase/vite-server 0.1.17-dev.7408ec4 → 0.1.17-dev.9d1f952
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 +32 -51
- package/dist/connectors/airtable-oauth.js +6 -0
- package/dist/connectors/airtable.js +6 -0
- package/dist/connectors/amplitude.js +6 -0
- package/dist/connectors/asana.js +6 -0
- package/dist/connectors/attio.js +6 -0
- package/dist/connectors/aws-billing.js +6 -0
- package/dist/connectors/azure-sql.js +6 -0
- package/dist/connectors/backlog-api-key.js +6 -0
- package/dist/connectors/clickup.js +6 -0
- package/dist/connectors/cosmosdb.js +6 -0
- package/dist/connectors/customerio.js +6 -0
- package/dist/connectors/dbt.js +6 -0
- package/dist/connectors/freshdesk.js +6 -0
- package/dist/connectors/freshsales.js +6 -0
- package/dist/connectors/freshservice.js +6 -0
- package/dist/connectors/gamma.js +6 -0
- package/dist/connectors/github.js +6 -0
- package/dist/connectors/gmail-oauth.js +6 -0
- package/dist/connectors/gmail.js +6 -0
- package/dist/connectors/google-ads.js +6 -0
- package/dist/connectors/google-analytics-oauth.js +6 -0
- package/dist/connectors/google-analytics.js +53 -64
- package/dist/connectors/google-audit-log.js +6 -0
- package/dist/connectors/google-calendar-oauth.js +6 -0
- package/dist/connectors/google-calendar.js +6 -0
- package/dist/connectors/google-docs.js +6 -0
- package/dist/connectors/google-drive.js +6 -0
- package/dist/connectors/google-search-console-oauth.js +6 -0
- package/dist/connectors/google-sheets.js +6 -0
- package/dist/connectors/google-slides.js +6 -0
- package/dist/connectors/grafana.js +6 -0
- package/dist/connectors/hubspot-oauth.js +6 -0
- package/dist/connectors/hubspot.js +6 -0
- package/dist/connectors/influxdb.js +6 -0
- package/dist/connectors/intercom-oauth.js +6 -0
- package/dist/connectors/intercom.js +6 -0
- package/dist/connectors/jdbc.js +6 -0
- package/dist/connectors/jira-api-key.js +6 -0
- package/dist/connectors/kintone-api-token.js +6 -0
- package/dist/connectors/kintone.js +6 -0
- package/dist/connectors/linear.js +6 -0
- package/dist/connectors/linkedin-ads.js +6 -0
- package/dist/connectors/mailchimp-oauth.js +6 -0
- package/dist/connectors/mailchimp.js +6 -0
- package/dist/connectors/meta-ads-oauth.js +6 -0
- package/dist/connectors/meta-ads.js +6 -0
- package/dist/connectors/mixpanel.js +6 -0
- package/dist/connectors/monday.js +6 -0
- package/dist/connectors/mongodb.js +6 -0
- package/dist/connectors/notion-oauth.js +6 -0
- package/dist/connectors/notion.js +6 -0
- package/dist/connectors/oracle.js +6 -0
- package/dist/connectors/outlook-oauth.js +6 -0
- package/dist/connectors/powerbi-oauth.js +6 -0
- package/dist/connectors/salesforce.js +6 -0
- package/dist/connectors/semrush.js +6 -0
- package/dist/connectors/sentry.js +6 -0
- package/dist/connectors/shopify-oauth.js +6 -0
- package/dist/connectors/shopify.js +6 -0
- package/dist/connectors/sqlserver.js +6 -0
- package/dist/connectors/stripe-api-key.js +6 -0
- package/dist/connectors/stripe-oauth.js +6 -0
- package/dist/connectors/supabase.js +6 -0
- package/dist/connectors/tableau.js +6 -0
- package/dist/connectors/tiktok-ads.js +6 -0
- package/dist/connectors/wix-store.js +6 -0
- package/dist/connectors/zendesk-oauth.js +6 -0
- package/dist/connectors/zendesk.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +43 -57
- package/dist/main.js +32 -51
- package/dist/vite-plugin.js +32 -51
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -869,6 +869,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
869
869
|
}
|
|
870
870
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
871
871
|
if (step.type === "text") {
|
|
872
|
+
if (step.fetchOptions) {
|
|
873
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
874
|
+
if (options2.length === 0) {
|
|
875
|
+
continue;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
872
878
|
return {
|
|
873
879
|
type: "nextQuestion",
|
|
874
880
|
questionSlug: step.slug,
|
|
@@ -7666,15 +7672,6 @@ var parameters13 = {
|
|
|
7666
7672
|
type: "base64EncodedJson",
|
|
7667
7673
|
secret: true,
|
|
7668
7674
|
required: true
|
|
7669
|
-
}),
|
|
7670
|
-
propertyId: new ParameterDefinition({
|
|
7671
|
-
slug: "property-id",
|
|
7672
|
-
name: "Google Analytics Property ID",
|
|
7673
|
-
description: "The Google Analytics 4 property ID (e.g., 123456789). Automatically set during the setup flow.",
|
|
7674
|
-
envVarBaseKey: "GA_PROPERTY_ID",
|
|
7675
|
-
type: "text",
|
|
7676
|
-
secret: false,
|
|
7677
|
-
required: false
|
|
7678
7675
|
})
|
|
7679
7676
|
};
|
|
7680
7677
|
|
|
@@ -7912,40 +7909,23 @@ var googleAnalyticsSetupFlow = {
|
|
|
7912
7909
|
return [];
|
|
7913
7910
|
}
|
|
7914
7911
|
},
|
|
7915
|
-
applyAnswer: (state, answer) => ({ ...state, properties: answer })
|
|
7916
|
-
toParameterUpdates: (state) => {
|
|
7917
|
-
const first = state.properties?.find((v) => v !== ALL_PROPERTIES);
|
|
7918
|
-
return first ? [{ slug: parameters13.propertyId.slug, value: first }] : [];
|
|
7919
|
-
}
|
|
7912
|
+
applyAnswer: (state, answer) => ({ ...state, properties: answer })
|
|
7920
7913
|
},
|
|
7921
7914
|
{
|
|
7922
7915
|
slug: "manualPropertyId",
|
|
7923
|
-
type: "
|
|
7924
|
-
allowFreeText: true,
|
|
7916
|
+
type: "text",
|
|
7925
7917
|
question: {
|
|
7926
7918
|
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",
|
|
7927
7919
|
en: "Enter your GA4 Property ID (e.g., 123456789). Found in GA4 Admin > Property Settings."
|
|
7928
7920
|
},
|
|
7929
|
-
async fetchOptions(state
|
|
7921
|
+
async fetchOptions(state) {
|
|
7930
7922
|
if (state.properties?.length) return [];
|
|
7931
|
-
|
|
7932
|
-
return existing ? [{ value: existing, label: existing }] : [
|
|
7933
|
-
{
|
|
7934
|
-
value: "example",
|
|
7935
|
-
label: rt.language === "ja" ? "\u4F8B: 123456789" : "Example: 123456789"
|
|
7936
|
-
}
|
|
7937
|
-
];
|
|
7923
|
+
return [{ value: "_show", label: "" }];
|
|
7938
7924
|
},
|
|
7939
7925
|
applyAnswer: (state, answer) => ({
|
|
7940
7926
|
...state,
|
|
7941
7927
|
manualPropertyId: answer[0]
|
|
7942
|
-
})
|
|
7943
|
-
toParameterUpdates: (state) => state.manualPropertyId ? [
|
|
7944
|
-
{
|
|
7945
|
-
slug: parameters13.propertyId.slug,
|
|
7946
|
-
value: state.manualPropertyId
|
|
7947
|
-
}
|
|
7948
|
-
] : []
|
|
7928
|
+
})
|
|
7949
7929
|
}
|
|
7950
7930
|
],
|
|
7951
7931
|
async finalize(state, rt) {
|
|
@@ -8001,7 +7981,7 @@ var googleAnalyticsSetupFlow = {
|
|
|
8001
7981
|
}
|
|
8002
7982
|
return sections.join("\n");
|
|
8003
7983
|
}
|
|
8004
|
-
const propertyId = state.manualPropertyId
|
|
7984
|
+
const propertyId = state.manualPropertyId;
|
|
8005
7985
|
if (propertyId) {
|
|
8006
7986
|
sections.push(`### Property: ${propertyId}`, "");
|
|
8007
7987
|
const { dimensions, metrics } = await getMetadata(
|
|
@@ -8012,7 +7992,7 @@ var googleAnalyticsSetupFlow = {
|
|
|
8012
7992
|
return sections.join("\n");
|
|
8013
7993
|
}
|
|
8014
7994
|
sections.push(
|
|
8015
|
-
"_Could not list GA4 accounts. Please enable the Google Analytics Admin API in your GCP project
|
|
7995
|
+
"_Could not list GA4 accounts. Please enable the Google Analytics Admin API in your GCP project. Property ID can be specified per request at runtime._",
|
|
8016
7996
|
""
|
|
8017
7997
|
);
|
|
8018
7998
|
return sections.join("\n");
|
|
@@ -8026,8 +8006,9 @@ var REQUEST_TIMEOUT_MS10 = 6e4;
|
|
|
8026
8006
|
var inputSchema20 = z20.object({
|
|
8027
8007
|
toolUseIntent: z20.string().optional().describe("Brief description of what you intend to accomplish with this tool call"),
|
|
8028
8008
|
connectionId: z20.string().describe("ID of the Google Analytics connection to use"),
|
|
8009
|
+
propertyId: z20.string().describe("GA4 property ID (e.g., '123456789')"),
|
|
8029
8010
|
method: z20.enum(["GET", "POST"]).describe("HTTP method"),
|
|
8030
|
-
path: z20.string().describe("API path (e.g., 'properties/{propertyId}:runReport'). {propertyId} is
|
|
8011
|
+
path: z20.string().describe("API path (e.g., 'properties/{propertyId}:runReport'). {propertyId} is replaced with the propertyId parameter."),
|
|
8031
8012
|
body: z20.record(z20.string(), z20.unknown()).optional().describe("POST request body (JSON)")
|
|
8032
8013
|
});
|
|
8033
8014
|
var outputSchema20 = z20.discriminatedUnion("success", [
|
|
@@ -8045,10 +8026,10 @@ var requestTool3 = new ConnectorTool({
|
|
|
8045
8026
|
name: "request",
|
|
8046
8027
|
description: `Send authenticated requests to the Google Analytics Data API.
|
|
8047
8028
|
Authentication is handled automatically using a service account.
|
|
8048
|
-
{propertyId} in the path is automatically replaced with the
|
|
8029
|
+
{propertyId} in the path is automatically replaced with the propertyId parameter.`,
|
|
8049
8030
|
inputSchema: inputSchema20,
|
|
8050
8031
|
outputSchema: outputSchema20,
|
|
8051
|
-
async execute({ connectionId, method, path: path5, body }, connections) {
|
|
8032
|
+
async execute({ connectionId, propertyId, method, path: path5, body }, connections) {
|
|
8052
8033
|
const connection = connections.find((c) => c.id === connectionId);
|
|
8053
8034
|
if (!connection) {
|
|
8054
8035
|
return { success: false, error: `Connection ${connectionId} not found` };
|
|
@@ -8057,7 +8038,6 @@ Authentication is handled automatically using a service account.
|
|
|
8057
8038
|
try {
|
|
8058
8039
|
const { GoogleAuth } = await import("google-auth-library");
|
|
8059
8040
|
const keyJsonBase64 = parameters13.serviceAccountKeyJsonBase64.getValue(connection);
|
|
8060
|
-
const propertyId = parameters13.propertyId.getValue(connection);
|
|
8061
8041
|
const credentials = JSON.parse(
|
|
8062
8042
|
Buffer.from(keyJsonBase64, "base64").toString("utf-8")
|
|
8063
8043
|
);
|
|
@@ -8117,7 +8097,7 @@ var googleAnalyticsConnector = new ConnectorPlugin({
|
|
|
8117
8097
|
systemPrompt: {
|
|
8118
8098
|
en: `### Tools
|
|
8119
8099
|
|
|
8120
|
-
- \`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.
|
|
8100
|
+
- \`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. Requires a \`propertyId\` parameter. See the GA4 Data API Reference below for available endpoints and request bodies.
|
|
8121
8101
|
|
|
8122
8102
|
### Business Logic
|
|
8123
8103
|
|
|
@@ -8126,9 +8106,11 @@ The business logic type for this connector is "typescript". Use the connector SD
|
|
|
8126
8106
|
SDK methods (client created via \`connection(connectionId)\`):
|
|
8127
8107
|
- \`client.runReport(request)\` \u2014 run a GA4 report
|
|
8128
8108
|
- \`client.runRealtimeReport(request)\` \u2014 run a realtime report
|
|
8129
|
-
- \`client.getMetadata()\` \u2014 fetch available dimensions/metrics
|
|
8109
|
+
- \`client.getMetadata(request)\` \u2014 fetch available dimensions/metrics
|
|
8130
8110
|
- \`client.request(path, init?)\` \u2014 low-level authenticated fetch
|
|
8131
8111
|
|
|
8112
|
+
**IMPORTANT**: You MUST always include \`propertyId\` in every SDK method call. The property ID is obtained during the setup flow. Without it, the request will fail.
|
|
8113
|
+
|
|
8132
8114
|
\`\`\`ts
|
|
8133
8115
|
import type { Context } from "hono";
|
|
8134
8116
|
import { connection } from "@squadbase/vite-server/connectors/google-analytics";
|
|
@@ -8136,12 +8118,14 @@ import { connection } from "@squadbase/vite-server/connectors/google-analytics";
|
|
|
8136
8118
|
const ga = connection("<connectionId>");
|
|
8137
8119
|
|
|
8138
8120
|
export default async function handler(c: Context) {
|
|
8139
|
-
const { startDate = "7daysAgo", endDate = "today" } = await c.req.json<{
|
|
8121
|
+
const { propertyId, startDate = "7daysAgo", endDate = "today" } = await c.req.json<{
|
|
8122
|
+
propertyId: string;
|
|
8140
8123
|
startDate?: string;
|
|
8141
8124
|
endDate?: string;
|
|
8142
8125
|
}>();
|
|
8143
8126
|
|
|
8144
8127
|
const { rows } = await ga.runReport({
|
|
8128
|
+
propertyId,
|
|
8145
8129
|
dateRanges: [{ startDate, endDate }],
|
|
8146
8130
|
dimensions: [{ name: "date" }],
|
|
8147
8131
|
metrics: [{ name: "activeUsers" }, { name: "sessions" }],
|
|
@@ -8185,7 +8169,7 @@ activeUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conv
|
|
|
8185
8169
|
- Relative: \`"today"\`, \`"yesterday"\`, \`"7daysAgo"\`, \`"30daysAgo"\``,
|
|
8186
8170
|
ja: `### \u30C4\u30FC\u30EB
|
|
8187
8171
|
|
|
8188
|
-
- \`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
|
|
8172
|
+
- \`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\`propertyId\` \u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u304C\u5FC5\u8981\u3067\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
|
|
8189
8173
|
|
|
8190
8174
|
### Business Logic
|
|
8191
8175
|
|
|
@@ -8194,9 +8178,11 @@ activeUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conv
|
|
|
8194
8178
|
SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
|
|
8195
8179
|
- \`client.runReport(request)\` \u2014 GA4\u30EC\u30DD\u30FC\u30C8\u3092\u5B9F\u884C
|
|
8196
8180
|
- \`client.runRealtimeReport(request)\` \u2014 \u30EA\u30A2\u30EB\u30BF\u30A4\u30E0\u30EC\u30DD\u30FC\u30C8\u3092\u5B9F\u884C
|
|
8197
|
-
- \`client.getMetadata()\` \u2014 \u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3/\u30E1\u30C8\u30EA\u30AF\u30B9\u3092\u53D6\u5F97
|
|
8181
|
+
- \`client.getMetadata(request)\` \u2014 \u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3/\u30E1\u30C8\u30EA\u30AF\u30B9\u3092\u53D6\u5F97
|
|
8198
8182
|
- \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
|
|
8199
8183
|
|
|
8184
|
+
**\u91CD\u8981**: \u3059\u3079\u3066\u306ESDK\u30E1\u30BD\u30C3\u30C9\u547C\u3073\u51FA\u3057\u306B\u306F\u5FC5\u305A \`propertyId\` \u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u30D7\u30ED\u30D1\u30C6\u30A3ID\u306F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30D5\u30ED\u30FC\u3067\u53D6\u5F97\u3055\u308C\u307E\u3059\u3002\u6307\u5B9A\u3057\u306A\u3044\u3068\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u5931\u6557\u3057\u307E\u3059\u3002
|
|
8185
|
+
|
|
8200
8186
|
\`\`\`ts
|
|
8201
8187
|
import type { Context } from "hono";
|
|
8202
8188
|
import { connection } from "@squadbase/vite-server/connectors/google-analytics";
|
|
@@ -8204,12 +8190,14 @@ import { connection } from "@squadbase/vite-server/connectors/google-analytics";
|
|
|
8204
8190
|
const ga = connection("<connectionId>");
|
|
8205
8191
|
|
|
8206
8192
|
export default async function handler(c: Context) {
|
|
8207
|
-
const { startDate = "7daysAgo", endDate = "today" } = await c.req.json<{
|
|
8193
|
+
const { propertyId, startDate = "7daysAgo", endDate = "today" } = await c.req.json<{
|
|
8194
|
+
propertyId: string;
|
|
8208
8195
|
startDate?: string;
|
|
8209
8196
|
endDate?: string;
|
|
8210
8197
|
}>();
|
|
8211
8198
|
|
|
8212
8199
|
const { rows } = await ga.runReport({
|
|
8200
|
+
propertyId,
|
|
8213
8201
|
dateRanges: [{ startDate, endDate }],
|
|
8214
8202
|
dimensions: [{ name: "date" }],
|
|
8215
8203
|
metrics: [{ name: "activeUsers" }, { name: "sessions" }],
|
|
@@ -8262,15 +8250,8 @@ activeUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conv
|
|
|
8262
8250
|
error: "google-analytics: missing service account key"
|
|
8263
8251
|
};
|
|
8264
8252
|
}
|
|
8265
|
-
const propertyId = params[parameters13.propertyId.slug];
|
|
8266
|
-
if (!propertyId) {
|
|
8267
|
-
return { success: true };
|
|
8268
|
-
}
|
|
8269
8253
|
try {
|
|
8270
|
-
const res = await dataFetch(
|
|
8271
|
-
params,
|
|
8272
|
-
`/properties/${propertyId}/metadata`
|
|
8273
|
-
);
|
|
8254
|
+
const res = await dataFetch(params, `/metadata`);
|
|
8274
8255
|
if (!res.ok) {
|
|
8275
8256
|
const body = await res.text().catch(() => res.statusText);
|
|
8276
8257
|
return {
|
|
@@ -264,6 +264,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
264
264
|
}
|
|
265
265
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
266
266
|
if (step.type === "text") {
|
|
267
|
+
if (step.fetchOptions) {
|
|
268
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
269
|
+
if (options2.length === 0) {
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
267
273
|
return {
|
|
268
274
|
type: "nextQuestion",
|
|
269
275
|
questionSlug: step.slug,
|
|
@@ -394,6 +394,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
394
394
|
}
|
|
395
395
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
396
396
|
if (step.type === "text") {
|
|
397
|
+
if (step.fetchOptions) {
|
|
398
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
399
|
+
if (options2.length === 0) {
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
397
403
|
return {
|
|
398
404
|
type: "nextQuestion",
|
|
399
405
|
questionSlug: step.slug,
|
|
@@ -354,6 +354,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
354
354
|
}
|
|
355
355
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
356
356
|
if (step.type === "text") {
|
|
357
|
+
if (step.fetchOptions) {
|
|
358
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
359
|
+
if (options2.length === 0) {
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
357
363
|
return {
|
|
358
364
|
type: "nextQuestion",
|
|
359
365
|
questionSlug: step.slug,
|
package/dist/connectors/asana.js
CHANGED
|
@@ -391,6 +391,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
391
391
|
}
|
|
392
392
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
393
393
|
if (step.type === "text") {
|
|
394
|
+
if (step.fetchOptions) {
|
|
395
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
396
|
+
if (options2.length === 0) {
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
394
400
|
return {
|
|
395
401
|
type: "nextQuestion",
|
|
396
402
|
questionSlug: step.slug,
|
package/dist/connectors/attio.js
CHANGED
|
@@ -527,6 +527,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
527
527
|
}
|
|
528
528
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
529
529
|
if (step.type === "text") {
|
|
530
|
+
if (step.fetchOptions) {
|
|
531
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
532
|
+
if (options2.length === 0) {
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
530
536
|
return {
|
|
531
537
|
type: "nextQuestion",
|
|
532
538
|
questionSlug: step.slug,
|
|
@@ -293,6 +293,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
293
293
|
}
|
|
294
294
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
295
295
|
if (step.type === "text") {
|
|
296
|
+
if (step.fetchOptions) {
|
|
297
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
298
|
+
if (options2.length === 0) {
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
296
302
|
return {
|
|
297
303
|
type: "nextQuestion",
|
|
298
304
|
questionSlug: step.slug,
|
|
@@ -590,6 +590,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
590
590
|
}
|
|
591
591
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
592
592
|
if (step.type === "text") {
|
|
593
|
+
if (step.fetchOptions) {
|
|
594
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
595
|
+
if (options2.length === 0) {
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
593
599
|
return {
|
|
594
600
|
type: "nextQuestion",
|
|
595
601
|
questionSlug: step.slug,
|
|
@@ -289,6 +289,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
289
289
|
}
|
|
290
290
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
291
291
|
if (step.type === "text") {
|
|
292
|
+
if (step.fetchOptions) {
|
|
293
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
294
|
+
if (options2.length === 0) {
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
292
298
|
return {
|
|
293
299
|
type: "nextQuestion",
|
|
294
300
|
questionSlug: step.slug,
|
|
@@ -425,6 +425,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
425
425
|
}
|
|
426
426
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
427
427
|
if (step.type === "text") {
|
|
428
|
+
if (step.fetchOptions) {
|
|
429
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
430
|
+
if (options2.length === 0) {
|
|
431
|
+
continue;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
428
434
|
return {
|
|
429
435
|
type: "nextQuestion",
|
|
430
436
|
questionSlug: step.slug,
|
|
@@ -335,6 +335,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
335
335
|
}
|
|
336
336
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
337
337
|
if (step.type === "text") {
|
|
338
|
+
if (step.fetchOptions) {
|
|
339
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
340
|
+
if (options2.length === 0) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
338
344
|
return {
|
|
339
345
|
type: "nextQuestion",
|
|
340
346
|
questionSlug: step.slug,
|
|
@@ -372,6 +372,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
372
372
|
}
|
|
373
373
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
374
374
|
if (step.type === "text") {
|
|
375
|
+
if (step.fetchOptions) {
|
|
376
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
377
|
+
if (options2.length === 0) {
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
375
381
|
return {
|
|
376
382
|
type: "nextQuestion",
|
|
377
383
|
questionSlug: step.slug,
|
package/dist/connectors/dbt.js
CHANGED
|
@@ -514,6 +514,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
514
514
|
}
|
|
515
515
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
516
516
|
if (step.type === "text") {
|
|
517
|
+
if (step.fetchOptions) {
|
|
518
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
519
|
+
if (options2.length === 0) {
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
517
523
|
return {
|
|
518
524
|
type: "nextQuestion",
|
|
519
525
|
questionSlug: step.slug,
|
|
@@ -422,6 +422,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
422
422
|
}
|
|
423
423
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
424
424
|
if (step.type === "text") {
|
|
425
|
+
if (step.fetchOptions) {
|
|
426
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
427
|
+
if (options2.length === 0) {
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
425
431
|
return {
|
|
426
432
|
type: "nextQuestion",
|
|
427
433
|
questionSlug: step.slug,
|
|
@@ -437,6 +437,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
437
437
|
}
|
|
438
438
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
439
439
|
if (step.type === "text") {
|
|
440
|
+
if (step.fetchOptions) {
|
|
441
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
442
|
+
if (options2.length === 0) {
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
440
446
|
return {
|
|
441
447
|
type: "nextQuestion",
|
|
442
448
|
questionSlug: step.slug,
|
|
@@ -392,6 +392,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
392
392
|
}
|
|
393
393
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
394
394
|
if (step.type === "text") {
|
|
395
|
+
if (step.fetchOptions) {
|
|
396
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
397
|
+
if (options2.length === 0) {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
395
401
|
return {
|
|
396
402
|
type: "nextQuestion",
|
|
397
403
|
questionSlug: step.slug,
|
package/dist/connectors/gamma.js
CHANGED
|
@@ -348,6 +348,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
348
348
|
}
|
|
349
349
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
350
350
|
if (step.type === "text") {
|
|
351
|
+
if (step.fetchOptions) {
|
|
352
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
353
|
+
if (options2.length === 0) {
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
351
357
|
return {
|
|
352
358
|
type: "nextQuestion",
|
|
353
359
|
questionSlug: step.slug,
|
|
@@ -481,6 +481,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
481
481
|
}
|
|
482
482
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
483
483
|
if (step.type === "text") {
|
|
484
|
+
if (step.fetchOptions) {
|
|
485
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
486
|
+
if (options2.length === 0) {
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
484
490
|
return {
|
|
485
491
|
type: "nextQuestion",
|
|
486
492
|
questionSlug: step.slug,
|
|
@@ -291,6 +291,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
291
291
|
}
|
|
292
292
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
293
293
|
if (step.type === "text") {
|
|
294
|
+
if (step.fetchOptions) {
|
|
295
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
296
|
+
if (options2.length === 0) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
294
300
|
return {
|
|
295
301
|
type: "nextQuestion",
|
|
296
302
|
questionSlug: step.slug,
|
package/dist/connectors/gmail.js
CHANGED
|
@@ -303,6 +303,12 @@ 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
|
+
}
|
|
306
312
|
return {
|
|
307
313
|
type: "nextQuestion",
|
|
308
314
|
questionSlug: step.slug,
|
|
@@ -351,6 +351,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
351
351
|
}
|
|
352
352
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
353
353
|
if (step.type === "text") {
|
|
354
|
+
if (step.fetchOptions) {
|
|
355
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
356
|
+
if (options2.length === 0) {
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
354
360
|
return {
|
|
355
361
|
type: "nextQuestion",
|
|
356
362
|
questionSlug: step.slug,
|
|
@@ -332,6 +332,12 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
332
332
|
}
|
|
333
333
|
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
334
334
|
if (step.type === "text") {
|
|
335
|
+
if (step.fetchOptions) {
|
|
336
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
337
|
+
if (options2.length === 0) {
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
335
341
|
return {
|
|
336
342
|
type: "nextQuestion",
|
|
337
343
|
questionSlug: step.slug,
|