@squadbase/vite-server 0.1.2 → 0.1.3-dev.0

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.
@@ -56,6 +56,7 @@ var parameters = {
56
56
  };
57
57
 
58
58
  // ../connectors/src/connectors/attio/sdk/index.ts
59
+ var BASE_URL = "https://api.attio.com/v2";
59
60
  function createClient(params) {
60
61
  const apiKey = params[parameters.apiKey.slug];
61
62
  if (!apiKey) {
@@ -63,9 +64,131 @@ function createClient(params) {
63
64
  `attio: missing required parameter: ${parameters.apiKey.slug}`
64
65
  );
65
66
  }
66
- return { apiKey };
67
+ function authHeaders(extra) {
68
+ const headers = new Headers(extra);
69
+ headers.set("Authorization", `Bearer ${apiKey}`);
70
+ headers.set("Content-Type", "application/json");
71
+ return headers;
72
+ }
73
+ async function assertOk(res, label) {
74
+ if (!res.ok) {
75
+ const body = await res.text().catch(() => "(unreadable body)");
76
+ throw new Error(
77
+ `attio ${label}: ${res.status} ${res.statusText} \u2014 ${body}`
78
+ );
79
+ }
80
+ }
81
+ return {
82
+ request(path2, init) {
83
+ const url = `${BASE_URL}${path2}`;
84
+ const headers = new Headers(init?.headers);
85
+ headers.set("Authorization", `Bearer ${apiKey}`);
86
+ headers.set("Content-Type", "application/json");
87
+ return fetch(url, { ...init, headers });
88
+ },
89
+ async listObjects() {
90
+ const res = await fetch(`${BASE_URL}/objects`, {
91
+ method: "GET",
92
+ headers: authHeaders()
93
+ });
94
+ await assertOk(res, "listObjects");
95
+ return await res.json();
96
+ },
97
+ async listAttributes(object) {
98
+ const res = await fetch(
99
+ `${BASE_URL}/objects/${encodeURIComponent(object)}/attributes`,
100
+ { method: "GET", headers: authHeaders() }
101
+ );
102
+ await assertOk(res, "listAttributes");
103
+ return await res.json();
104
+ },
105
+ async queryRecords(object, options) {
106
+ const body = {};
107
+ if (options?.filter) body.filter = options.filter;
108
+ if (options?.sorts) body.sorts = options.sorts;
109
+ if (options?.limit) body.limit = options.limit;
110
+ if (options?.offset) body.offset = options.offset;
111
+ const res = await fetch(
112
+ `${BASE_URL}/objects/${encodeURIComponent(object)}/records/query`,
113
+ {
114
+ method: "POST",
115
+ headers: authHeaders(),
116
+ body: JSON.stringify(body)
117
+ }
118
+ );
119
+ await assertOk(res, "queryRecords");
120
+ return await res.json();
121
+ },
122
+ async getRecord(object, recordId) {
123
+ const res = await fetch(
124
+ `${BASE_URL}/objects/${encodeURIComponent(object)}/records/${encodeURIComponent(recordId)}`,
125
+ { method: "GET", headers: authHeaders() }
126
+ );
127
+ await assertOk(res, "getRecord");
128
+ return await res.json();
129
+ },
130
+ async queryListEntries(listId, options) {
131
+ const body = {};
132
+ if (options?.filter) body.filter = options.filter;
133
+ if (options?.sorts) body.sorts = options.sorts;
134
+ if (options?.limit) body.limit = options.limit;
135
+ if (options?.offset) body.offset = options.offset;
136
+ const res = await fetch(
137
+ `${BASE_URL}/lists/${encodeURIComponent(listId)}/entries/query`,
138
+ {
139
+ method: "POST",
140
+ headers: authHeaders(),
141
+ body: JSON.stringify(body)
142
+ }
143
+ );
144
+ await assertOk(res, "queryListEntries");
145
+ return await res.json();
146
+ }
147
+ };
67
148
  }
68
149
 
150
+ // ../connectors/src/connector-onboarding.ts
151
+ var ConnectorOnboarding = class {
152
+ /** Phase 1: Connection setup instructions (optional — some connectors don't need this) */
153
+ connectionSetupInstructions;
154
+ /** Phase 2: Data overview instructions */
155
+ dataOverviewInstructions;
156
+ constructor(config) {
157
+ this.connectionSetupInstructions = config.connectionSetupInstructions;
158
+ this.dataOverviewInstructions = config.dataOverviewInstructions;
159
+ }
160
+ getConnectionSetupPrompt(language) {
161
+ return this.connectionSetupInstructions?.[language] ?? null;
162
+ }
163
+ getDataOverviewInstructions(language) {
164
+ return this.dataOverviewInstructions[language];
165
+ }
166
+ };
167
+
168
+ // ../connectors/src/connector-tool.ts
169
+ var ConnectorTool = class {
170
+ name;
171
+ description;
172
+ inputSchema;
173
+ outputSchema;
174
+ _execute;
175
+ constructor(config) {
176
+ this.name = config.name;
177
+ this.description = config.description;
178
+ this.inputSchema = config.inputSchema;
179
+ this.outputSchema = config.outputSchema;
180
+ this._execute = config.execute;
181
+ }
182
+ createTool(connections, config) {
183
+ return {
184
+ description: this.description,
185
+ inputSchema: this.inputSchema,
186
+ outputSchema: this.outputSchema,
187
+ execute: (input) => this._execute(input, connections, config)
188
+ };
189
+ }
190
+ };
191
+
69
192
  // ../connectors/src/connector-plugin.ts
70
193
  var ConnectorPlugin = class _ConnectorPlugin {
71
194
  slug;
@@ -124,8 +247,100 @@ var ConnectorPlugin = class _ConnectorPlugin {
124
247
  }
125
248
  };
126
249
 
250
+ // ../connectors/src/connectors/attio/setup.ts
251
+ var attioOnboarding = new ConnectorOnboarding({
252
+ dataOverviewInstructions: {
253
+ en: `1. Call attio_request with GET /objects to list all available objects (people, companies, deals, etc.)
254
+ 2. Call attio_request with GET /objects/people/attributes to explore the people object attributes
255
+ 3. Call attio_request with POST /objects/people/records/query with { "limit": 5 } to sample people records
256
+ 4. Explore other objects (companies, deals) as needed`,
257
+ ja: `1. attio_request \u3067 GET /objects \u3092\u547C\u3073\u51FA\u3057\u3001\u5229\u7528\u53EF\u80FD\u306A\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7\u3092\u53D6\u5F97\uFF08people\u3001companies\u3001deals\u306A\u3069\uFF09
258
+ 2. attio_request \u3067 GET /objects/people/attributes \u3092\u547C\u3073\u51FA\u3057\u3001people\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u5C5E\u6027\u3092\u78BA\u8A8D
259
+ 3. attio_request \u3067 POST /objects/people/records/query \u3092 { "limit": 5 } \u3067\u547C\u3073\u51FA\u3057\u3001people\u30EC\u30B3\u30FC\u30C9\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
260
+ 4. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u4ED6\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\uFF08companies\u3001deals\uFF09\u3092\u63A2\u7D22`
261
+ }
262
+ });
263
+
264
+ // ../connectors/src/connectors/attio/tools/request.ts
265
+ import { z } from "zod";
266
+ var BASE_URL2 = "https://api.attio.com/v2";
267
+ var REQUEST_TIMEOUT_MS = 6e4;
268
+ var inputSchema = z.object({
269
+ toolUseIntent: z.string().optional().describe(
270
+ "Brief description of what you intend to accomplish with this tool call"
271
+ ),
272
+ connectionId: z.string().describe("ID of the Attio connection to use"),
273
+ method: z.enum(["GET", "POST", "PATCH", "DELETE"]).describe(
274
+ "HTTP method. GET for reading resources, POST for creating or querying records, PATCH for updating, DELETE for removing."
275
+ ),
276
+ path: z.string().describe(
277
+ "API path (e.g., '/objects', '/objects/people/records/query', '/objects/companies/records/{record_id}')"
278
+ ),
279
+ body: z.record(z.string(), z.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
280
+ });
281
+ var outputSchema = z.discriminatedUnion("success", [
282
+ z.object({
283
+ success: z.literal(true),
284
+ status: z.number(),
285
+ data: z.record(z.string(), z.unknown())
286
+ }),
287
+ z.object({
288
+ success: z.literal(false),
289
+ error: z.string()
290
+ })
291
+ ]);
292
+ var requestTool = new ConnectorTool({
293
+ name: "request",
294
+ description: `Send authenticated requests to the Attio REST API.
295
+ Authentication is handled automatically using the API Key (Bearer token).
296
+ Use this tool for all Attio API interactions: querying records (people, companies, deals), listing objects and attributes, managing list entries, and working with notes.
297
+ Note that querying records uses POST (not GET) with a request body for filters.`,
298
+ inputSchema,
299
+ outputSchema,
300
+ async execute({ connectionId, method, path: path2, body }, connections) {
301
+ const connection2 = connections.find((c) => c.id === connectionId);
302
+ if (!connection2) {
303
+ return {
304
+ success: false,
305
+ error: `Connection ${connectionId} not found`
306
+ };
307
+ }
308
+ console.log(
309
+ `[connector-request] attio/${connection2.name}: ${method} ${path2}`
310
+ );
311
+ try {
312
+ const apiKey = parameters.apiKey.getValue(connection2);
313
+ const url = `${BASE_URL2}${path2}`;
314
+ const controller = new AbortController();
315
+ const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
316
+ try {
317
+ const response = await fetch(url, {
318
+ method,
319
+ headers: {
320
+ Authorization: `Bearer ${apiKey}`,
321
+ "Content-Type": "application/json"
322
+ },
323
+ body: body ? JSON.stringify(body) : void 0,
324
+ signal: controller.signal
325
+ });
326
+ const data = await response.json();
327
+ if (!response.ok) {
328
+ const errorMessage = typeof data?.message === "string" ? data.message : typeof data?.error === "string" ? data.error : `HTTP ${response.status} ${response.statusText}`;
329
+ return { success: false, error: errorMessage };
330
+ }
331
+ return { success: true, status: response.status, data };
332
+ } finally {
333
+ clearTimeout(timeout);
334
+ }
335
+ } catch (err) {
336
+ const msg = err instanceof Error ? err.message : String(err);
337
+ return { success: false, error: msg };
338
+ }
339
+ }
340
+ });
341
+
127
342
  // ../connectors/src/connectors/attio/index.ts
128
- var tools = {};
343
+ var tools = { request: requestTool };
129
344
  var attioConnector = new ConnectorPlugin({
130
345
  slug: "attio",
131
346
  authType: null,
@@ -134,69 +349,122 @@ var attioConnector = new ConnectorPlugin({
134
349
  iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2qqx99vvXJojUM3tSrSWPX/1e7c35e13da6b365b8b475c1effe568f/attio.svg",
135
350
  parameters,
136
351
  releaseFlag: { dev1: true, dev2: false, prod: false },
352
+ onboarding: attioOnboarding,
137
353
  systemPrompt: {
138
- en: `### Attio SDK (TypeScript handler)
139
- Use the Attio connector via the SDK in TypeScript handlers:
354
+ en: `### Tools
355
+
356
+ - \`attio_request\`: The only way to call the Attio REST API. Use it to query records (people, companies, deals), list objects and attributes, manage list entries, and work with notes. Authentication (Bearer token) is configured automatically. Note that querying records uses POST (not GET) with a request body containing filters.
357
+
358
+ ### Business Logic
359
+
360
+ The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
361
+
362
+ SDK methods (client created via \`connection(connectionId)\`):
363
+ - \`client.request(path, init?)\` \u2014 low-level authenticated fetch
364
+ - \`client.listObjects()\` \u2014 list all objects (people, companies, deals, etc.)
365
+ - \`client.listAttributes(object)\` \u2014 list attributes for an object
366
+ - \`client.queryRecords(object, options?)\` \u2014 query records with filter/sort/pagination
367
+ - \`client.getRecord(object, recordId)\` \u2014 fetch a single record
368
+ - \`client.queryListEntries(listId, options?)\` \u2014 query list entries with filter/sort/pagination
140
369
 
141
370
  \`\`\`ts
371
+ import type { Context } from "hono";
142
372
  import { connection } from "@squadbase/vite-server/connectors/attio";
143
373
 
144
- const { apiKey } = connection("<connectionId>");
374
+ const attio = connection("<connectionId>");
145
375
 
146
- // Use the Attio REST API
147
- const res = await fetch("https://api.attio.com/v2/objects/people/records/query", {
148
- method: "POST",
149
- headers: {
150
- Authorization: "Bearer " + apiKey,
151
- "Content-Type": "application/json",
152
- },
153
- body: JSON.stringify({ limit: 25 }),
154
- });
155
- const data = await res.json();
376
+ export default async function handler(c: Context) {
377
+ const { object = "people", limit = 25 } = await c.req.json<{
378
+ object?: string;
379
+ limit?: number;
380
+ }>();
381
+
382
+ const { data } = await attio.queryRecords(object, { limit });
383
+
384
+ return c.json({ records: data });
385
+ }
156
386
  \`\`\`
157
387
 
158
- ### Common Endpoints (Base URL: https://api.attio.com/v2)
388
+ ### Attio REST API Reference
389
+
390
+ - Base URL: \`https://api.attio.com/v2\`
391
+ - Authentication: Bearer token (handled automatically)
392
+ - Querying records uses POST with JSON body (not GET with query params)
393
+
394
+ #### Common Endpoints
395
+ - GET \`/objects\` \u2014 List all objects
396
+ - GET \`/objects/{object}/attributes\` \u2014 List attributes of an object
159
397
  - POST \`/objects/{object}/records/query\` \u2014 Query records (people, companies, deals, etc.)
160
398
  - GET \`/objects/{object}/records/{record_id}\` \u2014 Get a record
161
399
  - POST \`/objects/{object}/records\` \u2014 Create a record
162
400
  - PATCH \`/objects/{object}/records/{record_id}\` \u2014 Update a record
163
401
  - DELETE \`/objects/{object}/records/{record_id}\` \u2014 Delete a record
164
- - GET \`/objects\` \u2014 List all objects
165
- - GET \`/objects/{object}/attributes\` \u2014 List attributes of an object
166
402
  - POST \`/lists/{list_id}/entries/query\` \u2014 Query list entries
167
403
  - POST \`/notes\` \u2014 Create a note
168
- - GET \`/notes?parent_object={object}&parent_record_id={id}\` \u2014 Get notes for a record`,
169
- ja: `### Attio SDK\uFF08TypeScript\u30CF\u30F3\u30C9\u30E9\u30FC\uFF09
170
- TypeScript\u30CF\u30F3\u30C9\u30E9\u30FC\u3067Attio\u30B3\u30CD\u30AF\u30BF\u30FC\u3092SDK\u7D4C\u7531\u3067\u4F7F\u7528\u3057\u307E\u3059\uFF1A
404
+ - GET \`/notes?parent_object={object}&parent_record_id={id}\` \u2014 Get notes for a record
405
+
406
+ #### Query Body (for POST /objects/{object}/records/query)
407
+ - \`filter\` \u2014 Filter conditions
408
+ - \`sorts\` \u2014 Array of sort specifications
409
+ - \`limit\` \u2014 Max records per page (default 25)
410
+ - \`offset\` \u2014 Pagination offset`,
411
+ ja: `### \u30C4\u30FC\u30EB
412
+
413
+ - \`attio_request\`: Attio REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30EC\u30B3\u30FC\u30C9\uFF08people\u3001companies\u3001deals\uFF09\u306E\u30AF\u30A8\u30EA\u3001\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3084\u5C5E\u6027\u306E\u4E00\u89A7\u8868\u793A\u3001\u30EA\u30B9\u30C8\u30A8\u30F3\u30C8\u30EA\u306E\u7BA1\u7406\u3001\u30CE\u30FC\u30C8\u306E\u64CD\u4F5C\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08Bearer\u30C8\u30FC\u30AF\u30F3\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u30EC\u30B3\u30FC\u30C9\u306E\u30AF\u30A8\u30EA\u306B\u306FGET\u3067\u306F\u306A\u304FPOST\u3092\u30D5\u30A3\u30EB\u30BF\u4ED8\u304D\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u30DC\u30C7\u30A3\u3067\u4F7F\u7528\u3059\u308B\u70B9\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002
414
+
415
+ ### Business Logic
416
+
417
+ \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
418
+
419
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
420
+ - \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
421
+ - \`client.listObjects()\` \u2014 \u5168\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u4E00\u89A7\uFF08people\u3001companies\u3001deals\u306A\u3069\uFF09
422
+ - \`client.listAttributes(object)\` \u2014 \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u5C5E\u6027\u4E00\u89A7
423
+ - \`client.queryRecords(object, options?)\` \u2014 \u30D5\u30A3\u30EB\u30BF/\u30BD\u30FC\u30C8/\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u4ED8\u304D\u3067\u30EC\u30B3\u30FC\u30C9\u3092\u30AF\u30A8\u30EA
424
+ - \`client.getRecord(object, recordId)\` \u2014 \u5358\u4E00\u30EC\u30B3\u30FC\u30C9\u3092\u53D6\u5F97
425
+ - \`client.queryListEntries(listId, options?)\` \u2014 \u30D5\u30A3\u30EB\u30BF/\u30BD\u30FC\u30C8/\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u4ED8\u304D\u3067\u30EA\u30B9\u30C8\u30A8\u30F3\u30C8\u30EA\u3092\u30AF\u30A8\u30EA
171
426
 
172
427
  \`\`\`ts
428
+ import type { Context } from "hono";
173
429
  import { connection } from "@squadbase/vite-server/connectors/attio";
174
430
 
175
- const { apiKey } = connection("<connectionId>");
431
+ const attio = connection("<connectionId>");
176
432
 
177
- // Attio REST API\u3092\u4F7F\u7528
178
- const res = await fetch("https://api.attio.com/v2/objects/people/records/query", {
179
- method: "POST",
180
- headers: {
181
- Authorization: "Bearer " + apiKey,
182
- "Content-Type": "application/json",
183
- },
184
- body: JSON.stringify({ limit: 25 }),
185
- });
186
- const data = await res.json();
433
+ export default async function handler(c: Context) {
434
+ const { object = "people", limit = 25 } = await c.req.json<{
435
+ object?: string;
436
+ limit?: number;
437
+ }>();
438
+
439
+ const { data } = await attio.queryRecords(object, { limit });
440
+
441
+ return c.json({ records: data });
442
+ }
187
443
  \`\`\`
188
444
 
189
- ### \u4E3B\u8981\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\uFF08\u30D9\u30FC\u30B9URL: https://api.attio.com/v2\uFF09
445
+ ### Attio REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
446
+
447
+ - \u30D9\u30FC\u30B9URL: \`https://api.attio.com/v2\`
448
+ - \u8A8D\u8A3C: Bearer\u30C8\u30FC\u30AF\u30F3\uFF08\u81EA\u52D5\u8A2D\u5B9A\uFF09
449
+ - \u30EC\u30B3\u30FC\u30C9\u306E\u30AF\u30A8\u30EA\u306B\u306FGET\u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F\u306A\u304FPOST\u3067JSON\u30DC\u30C7\u30A3\u3092\u4F7F\u7528\u3057\u307E\u3059
450
+
451
+ #### \u4E3B\u8981\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
452
+ - GET \`/objects\` \u2014 \u5168\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u4E00\u89A7
453
+ - GET \`/objects/{object}/attributes\` \u2014 \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u5C5E\u6027\u4E00\u89A7
190
454
  - POST \`/objects/{object}/records/query\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u691C\u7D22\uFF08people\u3001companies\u3001deals\u306A\u3069\uFF09
191
455
  - GET \`/objects/{object}/records/{record_id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
192
456
  - POST \`/objects/{object}/records\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u4F5C\u6210
193
457
  - PATCH \`/objects/{object}/records/{record_id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u66F4\u65B0
194
458
  - DELETE \`/objects/{object}/records/{record_id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u524A\u9664
195
- - GET \`/objects\` \u2014 \u5168\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u4E00\u89A7
196
- - GET \`/objects/{object}/attributes\` \u2014 \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u5C5E\u6027\u4E00\u89A7
197
459
  - POST \`/lists/{list_id}/entries/query\` \u2014 \u30EA\u30B9\u30C8\u30A8\u30F3\u30C8\u30EA\u306E\u691C\u7D22
198
460
  - POST \`/notes\` \u2014 \u30CE\u30FC\u30C8\u306E\u4F5C\u6210
199
- - GET \`/notes?parent_object={object}&parent_record_id={id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u30CE\u30FC\u30C8\u3092\u53D6\u5F97`
461
+ - GET \`/notes?parent_object={object}&parent_record_id={id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u306E\u30CE\u30FC\u30C8\u3092\u53D6\u5F97
462
+
463
+ #### \u30AF\u30A8\u30EA\u30DC\u30C7\u30A3 (POST /objects/{object}/records/query)
464
+ - \`filter\` \u2014 \u30D5\u30A3\u30EB\u30BF\u6761\u4EF6
465
+ - \`sorts\` \u2014 \u30BD\u30FC\u30C8\u6307\u5B9A\u306E\u914D\u5217
466
+ - \`limit\` \u2014 \u30DA\u30FC\u30B8\u3042\u305F\u308A\u306E\u6700\u5927\u30EC\u30B3\u30FC\u30C9\u6570\uFF08\u30C7\u30D5\u30A9\u30EB\u30C825\uFF09
467
+ - \`offset\` \u2014 \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u30AA\u30D5\u30BB\u30C3\u30C8`
200
468
  },
201
469
  tools
202
470
  });
@@ -598,11 +598,14 @@ var googleAdsOauthConnector = new ConnectorPlugin({
598
598
  ]
599
599
  },
600
600
  systemPrompt: {
601
- en: `### Google Ads API (OAuth, Read-Only)
602
- - Use GAQL (Google Ads Query Language) to query campaign data
603
- - {customerId} in the path is automatically replaced (hyphens removed)
601
+ en: `### Tools
604
602
 
605
- ### Query Data (searchStream)
603
+ - \`google-ads-oauth_request\`: Send authenticated requests to the Google Ads API. Use it for GAQL queries via searchStream. The {customerId} placeholder in paths is automatically replaced (hyphens removed). Authentication and developer token are configured automatically.
604
+ - \`google-ads-oauth_listCustomers\`: List accessible Google Ads customer accounts. Use this during setup to discover available accounts.
605
+
606
+ ### Google Ads API Reference
607
+
608
+ #### Query Data (searchStream)
606
609
  - POST customers/{customerId}/googleAds:searchStream
607
610
  - Body: { "query": "SELECT campaign.id, campaign.name, metrics.impressions FROM campaign WHERE segments.date DURING LAST_30_DAYS" }
608
611
 
@@ -648,11 +651,14 @@ rows.forEach(row => console.log(row));
648
651
  // List accessible customer accounts
649
652
  const customerIds = await ads.listAccessibleCustomers();
650
653
  \`\`\``,
651
- ja: `### Google Ads API (OAuth\u3001\u8AAD\u307F\u53D6\u308A\u5C02\u7528)
652
- - GAQL (Google Ads Query Language) \u3092\u4F7F\u7528\u3057\u3066\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30C7\u30FC\u30BF\u3092\u30AF\u30A8\u30EA\u3057\u307E\u3059
653
- - \u30D1\u30B9\u5185\u306E {customerId} \u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\uFF08\u30CF\u30A4\u30D5\u30F3\u306F\u9664\u53BB\uFF09
654
+ ja: `### \u30C4\u30FC\u30EB
655
+
656
+ - \`google-ads-oauth_request\`: Google Ads API\u3078\u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002searchStream\u3092\u4F7F\u3063\u305FGAQL\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{customerId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\uFF08\u30CF\u30A4\u30D5\u30F3\u306F\u9664\u53BB\uFF09\u3002\u8A8D\u8A3C\u3068\u30C7\u30D9\u30ED\u30C3\u30D1\u30FC\u30C8\u30FC\u30AF\u30F3\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
657
+ - \`google-ads-oauth_listCustomers\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306AGoogle Ads\u9867\u5BA2\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
658
+
659
+ ### Google Ads API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
654
660
 
655
- ### \u30C7\u30FC\u30BF\u306E\u30AF\u30A8\u30EA (searchStream)
661
+ #### \u30C7\u30FC\u30BF\u306E\u30AF\u30A8\u30EA (searchStream)
656
662
  - POST customers/{customerId}/googleAds:searchStream
657
663
  - Body: { "query": "SELECT campaign.id, campaign.name, metrics.impressions FROM campaign WHERE segments.date DURING LAST_30_DAYS" }
658
664
 
@@ -668,11 +668,15 @@ var googleAnalyticsOauthConnector = new ConnectorPlugin({
668
668
  ]
669
669
  },
670
670
  systemPrompt: {
671
- en: `### Google Analytics Data API (OAuth, Read-Only)
672
- - Call the GA4 Data API using the authenticated request tool
673
- - {propertyId} in the path is automatically replaced
671
+ en: `### Tools
674
672
 
675
- ### Get Metadata (Check available dimensions and metrics)
673
+ - \`google-analytics-oauth_request\`: Send authenticated requests to the GA4 Data API. Use it for running reports, getting metadata, and realtime reports. The {propertyId} placeholder in paths is automatically replaced. Authentication is configured automatically via OAuth.
674
+ - \`google-analytics-oauth_listAccounts\`: List accessible Google Analytics accounts. Use during setup to discover available accounts.
675
+ - \`google-analytics-oauth_listProperties\`: List GA4 properties for a given account. Use during setup to select the target property.
676
+
677
+ ### GA4 Data API Reference
678
+
679
+ #### Get Metadata (Check available dimensions and metrics)
676
680
  - GET properties/{propertyId}/metadata
677
681
 
678
682
  ### Get Report
@@ -728,11 +732,15 @@ const realtime = await ga.runRealtimeReport({
728
732
  dimensions: [{ name: "country" }],
729
733
  });
730
734
  \`\`\``,
731
- ja: `### Google Analytics Data API (OAuth\u3001\u8AAD\u307F\u53D6\u308A\u5C02\u7528)
732
- - \u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u30C4\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u3066GA4 Data API\u3092\u547C\u3073\u51FA\u3057\u307E\u3059
733
- - \u30D1\u30B9\u5185\u306E {propertyId} \u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059
735
+ ja: `### \u30C4\u30FC\u30EB
736
+
737
+ - \`google-analytics-oauth_request\`: GA4 Data API\u3078\u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306E\u5B9F\u884C\u3001\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\u3001\u30EA\u30A2\u30EB\u30BF\u30A4\u30E0\u30EC\u30DD\u30FC\u30C8\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{propertyId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002OAuth\u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
738
+ - \`google-analytics-oauth_listAccounts\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306AGoogle Analytics\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
739
+ - \`google-analytics-oauth_listProperties\`: \u6307\u5B9A\u30A2\u30AB\u30A6\u30F3\u30C8\u306EGA4\u30D7\u30ED\u30D1\u30C6\u30A3\u4E00\u89A7\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306B\u30BF\u30FC\u30B2\u30C3\u30C8\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u9078\u629E\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002
740
+
741
+ ### GA4 Data API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
734
742
 
735
- ### \u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\uFF08\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u3068\u30E1\u30C8\u30EA\u30AF\u30B9\u306E\u78BA\u8A8D\uFF09
743
+ #### \u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\uFF08\u5229\u7528\u53EF\u80FD\u306A\u30C7\u30A3\u30E1\u30F3\u30B7\u30E7\u30F3\u3068\u30E1\u30C8\u30EA\u30AF\u30B9\u306E\u78BA\u8A8D\uFF09
736
744
  - GET properties/{propertyId}/metadata
737
745
 
738
746
  ### \u30EC\u30DD\u30FC\u30C8\u306E\u53D6\u5F97
@@ -417,9 +417,13 @@ var googleSheetsOauthConnector = new ConnectorPlugin({
417
417
  ]
418
418
  },
419
419
  systemPrompt: {
420
- en: `### Google Sheets API (OAuth, Read-Only)
420
+ en: `### Tools
421
421
 
422
- ### Available Endpoints
422
+ - \`google-sheets-oauth_request\`: The only way to call the Google Sheets API (read-only). Use it to get spreadsheet metadata, cell values, and batch values. Authentication is configured automatically via OAuth. The {spreadsheetId} placeholder in paths is automatically replaced with the configured default spreadsheet ID.
423
+
424
+ ### Google Sheets API Reference
425
+
426
+ #### Available Endpoints
423
427
  - GET \`/{spreadsheetId}\` \u2014 Get spreadsheet metadata (title, sheets, properties)
424
428
  - GET \`/{spreadsheetId}/values/{range}\` \u2014 Get cell values for a range
425
429
  - GET \`/{spreadsheetId}/values:batchGet?ranges={range1}&ranges={range2}\` \u2014 Get values for multiple ranges
@@ -461,9 +465,13 @@ console.log(values.values); // 2D array
461
465
  const batch = await sheets.batchGetValues(["Sheet1!A1:B5", "Sheet2!A1:C3"]);
462
466
  batch.valueRanges.forEach(vr => console.log(vr.range, vr.values));
463
467
  \`\`\``,
464
- ja: `### Google Sheets API (OAuth\u3001\u8AAD\u307F\u53D6\u308A\u5C02\u7528)
468
+ ja: `### \u30C4\u30FC\u30EB
469
+
470
+ - \`google-sheets-oauth_request\`: Google Sheets API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\u3002\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3001\u30BB\u30EB\u5024\u3001\u30D0\u30C3\u30C1\u5024\u306E\u53D6\u5F97\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002OAuth\u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{spreadsheetId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u8A2D\u5B9A\u6E08\u307F\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID\u3067\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002
471
+
472
+ ### Google Sheets API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
465
473
 
466
- ### \u5229\u7528\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
474
+ #### \u5229\u7528\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
467
475
  - GET \`/{spreadsheetId}\` \u2014 \u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\uFF08\u30BF\u30A4\u30C8\u30EB\u3001\u30B7\u30FC\u30C8\u3001\u30D7\u30ED\u30D1\u30C6\u30A3\uFF09
468
476
  - GET \`/{spreadsheetId}/values/{range}\` \u2014 \u7BC4\u56F2\u306E\u30BB\u30EB\u5024\u3092\u53D6\u5F97
469
477
  - GET \`/{spreadsheetId}/values:batchGet?ranges={range1}&ranges={range2}\` \u2014 \u8907\u6570\u7BC4\u56F2\u306E\u5024\u3092\u53D6\u5F97
@@ -296,9 +296,13 @@ var hubspotOauthConnector = new ConnectorPlugin({
296
296
  ]
297
297
  },
298
298
  systemPrompt: {
299
- en: `### HubSpot API (OAuth)
299
+ en: `### Tools
300
300
 
301
- ### Available Endpoints
301
+ - \`hubspot-oauth_request\`: The only way to call the HubSpot API. Use it to query contacts, deals, companies, and other CRM objects. Authentication is configured automatically via OAuth. HubSpot uses cursor-based pagination with the \`after\` parameter from \`paging.next.after\` in the response.
302
+
303
+ ### HubSpot API Reference
304
+
305
+ #### Available Endpoints
302
306
  - GET \`/crm/v3/objects/contacts\` \u2014 List contacts
303
307
  - GET \`/crm/v3/objects/contacts/{contactId}\` \u2014 Get a contact
304
308
  - GET \`/crm/v3/objects/deals\` \u2014 List deals
@@ -337,9 +341,13 @@ const hubspot = connection("<connectionId>");
337
341
  const res = await hubspot.request("/crm/v3/objects/contacts?limit=10");
338
342
  const data = await res.json();
339
343
  \`\`\``,
340
- ja: `### HubSpot API (OAuth)
344
+ ja: `### \u30C4\u30FC\u30EB
345
+
346
+ - \`hubspot-oauth_request\`: HubSpot API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30B3\u30F3\u30BF\u30AF\u30C8\u3001\u53D6\u5F15\u3001\u4F1A\u793E\u3001\u305D\u306E\u4ED6\u306ECRM\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002OAuth\u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002HubSpot\u306F\u30EC\u30B9\u30DD\u30F3\u30B9\u306E \`paging.next.after\` \u304B\u3089\u306E \`after\` \u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3088\u308B\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u306E\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
347
+
348
+ ### HubSpot API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
341
349
 
342
- ### \u5229\u7528\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
350
+ #### \u5229\u7528\u53EF\u80FD\u306A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
343
351
  - GET \`/crm/v3/objects/contacts\` \u2014 \u30B3\u30F3\u30BF\u30AF\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
344
352
  - GET \`/crm/v3/objects/contacts/{contactId}\` \u2014 \u30B3\u30F3\u30BF\u30AF\u30C8\u3092\u53D6\u5F97
345
353
  - GET \`/crm/v3/objects/deals\` \u2014 \u53D6\u5F15\u4E00\u89A7\u3092\u53D6\u5F97
@@ -0,0 +1,5 @@
1
+ import * as _squadbase_connectors_sdk from '@squadbase/connectors/sdk';
2
+
3
+ declare const connection: (connectionId: string) => _squadbase_connectors_sdk.HubSpotApiKeyConnectorSdk;
4
+
5
+ export { connection };