@squadbase/vite-server 0.1.17-dev.24af54e → 0.1.17-dev.423ee34

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.
Files changed (77) hide show
  1. package/dist/cli/index.js +4873 -1073
  2. package/dist/connectors/airtable-oauth.js +78 -11
  3. package/dist/connectors/airtable.js +74 -11
  4. package/dist/connectors/amplitude.js +38 -11
  5. package/dist/connectors/anthropic.js +4 -2
  6. package/dist/connectors/asana.js +67 -13
  7. package/dist/connectors/attio.js +60 -16
  8. package/dist/connectors/aws-billing.js +38 -11
  9. package/dist/connectors/azure-sql.js +64 -13
  10. package/dist/connectors/backlog-api-key.js +70 -18
  11. package/dist/connectors/clickup.js +80 -13
  12. package/dist/connectors/cosmosdb.js +42 -15
  13. package/dist/connectors/customerio.js +39 -12
  14. package/dist/connectors/dbt.js +716 -28
  15. package/dist/connectors/freshdesk.js +112 -11
  16. package/dist/connectors/freshsales.js +38 -11
  17. package/dist/connectors/freshservice.js +38 -11
  18. package/dist/connectors/gamma.js +47 -20
  19. package/dist/connectors/gemini.js +4 -2
  20. package/dist/connectors/github.js +42 -15
  21. package/dist/connectors/gmail-oauth.js +38 -13
  22. package/dist/connectors/gmail.js +34 -7
  23. package/dist/connectors/google-ads.js +38 -11
  24. package/dist/connectors/google-analytics-oauth.js +182 -28
  25. package/dist/connectors/google-analytics.js +653 -104
  26. package/dist/connectors/google-audit-log.js +34 -7
  27. package/dist/connectors/google-calendar-oauth.js +91 -18
  28. package/dist/connectors/google-calendar.js +91 -14
  29. package/dist/connectors/google-docs.js +38 -13
  30. package/dist/connectors/google-drive.js +60 -13
  31. package/dist/connectors/google-search-console-oauth.js +156 -20
  32. package/dist/connectors/google-sheets.js +36 -9
  33. package/dist/connectors/google-slides.js +38 -13
  34. package/dist/connectors/grafana.js +75 -13
  35. package/dist/connectors/hubspot-oauth.js +69 -12
  36. package/dist/connectors/hubspot.js +55 -12
  37. package/dist/connectors/influxdb.js +38 -11
  38. package/dist/connectors/intercom-oauth.js +100 -15
  39. package/dist/connectors/intercom.js +42 -15
  40. package/dist/connectors/jdbc.js +36 -9
  41. package/dist/connectors/jira-api-key.js +98 -14
  42. package/dist/connectors/kintone-api-token.js +96 -21
  43. package/dist/connectors/kintone.js +84 -14
  44. package/dist/connectors/linear.js +84 -15
  45. package/dist/connectors/linkedin-ads.js +71 -17
  46. package/dist/connectors/mailchimp-oauth.js +36 -9
  47. package/dist/connectors/mailchimp.js +36 -9
  48. package/dist/connectors/meta-ads-oauth.js +63 -17
  49. package/dist/connectors/meta-ads.js +65 -17
  50. package/dist/connectors/mixpanel.js +38 -11
  51. package/dist/connectors/monday.js +39 -12
  52. package/dist/connectors/mongodb.js +38 -11
  53. package/dist/connectors/notion-oauth.js +88 -14
  54. package/dist/connectors/notion.js +90 -14
  55. package/dist/connectors/openai.js +4 -2
  56. package/dist/connectors/oracle.js +78 -20
  57. package/dist/connectors/outlook-oauth.js +48 -23
  58. package/dist/connectors/powerbi-oauth.js +321 -49
  59. package/dist/connectors/salesforce.js +72 -12
  60. package/dist/connectors/semrush.js +374 -52
  61. package/dist/connectors/sentry.js +66 -13
  62. package/dist/connectors/shopify-oauth.js +71 -13
  63. package/dist/connectors/shopify.js +38 -11
  64. package/dist/connectors/sqlserver.js +64 -13
  65. package/dist/connectors/stripe-api-key.js +96 -18
  66. package/dist/connectors/stripe-oauth.js +98 -22
  67. package/dist/connectors/supabase.js +55 -11
  68. package/dist/connectors/tableau.js +262 -92
  69. package/dist/connectors/tiktok-ads.js +67 -19
  70. package/dist/connectors/wix-store.js +38 -11
  71. package/dist/connectors/zendesk-oauth.js +83 -15
  72. package/dist/connectors/zendesk.js +42 -15
  73. package/dist/index.d.ts +1 -0
  74. package/dist/index.js +4902 -1077
  75. package/dist/main.js +4891 -1071
  76. package/dist/vite-plugin.js +4871 -1071
  77. package/package.json +1 -1
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
16
16
  type;
17
17
  secret;
18
18
  required;
19
+ isDeprecated;
19
20
  constructor(config) {
20
21
  this.slug = config.slug;
21
22
  this.name = config.name;
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
24
25
  this.type = config.type;
25
26
  this.secret = config.secret;
26
27
  this.required = config.required;
28
+ this.isDeprecated = config.isDeprecated ?? false;
27
29
  }
28
30
  /**
29
31
  * Get the parameter value from a ConnectorConnectionObject.
@@ -256,7 +258,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
256
258
  /**
257
259
  * Create tools for connections that belong to this connector.
258
260
  * Filters connections by connectorKey internally.
259
- * Returns tools keyed as `${connectorKey}_${toolName}`.
261
+ * Returns tools keyed as `connector_${connectorKey}_${toolName}`.
260
262
  */
261
263
  createTools(connections, config, opts) {
262
264
  const myConnections = connections.filter(
@@ -266,7 +268,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
266
268
  for (const t of Object.values(this.tools)) {
267
269
  const tool = t.createTool(myConnections, config);
268
270
  const originalToModelOutput = tool.toModelOutput;
269
- result[`${this.connectorKey}_${t.name}`] = {
271
+ result[`connector_${this.connectorKey}_${t.name}`] = {
270
272
  ...tool,
271
273
  toModelOutput: async (options) => {
272
274
  if (!originalToModelOutput) {
@@ -322,19 +324,34 @@ async function runSetupFlow(flow, params, ctx, config) {
322
324
  };
323
325
  let state = flow.initialState();
324
326
  let answerIdx = 0;
327
+ const pendingParameterUpdates = [];
325
328
  for (const step of flow.steps) {
326
329
  const ans = ctx.answers[answerIdx];
327
330
  if (ans && ans.questionSlug === step.slug) {
328
331
  state = step.applyAnswer(state, ans.answer);
332
+ if (step.toParameterUpdates) {
333
+ pendingParameterUpdates.push(...step.toParameterUpdates(state));
334
+ }
329
335
  answerIdx += 1;
330
336
  continue;
331
337
  }
338
+ const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
332
339
  if (step.type === "text") {
340
+ if (step.fetchOptions) {
341
+ const options2 = await step.fetchOptions(state, runtime);
342
+ if (options2.length === 0) {
343
+ continue;
344
+ }
345
+ }
333
346
  return {
334
347
  type: "nextQuestion",
335
348
  questionSlug: step.slug,
336
349
  question: step.question[ctx.language],
337
- questionType: "text"
350
+ questionType: "text",
351
+ allowFreeText: resolvedAllowFreeText,
352
+ ...pendingParameterUpdates.length > 0 && {
353
+ parameterUpdates: pendingParameterUpdates
354
+ }
338
355
  };
339
356
  }
340
357
  const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
@@ -346,11 +363,21 @@ async function runSetupFlow(flow, params, ctx, config) {
346
363
  questionSlug: step.slug,
347
364
  question: step.question[ctx.language],
348
365
  questionType: step.type,
349
- options
366
+ options,
367
+ allowFreeText: resolvedAllowFreeText,
368
+ ...pendingParameterUpdates.length > 0 && {
369
+ parameterUpdates: pendingParameterUpdates
370
+ }
350
371
  };
351
372
  }
352
373
  const dataInvestigationResult = await flow.finalize(state, runtime);
353
- return { type: "fulfilled", dataInvestigationResult };
374
+ return {
375
+ type: "fulfilled",
376
+ dataInvestigationResult,
377
+ ...pendingParameterUpdates.length > 0 && {
378
+ parameterUpdates: pendingParameterUpdates
379
+ }
380
+ };
354
381
  }
355
382
  async function resolveSetupSelection(params) {
356
383
  const { selected, allSentinel, fetchAll, limit } = params;
@@ -371,14 +398,14 @@ var AUTH_TYPES = {
371
398
  // ../connectors/src/connectors/cosmosdb/setup.ts
372
399
  var cosmosdbOnboarding = new ConnectorOnboarding({
373
400
  dataOverviewInstructions: {
374
- en: `1. Use cosmosdb_listContainers to list all containers in the configured database
375
- 2. For key containers, sample documents with cosmosdb_query: container="users", sql="SELECT TOP 5 * FROM c"
401
+ en: `1. Use connector_cosmosdb_listContainers to list all containers in the configured database
402
+ 2. For key containers, sample documents with connector_cosmosdb_query: container="users", sql="SELECT TOP 5 * FROM c"
376
403
  3. Examine the document structure to understand the schema (Cosmos DB containers are schema-flexible \u2014 items in the same container may have different fields)
377
- 4. Use cosmosdb_query with GROUP BY to analyse data distribution if needed: \`SELECT c.status, COUNT(1) AS n FROM c GROUP BY c.status\``,
378
- ja: `1. cosmosdb_listContainers \u3067\u5BFE\u8C61\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u5185\u306E\u30B3\u30F3\u30C6\u30CA\u4E00\u89A7\u3092\u53D6\u5F97
379
- 2. \u4E3B\u8981\u30B3\u30F3\u30C6\u30CA\u306B\u3064\u3044\u3066 cosmosdb_query \u3067\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0: container="users", sql="SELECT TOP 5 * FROM c"
404
+ 4. Use connector_cosmosdb_query with GROUP BY to analyse data distribution if needed: \`SELECT c.status, COUNT(1) AS n FROM c GROUP BY c.status\``,
405
+ ja: `1. connector_cosmosdb_listContainers \u3067\u5BFE\u8C61\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u5185\u306E\u30B3\u30F3\u30C6\u30CA\u4E00\u89A7\u3092\u53D6\u5F97
406
+ 2. \u4E3B\u8981\u30B3\u30F3\u30C6\u30CA\u306B\u3064\u3044\u3066 connector_cosmosdb_query \u3067\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0: container="users", sql="SELECT TOP 5 * FROM c"
380
407
  3. \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u69CB\u9020\u3092\u78BA\u8A8D\u3057\u3066\u30B9\u30AD\u30FC\u30DE\u3092\u628A\u63E1\uFF08Cosmos DB \u306E\u30B3\u30F3\u30C6\u30CA\u306F\u30B9\u30AD\u30FC\u30DE\u304C\u67D4\u8EDF\u306A\u305F\u3081\u3001\u540C\u3058\u30B3\u30F3\u30C6\u30CA\u5185\u3067\u3082\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u7570\u306A\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\uFF09
381
- 4. \u5FC5\u8981\u306B\u5FDC\u3058\u3066 cosmosdb_query \u306E GROUP BY \u3067\u30C7\u30FC\u30BF\u5206\u5E03\u3092\u78BA\u8A8D: \`SELECT c.status, COUNT(1) AS n FROM c GROUP BY c.status\``
408
+ 4. \u5FC5\u8981\u306B\u5FDC\u3058\u3066 connector_cosmosdb_query \u306E GROUP BY \u3067\u30C7\u30FC\u30BF\u5206\u5E03\u3092\u78BA\u8A8D: \`SELECT c.status, COUNT(1) AS n FROM c GROUP BY c.status\``
382
409
  }
383
410
  });
384
411
 
@@ -690,8 +717,8 @@ var cosmosdbConnector = new ConnectorPlugin({
690
717
  systemPrompt: {
691
718
  en: `### Tools
692
719
 
693
- - \`cosmosdb_listContainers\`: Lists all containers in the configured database, with their partition key paths. Use this first to explore available data.
694
- - \`cosmosdb_query\`: Executes a Cosmos DB SQL (Core / NoSQL API) query against a single container and returns items. Use for schema exploration, data sampling, and analytical queries. Pass \`partitionKey\` to scope the query to a single partition (cross-partition queries are enabled by default).
720
+ - \`connector_cosmosdb_listContainers\`: Lists all containers in the configured database, with their partition key paths. Use this first to explore available data.
721
+ - \`connector_cosmosdb_query\`: Executes a Cosmos DB SQL (Core / NoSQL API) query against a single container and returns items. Use for schema exploration, data sampling, and analytical queries. Pass \`partitionKey\` to scope the query to a single partition (cross-partition queries are enabled by default).
695
722
 
696
723
  ### Business Logic
697
724
 
@@ -736,8 +763,8 @@ export default async function handler(_c: Context) {
736
763
  - Always bound results with \`TOP n\` and prefer scoped queries with a \`partitionKey\` value when possible \u2014 cross-partition queries cost more RUs.`,
737
764
  ja: `### \u30C4\u30FC\u30EB
738
765
 
739
- - \`cosmosdb_listContainers\`: \u8A2D\u5B9A\u3055\u308C\u305F\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u5185\u306E\u30B3\u30F3\u30C6\u30CA\u4E00\u89A7\uFF08\u30D1\u30FC\u30C6\u30A3\u30B7\u30E7\u30F3\u30AD\u30FC\u306E\u30D1\u30B9\u4ED8\u304D\uFF09\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30C7\u30FC\u30BF\u63A2\u7D22\u306E\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u3068\u3057\u3066\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
740
- - \`cosmosdb_query\`: \u5358\u4E00\u306E\u30B3\u30F3\u30C6\u30CA\u306B\u5BFE\u3057\u3066 Cosmos DB SQL\uFF08Core / NoSQL API\uFF09\u30AF\u30A8\u30EA\u3092\u5B9F\u884C\u3057\u3001\u30A2\u30A4\u30C6\u30E0\u3092\u8FD4\u3057\u307E\u3059\u3002\u30B9\u30AD\u30FC\u30DE\u63A2\u7D22\u3001\u30C7\u30FC\u30BF\u306E\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3001\u5206\u6790\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\`partitionKey\` \u3092\u6E21\u3059\u3068\u5358\u4E00\u30D1\u30FC\u30C6\u30A3\u30B7\u30E7\u30F3\u306B\u30B9\u30B3\u30FC\u30D7\u3067\u304D\u3001\u672A\u6307\u5B9A\u3060\u3068\u30AF\u30ED\u30B9\u30D1\u30FC\u30C6\u30A3\u30B7\u30E7\u30F3\u30AF\u30A8\u30EA\u306B\u306A\u308A\u307E\u3059\u3002
766
+ - \`connector_cosmosdb_listContainers\`: \u8A2D\u5B9A\u3055\u308C\u305F\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u5185\u306E\u30B3\u30F3\u30C6\u30CA\u4E00\u89A7\uFF08\u30D1\u30FC\u30C6\u30A3\u30B7\u30E7\u30F3\u30AD\u30FC\u306E\u30D1\u30B9\u4ED8\u304D\uFF09\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30C7\u30FC\u30BF\u63A2\u7D22\u306E\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u3068\u3057\u3066\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
767
+ - \`connector_cosmosdb_query\`: \u5358\u4E00\u306E\u30B3\u30F3\u30C6\u30CA\u306B\u5BFE\u3057\u3066 Cosmos DB SQL\uFF08Core / NoSQL API\uFF09\u30AF\u30A8\u30EA\u3092\u5B9F\u884C\u3057\u3001\u30A2\u30A4\u30C6\u30E0\u3092\u8FD4\u3057\u307E\u3059\u3002\u30B9\u30AD\u30FC\u30DE\u63A2\u7D22\u3001\u30C7\u30FC\u30BF\u306E\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3001\u5206\u6790\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\`partitionKey\` \u3092\u6E21\u3059\u3068\u5358\u4E00\u30D1\u30FC\u30C6\u30A3\u30B7\u30E7\u30F3\u306B\u30B9\u30B3\u30FC\u30D7\u3067\u304D\u3001\u672A\u6307\u5B9A\u3060\u3068\u30AF\u30ED\u30B9\u30D1\u30FC\u30C6\u30A3\u30B7\u30E7\u30F3\u30AF\u30A8\u30EA\u306B\u306A\u308A\u307E\u3059\u3002
741
768
 
742
769
  ### Business Logic
743
770
 
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
16
16
  type;
17
17
  secret;
18
18
  required;
19
+ isDeprecated;
19
20
  constructor(config) {
20
21
  this.slug = config.slug;
21
22
  this.name = config.name;
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
24
25
  this.type = config.type;
25
26
  this.secret = config.secret;
26
27
  this.required = config.required;
28
+ this.isDeprecated = config.isDeprecated ?? false;
27
29
  }
28
30
  /**
29
31
  * Get the parameter value from a ConnectorConnectionObject.
@@ -293,7 +295,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
293
295
  /**
294
296
  * Create tools for connections that belong to this connector.
295
297
  * Filters connections by connectorKey internally.
296
- * Returns tools keyed as `${connectorKey}_${toolName}`.
298
+ * Returns tools keyed as `connector_${connectorKey}_${toolName}`.
297
299
  */
298
300
  createTools(connections, config, opts) {
299
301
  const myConnections = connections.filter(
@@ -303,7 +305,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
303
305
  for (const t of Object.values(this.tools)) {
304
306
  const tool = t.createTool(myConnections, config);
305
307
  const originalToModelOutput = tool.toModelOutput;
306
- result[`${this.connectorKey}_${t.name}`] = {
308
+ result[`connector_${this.connectorKey}_${t.name}`] = {
307
309
  ...tool,
308
310
  toModelOutput: async (options) => {
309
311
  if (!originalToModelOutput) {
@@ -359,19 +361,34 @@ async function runSetupFlow(flow, params, ctx, config) {
359
361
  };
360
362
  let state = flow.initialState();
361
363
  let answerIdx = 0;
364
+ const pendingParameterUpdates = [];
362
365
  for (const step of flow.steps) {
363
366
  const ans = ctx.answers[answerIdx];
364
367
  if (ans && ans.questionSlug === step.slug) {
365
368
  state = step.applyAnswer(state, ans.answer);
369
+ if (step.toParameterUpdates) {
370
+ pendingParameterUpdates.push(...step.toParameterUpdates(state));
371
+ }
366
372
  answerIdx += 1;
367
373
  continue;
368
374
  }
375
+ const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
369
376
  if (step.type === "text") {
377
+ if (step.fetchOptions) {
378
+ const options2 = await step.fetchOptions(state, runtime);
379
+ if (options2.length === 0) {
380
+ continue;
381
+ }
382
+ }
370
383
  return {
371
384
  type: "nextQuestion",
372
385
  questionSlug: step.slug,
373
386
  question: step.question[ctx.language],
374
- questionType: "text"
387
+ questionType: "text",
388
+ allowFreeText: resolvedAllowFreeText,
389
+ ...pendingParameterUpdates.length > 0 && {
390
+ parameterUpdates: pendingParameterUpdates
391
+ }
375
392
  };
376
393
  }
377
394
  const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
@@ -383,11 +400,21 @@ async function runSetupFlow(flow, params, ctx, config) {
383
400
  questionSlug: step.slug,
384
401
  question: step.question[ctx.language],
385
402
  questionType: step.type,
386
- options
403
+ options,
404
+ allowFreeText: resolvedAllowFreeText,
405
+ ...pendingParameterUpdates.length > 0 && {
406
+ parameterUpdates: pendingParameterUpdates
407
+ }
387
408
  };
388
409
  }
389
410
  const dataInvestigationResult = await flow.finalize(state, runtime);
390
- return { type: "fulfilled", dataInvestigationResult };
411
+ return {
412
+ type: "fulfilled",
413
+ dataInvestigationResult,
414
+ ...pendingParameterUpdates.length > 0 && {
415
+ parameterUpdates: pendingParameterUpdates
416
+ }
417
+ };
391
418
  }
392
419
 
393
420
  // ../connectors/src/auth-types.ts
@@ -403,12 +430,12 @@ var AUTH_TYPES = {
403
430
  // ../connectors/src/connectors/customerio/setup.ts
404
431
  var customerioOnboarding = new ConnectorOnboarding({
405
432
  dataOverviewInstructions: {
406
- en: `1. Call customerio_request with GET /v1/segments to list all segments
407
- 2. Call customerio_request with GET /v1/campaigns to list all campaigns
433
+ en: `1. Call connector_customerio_request with GET /v1/segments to list all segments
434
+ 2. Call connector_customerio_request with GET /v1/campaigns to list all campaigns
408
435
  3. Pick a segment and call GET /v1/segments/{segment_id}/membership to view member IDs
409
436
  4. Pick a customer ID and call GET /v1/customers/{id}/attributes to view customer attributes`,
410
- ja: `1. customerio_request \u3067 GET /v1/segments \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30BB\u30B0\u30E1\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
411
- 2. customerio_request \u3067 GET /v1/campaigns \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
437
+ ja: `1. connector_customerio_request \u3067 GET /v1/segments \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30BB\u30B0\u30E1\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
438
+ 2. connector_customerio_request \u3067 GET /v1/campaigns \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
412
439
  3. \u30BB\u30B0\u30E1\u30F3\u30C8\u3092\u9078\u629E\u3057 GET /v1/segments/{segment_id}/membership \u3067\u30E1\u30F3\u30D0\u30FCID\u3092\u78BA\u8A8D
413
440
  4. \u9867\u5BA2ID\u3092\u9078\u629E\u3057 GET /v1/customers/{id}/attributes \u3067\u9867\u5BA2\u5C5E\u6027\u3092\u78BA\u8A8D`
414
441
  }
@@ -640,7 +667,7 @@ var customerioConnector = new ConnectorPlugin({
640
667
  systemPrompt: {
641
668
  en: `### Tools
642
669
 
643
- - \`customerio_request\`: The only way to call the Customer.io App API. Use it to read customer data, manage campaigns and segments, send transactional messages, and trigger broadcasts. Authentication (Bearer token with App API Key) is configured automatically.
670
+ - \`connector_customerio_request\`: The only way to call the Customer.io App API. Use it to read customer data, manage campaigns and segments, send transactional messages, and trigger broadcasts. Authentication (Bearer token with App API Key) is configured automatically.
644
671
 
645
672
  ### Business Logic
646
673
 
@@ -724,7 +751,7 @@ export default async function handler(c: Context) {
724
751
  - Pagination uses cursor-based \`start\` parameter for customer listing`,
725
752
  ja: `### \u30C4\u30FC\u30EB
726
753
 
727
- - \`customerio_request\`: Customer.io App API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u9867\u5BA2\u30C7\u30FC\u30BF\u306E\u8AAD\u307F\u53D6\u308A\u3001\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u3084\u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u7BA1\u7406\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u9001\u4FE1\u3001\u30D6\u30ED\u30FC\u30C9\u30AD\u30E3\u30B9\u30C8\u306E\u30C8\u30EA\u30AC\u30FC\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08App API\u30AD\u30FC\u306B\u3088\u308BBearer\u30C8\u30FC\u30AF\u30F3\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
754
+ - \`connector_customerio_request\`: Customer.io App API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u9867\u5BA2\u30C7\u30FC\u30BF\u306E\u8AAD\u307F\u53D6\u308A\u3001\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u3084\u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u7BA1\u7406\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u9001\u4FE1\u3001\u30D6\u30ED\u30FC\u30C9\u30AD\u30E3\u30B9\u30C8\u306E\u30C8\u30EA\u30AC\u30FC\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08App API\u30AD\u30FC\u306B\u3088\u308BBearer\u30C8\u30FC\u30AF\u30F3\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
728
755
 
729
756
  ### Business Logic
730
757
 
@@ -820,7 +847,7 @@ export default async function handler(c: Context) {
820
847
  const region = params[parameters.region.slug];
821
848
  const baseUrl = region === "eu" ? "https://api-eu.customer.io" : "https://api.customer.io";
822
849
  try {
823
- const res = await fetch(`${baseUrl}/v1/accounts/region`, {
850
+ const res = await fetch(`${baseUrl}/v1/segments`, {
824
851
  method: "GET",
825
852
  headers: {
826
853
  Authorization: `Bearer ${appApiKey}`,