@squadbase/vite-server 0.1.17-dev.a9ddcfa → 0.1.17-dev.e4768d1
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 +8941 -3700
- package/dist/connectors/airtable-oauth.js +87 -23
- package/dist/connectors/airtable.js +130 -23
- package/dist/connectors/amplitude.js +47 -23
- package/dist/connectors/anthropic.js +41 -17
- package/dist/connectors/asana.js +76 -25
- package/dist/connectors/attio.js +69 -28
- package/dist/connectors/aws-billing.js +47 -23
- package/dist/connectors/azure-sql.js +322 -25
- package/dist/connectors/backlog-api-key.js +79 -30
- package/dist/connectors/clickup.js +89 -25
- package/dist/connectors/cosmosdb.js +51 -27
- package/dist/connectors/customerio.js +47 -23
- package/dist/connectors/dbt.js +725 -40
- package/dist/connectors/freshdesk.js +121 -23
- package/dist/connectors/freshsales.js +47 -23
- package/dist/connectors/freshservice.js +47 -23
- package/dist/connectors/gamma.js +54 -30
- package/dist/connectors/gemini.js +41 -17
- package/dist/connectors/github.js +51 -27
- package/dist/connectors/gmail-oauth.js +42 -23
- package/dist/connectors/gmail.js +43 -19
- package/dist/connectors/google-ads.js +47 -23
- package/dist/connectors/google-analytics-oauth.js +191 -40
- package/dist/connectors/google-analytics.js +529 -111
- package/dist/connectors/google-audit-log.js +43 -19
- package/dist/connectors/google-calendar-oauth.js +100 -30
- package/dist/connectors/google-calendar.js +100 -26
- package/dist/connectors/google-docs.js +42 -23
- package/dist/connectors/google-drive.js +64 -23
- package/dist/connectors/google-search-console-oauth.js +165 -32
- package/dist/connectors/google-sheets.js +142 -199
- package/dist/connectors/google-slides.js +42 -23
- package/dist/connectors/grafana.js +84 -25
- package/dist/connectors/hackernews.d.ts +5 -0
- package/dist/connectors/hackernews.js +909 -0
- package/dist/connectors/hubspot-oauth.js +73 -22
- package/dist/connectors/hubspot.js +64 -24
- package/dist/connectors/influxdb.js +47 -23
- package/dist/connectors/intercom-oauth.js +104 -25
- package/dist/connectors/intercom.js +51 -27
- package/dist/connectors/jdbc.js +76 -25
- package/dist/connectors/jira-api-key.js +107 -26
- package/dist/connectors/kintone-api-token.js +105 -33
- package/dist/connectors/kintone.js +182 -26
- package/dist/connectors/linear.js +93 -27
- package/dist/connectors/linkedin-ads.js +80 -29
- package/dist/connectors/mailchimp-oauth.js +45 -21
- package/dist/connectors/mailchimp.js +45 -21
- package/dist/connectors/meta-ads-oauth.js +72 -29
- package/dist/connectors/meta-ads.js +74 -29
- package/dist/connectors/mixpanel.js +47 -23
- package/dist/connectors/monday.js +48 -24
- package/dist/connectors/mongodb.js +47 -23
- package/dist/connectors/notion-oauth.js +92 -24
- package/dist/connectors/notion.js +144 -26
- package/dist/connectors/openai.js +41 -17
- package/dist/connectors/oracle.js +316 -26
- package/dist/connectors/outlook-oauth.js +53 -34
- package/dist/connectors/powerbi-oauth.js +45 -26
- package/dist/connectors/salesforce.js +150 -24
- package/dist/connectors/semrush.js +45 -21
- package/dist/connectors/sentry.js +75 -25
- package/dist/connectors/shopify-oauth.js +75 -23
- package/dist/connectors/shopify.js +47 -23
- package/dist/connectors/sqlserver.js +322 -25
- package/dist/connectors/stripe-api-key.js +105 -30
- package/dist/connectors/stripe-oauth.js +102 -32
- package/dist/connectors/supabase.js +315 -21
- package/dist/connectors/tableau.js +54 -30
- package/dist/connectors/tiktok-ads.js +76 -31
- package/dist/connectors/wix-store.js +47 -23
- package/dist/connectors/x.d.ts +5 -0
- package/dist/connectors/x.js +951 -0
- package/dist/connectors/zendesk-oauth.js +87 -25
- package/dist/connectors/zendesk.js +51 -27
- package/dist/index.js +9005 -3709
- package/dist/main.js +9005 -3709
- package/dist/vite-plugin.js +8939 -3698
- package/package.json +12 -4
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -132,6 +137,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
132
137
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
133
138
|
*/
|
|
134
139
|
setup;
|
|
140
|
+
/**
|
|
141
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
142
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
143
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
144
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
145
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
146
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
147
|
+
*/
|
|
148
|
+
introspect;
|
|
135
149
|
/**
|
|
136
150
|
* Opt-out of the default "verify before save" behavior on connection
|
|
137
151
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -146,6 +160,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
146
160
|
* the default verify-on-create behavior without opt-in.
|
|
147
161
|
*/
|
|
148
162
|
skipConnectionCheckOnCreate;
|
|
163
|
+
/**
|
|
164
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
165
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
166
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
167
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
168
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
169
|
+
*/
|
|
170
|
+
surveyProbes;
|
|
149
171
|
constructor(config) {
|
|
150
172
|
this.slug = config.slug;
|
|
151
173
|
this.authType = config.authType;
|
|
@@ -163,7 +185,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
163
185
|
this.query = config.query;
|
|
164
186
|
this.checkConnection = config.checkConnection;
|
|
165
187
|
this.setup = config.setup;
|
|
188
|
+
this.introspect = config.introspect;
|
|
166
189
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
190
|
+
this.surveyProbes = config.surveyProbes;
|
|
167
191
|
}
|
|
168
192
|
get connectorKey() {
|
|
169
193
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -171,7 +195,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
171
195
|
/**
|
|
172
196
|
* Create tools for connections that belong to this connector.
|
|
173
197
|
* Filters connections by connectorKey internally.
|
|
174
|
-
* Returns tools keyed as
|
|
198
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
175
199
|
*/
|
|
176
200
|
createTools(connections, config, opts) {
|
|
177
201
|
const myConnections = connections.filter(
|
|
@@ -181,7 +205,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
181
205
|
for (const t of Object.values(this.tools)) {
|
|
182
206
|
const tool = t.createTool(myConnections, config);
|
|
183
207
|
const originalToModelOutput = tool.toModelOutput;
|
|
184
|
-
result[
|
|
208
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
185
209
|
...tool,
|
|
186
210
|
toModelOutput: async (options) => {
|
|
187
211
|
if (!originalToModelOutput) {
|
|
@@ -201,25 +225,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
201
225
|
if (authType) return `${slug}-${authType}`;
|
|
202
226
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
203
227
|
// user-password
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
228
|
+
postgresql: "user-password",
|
|
229
|
+
mysql: "user-password",
|
|
230
|
+
clickhouse: "user-password",
|
|
231
|
+
kintone: "user-password",
|
|
208
232
|
"squadbase-db": "user-password",
|
|
209
233
|
// service-account
|
|
210
|
-
|
|
211
|
-
|
|
234
|
+
snowflake: "service-account",
|
|
235
|
+
bigquery: "service-account",
|
|
212
236
|
"google-analytics": "service-account",
|
|
213
237
|
"google-calendar": "service-account",
|
|
214
238
|
"aws-athena": "service-account",
|
|
215
|
-
|
|
239
|
+
redshift: "service-account",
|
|
216
240
|
// api-key
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
241
|
+
databricks: "api-key",
|
|
242
|
+
dbt: "api-key",
|
|
243
|
+
airtable: "api-key",
|
|
244
|
+
openai: "api-key",
|
|
245
|
+
gemini: "api-key",
|
|
246
|
+
anthropic: "api-key",
|
|
223
247
|
"wix-store": "api-key"
|
|
224
248
|
};
|
|
225
249
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
@@ -468,12 +492,12 @@ var tiktokAdsOnboarding = new ConnectorOnboarding({
|
|
|
468
492
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
469
493
|
},
|
|
470
494
|
dataOverviewInstructions: {
|
|
471
|
-
en: `1. Call
|
|
472
|
-
2. Call
|
|
473
|
-
3. Call
|
|
474
|
-
ja: `1.
|
|
475
|
-
2.
|
|
476
|
-
3.
|
|
495
|
+
en: `1. Call connector_tiktok-ads_request with GET campaign/get/ to explore campaign data
|
|
496
|
+
2. Call connector_tiktok-ads_request with GET adgroup/get/ to explore ad group data
|
|
497
|
+
3. Call connector_tiktok-ads_request with GET report/integrated/get/ with metrics=["spend","impressions","clicks","ctr","cpm","cpc"]&dimensions=["campaign_id"]&data_level=AUCTION_CAMPAIGN&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD to check recent performance`,
|
|
498
|
+
ja: `1. connector_tiktok-ads_request \u3067 GET campaign/get/ \u3092\u547C\u3073\u51FA\u3057\u3066\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30C7\u30FC\u30BF\u3092\u63A2\u7D22
|
|
499
|
+
2. connector_tiktok-ads_request \u3067 GET adgroup/get/ \u3092\u547C\u3073\u51FA\u3057\u3066\u5E83\u544A\u30B0\u30EB\u30FC\u30D7\u30C7\u30FC\u30BF\u3092\u63A2\u7D22
|
|
500
|
+
3. connector_tiktok-ads_request \u3067 GET report/integrated/get/ \u306B metrics=["spend","impressions","clicks","ctr","cpm","cpc"]&dimensions=["campaign_id"]&data_level=AUCTION_CAMPAIGN&start_date=YYYY-MM-DD&end_date=YYYY-MM-DD \u3092\u6307\u5B9A\u3057\u3066\u76F4\u8FD1\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u3092\u78BA\u8A8D`
|
|
477
501
|
}
|
|
478
502
|
});
|
|
479
503
|
|
|
@@ -513,6 +537,19 @@ async function listAdvertisers(proxyFetch) {
|
|
|
513
537
|
}
|
|
514
538
|
return data.data?.list ?? [];
|
|
515
539
|
}
|
|
540
|
+
async function fetchCampaignCount(proxyFetch, advertiserId) {
|
|
541
|
+
try {
|
|
542
|
+
const url = `${BASE_URL3}/campaign/get/?advertiser_id=${encodeURIComponent(advertiserId)}&page_size=1`;
|
|
543
|
+
const res = await proxyFetch(url, { method: "GET" });
|
|
544
|
+
if (!res.ok) return null;
|
|
545
|
+
const data = await res.json();
|
|
546
|
+
if (data.code !== void 0 && data.code !== 0) return null;
|
|
547
|
+
const total = data.data?.page_info?.total_number;
|
|
548
|
+
return typeof total === "number" ? total : null;
|
|
549
|
+
} catch {
|
|
550
|
+
return null;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
516
553
|
async function fetchAdvertiserInfo(proxyFetch, advertiserId) {
|
|
517
554
|
const advertiserIdsParam = encodeURIComponent(
|
|
518
555
|
JSON.stringify([advertiserId])
|
|
@@ -577,16 +614,24 @@ var tiktokAdsSetupFlow = {
|
|
|
577
614
|
sections.push("_No advertisers selected._", "");
|
|
578
615
|
return sections.join("\n");
|
|
579
616
|
}
|
|
580
|
-
sections.push(
|
|
581
|
-
|
|
617
|
+
sections.push(
|
|
618
|
+
"| Advertiser ID | Name | Currency | Status | Time Zone | Campaigns |"
|
|
619
|
+
);
|
|
620
|
+
sections.push(
|
|
621
|
+
"|---------------|------|----------|--------|-----------|-----------|"
|
|
622
|
+
);
|
|
582
623
|
for (const id of targetIds) {
|
|
583
|
-
const info = await
|
|
624
|
+
const [info, campaignCount] = await Promise.all([
|
|
625
|
+
fetchAdvertiserInfo(rt.config.proxyFetch, id),
|
|
626
|
+
fetchCampaignCount(rt.config.proxyFetch, id)
|
|
627
|
+
]);
|
|
584
628
|
const name = (info.name ?? "-").replace(/\|/g, "\\|");
|
|
585
629
|
const currency = info.currency ?? "-";
|
|
586
630
|
const status = info.status ?? "-";
|
|
587
631
|
const timeZone = info.display_timezone ?? "-";
|
|
632
|
+
const campaigns = campaignCount == null ? "-" : String(campaignCount);
|
|
588
633
|
sections.push(
|
|
589
|
-
`| ${id} | ${name} | ${currency} | ${status} | ${timeZone} |`
|
|
634
|
+
`| ${id} | ${name} | ${currency} | ${status} | ${timeZone} | ${campaigns} |`
|
|
590
635
|
);
|
|
591
636
|
}
|
|
592
637
|
sections.push("");
|
|
@@ -759,8 +804,8 @@ var tiktokAdsConnector = new ConnectorPlugin({
|
|
|
759
804
|
systemPrompt: {
|
|
760
805
|
en: `### Tools
|
|
761
806
|
|
|
762
|
-
- \`
|
|
763
|
-
- \`
|
|
807
|
+
- \`connector_tiktok-ads_request\`: Send authenticated requests to the TikTok Marketing API v1.3. Authentication is handled automatically via OAuth proxy. The advertiser_id is automatically injected if configured.
|
|
808
|
+
- \`connector_tiktok-ads_listAdvertisers\`: List accessible TikTok Ads advertiser accounts. Use this during setup to discover available accounts.
|
|
764
809
|
|
|
765
810
|
### TikTok Marketing API Reference
|
|
766
811
|
|
|
@@ -825,8 +870,8 @@ const data = await res.json();
|
|
|
825
870
|
\`\`\``,
|
|
826
871
|
ja: `### \u30C4\u30FC\u30EB
|
|
827
872
|
|
|
828
|
-
- \`
|
|
829
|
-
- \`
|
|
873
|
+
- \`connector_tiktok-ads_request\`: TikTok Marketing API v1.3\u3078\u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002\u8A8D\u8A3C\u306FOAuth\u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u3067\u81EA\u52D5\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002advertiser_id\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u81EA\u52D5\u7684\u306B\u6CE8\u5165\u3055\u308C\u307E\u3059\u3002
|
|
874
|
+
- \`connector_tiktok-ads_listAdvertisers\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306ATikTok Ads\u5E83\u544A\u4E3B\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4E00\u89A7\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306B\u5229\u7528\u53EF\u80FD\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
830
875
|
|
|
831
876
|
### TikTok Marketing API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
832
877
|
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -280,6 +285,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
280
285
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
281
286
|
*/
|
|
282
287
|
setup;
|
|
288
|
+
/**
|
|
289
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
290
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
291
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
292
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
293
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
294
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
295
|
+
*/
|
|
296
|
+
introspect;
|
|
283
297
|
/**
|
|
284
298
|
* Opt-out of the default "verify before save" behavior on connection
|
|
285
299
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -294,6 +308,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
294
308
|
* the default verify-on-create behavior without opt-in.
|
|
295
309
|
*/
|
|
296
310
|
skipConnectionCheckOnCreate;
|
|
311
|
+
/**
|
|
312
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
313
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
314
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
315
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
316
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
317
|
+
*/
|
|
318
|
+
surveyProbes;
|
|
297
319
|
constructor(config) {
|
|
298
320
|
this.slug = config.slug;
|
|
299
321
|
this.authType = config.authType;
|
|
@@ -311,7 +333,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
311
333
|
this.query = config.query;
|
|
312
334
|
this.checkConnection = config.checkConnection;
|
|
313
335
|
this.setup = config.setup;
|
|
336
|
+
this.introspect = config.introspect;
|
|
314
337
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
338
|
+
this.surveyProbes = config.surveyProbes;
|
|
315
339
|
}
|
|
316
340
|
get connectorKey() {
|
|
317
341
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -319,7 +343,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
319
343
|
/**
|
|
320
344
|
* Create tools for connections that belong to this connector.
|
|
321
345
|
* Filters connections by connectorKey internally.
|
|
322
|
-
* Returns tools keyed as
|
|
346
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
323
347
|
*/
|
|
324
348
|
createTools(connections, config, opts) {
|
|
325
349
|
const myConnections = connections.filter(
|
|
@@ -329,7 +353,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
329
353
|
for (const t of Object.values(this.tools)) {
|
|
330
354
|
const tool = t.createTool(myConnections, config);
|
|
331
355
|
const originalToModelOutput = tool.toModelOutput;
|
|
332
|
-
result[
|
|
356
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
333
357
|
...tool,
|
|
334
358
|
toModelOutput: async (options) => {
|
|
335
359
|
if (!originalToModelOutput) {
|
|
@@ -349,25 +373,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
349
373
|
if (authType) return `${slug}-${authType}`;
|
|
350
374
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
351
375
|
// user-password
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
376
|
+
postgresql: "user-password",
|
|
377
|
+
mysql: "user-password",
|
|
378
|
+
clickhouse: "user-password",
|
|
379
|
+
kintone: "user-password",
|
|
356
380
|
"squadbase-db": "user-password",
|
|
357
381
|
// service-account
|
|
358
|
-
|
|
359
|
-
|
|
382
|
+
snowflake: "service-account",
|
|
383
|
+
bigquery: "service-account",
|
|
360
384
|
"google-analytics": "service-account",
|
|
361
385
|
"google-calendar": "service-account",
|
|
362
386
|
"aws-athena": "service-account",
|
|
363
|
-
|
|
387
|
+
redshift: "service-account",
|
|
364
388
|
// api-key
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
389
|
+
databricks: "api-key",
|
|
390
|
+
dbt: "api-key",
|
|
391
|
+
airtable: "api-key",
|
|
392
|
+
openai: "api-key",
|
|
393
|
+
gemini: "api-key",
|
|
394
|
+
anthropic: "api-key",
|
|
371
395
|
"wix-store": "api-key"
|
|
372
396
|
};
|
|
373
397
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
@@ -454,11 +478,11 @@ var AUTH_TYPES = {
|
|
|
454
478
|
// ../connectors/src/connectors/wix-store/setup.ts
|
|
455
479
|
var wixStoreOnboarding = new ConnectorOnboarding({
|
|
456
480
|
dataOverviewInstructions: {
|
|
457
|
-
en: `1. Call
|
|
458
|
-
2. Call
|
|
481
|
+
en: `1. Call connector_wix-store_request with POST stores/v1/products/query with { "query": { "paging": { "limit": 5 } } } to explore products
|
|
482
|
+
2. Call connector_wix-store_request with POST ecom/v1/orders/search with { "search": { "cursorPaging": { "limit": 5 } } } to explore orders
|
|
459
483
|
3. Explore other endpoints (collections, inventory) as needed`,
|
|
460
|
-
ja: `1.
|
|
461
|
-
2.
|
|
484
|
+
ja: `1. connector_wix-store_request \u3067 POST stores/v1/products/query \u3092 { "query": { "paging": { "limit": 5 } } } \u3067\u547C\u3073\u51FA\u3057\u3001\u5546\u54C1\u30C7\u30FC\u30BF\u3092\u78BA\u8A8D
|
|
485
|
+
2. connector_wix-store_request \u3067 POST ecom/v1/orders/search \u3092 { "search": { "cursorPaging": { "limit": 5 } } } \u3067\u547C\u3073\u51FA\u3057\u3001\u6CE8\u6587\u30C7\u30FC\u30BF\u3092\u78BA\u8A8D
|
|
462
486
|
3. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u4ED6\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\uFF08\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3001\u5728\u5EAB\uFF09\u3092\u63A2\u7D22`
|
|
463
487
|
}
|
|
464
488
|
});
|
|
@@ -659,7 +683,7 @@ var wixStoreConnector = new ConnectorPlugin({
|
|
|
659
683
|
systemPrompt: {
|
|
660
684
|
en: `### Tools
|
|
661
685
|
|
|
662
|
-
- \`
|
|
686
|
+
- \`connector_wix-store_request\`: The only way to call the Wix Store REST API. Use it to query products, orders, collections, and inventory. Authentication (API Key, Site ID) is configured automatically. Note that Wix uses POST even for query endpoints, and filters are written in WQL (Wix Query Language). See the Wix Store API Reference below for endpoints and request bodies.
|
|
663
687
|
|
|
664
688
|
### Business Logic
|
|
665
689
|
|
|
@@ -733,7 +757,7 @@ export default async function handler(c: Context) {
|
|
|
733
757
|
- Body: \`{ "query": { "paging": { "limit": 50 } } }\``,
|
|
734
758
|
ja: `### \u30C4\u30FC\u30EB
|
|
735
759
|
|
|
736
|
-
- \`
|
|
760
|
+
- \`connector_wix-store_request\`: Wix Store REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u5546\u54C1\u3001\u6CE8\u6587\u3001\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3001\u5728\u5EAB\u306E\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API Key\u3001Site ID\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002Wix\u306F\u30AF\u30A8\u30EA\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3067\u3082 POST \u3092\u4F7F\u7528\u3057\u3001\u30D5\u30A3\u30EB\u30BF\u306F WQL (Wix Query Language) \u3067\u8A18\u8FF0\u3059\u308B\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\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\u300CWix Store API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
737
761
|
|
|
738
762
|
### Business Logic
|
|
739
763
|
|