@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.
@@ -72049,7 +72049,7 @@ var googleDriveConnector = new ConnectorPlugin({
72049
72049
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
72050
72050
  name: "Google Drive",
72051
72051
  description: "Connect to Google Drive for file management, sharing, and collaboration using a service account.",
72052
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7rOUJhO4dDKRYirBqCYzxI/48e9a5b85f0b4c6f9a3d7e2c1b8a5f4d/google-drive.svg",
72052
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4GJX5yQTogUgar1buWxXbv/4b43a65353319c508111489f834d22c4/google_drive.png",
72053
72053
  parameters: parameters16,
72054
72054
  releaseFlag: { dev1: true, dev2: false, prod: false },
72055
72055
  onboarding: googleDriveOnboarding,
@@ -72299,7 +72299,7 @@ var googleDriveOauthConnector = new ConnectorPlugin({
72299
72299
  authType: AUTH_TYPES.OAUTH,
72300
72300
  name: "Google Drive",
72301
72301
  description: "Connect to Google Drive for file management, sharing, and collaboration using OAuth.",
72302
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7rOUJhO4dDKRYirBqCYzxI/48e9a5b85f0b4c6f9a3d7e2c1b8a5f4d/google-drive.svg",
72302
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4GJX5yQTogUgar1buWxXbv/4b43a65353319c508111489f834d22c4/google_drive.png",
72303
72303
  parameters: parameters17,
72304
72304
  releaseFlag: { dev1: true, dev2: false, prod: false },
72305
72305
  onboarding: googleDriveOnboarding2,
@@ -73357,7 +73357,7 @@ var googleSlidesConnector = new ConnectorPlugin({
73357
73357
  authType: AUTH_TYPES.SERVICE_ACCOUNT,
73358
73358
  name: "Google Slides",
73359
73359
  description: "Connect to Google Slides for presentation data access and creation using a service account.",
73360
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5g0LJMwN28s2OhJbYU9CxC/71f1abfb40c89e5a6b5e3a3ad83b5a73/google-slides.svg",
73360
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4oyF4yTRpemMA43X49masx/e1582d25e3b4c9a63ba83df2147c1968/google_slide.png",
73361
73361
  parameters: parameters20,
73362
73362
  releaseFlag: { dev1: true, dev2: false, prod: false },
73363
73363
  onboarding: googleSlidesOnboarding,
@@ -73649,7 +73649,7 @@ var googleSlidesOauthConnector = new ConnectorPlugin({
73649
73649
  authType: AUTH_TYPES.OAUTH,
73650
73650
  name: "Google Slides",
73651
73651
  description: "Connect to Google Slides for presentation data access and creation using OAuth.",
73652
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5g0LJMwN28s2OhJbYU9CxC/71f1abfb40c89e5a6b5e3a3ad83b5a73/google-slides.svg",
73652
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4oyF4yTRpemMA43X49masx/e1582d25e3b4c9a63ba83df2147c1968/google_slide.png",
73653
73653
  parameters: parameters21,
73654
73654
  releaseFlag: { dev1: true, dev2: false, prod: false },
73655
73655
  onboarding: googleSlidesOnboarding2,
@@ -75427,98 +75427,140 @@ var kintoneApiTokenConnector = new ConnectorPlugin({
75427
75427
  systemPrompt: {
75428
75428
  en: `### Tools
75429
75429
 
75430
- - \`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.
75430
+ - \`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.
75431
+
75432
+ ### Business Logic
75433
+
75434
+ The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
75435
+
75436
+ SDK methods (client created via \`connection(connectionId)\`):
75437
+ - \`client.request(path, init?)\` \u2014 low-level authenticated fetch
75438
+ - \`client.getRecords(appId, options?)\` \u2014 fetch records with query/fields/totalCount (uses @kintone/rest-api-client)
75439
+ - \`client.getRecord(appId, recordId)\` \u2014 fetch a single record
75440
+
75441
+ Note: app listing (\`/k/v1/apps.json\`) requires user-level auth and is not available via API token.
75442
+
75443
+ \`\`\`ts
75444
+ import type { Context } from "hono";
75445
+ import { connection } from "@squadbase/vite-server/connectors/kintone-api-token";
75446
+
75447
+ const kintone = connection("<connectionId>");
75448
+
75449
+ export default async function handler(c: Context) {
75450
+ const { appId, status = "Active" } = await c.req.json<{
75451
+ appId: number;
75452
+ status?: string;
75453
+ }>();
75454
+
75455
+ const { records, totalCount } = await kintone.getRecords(appId, {
75456
+ query: \`status = "\${status}" order by updatedTime desc limit 100\`,
75457
+ fields: ["$id", "name", "email", "status", "updatedTime"],
75458
+ totalCount: true,
75459
+ });
75460
+
75461
+ return c.json({
75462
+ totalCount,
75463
+ rows: records.map((r) => ({
75464
+ id: r.$id.value,
75465
+ name: r.name?.value,
75466
+ email: r.email?.value,
75467
+ status: r.status?.value,
75468
+ updatedTime: r.updatedTime?.value,
75469
+ })),
75470
+ });
75471
+ }
75472
+ \`\`\`
75431
75473
 
75432
75474
  ### kintone REST API Reference
75433
75475
 
75434
75476
  #### List Apps
75435
- - GET apps.json
75477
+ - \`GET apps.json\`
75436
75478
 
75437
- ### Get Field Definitions
75438
- - GET app/form/fields.json?app={appId}
75479
+ #### Get Field Definitions
75480
+ - \`GET app/form/fields.json?app={appId}\`
75439
75481
 
75440
- ### Get Records
75441
- - GET records.json?app={appId}&query={query}
75442
- - Query example: records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100
75482
+ #### Get Records
75483
+ - \`GET records.json?app={appId}&query={query}\`
75484
+ - Query example: \`records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100\`
75443
75485
 
75444
75486
  #### Add Record
75445
- - POST record.json
75446
- - Body: { "app": 1, "record": { "fieldName": { "value": "value" } } }
75487
+ - \`POST record.json\`
75488
+ - Body: \`{ "app": 1, "record": { "fieldName": { "value": "value" } } }\`
75447
75489
 
75448
75490
  #### kintone Query Syntax
75449
- - Comparison: fieldName = "value", fieldName > 100
75450
- - Operators: and, or, not
75451
- - Sort: order by fieldName asc/desc
75452
- - Limit: limit 100 offset 0
75453
- - String: like "partial match"
75491
+ - Comparison: \`fieldName = "value"\`, \`fieldName > 100\`
75492
+ - Operators: \`and\`, \`or\`, \`not\`
75493
+ - Sort: \`order by fieldName asc/desc\`
75494
+ - Limit: \`limit 100 offset 0\`
75495
+ - String: \`like "partial match"\``,
75496
+ ja: `### \u30C4\u30FC\u30EB
75497
+
75498
+ - \`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
75454
75499
 
75455
75500
  ### Business Logic
75456
75501
 
75457
- 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.
75502
+ \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
75458
75503
 
75459
- #### Example
75504
+ SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
75505
+ - \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304Dfetch
75506
+ - \`client.getRecords(appId, options?)\` \u2014 query/fields/totalCount\u4ED8\u304D\u3067\u30EC\u30B3\u30FC\u30C9\u53D6\u5F97 (@kintone/rest-api-client \u4F7F\u7528)
75507
+ - \`client.getRecord(appId, recordId)\` \u2014 \u5358\u4E00\u30EC\u30B3\u30FC\u30C9\u3092\u53D6\u5F97
75508
+
75509
+ \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
75460
75510
 
75461
75511
  \`\`\`ts
75462
- import { connection } from "@squadbase/vite-server/connectors/kintone-api-key";
75512
+ import type { Context } from "hono";
75513
+ import { connection } from "@squadbase/vite-server/connectors/kintone-api-token";
75463
75514
 
75464
75515
  const kintone = connection("<connectionId>");
75465
75516
 
75466
- // Authenticated fetch (returns standard Response)
75467
- const res = await kintone.request("/k/v1/records.json?app=1&query=limit 10");
75468
- const data = await res.json();
75517
+ export default async function handler(c: Context) {
75518
+ const { appId, status = "Active" } = await c.req.json<{
75519
+ appId: number;
75520
+ status?: string;
75521
+ }>();
75469
75522
 
75470
- await kintone.request("/k/v1/record.json", {
75471
- method: "POST",
75472
- body: JSON.stringify({ app: 1, record: { title: { value: "Hello" } } }),
75473
- });
75474
- \`\`\``,
75475
- ja: `### \u30C4\u30FC\u30EB
75523
+ const { records, totalCount } = await kintone.getRecords(appId, {
75524
+ query: \`status = "\${status}" order by updatedTime desc limit 100\`,
75525
+ fields: ["$id", "name", "email", "status", "updatedTime"],
75526
+ totalCount: true,
75527
+ });
75476
75528
 
75477
- - \`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
75529
+ return c.json({
75530
+ totalCount,
75531
+ rows: records.map((r) => ({
75532
+ id: r.$id.value,
75533
+ name: r.name?.value,
75534
+ email: r.email?.value,
75535
+ status: r.status?.value,
75536
+ updatedTime: r.updatedTime?.value,
75537
+ })),
75538
+ });
75539
+ }
75540
+ \`\`\`
75478
75541
 
75479
75542
  ### kintone REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
75480
75543
 
75481
75544
  #### \u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97
75482
- - GET apps.json
75545
+ - \`GET apps.json\`
75483
75546
 
75484
- ### \u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97
75485
- - GET app/form/fields.json?app={appId}
75547
+ #### \u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97
75548
+ - \`GET app/form/fields.json?app={appId}\`
75486
75549
 
75487
- ### \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
75488
- - GET records.json?app={appId}&query={query}
75489
- - \u30AF\u30A8\u30EA\u4F8B: records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100
75550
+ #### \u30EC\u30B3\u30FC\u30C9\u306E\u53D6\u5F97
75551
+ - \`GET records.json?app={appId}&query={query}\`
75552
+ - \u30AF\u30A8\u30EA\u4F8B: \`records.json?app=1&query=updatedTime > "2024-01-01" order by recordNumber asc limit 100\`
75490
75553
 
75491
75554
  #### \u30EC\u30B3\u30FC\u30C9\u306E\u8FFD\u52A0
75492
- - POST record.json
75493
- - Body: { "app": 1, "record": { "fieldName": { "value": "value" } } }
75555
+ - \`POST record.json\`
75556
+ - Body: \`{ "app": 1, "record": { "fieldName": { "value": "value" } } }\`
75494
75557
 
75495
75558
  #### kintone \u30AF\u30A8\u30EA\u69CB\u6587
75496
- - \u6BD4\u8F03: fieldName = "value", fieldName > 100
75497
- - \u6F14\u7B97\u5B50: and, or, not
75498
- - \u30BD\u30FC\u30C8: order by fieldName asc/desc
75499
- - \u5236\u9650: limit 100 offset 0
75500
- - \u6587\u5B57\u5217: like "\u90E8\u5206\u4E00\u81F4"
75501
-
75502
- ### Business Logic
75503
-
75504
- \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
75505
-
75506
- #### Example
75507
-
75508
- \`\`\`ts
75509
- import { connection } from "@squadbase/vite-server/connectors/kintone-api-key";
75510
-
75511
- const kintone = connection("<connectionId>");
75512
-
75513
- // Authenticated fetch (returns standard Response)
75514
- const res = await kintone.request("/k/v1/records.json?app=1&query=limit 10");
75515
- const data = await res.json();
75516
-
75517
- await kintone.request("/k/v1/record.json", {
75518
- method: "POST",
75519
- body: JSON.stringify({ app: 1, record: { title: { value: "Hello" } } }),
75520
- });
75521
- \`\`\``
75559
+ - \u6BD4\u8F03: \`fieldName = "value"\`, \`fieldName > 100\`
75560
+ - \u6F14\u7B97\u5B50: \`and\`, \`or\`, \`not\`
75561
+ - \u30BD\u30FC\u30C8: \`order by fieldName asc/desc\`
75562
+ - \u5236\u9650: \`limit 100 offset 0\`
75563
+ - \u6587\u5B57\u5217: \`like "\u90E8\u5206\u4E00\u81F4"\``
75522
75564
  },
75523
75565
  tools: tools27
75524
75566
  });
@@ -86246,7 +86288,7 @@ var sentryConnector = new ConnectorPlugin({
86246
86288
  authType: AUTH_TYPES.API_KEY,
86247
86289
  name: "Sentry",
86248
86290
  description: "Connect to Sentry for error tracking and performance monitoring data.",
86249
- iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4PSjwCKbQvbzDhTvYpHLyq/8e61f1e09f80f4c8dca7eb9cc5c8a6d4/sentry.svg",
86291
+ iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4B8ZEGFGjTeMWNnXQb1dAL/ac10f813f02353f5b0cbe64fb5c06d8f/sentry.svg",
86250
86292
  parameters: parameters63,
86251
86293
  releaseFlag: { dev1: true, dev2: false, prod: false },
86252
86294
  onboarding: sentryOnboarding,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squadbase/vite-server",
3
- "version": "0.1.3-dev.14",
3
+ "version": "0.1.3-dev.15",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {