@squadbase/vite-server 0.1.3-dev.14 → 0.1.3-dev.15

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 CHANGED
@@ -87708,7 +87708,7 @@ var googleDriveConnector = new ConnectorPlugin({
87708
87708
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
87709
87709
  name: "Google Drive",
87710
87710
  description: "Connect to Google Drive for file management, sharing, and collaboration using a service account.",
87711
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7rOUJhO4dDKRYirBqCYzxI/48e9a5b85f0b4c6f9a3d7e2c1b8a5f4d/google-drive.svg",
87711
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4GJX5yQTogUgar1buWxXbv/4b43a65353319c508111489f834d22c4/google_drive.png",
87712
87712
  parameters: parameters16,
87713
87713
  releaseFlag: { dev1: true, dev2: false, prod: false },
87714
87714
  onboarding: googleDriveOnboarding,
@@ -87958,7 +87958,7 @@ var googleDriveOauthConnector = new ConnectorPlugin({
87958
87958
  authType: AUTH_TYPES.OAUTH,
87959
87959
  name: "Google Drive",
87960
87960
  description: "Connect to Google Drive for file management, sharing, and collaboration using OAuth.",
87961
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7rOUJhO4dDKRYirBqCYzxI/48e9a5b85f0b4c6f9a3d7e2c1b8a5f4d/google-drive.svg",
87961
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4GJX5yQTogUgar1buWxXbv/4b43a65353319c508111489f834d22c4/google_drive.png",
87962
87962
  parameters: parameters17,
87963
87963
  releaseFlag: { dev1: true, dev2: false, prod: false },
87964
87964
  onboarding: googleDriveOnboarding2,
@@ -89016,7 +89016,7 @@ var googleSlidesConnector = new ConnectorPlugin({
89016
89016
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
89017
89017
  name: "Google Slides",
89018
89018
  description: "Connect to Google Slides for presentation data access and creation using a service account.",
89019
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5g0LJMwN28s2OhJbYU9CxC/71f1abfb40c89e5a6b5e3a3ad83b5a73/google-slides.svg",
89019
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4oyF4yTRpemMA43X49masx/e1582d25e3b4c9a63ba83df2147c1968/google_slide.png",
89020
89020
  parameters: parameters20,
89021
89021
  releaseFlag: { dev1: true, dev2: false, prod: false },
89022
89022
  onboarding: googleSlidesOnboarding,
@@ -89308,7 +89308,7 @@ var googleSlidesOauthConnector = new ConnectorPlugin({
89308
89308
  authType: AUTH_TYPES.OAUTH,
89309
89309
  name: "Google Slides",
89310
89310
  description: "Connect to Google Slides for presentation data access and creation using OAuth.",
89311
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5g0LJMwN28s2OhJbYU9CxC/71f1abfb40c89e5a6b5e3a3ad83b5a73/google-slides.svg",
89311
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4oyF4yTRpemMA43X49masx/e1582d25e3b4c9a63ba83df2147c1968/google_slide.png",
89312
89312
  parameters: parameters21,
89313
89313
  releaseFlag: { dev1: true, dev2: false, prod: false },
89314
89314
  onboarding: googleSlidesOnboarding2,
@@ -91086,98 +91086,140 @@ var kintoneApiTokenConnector = new ConnectorPlugin({
91086
91086
  systemPrompt: {
91087
91087
  en: `### Tools
91088
91088
 
91089
- - \`kintone-api-key_request\`: The only way to call the kintone REST API. Use it to list apps, get field definitions, query records, and create/update records. Authentication (API Token) and base URL are configured automatically. API tokens are scoped per app \u2014 combine multiple tokens with commas to access multiple apps.
91089
+ - \`kintone-api-key_request\`: The only way to call the kintone REST API. Use it to list apps, fetch field definitions, and read/write records. Authentication (API Token) and the base URL are configured automatically. API tokens are scoped per app \u2014 combine multiple tokens with commas to access multiple apps. See the kintone REST API Reference below for endpoints and the kintone query syntax.
91090
+
91091
+ ### Business Logic
91092
+
91093
+ The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
91094
+
91095
+ SDK methods (client created via \`connection(connectionId)\`):
91096
+ - \`client.request(path, init?)\` \u2014 low-level authenticated fetch
91097
+ - \`client.getRecords(appId, options?)\` \u2014 fetch records with query/fields/totalCount (uses @kintone/rest-api-client)
91098
+ - \`client.getRecord(appId, recordId)\` \u2014 fetch a single record
91099
+
91100
+ Note: app listing (\`/k/v1/apps.json\`) requires user-level auth and is not available via API token.
91101
+
91102
+ \`\`\`ts
91103
+ import type { Context } from "hono";
91104
+ import { connection } from "@squadbase/vite-server/connectors/kintone-api-token";
91105
+
91106
+ const kintone = connection("<connectionId>");
91107
+
91108
+ export default async function handler(c: Context) {
91109
+ const { appId, status = "Active" } = await c.req.json<{
91110
+ appId: number;
91111
+ status?: string;
91112
+ }>();
91113
+
91114
+ const { records, totalCount } = await kintone.getRecords(appId, {
91115
+ query: \`status = "\${status}" order by updatedTime desc limit 100\`,
91116
+ fields: ["$id", "name", "email", "status", "updatedTime"],
91117
+ totalCount: true,
91118
+ });
91119
+
91120
+ return c.json({
91121
+ totalCount,
91122
+ rows: records.map((r) => ({
91123
+ id: r.$id.value,
91124
+ name: r.name?.value,
91125
+ email: r.email?.value,
91126
+ status: r.status?.value,
91127
+ updatedTime: r.updatedTime?.value,
91128
+ })),
91129
+ });
91130
+ }
91131
+ \`\`\`
91090
91132
 
91091
91133
  ### kintone REST API Reference
91092
91134
 
91093
91135
  #### List Apps
91094
- - GET apps.json
91136
+ - \`GET apps.json\`
91095
91137
 
91096
- ### Get Field Definitions
91097
- - GET app/form/fields.json?app={appId}
91138
+ #### Get Field Definitions
91139
+ - \`GET app/form/fields.json?app={appId}\`
91098
91140
 
91099
- ### Get Records
91100
- - GET records.json?app={appId}&query={query}
91101
- - Query example: records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100
91141
+ #### Get Records
91142
+ - \`GET records.json?app={appId}&query={query}\`
91143
+ - Query example: \`records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100\`
91102
91144
 
91103
91145
  #### Add Record
91104
- - POST record.json
91105
- - Body: { "app": 1, "record": { "fieldName": { "value": "value" } } }
91146
+ - \`POST record.json\`
91147
+ - Body: \`{ "app": 1, "record": { "fieldName": { "value": "value" } } }\`
91106
91148
 
91107
91149
  #### kintone Query Syntax
91108
- - Comparison: fieldName = "value", fieldName > 100
91109
- - Operators: and, or, not
91110
- - Sort: order by fieldName asc/desc
91111
- - Limit: limit 100 offset 0
91112
- - String: like "partial match"
91150
+ - Comparison: \`fieldName = "value"\`, \`fieldName > 100\`
91151
+ - Operators: \`and\`, \`or\`, \`not\`
91152
+ - Sort: \`order by fieldName asc/desc\`
91153
+ - Limit: \`limit 100 offset 0\`
91154
+ - String: \`like "partial match"\``,
91155
+ ja: `### \u30C4\u30FC\u30EB
91156
+
91157
+ - \`kintone-api-key_request\`: kintone REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API\u30C8\u30FC\u30AF\u30F3\uFF09\u3068\u30D9\u30FC\u30B9URL\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002API\u30C8\u30FC\u30AF\u30F3\u306F\u30A2\u30D7\u30EA\u3054\u3068\u306B\u30B9\u30B3\u30FC\u30D7\u3055\u308C\u3066\u3044\u307E\u3059 \u2014 \u8907\u6570\u306E\u30A2\u30D7\u30EA\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u30C8\u30FC\u30AF\u30F3\u3092\u7D44\u307F\u5408\u308F\u305B\u3066\u304F\u3060\u3055\u3044\u3002\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304A\u3088\u3073kintone\u30AF\u30A8\u30EA\u69CB\u6587\u306F\u4E0B\u90E8\u306E\u300Ckintone REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
91113
91158
 
91114
91159
  ### Business Logic
91115
91160
 
91116
- The business logic type for this connector is "typescript". Write handler code using the connector SDK shown below. Do NOT access credentials directly from environment variables.
91161
+ \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
91117
91162
 
91118
- #### Example
91163
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
91164
+ - \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
91165
+ - \`client.getRecords(appId, options?)\` \u2014 query/fields/totalCount\u4ED8\u304D\u3067\u30EC\u30B3\u30FC\u30C9\u53D6\u5F97 (@kintone/rest-api-client \u4F7F\u7528)
91166
+ - \`client.getRecord(appId, recordId)\` \u2014 \u5358\u4E00\u30EC\u30B3\u30FC\u30C9\u3092\u53D6\u5F97
91167
+
91168
+ \u6CE8: \u30A2\u30D7\u30EA\u4E00\u89A7 (\`/k/v1/apps.json\`) \u306F\u30E6\u30FC\u30B6\u30FC\u8A8D\u8A3C\u304C\u5FC5\u8981\u306A\u305F\u3081\u3001API \u30C8\u30FC\u30AF\u30F3\u8A8D\u8A3C\u3067\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002
91119
91169
 
91120
91170
  \`\`\`ts
91121
- import { connection } from "@squadbase/vite-server/connectors/kintone-api-key";
91171
+ import type { Context } from "hono";
91172
+ import { connection } from "@squadbase/vite-server/connectors/kintone-api-token";
91122
91173
 
91123
91174
  const kintone = connection("<connectionId>");
91124
91175
 
91125
- // Authenticated fetch (returns standard Response)
91126
- const res = await kintone.request("/k/v1/records.json?app=1&query=limit 10");
91127
- const data = await res.json();
91176
+ export default async function handler(c: Context) {
91177
+ const { appId, status = "Active" } = await c.req.json<{
91178
+ appId: number;
91179
+ status?: string;
91180
+ }>();
91128
91181
 
91129
- await kintone.request("/k/v1/record.json", {
91130
- method: "POST",
91131
- body: JSON.stringify({ app: 1, record: { title: { value: "Hello" } } }),
91132
- });
91133
- \`\`\``,
91134
- ja: `### \u30C4\u30FC\u30EB
91182
+ const { records, totalCount } = await kintone.getRecords(appId, {
91183
+ query: \`status = "\${status}" order by updatedTime desc limit 100\`,
91184
+ fields: ["$id", "name", "email", "status", "updatedTime"],
91185
+ totalCount: true,
91186
+ });
91135
91187
 
91136
- - \`kintone-api-key_request\`: kintone REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u691C\u7D22\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u4F5C\u6210\u30FB\u66F4\u65B0\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API\u30C8\u30FC\u30AF\u30F3\uFF09\u3068\u30D9\u30FC\u30B9URL\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002API\u30C8\u30FC\u30AF\u30F3\u306F\u30A2\u30D7\u30EA\u3054\u3068\u306B\u30B9\u30B3\u30FC\u30D7\u3055\u308C\u3066\u3044\u307E\u3059 \u2014 \u8907\u6570\u306E\u30A2\u30D7\u30EA\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u30C8\u30FC\u30AF\u30F3\u3092\u7D44\u307F\u5408\u308F\u305B\u3066\u304F\u3060\u3055\u3044\u3002
91188
+ return c.json({
91189
+ totalCount,
91190
+ rows: records.map((r) => ({
91191
+ id: r.$id.value,
91192
+ name: r.name?.value,
91193
+ email: r.email?.value,
91194
+ status: r.status?.value,
91195
+ updatedTime: r.updatedTime?.value,
91196
+ })),
91197
+ });
91198
+ }
91199
+ \`\`\`
91137
91200
 
91138
91201
  ### kintone REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
91139
91202
 
91140
91203
  #### \u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97
91141
- - GET apps.json
91204
+ - \`GET apps.json\`
91142
91205
 
91143
- ### \u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97
91144
- - GET app/form/fields.json?app={appId}
91206
+ #### \u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97
91207
+ - \`GET app/form/fields.json?app={appId}\`
91145
91208
 
91146
- ### \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
91147
- - GET records.json?app={appId}&query={query}
91148
- - \u30AF\u30A8\u30EA\u4F8B: records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100
91209
+ #### \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
91210
+ - \`GET records.json?app={appId}&query={query}\`
91211
+ - \u30AF\u30A8\u30EA\u4F8B: \`records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100\`
91149
91212
 
91150
91213
  #### \u30EC\u30B3\u30FC\u30C9\u306E\u8FFD\u52A0
91151
- - POST record.json
91152
- - Body: { "app": 1, "record": { "fieldName": { "value": "value" } } }
91214
+ - \`POST record.json\`
91215
+ - Body: \`{ "app": 1, "record": { "fieldName": { "value": "value" } } }\`
91153
91216
 
91154
91217
  #### kintone \u30AF\u30A8\u30EA\u69CB\u6587
91155
- - \u6BD4\u8F03: fieldName = "value", fieldName > 100
91156
- - \u6F14\u7B97\u5B50: and, or, not
91157
- - \u30BD\u30FC\u30C8: order by fieldName asc/desc
91158
- - \u5236\u9650: limit 100 offset 0
91159
- - \u6587\u5B57\u5217: like "\u90E8\u5206\u4E00\u81F4"
91160
-
91161
- ### Business Logic
91162
-
91163
- \u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u4EE5\u4E0B\u306B\u793A\u3059\u30B3\u30CD\u30AF\u30BFSDK\u3092\u4F7F\u7528\u3057\u3066\u30CF\u30F3\u30C9\u30E9\u30B3\u30FC\u30C9\u3092\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u74B0\u5883\u5909\u6570\u304B\u3089\u76F4\u63A5\u8A8D\u8A3C\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
91164
-
91165
- #### Example
91166
-
91167
- \`\`\`ts
91168
- import { connection } from "@squadbase/vite-server/connectors/kintone-api-key";
91169
-
91170
- const kintone = connection("<connectionId>");
91171
-
91172
- // Authenticated fetch (returns standard Response)
91173
- const res = await kintone.request("/k/v1/records.json?app=1&query=limit 10");
91174
- const data = await res.json();
91175
-
91176
- await kintone.request("/k/v1/record.json", {
91177
- method: "POST",
91178
- body: JSON.stringify({ app: 1, record: { title: { value: "Hello" } } }),
91179
- });
91180
- \`\`\``
91218
+ - \u6BD4\u8F03: \`fieldName = "value"\`, \`fieldName > 100\`
91219
+ - \u6F14\u7B97\u5B50: \`and\`, \`or\`, \`not\`
91220
+ - \u30BD\u30FC\u30C8: \`order by fieldName asc/desc\`
91221
+ - \u5236\u9650: \`limit 100 offset 0\`
91222
+ - \u6587\u5B57\u5217: \`like "\u90E8\u5206\u4E00\u81F4"\``
91181
91223
  },
91182
91224
  tools: tools27
91183
91225
  });
@@ -101905,7 +101947,7 @@ var sentryConnector = new ConnectorPlugin({
101905
101947
  authType: AUTH_TYPES.API_KEY,
101906
101948
  name: "Sentry",
101907
101949
  description: "Connect to Sentry for error tracking and performance monitoring data.",
101908
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4PSjwCKbQvbzDhTvYpHLyq/8e61f1e09f80f4c8dca7eb9cc5c8a6d4/sentry.svg",
101950
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4B8ZEGFGjTeMWNnXQb1dAL/ac10f813f02353f5b0cbe64fb5c06d8f/sentry.svg",
101909
101951
  parameters: parameters63,
101910
101952
  releaseFlag: { dev1: true, dev2: false, prod: false },
101911
101953
  onboarding: sentryOnboarding,
@@ -462,7 +462,7 @@ var googleDriveOauthConnector = new ConnectorPlugin({
462
462
  authType: AUTH_TYPES.OAUTH,
463
463
  name: "Google Drive",
464
464
  description: "Connect to Google Drive for file management, sharing, and collaboration using OAuth.",
465
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7rOUJhO4dDKRYirBqCYzxI/48e9a5b85f0b4c6f9a3d7e2c1b8a5f4d/google-drive.svg",
465
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4GJX5yQTogUgar1buWxXbv/4b43a65353319c508111489f834d22c4/google_drive.png",
466
466
  parameters,
467
467
  releaseFlag: { dev1: true, dev2: false, prod: false },
468
468
  onboarding: googleDriveOnboarding,
@@ -510,7 +510,7 @@ var googleDriveConnector = new ConnectorPlugin({
510
510
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
511
511
  name: "Google Drive",
512
512
  description: "Connect to Google Drive for file management, sharing, and collaboration using a service account.",
513
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7rOUJhO4dDKRYirBqCYzxI/48e9a5b85f0b4c6f9a3d7e2c1b8a5f4d/google-drive.svg",
513
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4GJX5yQTogUgar1buWxXbv/4b43a65353319c508111489f834d22c4/google_drive.png",
514
514
  parameters,
515
515
  releaseFlag: { dev1: true, dev2: false, prod: false },
516
516
  onboarding: googleDriveOnboarding,
@@ -429,7 +429,7 @@ var googleSlidesOauthConnector = new ConnectorPlugin({
429
429
  authType: AUTH_TYPES.OAUTH,
430
430
  name: "Google Slides",
431
431
  description: "Connect to Google Slides for presentation data access and creation using OAuth.",
432
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5g0LJMwN28s2OhJbYU9CxC/71f1abfb40c89e5a6b5e3a3ad83b5a73/google-slides.svg",
432
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4oyF4yTRpemMA43X49masx/e1582d25e3b4c9a63ba83df2147c1968/google_slide.png",
433
433
  parameters,
434
434
  releaseFlag: { dev1: true, dev2: false, prod: false },
435
435
  onboarding: googleSlidesOnboarding,
@@ -502,7 +502,7 @@ var googleSlidesConnector = new ConnectorPlugin({
502
502
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
503
503
  name: "Google Slides",
504
504
  description: "Connect to Google Slides for presentation data access and creation using a service account.",
505
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5g0LJMwN28s2OhJbYU9CxC/71f1abfb40c89e5a6b5e3a3ad83b5a73/google-slides.svg",
505
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4oyF4yTRpemMA43X49masx/e1582d25e3b4c9a63ba83df2147c1968/google_slide.png",
506
506
  parameters,
507
507
  releaseFlag: { dev1: true, dev2: false, prod: false },
508
508
  onboarding: googleSlidesOnboarding,
@@ -75,12 +75,44 @@ function createClient(params) {
75
75
  `kintone: missing required parameters: ${missing.join(", ")}`
76
76
  );
77
77
  }
78
+ let _restClient = null;
79
+ async function getRestClient() {
80
+ if (!_restClient) {
81
+ const { KintoneRestAPIClient } = await import("@kintone/rest-api-client");
82
+ _restClient = new KintoneRestAPIClient({
83
+ baseUrl,
84
+ auth: { apiToken }
85
+ });
86
+ }
87
+ return _restClient;
88
+ }
78
89
  return {
79
90
  request(path2, init) {
80
91
  const url = `${baseUrl.replace(/\/+$/, "")}${path2}`;
81
92
  const headers = new Headers(init?.headers);
82
93
  headers.set("X-Cybozu-API-Token", apiToken);
83
94
  return fetch(url, { ...init, headers });
95
+ },
96
+ async getRecords(appId, options) {
97
+ const client = await getRestClient();
98
+ const result = await client.record.getRecords({
99
+ app: appId,
100
+ query: options?.query,
101
+ fields: options?.fields,
102
+ totalCount: options?.totalCount
103
+ });
104
+ return {
105
+ records: result.records,
106
+ totalCount: result.totalCount ? Number(result.totalCount) : null
107
+ };
108
+ },
109
+ async getRecord(appId, recordId) {
110
+ const client = await getRestClient();
111
+ const result = await client.record.getRecord({
112
+ app: appId,
113
+ id: recordId
114
+ });
115
+ return { record: result.record };
84
116
  }
85
117
  };
86
118
  }
@@ -291,98 +323,140 @@ var kintoneApiTokenConnector = new ConnectorPlugin({
291
323
  systemPrompt: {
292
324
  en: `### Tools
293
325
 
294
- - \`kintone-api-key_request\`: The only way to call the kintone REST API. Use it to list apps, get field definitions, query records, and create/update records. Authentication (API Token) and base URL are configured automatically. API tokens are scoped per app \u2014 combine multiple tokens with commas to access multiple apps.
326
+ - \`kintone-api-key_request\`: The only way to call the kintone REST API. Use it to list apps, fetch field definitions, and read/write records. Authentication (API Token) and the base URL are configured automatically. API tokens are scoped per app \u2014 combine multiple tokens with commas to access multiple apps. See the kintone REST API Reference below for endpoints and the kintone query syntax.
327
+
328
+ ### Business Logic
329
+
330
+ The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
331
+
332
+ SDK methods (client created via \`connection(connectionId)\`):
333
+ - \`client.request(path, init?)\` \u2014 low-level authenticated fetch
334
+ - \`client.getRecords(appId, options?)\` \u2014 fetch records with query/fields/totalCount (uses @kintone/rest-api-client)
335
+ - \`client.getRecord(appId, recordId)\` \u2014 fetch a single record
336
+
337
+ Note: app listing (\`/k/v1/apps.json\`) requires user-level auth and is not available via API token.
338
+
339
+ \`\`\`ts
340
+ import type { Context } from "hono";
341
+ import { connection } from "@squadbase/vite-server/connectors/kintone-api-token";
342
+
343
+ const kintone = connection("<connectionId>");
344
+
345
+ export default async function handler(c: Context) {
346
+ const { appId, status = "Active" } = await c.req.json<{
347
+ appId: number;
348
+ status?: string;
349
+ }>();
350
+
351
+ const { records, totalCount } = await kintone.getRecords(appId, {
352
+ query: \`status = "\${status}" order by updatedTime desc limit 100\`,
353
+ fields: ["$id", "name", "email", "status", "updatedTime"],
354
+ totalCount: true,
355
+ });
356
+
357
+ return c.json({
358
+ totalCount,
359
+ rows: records.map((r) => ({
360
+ id: r.$id.value,
361
+ name: r.name?.value,
362
+ email: r.email?.value,
363
+ status: r.status?.value,
364
+ updatedTime: r.updatedTime?.value,
365
+ })),
366
+ });
367
+ }
368
+ \`\`\`
295
369
 
296
370
  ### kintone REST API Reference
297
371
 
298
372
  #### List Apps
299
- - GET apps.json
373
+ - \`GET apps.json\`
300
374
 
301
- ### Get Field Definitions
302
- - GET app/form/fields.json?app={appId}
375
+ #### Get Field Definitions
376
+ - \`GET app/form/fields.json?app={appId}\`
303
377
 
304
- ### Get Records
305
- - GET records.json?app={appId}&query={query}
306
- - Query example: records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100
378
+ #### Get Records
379
+ - \`GET records.json?app={appId}&query={query}\`
380
+ - Query example: \`records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100\`
307
381
 
308
382
  #### Add Record
309
- - POST record.json
310
- - Body: { "app": 1, "record": { "fieldName": { "value": "value" } } }
383
+ - \`POST record.json\`
384
+ - Body: \`{ "app": 1, "record": { "fieldName": { "value": "value" } } }\`
311
385
 
312
386
  #### kintone Query Syntax
313
- - Comparison: fieldName = "value", fieldName > 100
314
- - Operators: and, or, not
315
- - Sort: order by fieldName asc/desc
316
- - Limit: limit 100 offset 0
317
- - String: like "partial match"
387
+ - Comparison: \`fieldName = "value"\`, \`fieldName > 100\`
388
+ - Operators: \`and\`, \`or\`, \`not\`
389
+ - Sort: \`order by fieldName asc/desc\`
390
+ - Limit: \`limit 100 offset 0\`
391
+ - String: \`like "partial match"\``,
392
+ ja: `### \u30C4\u30FC\u30EB
393
+
394
+ - \`kintone-api-key_request\`: kintone REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API\u30C8\u30FC\u30AF\u30F3\uFF09\u3068\u30D9\u30FC\u30B9URL\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002API\u30C8\u30FC\u30AF\u30F3\u306F\u30A2\u30D7\u30EA\u3054\u3068\u306B\u30B9\u30B3\u30FC\u30D7\u3055\u308C\u3066\u3044\u307E\u3059 \u2014 \u8907\u6570\u306E\u30A2\u30D7\u30EA\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u30C8\u30FC\u30AF\u30F3\u3092\u7D44\u307F\u5408\u308F\u305B\u3066\u304F\u3060\u3055\u3044\u3002\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304A\u3088\u3073kintone\u30AF\u30A8\u30EA\u69CB\u6587\u306F\u4E0B\u90E8\u306E\u300Ckintone REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
318
395
 
319
396
  ### Business Logic
320
397
 
321
- The business logic type for this connector is "typescript". Write handler code using the connector SDK shown below. Do NOT access credentials directly from environment variables.
398
+ \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
399
+
400
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
401
+ - \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
402
+ - \`client.getRecords(appId, options?)\` \u2014 query/fields/totalCount\u4ED8\u304D\u3067\u30EC\u30B3\u30FC\u30C9\u53D6\u5F97 (@kintone/rest-api-client \u4F7F\u7528)
403
+ - \`client.getRecord(appId, recordId)\` \u2014 \u5358\u4E00\u30EC\u30B3\u30FC\u30C9\u3092\u53D6\u5F97
322
404
 
323
- #### Example
405
+ \u6CE8: \u30A2\u30D7\u30EA\u4E00\u89A7 (\`/k/v1/apps.json\`) \u306F\u30E6\u30FC\u30B6\u30FC\u8A8D\u8A3C\u304C\u5FC5\u8981\u306A\u305F\u3081\u3001API \u30C8\u30FC\u30AF\u30F3\u8A8D\u8A3C\u3067\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002
324
406
 
325
407
  \`\`\`ts
326
- import { connection } from "@squadbase/vite-server/connectors/kintone-api-key";
408
+ import type { Context } from "hono";
409
+ import { connection } from "@squadbase/vite-server/connectors/kintone-api-token";
327
410
 
328
411
  const kintone = connection("<connectionId>");
329
412
 
330
- // Authenticated fetch (returns standard Response)
331
- const res = await kintone.request("/k/v1/records.json?app=1&query=limit 10");
332
- const data = await res.json();
333
-
334
- await kintone.request("/k/v1/record.json", {
335
- method: "POST",
336
- body: JSON.stringify({ app: 1, record: { title: { value: "Hello" } } }),
337
- });
338
- \`\`\``,
339
- ja: `### \u30C4\u30FC\u30EB
340
-
341
- - \`kintone-api-key_request\`: kintone REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u691C\u7D22\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u4F5C\u6210\u30FB\u66F4\u65B0\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API\u30C8\u30FC\u30AF\u30F3\uFF09\u3068\u30D9\u30FC\u30B9URL\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002API\u30C8\u30FC\u30AF\u30F3\u306F\u30A2\u30D7\u30EA\u3054\u3068\u306B\u30B9\u30B3\u30FC\u30D7\u3055\u308C\u3066\u3044\u307E\u3059 \u2014 \u8907\u6570\u306E\u30A2\u30D7\u30EA\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u30C8\u30FC\u30AF\u30F3\u3092\u7D44\u307F\u5408\u308F\u305B\u3066\u304F\u3060\u3055\u3044\u3002
413
+ export default async function handler(c: Context) {
414
+ const { appId, status = "Active" } = await c.req.json<{
415
+ appId: number;
416
+ status?: string;
417
+ }>();
418
+
419
+ const { records, totalCount } = await kintone.getRecords(appId, {
420
+ query: \`status = "\${status}" order by updatedTime desc limit 100\`,
421
+ fields: ["$id", "name", "email", "status", "updatedTime"],
422
+ totalCount: true,
423
+ });
424
+
425
+ return c.json({
426
+ totalCount,
427
+ rows: records.map((r) => ({
428
+ id: r.$id.value,
429
+ name: r.name?.value,
430
+ email: r.email?.value,
431
+ status: r.status?.value,
432
+ updatedTime: r.updatedTime?.value,
433
+ })),
434
+ });
435
+ }
436
+ \`\`\`
342
437
 
343
438
  ### kintone REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
344
439
 
345
440
  #### \u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97
346
- - GET apps.json
441
+ - \`GET apps.json\`
347
442
 
348
- ### \u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97
349
- - GET app/form/fields.json?app={appId}
443
+ #### \u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97
444
+ - \`GET app/form/fields.json?app={appId}\`
350
445
 
351
- ### \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
352
- - GET records.json?app={appId}&query={query}
353
- - \u30AF\u30A8\u30EA\u4F8B: records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100
446
+ #### \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
447
+ - \`GET records.json?app={appId}&query={query}\`
448
+ - \u30AF\u30A8\u30EA\u4F8B: \`records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100\`
354
449
 
355
450
  #### \u30EC\u30B3\u30FC\u30C9\u306E\u8FFD\u52A0
356
- - POST record.json
357
- - Body: { "app": 1, "record": { "fieldName": { "value": "value" } } }
451
+ - \`POST record.json\`
452
+ - Body: \`{ "app": 1, "record": { "fieldName": { "value": "value" } } }\`
358
453
 
359
454
  #### kintone \u30AF\u30A8\u30EA\u69CB\u6587
360
- - \u6BD4\u8F03: fieldName = "value", fieldName > 100
361
- - \u6F14\u7B97\u5B50: and, or, not
362
- - \u30BD\u30FC\u30C8: order by fieldName asc/desc
363
- - \u5236\u9650: limit 100 offset 0
364
- - \u6587\u5B57\u5217: like "\u90E8\u5206\u4E00\u81F4"
365
-
366
- ### Business Logic
367
-
368
- \u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306E\u30D3\u30B8\u30CD\u30B9\u30ED\u30B8\u30C3\u30AF\u30BF\u30A4\u30D7\u306F "typescript" \u3067\u3059\u3002\u4EE5\u4E0B\u306B\u793A\u3059\u30B3\u30CD\u30AF\u30BFSDK\u3092\u4F7F\u7528\u3057\u3066\u30CF\u30F3\u30C9\u30E9\u30B3\u30FC\u30C9\u3092\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u74B0\u5883\u5909\u6570\u304B\u3089\u76F4\u63A5\u8A8D\u8A3C\u60C5\u5831\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
369
-
370
- #### Example
371
-
372
- \`\`\`ts
373
- import { connection } from "@squadbase/vite-server/connectors/kintone-api-key";
374
-
375
- const kintone = connection("<connectionId>");
376
-
377
- // Authenticated fetch (returns standard Response)
378
- const res = await kintone.request("/k/v1/records.json?app=1&query=limit 10");
379
- const data = await res.json();
380
-
381
- await kintone.request("/k/v1/record.json", {
382
- method: "POST",
383
- body: JSON.stringify({ app: 1, record: { title: { value: "Hello" } } }),
384
- });
385
- \`\`\``
455
+ - \u6BD4\u8F03: \`fieldName = "value"\`, \`fieldName > 100\`
456
+ - \u6F14\u7B97\u5B50: \`and\`, \`or\`, \`not\`
457
+ - \u30BD\u30FC\u30C8: \`order by fieldName asc/desc\`
458
+ - \u5236\u9650: \`limit 100 offset 0\`
459
+ - \u6587\u5B57\u5217: \`like "\u90E8\u5206\u4E00\u81F4"\``
386
460
  },
387
461
  tools
388
462
  });
@@ -379,7 +379,7 @@ var sentryConnector = new ConnectorPlugin({
379
379
  authType: AUTH_TYPES.API_KEY,
380
380
  name: "Sentry",
381
381
  description: "Connect to Sentry for error tracking and performance monitoring data.",
382
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4PSjwCKbQvbzDhTvYpHLyq/8e61f1e09f80f4c8dca7eb9cc5c8a6d4/sentry.svg",
382
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4B8ZEGFGjTeMWNnXQb1dAL/ac10f813f02353f5b0cbe64fb5c06d8f/sentry.svg",
383
383
  parameters,
384
384
  releaseFlag: { dev1: true, dev2: false, prod: false },
385
385
  onboarding: sentryOnboarding,