@squadbase/vite-server 0.1.7-dev.3 → 0.1.7-dev.5
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 +161 -190
- package/dist/connectors/google-sheets.js +183 -138
- package/dist/connectors/grafana.js +1 -1
- package/dist/connectors/influxdb.js +1 -1
- package/dist/connectors/salesforce.js +54 -107
- package/dist/index.js +161 -190
- package/dist/main.js +161 -190
- package/dist/vite-plugin.js +161 -190
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -72736,21 +72736,6 @@ await drive.updateFile("fileId123", {}, "newFolderId", "oldFolderId");
|
|
|
72736
72736
|
|
|
72737
72737
|
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72738
72738
|
import { z as z27 } from "zod";
|
|
72739
|
-
|
|
72740
|
-
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
72741
|
-
var parameters18 = {
|
|
72742
|
-
spreadsheetId: new ParameterDefinition({
|
|
72743
|
-
slug: "spreadsheet-id",
|
|
72744
|
-
name: "Google Sheets Spreadsheet ID",
|
|
72745
|
-
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
|
|
72746
|
-
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
72747
|
-
type: "text",
|
|
72748
|
-
secret: false,
|
|
72749
|
-
required: true
|
|
72750
|
-
})
|
|
72751
|
-
};
|
|
72752
|
-
|
|
72753
|
-
// ../connectors/src/connectors/google-sheets/tools/request.ts
|
|
72754
72739
|
var SHEETS_BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
|
|
72755
72740
|
var REQUEST_TIMEOUT_MS17 = 6e4;
|
|
72756
72741
|
var cachedToken13 = null;
|
|
@@ -72789,11 +72774,16 @@ var inputSchema27 = z27.object({
|
|
|
72789
72774
|
"Brief description of what you intend to accomplish with this tool call"
|
|
72790
72775
|
),
|
|
72791
72776
|
connectionId: z27.string().describe("ID of the Google Sheets connection to use"),
|
|
72792
|
-
method: z27.enum(["GET"]).describe(
|
|
72777
|
+
method: z27.enum(["GET", "POST", "PUT"]).describe(
|
|
72778
|
+
"HTTP method. GET for reads, PUT for values.update, POST for values.append / values:batchUpdate / values:batchGet / values:clear / values:batchClear."
|
|
72779
|
+
),
|
|
72793
72780
|
path: z27.string().describe(
|
|
72794
|
-
"API path appended to https://sheets.googleapis.com/v4/spreadsheets (e.g., '/
|
|
72781
|
+
"API path appended to https://sheets.googleapis.com/v4/spreadsheets. The caller must provide the target spreadsheetId explicitly in the path (e.g., '/1AbCxyz...', '/1AbCxyz.../values/Sheet1!A1:D10')."
|
|
72795
72782
|
),
|
|
72796
|
-
queryParams: z27.record(z27.string(), z27.string()).optional().describe("Query parameters to append to the URL")
|
|
72783
|
+
queryParams: z27.record(z27.string(), z27.string()).optional().describe("Query parameters to append to the URL"),
|
|
72784
|
+
body: z27.unknown().optional().describe(
|
|
72785
|
+
"Request body for POST/PUT. Will be JSON-serialized. Omit for GET."
|
|
72786
|
+
)
|
|
72797
72787
|
});
|
|
72798
72788
|
var outputSchema27 = z27.discriminatedUnion("success", [
|
|
72799
72789
|
z27.object({
|
|
@@ -72808,12 +72798,13 @@ var outputSchema27 = z27.discriminatedUnion("success", [
|
|
|
72808
72798
|
]);
|
|
72809
72799
|
var requestTool9 = new ConnectorTool({
|
|
72810
72800
|
name: "request",
|
|
72811
|
-
description: `Send authenticated
|
|
72812
|
-
|
|
72801
|
+
description: `Send authenticated requests to the Google Sheets API v4.
|
|
72802
|
+
Supports GET (read) and POST/PUT (write: update/append/batchUpdate/clear).
|
|
72803
|
+
The caller must include the target spreadsheetId in the path explicitly.
|
|
72813
72804
|
Authentication is handled automatically via OAuth proxy.`,
|
|
72814
72805
|
inputSchema: inputSchema27,
|
|
72815
72806
|
outputSchema: outputSchema27,
|
|
72816
|
-
async execute({ connectionId, method, path: path5, queryParams }, connections, config) {
|
|
72807
|
+
async execute({ connectionId, method, path: path5, queryParams, body }, connections, config) {
|
|
72817
72808
|
const connection = connections.find((c6) => c6.id === connectionId);
|
|
72818
72809
|
if (!connection) {
|
|
72819
72810
|
return {
|
|
@@ -72825,15 +72816,7 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72825
72816
|
`[connector-request] google-sheets/${connection.name}: ${method} ${path5}`
|
|
72826
72817
|
);
|
|
72827
72818
|
try {
|
|
72828
|
-
|
|
72829
|
-
if (!spreadsheetId) {
|
|
72830
|
-
return {
|
|
72831
|
-
success: false,
|
|
72832
|
-
error: `Spreadsheet ID is not configured for connection "${connection.name}". Ask the user for a Google Sheets URL and save it with updateConnectionParameters (parameterSlug: "spreadsheet-id") before calling this tool.`
|
|
72833
|
-
};
|
|
72834
|
-
}
|
|
72835
|
-
const resolvedPath = path5.replace(/\{spreadsheetId\}/g, spreadsheetId);
|
|
72836
|
-
let url = `${SHEETS_BASE_URL}${resolvedPath === "" || resolvedPath.startsWith("/") ? "" : "/"}${resolvedPath}`;
|
|
72819
|
+
let url = `${SHEETS_BASE_URL}${path5 === "" || path5.startsWith("/") ? "" : "/"}${path5}`;
|
|
72837
72820
|
if (queryParams) {
|
|
72838
72821
|
const searchParams = new URLSearchParams(queryParams);
|
|
72839
72822
|
url += `?${searchParams.toString()}`;
|
|
@@ -72843,16 +72826,17 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72843
72826
|
const controller = new AbortController();
|
|
72844
72827
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS17);
|
|
72845
72828
|
try {
|
|
72829
|
+
const proxyBody = { url, method };
|
|
72830
|
+
if (body !== void 0 && method !== "GET") {
|
|
72831
|
+
proxyBody.body = body;
|
|
72832
|
+
}
|
|
72846
72833
|
const response = await fetch(proxyUrl, {
|
|
72847
72834
|
method: "POST",
|
|
72848
72835
|
headers: {
|
|
72849
72836
|
"Content-Type": "application/json",
|
|
72850
72837
|
Authorization: `Bearer ${token}`
|
|
72851
72838
|
},
|
|
72852
|
-
body: JSON.stringify(
|
|
72853
|
-
url,
|
|
72854
|
-
method
|
|
72855
|
-
}),
|
|
72839
|
+
body: JSON.stringify(proxyBody),
|
|
72856
72840
|
signal: controller.signal
|
|
72857
72841
|
});
|
|
72858
72842
|
const data = await response.json();
|
|
@@ -72875,66 +72859,73 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72875
72859
|
var requestToolName = `google-sheets-oauth_${requestTool9.name}`;
|
|
72876
72860
|
var googleSheetsOnboarding = new ConnectorOnboarding({
|
|
72877
72861
|
connectionSetupInstructions: {
|
|
72878
|
-
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Google Sheets (OAuth) \u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002\
|
|
72862
|
+
ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Google Sheets (OAuth) \u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u306E\u30B3\u30CD\u30AF\u30BF\u306F\u8AAD\u307F\u66F8\u304D\u53EF\u80FD\u306A\u30B9\u30B3\u30FC\u30D7 (\`spreadsheets\`) \u3067\u63A5\u7D9A\u3055\u308C\u3001OAuth\u8A8D\u8A3C\u3057\u305FGoogle\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6A29\u9650\u3092\u6301\u3064\u4EFB\u610F\u306E\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306B\u5BFE\u3057\u3066\u8AAD\u307F\u66F8\u304D\u3067\u304D\u307E\u3059\u3002
|
|
72879
72863
|
|
|
72880
|
-
1. \`askUserQuestion\` \u3067\
|
|
72864
|
+
1. \`askUserQuestion\` \u3067\u64CD\u4F5C\u5BFE\u8C61\u306E\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8URL\u3092\u30D2\u30A2\u30EA\u30F3\u30B0\u3059\u308B:
|
|
72881
72865
|
- \`type\`: \`"freeText"\`
|
|
72882
|
-
- \`question\`: \u300C\
|
|
72866
|
+
- \`question\`: \u300C\u64CD\u4F5C\u3057\u305F\u3044Google Sheets\u306EURL\u3092\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044\uFF08\u8AAD\u307F\u53D6\u308A\u30FB\u7DE8\u96C6\u3069\u3061\u3089\u3082\u53EF\u80FD\u3067\u3059\uFF09\u300D
|
|
72883
72867
|
- \`placeholder\`: \`"https://docs.google.com/spreadsheets/d/.../edit"\`
|
|
72884
72868
|
2. \u53D7\u3051\u53D6\u3063\u305FURL\u304B\u3089\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID\u3092\u62BD\u51FA\u3059\u308B\u3002URL\u306E \`/d/\` \u3068 \`/edit\`\uFF08\u307E\u305F\u306F\u672B\u5C3E\uFF09\u306E\u9593\u306B\u3042\u308B\u6587\u5B57\u5217\u304C\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID\u3067\u3059\uFF08\u4F8B: \`https://docs.google.com/spreadsheets/d/1AbCxyz.../edit\` \u2192 \`1AbCxyz...\`\uFF09\u3002URL\u3067\u306F\u306A\u304FID\u3060\u3051\u304C\u6E21\u3055\u308C\u305F\u5834\u5408\u306F\u305D\u306E\u307E\u307E\u5229\u7528\u3057\u307E\u3059\u3002
|
|
72885
|
-
3. \
|
|
72886
|
-
- \`parameterSlug\`: \`"spreadsheet-id"\`
|
|
72887
|
-
- \`options\`: \`[{ value: <\u62BD\u51FA\u3057\u305FID>, label: <\u540C\u3058\u5024> }]\`\uFF081\u4EF6\u306E\u307F\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u81EA\u52D5\u9078\u629E\u3055\u308C\u308B\uFF09
|
|
72888
|
-
4. \`${requestToolName}\` \u3067\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B:
|
|
72869
|
+
3. \`${requestToolName}\` \u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u6027\u3092\u78BA\u8A8D\u3059\u308B:
|
|
72889
72870
|
- \`method\`: \`"GET"\`
|
|
72890
|
-
- \`path\`: \`"
|
|
72891
|
-
|
|
72892
|
-
a. \u30E6\u30FC\u30B6\u30FC\u306B\u539F\u56E0\u306E\u53EF\u80FD\u6027\u3092\u4F1D\u3048\u308B\
|
|
72893
|
-
b. \`askUserQuestion\` \u3067\u3082\u3046\u4E00\u5EA6URL\u3092\u805E\u304D\u76F4\
|
|
72894
|
-
c. \
|
|
72895
|
-
d. \u6210\u529F\u3059\u308B\u307E\u3067\uFF08\u307E\u305F\u306F\u30E6\u30FC\u30B6\u30FC\u304C\u4E2D\u65AD\u3059\u308B\u307E\u3067\uFF09\u3053\u306E\u30EB\u30FC\u30D7\u3092\u7E70\u308A\u8FD4\u3059\u3002\u540C\u3058ID\u304C\u518D\u5EA6\u5931\u6557\u3059\u308B\u5834\u5408\u306F\u5171\u6709\u8A2D\u5B9A\u306E\u554F\u984C\u306A\u306E\u3067\u30E6\u30FC\u30B6\u30FC\u306B\u305D\u306E\u65E8\u3092\u4F1D\u3048\u3066\u5224\u65AD\u3092\u4EF0\u3050
|
|
72871
|
+
- \`path\`: \`"/<\u62BD\u51FA\u3057\u305FspreadsheetId>"\`
|
|
72872
|
+
4. **\u691C\u8A3C\u5931\u6557\u6642\u306E\u518D\u30D2\u30A2\u30EA\u30F3\u30B0**: \u30B9\u30C6\u30C3\u30D73\u304C \`success: false\` \u3092\u8FD4\u3057\u305F\u5834\u5408\uFF08404/403/\u898B\u3064\u304B\u3089\u306A\u3044\u7B49\uFF09\u3001\u4EE5\u4E0B\u306E\u624B\u9806\u3067\u518D\u8A66\u884C\u3059\u308B:
|
|
72873
|
+
a. \u30E6\u30FC\u30B6\u30FC\u306B\u539F\u56E0\u306E\u53EF\u80FD\u6027\u3092\u4F1D\u3048\u308B\uFF08URL\u304C\u9593\u9055\u3063\u3066\u3044\u308B\u3001OAuth\u9023\u643A\u3057\u305FGoogle\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30A2\u30AF\u30BB\u30B9\u6A29\u9650\u304C\u306A\u3044\u3001\u30D7\u30E9\u30A4\u30D9\u30FC\u30C8\u30B7\u30FC\u30C8\u3067\u5225\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u5171\u6709\u3055\u308C\u3066\u3044\u308B \u7B49\uFF09
|
|
72874
|
+
b. \`askUserQuestion\` \u3067\u3082\u3046\u4E00\u5EA6URL\u3092\u805E\u304D\u76F4\u3057\u3001\u518D\u5EA6 \`${requestToolName}\` \u3067\u691C\u8A3C
|
|
72875
|
+
c. \u6210\u529F\u3059\u308B\u307E\u3067\uFF08\u307E\u305F\u306F\u30E6\u30FC\u30B6\u30FC\u304C\u4E2D\u65AD\u3059\u308B\u307E\u3067\uFF09\u3053\u306E\u30EB\u30FC\u30D7\u3092\u7E70\u308A\u8FD4\u3059
|
|
72896
72876
|
|
|
72897
72877
|
#### \u5236\u7D04
|
|
72898
|
-
- **\
|
|
72878
|
+
- **\u63A5\u7D9A\u8A2D\u5B9A\u4E2D\u306F\u5927\u91CF\u306E\u30BB\u30EB\u5024\u3092\u53D6\u5F97\u3057\u306A\u3044\u3053\u3068**\u3002\u5B9F\u884C\u3057\u3066\u3088\u3044\u306E\u306F\u4E0A\u8A18\u624B\u9806\u3067\u6307\u5B9A\u3055\u308C\u305F\u30E1\u30BF\u30C7\u30FC\u30BF\u53D6\u5F97\u306E\u307F
|
|
72879
|
+
- **\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID\u3092\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u3057\u3066\u4FDD\u5B58\u3057\u306A\u3044**\u3002\u30CF\u30F3\u30C9\u30E9\u5074\u306E\u30B3\u30FC\u30C9\uFF08\`server-logic\`\uFF09\u306B\u5BFE\u8C61\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8ID\u3092\u76F4\u63A5\u6E21\u3059\u8A2D\u8A08\u306B\u306A\u3063\u3066\u3044\u308B\u305F\u3081\u3001\`updateConnectionParameters\` \u306F\u547C\u3070\u306A\u3044\u3053\u3068
|
|
72899
72880
|
- \u30C4\u30FC\u30EB\u9593\u306F1\u6587\u3060\u3051\u66F8\u3044\u3066\u5373\u6B21\u306E\u30C4\u30FC\u30EB\u547C\u3073\u51FA\u3057\u3002\u4E0D\u8981\u306A\u8AAC\u660E\u306F\u7701\u7565\u3057\u3001\u52B9\u7387\u7684\u306B\u9032\u3081\u308B`,
|
|
72900
|
-
en: `Follow these steps to set up the Google Sheets (OAuth) connection.
|
|
72881
|
+
en: `Follow these steps to set up the Google Sheets (OAuth) connection. This connector uses the read/write \`spreadsheets\` scope, so it can read and edit any spreadsheet the authenticated Google account has access to.
|
|
72901
72882
|
|
|
72902
|
-
1. Call \`askUserQuestion\` to ask for the spreadsheet URL to
|
|
72883
|
+
1. Call \`askUserQuestion\` to ask for the spreadsheet URL the user wants to work with:
|
|
72903
72884
|
- \`type\`: \`"freeText"\`
|
|
72904
|
-
- \`question\`: "Please paste the URL of the Google Sheet you want to
|
|
72885
|
+
- \`question\`: "Please paste the URL of the Google Sheet you want to work with (both read and edit are supported)."
|
|
72905
72886
|
- \`placeholder\`: \`"https://docs.google.com/spreadsheets/d/.../edit"\`
|
|
72906
72887
|
2. Extract the spreadsheet ID from the URL. It is the segment between \`/d/\` and \`/edit\` (or the end of the URL), e.g. \`https://docs.google.com/spreadsheets/d/1AbCxyz.../edit\` \u2192 \`1AbCxyz...\`. If the user pasted just the ID, use it as-is.
|
|
72907
|
-
3.
|
|
72908
|
-
- \`parameterSlug\`: \`"spreadsheet-id"\`
|
|
72909
|
-
- \`options\`: \`[{ value: <extracted ID>, label: <same value> }]\` (a single option is auto-selected)
|
|
72910
|
-
4. Verify access by calling \`${requestToolName}\`:
|
|
72888
|
+
3. Verify accessibility by calling \`${requestToolName}\`:
|
|
72911
72889
|
- \`method\`: \`"GET"\`
|
|
72912
|
-
- \`path\`: \`"
|
|
72913
|
-
|
|
72914
|
-
a. Tell the user the likely causes (wrong URL, OAuth-connected Google account lacks
|
|
72915
|
-
b. Call \`askUserQuestion\` to re-ask for the URL
|
|
72916
|
-
c.
|
|
72917
|
-
d. Repeat until verification succeeds (or the user aborts). If the same ID keeps failing, it is a sharing/permissions issue \u2014 inform the user and ask how to proceed
|
|
72890
|
+
- \`path\`: \`"/<extracted spreadsheetId>"\`
|
|
72891
|
+
4. **Retry on verification failure**: If step 3 returns \`success: false\` (404/403/not found or any other error):
|
|
72892
|
+
a. Tell the user the likely causes (wrong URL, OAuth-connected Google account lacks access, private sheet shared with a different account, etc.)
|
|
72893
|
+
b. Call \`askUserQuestion\` again to re-ask for the URL and re-verify with \`${requestToolName}\`
|
|
72894
|
+
c. Repeat until verification succeeds (or the user aborts)
|
|
72918
72895
|
|
|
72919
72896
|
#### Constraints
|
|
72920
|
-
- **Do NOT
|
|
72921
|
-
-
|
|
72897
|
+
- **Do NOT fetch large amounts of cell data during setup**. Only the metadata request specified above is allowed.
|
|
72898
|
+
- **Do NOT persist the spreadsheet ID as a connection parameter.** The handler-side code (\`server-logic\`) is designed to receive the target spreadsheet ID directly, so do NOT call \`updateConnectionParameters\`.
|
|
72899
|
+
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently.`
|
|
72922
72900
|
},
|
|
72923
72901
|
dataOverviewInstructions: {
|
|
72924
|
-
en: `1. Call ${requestToolName} with GET
|
|
72925
|
-
2. For each sheet of interest, call ${requestToolName} with GET
|
|
72926
|
-
ja: `1. ${requestToolName} \u3067 GET
|
|
72927
|
-
2. \u4E3B\u8981\u306A\u30B7\u30FC\u30C8\u306B\u3064\u3044\u3066 ${requestToolName} \u3067 GET
|
|
72902
|
+
en: `1. Call ${requestToolName} with GET /<spreadsheetId> to fetch spreadsheet metadata (sheet names, grid properties)
|
|
72903
|
+
2. For each sheet of interest, call ${requestToolName} with GET /<spreadsheetId>/values/<SheetName>!A1:Z5 to sample the first rows and understand the column layout`,
|
|
72904
|
+
ja: `1. ${requestToolName} \u3067 GET /<spreadsheetId> \u3092\u547C\u3073\u51FA\u3057\u3001\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\uFF08\u30B7\u30FC\u30C8\u540D\u3001\u30B0\u30EA\u30C3\u30C9\u30D7\u30ED\u30D1\u30C6\u30A3\uFF09\u3092\u53D6\u5F97
|
|
72905
|
+
2. \u4E3B\u8981\u306A\u30B7\u30FC\u30C8\u306B\u3064\u3044\u3066 ${requestToolName} \u3067 GET /<spreadsheetId>/values/<\u30B7\u30FC\u30C8\u540D>!A1:Z5 \u3092\u547C\u3073\u51FA\u3057\u3001\u5148\u982D\u6570\u884C\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3057\u3066\u30AB\u30E9\u30E0\u69CB\u9020\u3092\u628A\u63E1`
|
|
72928
72906
|
}
|
|
72929
72907
|
});
|
|
72930
72908
|
|
|
72909
|
+
// ../connectors/src/connectors/google-sheets/parameters.ts
|
|
72910
|
+
var parameters18 = {
|
|
72911
|
+
spreadsheetId: new ParameterDefinition({
|
|
72912
|
+
slug: "spreadsheet-id",
|
|
72913
|
+
name: "Google Sheets Spreadsheet ID",
|
|
72914
|
+
description: "The spreadsheet ID from the Google Sheets URL (the segment between /d/ and /edit in https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). Collected during the setup flow.",
|
|
72915
|
+
envVarBaseKey: "GOOGLE_SHEETS_SPREADSHEET_ID",
|
|
72916
|
+
type: "text",
|
|
72917
|
+
secret: false,
|
|
72918
|
+
required: false
|
|
72919
|
+
})
|
|
72920
|
+
};
|
|
72921
|
+
|
|
72931
72922
|
// ../connectors/src/connectors/google-sheets/index.ts
|
|
72932
72923
|
var tools18 = { request: requestTool9 };
|
|
72933
72924
|
var googleSheetsConnector = new ConnectorPlugin({
|
|
72934
72925
|
slug: "google-sheets",
|
|
72935
72926
|
authType: AUTH_TYPES.OAUTH,
|
|
72936
72927
|
name: "Google Sheets",
|
|
72937
|
-
description: "Connect to
|
|
72928
|
+
description: "Connect to Google Sheets for read/write access via OAuth. Any spreadsheet the authenticated Google account can access is supported \u2014 the target spreadsheetId is passed per call.",
|
|
72938
72929
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/1UPQuggyiZmbb26CuaSr2h/032770e8739b183fa00b7625f024e536/google-sheets.svg",
|
|
72939
72930
|
parameters: parameters18,
|
|
72940
72931
|
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
@@ -72943,25 +72934,33 @@ var googleSheetsConnector = new ConnectorPlugin({
|
|
|
72943
72934
|
allowlist: [
|
|
72944
72935
|
{
|
|
72945
72936
|
host: "sheets.googleapis.com",
|
|
72946
|
-
methods: ["GET"]
|
|
72937
|
+
methods: ["GET", "POST", "PUT"]
|
|
72947
72938
|
}
|
|
72948
72939
|
]
|
|
72949
72940
|
},
|
|
72950
72941
|
systemPrompt: {
|
|
72951
72942
|
en: `### Tools (setup-time only)
|
|
72952
72943
|
|
|
72953
|
-
- \`google-sheets-oauth_request\`: Call the Google Sheets API during setup / data overview.
|
|
72944
|
+
- \`google-sheets-oauth_request\`: Call the Google Sheets API during setup / data overview. Supports GET, POST, and PUT. The caller must include the target spreadsheetId in the path explicitly (e.g., \`/1AbCxyz...\`, \`/1AbCxyz.../values/Sheet1!A1:D10\`). Authentication is configured automatically via OAuth.
|
|
72954
72945
|
|
|
72955
|
-
> **Important**: The \`google-sheets-oauth_request\` tool is only available at setup time. Inside server-logic handlers, use the SDK (\`connection(id).getValues\`, etc.) \u2014 the SDK's fetch is already wired through the OAuth proxy. **Do NOT** hand-roll HTTP calls to \`_sqcore/connections/*/request\` from a handler.
|
|
72946
|
+
> **Important**: The \`google-sheets-oauth_request\` tool is only available at setup time. Inside server-logic handlers, use the SDK (\`connection(id).getValues(spreadsheetId, range)\`, etc.) \u2014 the SDK's fetch is already wired through the OAuth proxy. **Do NOT** hand-roll HTTP calls to \`_sqcore/connections/*/request\` from a handler.
|
|
72956
72947
|
|
|
72957
|
-
> **Connection scope**:
|
|
72948
|
+
> **Connection scope**: The OAuth scope is \`spreadsheets\` (read/write). A connection is NOT bound to a single spreadsheet \u2014 the target spreadsheetId is passed per call. The spreadsheetId is NOT stored as a connection parameter or environment variable; pass it explicitly from the caller (e.g., as a query param or request input to the handler).
|
|
72958
72949
|
|
|
72959
|
-
### Google Sheets API Reference
|
|
72950
|
+
### Google Sheets API Reference
|
|
72960
72951
|
|
|
72952
|
+
Reads:
|
|
72961
72953
|
- GET \`/{spreadsheetId}\` \u2014 Get spreadsheet metadata (title, sheets, properties)
|
|
72962
72954
|
- GET \`/{spreadsheetId}/values/{range}\` \u2014 Get cell values for a range
|
|
72963
72955
|
- GET \`/{spreadsheetId}/values:batchGet?ranges={range1}&ranges={range2}\` \u2014 Get values for multiple ranges
|
|
72964
72956
|
|
|
72957
|
+
Writes:
|
|
72958
|
+
- PUT \`/{spreadsheetId}/values/{range}?valueInputOption=USER_ENTERED\` \u2014 Overwrite a range (body: \`{ range, majorDimension, values }\`)
|
|
72959
|
+
- POST \`/{spreadsheetId}/values/{range}:append?valueInputOption=USER_ENTERED\` \u2014 Append rows after the existing data
|
|
72960
|
+
- POST \`/{spreadsheetId}/values/{range}:clear\` \u2014 Clear values in a range
|
|
72961
|
+
- POST \`/{spreadsheetId}/values:batchUpdate\` \u2014 Batch update / batch clear
|
|
72962
|
+
- POST \`/{spreadsheetId}:batchUpdate\` \u2014 Structural edits (addSheet, deleteSheet, updateCells, formatting, \u2026)
|
|
72963
|
+
|
|
72965
72964
|
### Range Notation (A1 notation)
|
|
72966
72965
|
- \`Sheet1!A1:D10\` \u2014 Specific range on Sheet1
|
|
72967
72966
|
- \`Sheet1!A:A\` \u2014 Entire column A on Sheet1
|
|
@@ -72971,20 +72970,24 @@ var googleSheetsConnector = new ConnectorPlugin({
|
|
|
72971
72970
|
|
|
72972
72971
|
### Tips
|
|
72973
72972
|
- To explore a spreadsheet, first get metadata to see available sheet names
|
|
72973
|
+
- Use \`valueInputOption=USER_ENTERED\` to parse formulas/dates like the UI; use \`RAW\` to store inputs literally
|
|
72974
72974
|
- Use \`valueRenderOption=FORMATTED_VALUE\` query param to get display values
|
|
72975
72975
|
- Use \`valueRenderOption=UNFORMATTED_VALUE\` for raw numeric values
|
|
72976
72976
|
- Use \`majorDimension=COLUMNS\` to get data organized by columns instead of rows
|
|
72977
72977
|
|
|
72978
72978
|
### Business Logic
|
|
72979
72979
|
|
|
72980
|
-
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 and do NOT read \`INTERNAL_SQUADBASE_*\` env vars \u2014 the SDK takes care of OAuth. The
|
|
72980
|
+
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 and do NOT read \`INTERNAL_SQUADBASE_*\` env vars \u2014 the SDK takes care of OAuth. The target spreadsheetId is NOT stored on the connection \u2014 the handler caller must pass it (as part of the request input).
|
|
72981
72981
|
|
|
72982
72982
|
SDK surface (client created via \`connection(connectionId)\`):
|
|
72983
|
-
- \`client.
|
|
72984
|
-
- \`client.
|
|
72985
|
-
- \`client.
|
|
72986
|
-
- \`client.
|
|
72987
|
-
- \`client.
|
|
72983
|
+
- \`client.request(path, init?)\` \u2014 low-level authenticated fetch (\`path\` is appended to \`https://sheets.googleapis.com/v4/spreadsheets\`; the caller must include the target spreadsheetId).
|
|
72984
|
+
- \`client.getSpreadsheet(spreadsheetId)\` \u2014 fetch spreadsheet metadata.
|
|
72985
|
+
- \`client.getValues(spreadsheetId, range)\` \u2014 read a range (A1 notation).
|
|
72986
|
+
- \`client.batchGetValues(spreadsheetId, ranges)\` \u2014 read multiple ranges.
|
|
72987
|
+
- \`client.updateValues(spreadsheetId, range, values, valueInputOption?)\` \u2014 overwrite a range (requires write scope).
|
|
72988
|
+
- \`client.appendValues(spreadsheetId, range, values, valueInputOption?)\` \u2014 append rows (requires write scope).
|
|
72989
|
+
- \`client.clearValues(spreadsheetId, range)\` \u2014 clear a range (requires write scope).
|
|
72990
|
+
- \`client.batchUpdate(spreadsheetId, requests)\` \u2014 structural edits (requires write scope).
|
|
72988
72991
|
|
|
72989
72992
|
If a handler test fails with \`Connection proxy is not configured\`, retry \u2014 the sandbox is still initializing. Do NOT abandon the SDK and construct OAuth proxy URLs manually.
|
|
72990
72993
|
|
|
@@ -72994,32 +72997,44 @@ If a handler test fails with \`Connection proxy is not configured\`, retry \u201
|
|
|
72994
72997
|
import { connection } from "@squadbase/vite-server/connectors/google-sheets";
|
|
72995
72998
|
|
|
72996
72999
|
const sheets = connection("<connectionId>");
|
|
73000
|
+
const spreadsheetId = "<passed from request input>";
|
|
72997
73001
|
|
|
72998
|
-
//
|
|
72999
|
-
const metadata = await sheets.getSpreadsheet();
|
|
73000
|
-
|
|
73002
|
+
// Read: metadata and values
|
|
73003
|
+
const metadata = await sheets.getSpreadsheet(spreadsheetId);
|
|
73004
|
+
const values = await sheets.getValues(spreadsheetId, "Sheet1!A1:D10");
|
|
73001
73005
|
|
|
73002
|
-
//
|
|
73003
|
-
|
|
73004
|
-
|
|
73006
|
+
// Write: overwrite, append, clear
|
|
73007
|
+
await sheets.updateValues(spreadsheetId, "Sheet1!A1:B2", [["name", "age"], ["Alice", 30]]);
|
|
73008
|
+
await sheets.appendValues(spreadsheetId, "Sheet1!A:B", [["Bob", 25]]);
|
|
73009
|
+
await sheets.clearValues(spreadsheetId, "Sheet1!A1:B10");
|
|
73005
73010
|
|
|
73006
|
-
//
|
|
73007
|
-
|
|
73011
|
+
// Structural edits (add a sheet)
|
|
73012
|
+
await sheets.batchUpdate(spreadsheetId, [
|
|
73013
|
+
{ addSheet: { properties: { title: "NewSheet" } } },
|
|
73014
|
+
]);
|
|
73008
73015
|
\`\`\``,
|
|
73009
73016
|
ja: `### \u30C4\u30FC\u30EB\uFF08\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306E\u307F\uFF09
|
|
73010
73017
|
|
|
73011
|
-
- \`google-sheets-oauth_request\`: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3084\u30C7\u30FC\u30BF\u6982\u8981\u628A\u63E1\u6642\u306B Google Sheets API \u3092\u547C\u3073\u51FA\u3059\u30C4\u30FC\u30EB\u3067\u3059\
|
|
73018
|
+
- \`google-sheets-oauth_request\`: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3084\u30C7\u30FC\u30BF\u6982\u8981\u628A\u63E1\u6642\u306B Google Sheets API \u3092\u547C\u3073\u51FA\u3059\u30C4\u30FC\u30EB\u3067\u3059\u3002GET / POST / PUT \u3092\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\u547C\u3073\u51FA\u3057\u5074\u304C\u30D1\u30B9\u306B\u5BFE\u8C61\u306E spreadsheetId \u3092\u660E\u793A\u7684\u306B\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\uFF08\u4F8B: \`/1AbCxyz...\`\u3001\`/1AbCxyz.../values/Sheet1!A1:D10\`\uFF09\u3002OAuth \u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
73012
73019
|
|
|
73013
|
-
> **\u91CD\u8981**: \`google-sheets-oauth_request\` \u306F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306E\u307F\u5229\u7528\u53EF\u80FD\u3067\u3059\u3002\u30B5\u30FC\u30D0\u30FC\u30ED\u30B8\u30C3\u30AF\u306E\u30CF\u30F3\u30C9\u30E9\u5185\u3067\u306F\u5FC5\u305A SDK\uFF08\`connection(id).getValues\` \u306A\u3069\uFF09\u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002SDK \u306E fetch \u306F OAuth \u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u3067\u65E2\u306B\u914D\u7DDA\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30CF\u30F3\u30C9\u30E9\u304B\u3089 \`_sqcore/connections/*/request\` \u3092\u624B\u66F8\u304D\u3067\u547C\u3073\u51FA\u3055\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
|
|
73020
|
+
> **\u91CD\u8981**: \`google-sheets-oauth_request\` \u306F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306E\u307F\u5229\u7528\u53EF\u80FD\u3067\u3059\u3002\u30B5\u30FC\u30D0\u30FC\u30ED\u30B8\u30C3\u30AF\u306E\u30CF\u30F3\u30C9\u30E9\u5185\u3067\u306F\u5FC5\u305A SDK\uFF08\`connection(id).getValues(spreadsheetId, range)\` \u306A\u3069\uFF09\u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002SDK \u306E fetch \u306F OAuth \u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u3067\u65E2\u306B\u914D\u7DDA\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30CF\u30F3\u30C9\u30E9\u304B\u3089 \`_sqcore/connections/*/request\` \u3092\u624B\u66F8\u304D\u3067\u547C\u3073\u51FA\u3055\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
|
|
73014
73021
|
|
|
73015
|
-
> **\u63A5\u7D9A\u30B9\u30B3\u30FC\u30D7**: \
|
|
73022
|
+
> **\u63A5\u7D9A\u30B9\u30B3\u30FC\u30D7**: OAuth \u30B9\u30B3\u30FC\u30D7\u306F \`spreadsheets\`\uFF08\u8AAD\u307F\u66F8\u304D\u53EF\u80FD\uFF09\u3067\u3059\u3002\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306F\u5358\u4E00\u306E\u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306B\u7D10\u3065\u304D\u307E\u305B\u3093 \u2014 \u5BFE\u8C61\u306E spreadsheetId \u306F\u547C\u3073\u51FA\u3057\u3054\u3068\u306B\u6E21\u3057\u307E\u3059\u3002spreadsheetId \u306F\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u30D1\u30E9\u30E1\u30FC\u30BF\u3084\u74B0\u5883\u5909\u6570\u3068\u3057\u3066\u4FDD\u5B58\u3055\u308C\u306A\u3044\u305F\u3081\u3001\u30CF\u30F3\u30C9\u30E9\u306E\u547C\u3073\u51FA\u3057\u5143\uFF08\u30EA\u30AF\u30A8\u30B9\u30C8\u5165\u529B\u306A\u3069\uFF09\u304B\u3089\u660E\u793A\u7684\u306B\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
73016
73023
|
|
|
73017
|
-
### Google Sheets API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
73024
|
+
### Google Sheets API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
73018
73025
|
|
|
73026
|
+
\u8AAD\u307F\u53D6\u308A:
|
|
73019
73027
|
- 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
|
|
73020
73028
|
- GET \`/{spreadsheetId}/values/{range}\` \u2014 \u7BC4\u56F2\u306E\u30BB\u30EB\u5024\u3092\u53D6\u5F97
|
|
73021
73029
|
- GET \`/{spreadsheetId}/values:batchGet?ranges={range1}&ranges={range2}\` \u2014 \u8907\u6570\u7BC4\u56F2\u306E\u5024\u3092\u53D6\u5F97
|
|
73022
73030
|
|
|
73031
|
+
\u66F8\u304D\u8FBC\u307F:
|
|
73032
|
+
- PUT \`/{spreadsheetId}/values/{range}?valueInputOption=USER_ENTERED\` \u2014 \u7BC4\u56F2\u3092\u4E0A\u66F8\u304D\uFF08body: \`{ range, majorDimension, values }\`\uFF09
|
|
73033
|
+
- POST \`/{spreadsheetId}/values/{range}:append?valueInputOption=USER_ENTERED\` \u2014 \u65E2\u5B58\u30C7\u30FC\u30BF\u306E\u5F8C\u308D\u306B\u884C\u3092\u8FFD\u8A18
|
|
73034
|
+
- POST \`/{spreadsheetId}/values/{range}:clear\` \u2014 \u7BC4\u56F2\u306E\u5024\u3092\u30AF\u30EA\u30A2
|
|
73035
|
+
- POST \`/{spreadsheetId}/values:batchUpdate\` \u2014 \u30D0\u30C3\u30C1\u66F4\u65B0 / \u30D0\u30C3\u30C1\u30AF\u30EA\u30A2
|
|
73036
|
+
- POST \`/{spreadsheetId}:batchUpdate\` \u2014 \u69CB\u9020\u5909\u66F4\uFF08addSheet, deleteSheet, updateCells, \u66F8\u5F0F\u8A2D\u5B9A \u7B49\uFF09
|
|
73037
|
+
|
|
73023
73038
|
### \u7BC4\u56F2\u306E\u8868\u8A18\u6CD5\uFF08A1\u8868\u8A18\u6CD5\uFF09
|
|
73024
73039
|
- \`Sheet1!A1:D10\` \u2014 Sheet1\u4E0A\u306E\u7279\u5B9A\u7BC4\u56F2
|
|
73025
73040
|
- \`Sheet1!A:A\` \u2014 Sheet1\u306EA\u5217\u5168\u4F53
|
|
@@ -73029,20 +73044,24 @@ const batch = await sheets.batchGetValues(["Sheet1!A:A", "Sheet2!B2:C100"]);
|
|
|
73029
73044
|
|
|
73030
73045
|
### \u30D2\u30F3\u30C8
|
|
73031
73046
|
- \u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u3092\u63A2\u7D22\u3059\u308B\u306B\u306F\u3001\u307E\u305A\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3057\u3066\u5229\u7528\u53EF\u80FD\u306A\u30B7\u30FC\u30C8\u540D\u3092\u78BA\u8A8D\u3057\u307E\u3059
|
|
73047
|
+
- \u6570\u5F0F\u3084\u65E5\u4ED8\u3092 UI \u3068\u540C\u3058\u3088\u3046\u306B\u89E3\u91C8\u3055\u305B\u308B\u306B\u306F \`valueInputOption=USER_ENTERED\`\u3001\u305D\u306E\u307E\u307E\u6587\u5B57\u5217\u3068\u3057\u3066\u4FDD\u5B58\u3059\u308B\u306B\u306F \`RAW\` \u3092\u4F7F\u3044\u307E\u3059
|
|
73032
73048
|
- \u8868\u793A\u5024\u3092\u53D6\u5F97\u3059\u308B\u306B\u306F \`valueRenderOption=FORMATTED_VALUE\` \u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u307E\u3059
|
|
73033
73049
|
- \u751F\u306E\u6570\u5024\u3092\u53D6\u5F97\u3059\u308B\u306B\u306F \`valueRenderOption=UNFORMATTED_VALUE\` \u3092\u4F7F\u7528\u3057\u307E\u3059
|
|
73034
73050
|
- \u5217\u3054\u3068\u306B\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3059\u308B\u306B\u306F \`majorDimension=COLUMNS\` \u3092\u4F7F\u7528\u3057\u307E\u3059
|
|
73035
73051
|
|
|
73036
73052
|
### Business Logic
|
|
73037
73053
|
|
|
73038
|
-
\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\u30BF SDK \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\`INTERNAL_SQUADBASE_*\` \u306E\u74B0\u5883\u5909\u6570\u3092\u4F7F\u3063\u3066\u624B\u52D5\u3067 OAuth \u30D7\u30ED\u30AD\u30B7\u3092\u53E9\u304F\u3053\u3068\u3082\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044 \u2014 SDK \u304C OAuth \u3092\u51E6\u7406\u3057\u307E\u3059\u3002\
|
|
73054
|
+
\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\u30BF SDK \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\`INTERNAL_SQUADBASE_*\` \u306E\u74B0\u5883\u5909\u6570\u3092\u4F7F\u3063\u3066\u624B\u52D5\u3067 OAuth \u30D7\u30ED\u30AD\u30B7\u3092\u53E9\u304F\u3053\u3068\u3082\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044 \u2014 SDK \u304C OAuth \u3092\u51E6\u7406\u3057\u307E\u3059\u3002\u5BFE\u8C61 spreadsheetId \u306F\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306B\u4FDD\u5B58\u3055\u308C\u306A\u3044\u305F\u3081\u3001\u30CF\u30F3\u30C9\u30E9\u306E\u547C\u3073\u51FA\u3057\u5143\uFF08\u30EA\u30AF\u30A8\u30B9\u30C8\u5165\u529B\u306A\u3069\uFF09\u304B\u3089\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
73039
73055
|
|
|
73040
73056
|
SDK\uFF08\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF09:
|
|
73041
|
-
- \`client.
|
|
73042
|
-
- \`client.
|
|
73043
|
-
- \`client.
|
|
73044
|
-
- \`client.
|
|
73045
|
-
- \`client.
|
|
73057
|
+
- \`client.request(path, init?)\` \u2014 \u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304D fetch\uFF08\`path\` \u306F \`https://sheets.googleapis.com/v4/spreadsheets\` \u306B\u8FFD\u52A0\u3055\u308C\u3001\u547C\u3073\u51FA\u3057\u5074\u304C spreadsheetId \u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\uFF09\u3002
|
|
73058
|
+
- \`client.getSpreadsheet(spreadsheetId)\` \u2014 \u30B9\u30D7\u30EC\u30C3\u30C9\u30B7\u30FC\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u3002
|
|
73059
|
+
- \`client.getValues(spreadsheetId, range)\` \u2014 \u7BC4\u56F2\u306E\u5024\u3092\u53D6\u5F97\uFF08A1 \u8868\u8A18\uFF09\u3002
|
|
73060
|
+
- \`client.batchGetValues(spreadsheetId, ranges)\` \u2014 \u8907\u6570\u7BC4\u56F2\u306E\u5024\u3092\u53D6\u5F97\u3002
|
|
73061
|
+
- \`client.updateValues(spreadsheetId, range, values, valueInputOption?)\` \u2014 \u7BC4\u56F2\u3092\u4E0A\u66F8\u304D\uFF08\u66F8\u304D\u8FBC\u307F\u30B9\u30B3\u30FC\u30D7\u304C\u5FC5\u8981\uFF09\u3002
|
|
73062
|
+
- \`client.appendValues(spreadsheetId, range, values, valueInputOption?)\` \u2014 \u884C\u3092\u8FFD\u8A18\uFF08\u66F8\u304D\u8FBC\u307F\u30B9\u30B3\u30FC\u30D7\u304C\u5FC5\u8981\uFF09\u3002
|
|
73063
|
+
- \`client.clearValues(spreadsheetId, range)\` \u2014 \u7BC4\u56F2\u306E\u5024\u3092\u30AF\u30EA\u30A2\uFF08\u66F8\u304D\u8FBC\u307F\u30B9\u30B3\u30FC\u30D7\u304C\u5FC5\u8981\uFF09\u3002
|
|
73064
|
+
- \`client.batchUpdate(spreadsheetId, requests)\` \u2014 \u69CB\u9020\u5909\u66F4\uFF08\u66F8\u304D\u8FBC\u307F\u30B9\u30B3\u30FC\u30D7\u304C\u5FC5\u8981\uFF09\u3002
|
|
73046
73065
|
|
|
73047
73066
|
\u30CF\u30F3\u30C9\u30E9\u306E\u30C6\u30B9\u30C8\u304C \`Connection proxy is not configured\` \u3067\u5931\u6557\u3059\u308B\u5834\u5408\u306F\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u901A\u5E38\u306F\u30B5\u30F3\u30C9\u30DC\u30C3\u30AF\u30B9\u306E\u521D\u671F\u5316\u4E2D\u306B\u8D77\u304D\u307E\u3059\u3002SDK \u3092\u8AE6\u3081\u3066 OAuth \u30D7\u30ED\u30AD\u30B7\u306E URL \u3092\u81EA\u5206\u3067\u7D44\u307F\u7ACB\u3066\u308B\u3053\u3068\u306F **\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044**\u3002
|
|
73048
73067
|
|
|
@@ -73052,17 +73071,21 @@ SDK\uFF08\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9
|
|
|
73052
73071
|
import { connection } from "@squadbase/vite-server/connectors/google-sheets";
|
|
73053
73072
|
|
|
73054
73073
|
const sheets = connection("<connectionId>");
|
|
73074
|
+
const spreadsheetId = "<\u30EA\u30AF\u30A8\u30B9\u30C8\u5165\u529B\u304B\u3089\u53D7\u3051\u53D6\u308B>";
|
|
73055
73075
|
|
|
73056
|
-
// \
|
|
73057
|
-
const metadata = await sheets.getSpreadsheet();
|
|
73058
|
-
|
|
73076
|
+
// \u8AAD\u307F\u53D6\u308A: \u30E1\u30BF\u30C7\u30FC\u30BF\u3068\u5024
|
|
73077
|
+
const metadata = await sheets.getSpreadsheet(spreadsheetId);
|
|
73078
|
+
const values = await sheets.getValues(spreadsheetId, "Sheet1!A1:D10");
|
|
73059
73079
|
|
|
73060
|
-
// \
|
|
73061
|
-
|
|
73062
|
-
|
|
73080
|
+
// \u66F8\u304D\u8FBC\u307F: \u4E0A\u66F8\u304D\u30FB\u8FFD\u8A18\u30FB\u30AF\u30EA\u30A2
|
|
73081
|
+
await sheets.updateValues(spreadsheetId, "Sheet1!A1:B2", [["name", "age"], ["Alice", 30]]);
|
|
73082
|
+
await sheets.appendValues(spreadsheetId, "Sheet1!A:B", [["Bob", 25]]);
|
|
73083
|
+
await sheets.clearValues(spreadsheetId, "Sheet1!A1:B10");
|
|
73063
73084
|
|
|
73064
|
-
// \
|
|
73065
|
-
|
|
73085
|
+
// \u69CB\u9020\u5909\u66F4\uFF08\u30B7\u30FC\u30C8\u3092\u8FFD\u52A0\uFF09
|
|
73086
|
+
await sheets.batchUpdate(spreadsheetId, [
|
|
73087
|
+
{ addSheet: { properties: { title: "NewSheet" } } },
|
|
73088
|
+
]);
|
|
73066
73089
|
\`\`\``
|
|
73067
73090
|
},
|
|
73068
73091
|
tools: tools18
|
|
@@ -85072,7 +85095,7 @@ var grafanaConnector = new ConnectorPlugin({
|
|
|
85072
85095
|
description: "Connect to Grafana for monitoring dashboards, datasource queries, and alerting.",
|
|
85073
85096
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3nGaPhV94lXQsHcCtv4mXz/0559d42f83066e8ba79e78410806750c/grafana-icon.webp",
|
|
85074
85097
|
parameters: parameters58,
|
|
85075
|
-
releaseFlag: { dev1: true, dev2:
|
|
85098
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
85076
85099
|
onboarding: grafanaOnboarding,
|
|
85077
85100
|
systemPrompt: {
|
|
85078
85101
|
en: `### Tools
|
|
@@ -86241,42 +86264,6 @@ await sentry.updateIssue("12345", { status: "resolved" });
|
|
|
86241
86264
|
|
|
86242
86265
|
// ../connectors/src/connectors/salesforce/setup.ts
|
|
86243
86266
|
var salesforceOnboarding = new ConnectorOnboarding({
|
|
86244
|
-
connectionSetupInstructions: {
|
|
86245
|
-
en: `#### Create a Connected App in Salesforce
|
|
86246
|
-
1. In Salesforce Setup, go to App Manager \u2192 New Connected App
|
|
86247
|
-
2. Under API (Enable OAuth Settings), check "Enable OAuth Settings"
|
|
86248
|
-
3. Add OAuth scopes: "Manage user data via APIs (api)" and "Perform requests at any time (refresh_token, offline_access)"
|
|
86249
|
-
4. Save and note the Consumer Key (client_id) and Consumer Secret (client_secret)
|
|
86250
|
-
|
|
86251
|
-
#### Allow Username-Password Flow
|
|
86252
|
-
1. Go to Setup \u2192 Identity \u2192 OAuth and OpenID Connect Settings
|
|
86253
|
-
2. Enable "Allow OAuth Username-Password Flows"
|
|
86254
|
-
|
|
86255
|
-
#### Reset your Security Token
|
|
86256
|
-
1. Go to Settings \u2192 My Personal Information \u2192 Reset My Security Token
|
|
86257
|
-
2. Salesforce emails you a new security token \u2014 append it to your password when entering the Password parameter (password + securityToken)
|
|
86258
|
-
|
|
86259
|
-
#### Sandbox vs Production
|
|
86260
|
-
- Leave Use Sandbox as "false" (or empty) to connect to production (login.salesforce.com)
|
|
86261
|
-
- Set Use Sandbox to "true" to connect to a sandbox (test.salesforce.com)`,
|
|
86262
|
-
ja: `#### Salesforce \u3067 Connected App \u3092\u4F5C\u6210
|
|
86263
|
-
1. Setup \u2192 App Manager \u2192 New Connected App
|
|
86264
|
-
2. API (Enable OAuth Settings) \u30BB\u30AF\u30B7\u30E7\u30F3\u3067 "Enable OAuth Settings" \u3092\u6709\u52B9\u5316
|
|
86265
|
-
3. OAuth \u30B9\u30B3\u30FC\u30D7\u306B "Manage user data via APIs (api)" \u3068 "Perform requests at any time (refresh_token, offline_access)" \u3092\u8FFD\u52A0
|
|
86266
|
-
4. \u4FDD\u5B58\u5F8C\u3001Consumer Key (client_id) \u3068 Consumer Secret (client_secret) \u3092\u63A7\u3048\u308B
|
|
86267
|
-
|
|
86268
|
-
#### Username-Password Flow \u3092\u8A31\u53EF
|
|
86269
|
-
1. Setup \u2192 Identity \u2192 OAuth and OpenID Connect Settings
|
|
86270
|
-
2. "Allow OAuth Username-Password Flows" \u3092\u6709\u52B9\u5316
|
|
86271
|
-
|
|
86272
|
-
#### Security Token \u306E\u767A\u884C
|
|
86273
|
-
1. \u500B\u4EBA\u8A2D\u5B9A \u2192 My Personal Information \u2192 Reset My Security Token
|
|
86274
|
-
2. Salesforce \u304B\u3089\u9001\u3089\u308C\u308B\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30C8\u30FC\u30AF\u30F3\u3092\u30D1\u30B9\u30EF\u30FC\u30C9\u306B\u9023\u7D50\u3057\u3066\u5165\u529B\uFF08password + securityToken\uFF09
|
|
86275
|
-
|
|
86276
|
-
#### Sandbox / Production
|
|
86277
|
-
- \u672C\u756A (login.salesforce.com) \u306E\u5834\u5408: Use Sandbox \u3092 "false" \u307E\u305F\u306F\u672A\u5165\u529B
|
|
86278
|
-
- Sandbox (test.salesforce.com) \u306E\u5834\u5408: Use Sandbox \u3092 "true" \u306B\u8A2D\u5B9A`
|
|
86279
|
-
},
|
|
86280
86267
|
dataOverviewInstructions: {
|
|
86281
86268
|
en: `1. Call salesforce_request with GET /services/data/v60.0/sobjects/ to list available sObjects (standard + custom)
|
|
86282
86269
|
2. Call salesforce_request with GET /services/data/v60.0/sobjects/Account/describe to inspect Account fields; repeat for Contact, Opportunity, Lead as needed
|
|
@@ -86289,28 +86276,19 @@ var salesforceOnboarding = new ConnectorOnboarding({
|
|
|
86289
86276
|
|
|
86290
86277
|
// ../connectors/src/connectors/salesforce/parameters.ts
|
|
86291
86278
|
var parameters62 = {
|
|
86292
|
-
|
|
86293
|
-
slug: "
|
|
86294
|
-
name: "
|
|
86295
|
-
description: "Your Salesforce
|
|
86296
|
-
envVarBaseKey: "
|
|
86279
|
+
instanceUrl: new ParameterDefinition({
|
|
86280
|
+
slug: "instance-url",
|
|
86281
|
+
name: "Instance URL",
|
|
86282
|
+
description: "Your Salesforce org's My Domain URL (e.g., https://yourorg.my.salesforce.com). Find it under Setup \u2192 Company Settings \u2192 My Domain \u2192 Current My Domain URL.",
|
|
86283
|
+
envVarBaseKey: "SALESFORCE_INSTANCE_URL",
|
|
86297
86284
|
type: "text",
|
|
86298
86285
|
secret: false,
|
|
86299
86286
|
required: true
|
|
86300
86287
|
}),
|
|
86301
|
-
password: new ParameterDefinition({
|
|
86302
|
-
slug: "password",
|
|
86303
|
-
name: "Password",
|
|
86304
|
-
description: "Your Salesforce account password concatenated with your security token (password + securityToken). The security token is emailed to you when you reset it from Settings \u2192 My Personal Information \u2192 Reset My Security Token.",
|
|
86305
|
-
envVarBaseKey: "SALESFORCE_PASSWORD",
|
|
86306
|
-
type: "text",
|
|
86307
|
-
secret: true,
|
|
86308
|
-
required: true
|
|
86309
|
-
}),
|
|
86310
86288
|
clientId: new ParameterDefinition({
|
|
86311
86289
|
slug: "client-id",
|
|
86312
86290
|
name: "Consumer Key",
|
|
86313
|
-
description: "The Consumer Key (client_id) of your
|
|
86291
|
+
description: "The Consumer Key (client_id) of your External Client App (or Connected App). The app must enable the OAuth 2.0 Client Credentials Flow and bind a Run-As user with API access.",
|
|
86314
86292
|
envVarBaseKey: "SALESFORCE_CLIENT_ID",
|
|
86315
86293
|
type: "text",
|
|
86316
86294
|
secret: false,
|
|
@@ -86319,20 +86297,11 @@ var parameters62 = {
|
|
|
86319
86297
|
clientSecret: new ParameterDefinition({
|
|
86320
86298
|
slug: "client-secret",
|
|
86321
86299
|
name: "Consumer Secret",
|
|
86322
|
-
description: "The Consumer Secret (client_secret) of your
|
|
86300
|
+
description: "The Consumer Secret (client_secret) of your External Client App (or Connected App).",
|
|
86323
86301
|
envVarBaseKey: "SALESFORCE_CLIENT_SECRET",
|
|
86324
86302
|
type: "text",
|
|
86325
86303
|
secret: true,
|
|
86326
86304
|
required: true
|
|
86327
|
-
}),
|
|
86328
|
-
isSandbox: new ParameterDefinition({
|
|
86329
|
-
slug: "is-sandbox",
|
|
86330
|
-
name: "Use Sandbox",
|
|
86331
|
-
description: 'Set to "true" to authenticate against a Salesforce sandbox (test.salesforce.com) instead of production (login.salesforce.com). Defaults to "false".',
|
|
86332
|
-
envVarBaseKey: "SALESFORCE_IS_SANDBOX",
|
|
86333
|
-
type: "text",
|
|
86334
|
-
secret: false,
|
|
86335
|
-
required: false
|
|
86336
86305
|
})
|
|
86337
86306
|
};
|
|
86338
86307
|
|
|
@@ -86363,10 +86332,17 @@ var outputSchema75 = z77.discriminatedUnion("success", [
|
|
|
86363
86332
|
error: z77.string()
|
|
86364
86333
|
})
|
|
86365
86334
|
]);
|
|
86335
|
+
function normalizeInstanceUrl(raw) {
|
|
86336
|
+
const trimmed = raw.trim().replace(/\/+$/, "");
|
|
86337
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
86338
|
+
return `https://${trimmed}`;
|
|
86339
|
+
}
|
|
86340
|
+
return trimmed;
|
|
86341
|
+
}
|
|
86366
86342
|
var requestTool47 = new ConnectorTool({
|
|
86367
86343
|
name: "request",
|
|
86368
86344
|
description: `Send authenticated requests to the Salesforce REST API.
|
|
86369
|
-
Authentication is handled automatically using the OAuth 2.0
|
|
86345
|
+
Authentication is handled automatically using the OAuth 2.0 Client Credentials Flow (External Client App or Connected App Consumer Key + Secret). An access token is obtained on each request, so the tool user only provides the API path.
|
|
86370
86346
|
Use this tool for all Salesforce interactions: describing sObjects, running SOQL queries (GET /services/data/vXX.X/query?q=...), reading/creating/updating standard (Account, Contact, Opportunity, Lead, Case) and custom objects.
|
|
86371
86347
|
Prefer SOQL via the /query endpoint for filtered, joined, or aggregated reads rather than paginating /sobjects/{Type} endpoints.`,
|
|
86372
86348
|
inputSchema: inputSchema75,
|
|
@@ -86383,20 +86359,16 @@ Prefer SOQL via the /query endpoint for filtered, joined, or aggregated reads ra
|
|
|
86383
86359
|
`[connector-request] salesforce/${connection.name}: ${method} ${path5}`
|
|
86384
86360
|
);
|
|
86385
86361
|
try {
|
|
86386
|
-
const
|
|
86387
|
-
const password = parameters62.password.getValue(connection);
|
|
86362
|
+
const instanceUrlParam = parameters62.instanceUrl.getValue(connection);
|
|
86388
86363
|
const clientId = parameters62.clientId.getValue(connection);
|
|
86389
86364
|
const clientSecret = parameters62.clientSecret.getValue(connection);
|
|
86390
|
-
const
|
|
86391
|
-
const loginHost = isSandbox ? "https://test.salesforce.com" : "https://login.salesforce.com";
|
|
86365
|
+
const instanceUrl = normalizeInstanceUrl(instanceUrlParam);
|
|
86392
86366
|
const tokenBody = new URLSearchParams({
|
|
86393
|
-
grant_type: "
|
|
86367
|
+
grant_type: "client_credentials",
|
|
86394
86368
|
client_id: clientId,
|
|
86395
|
-
client_secret: clientSecret
|
|
86396
|
-
username,
|
|
86397
|
-
password
|
|
86369
|
+
client_secret: clientSecret
|
|
86398
86370
|
});
|
|
86399
|
-
const tokenRes = await fetch(`${
|
|
86371
|
+
const tokenRes = await fetch(`${instanceUrl}/services/oauth2/token`, {
|
|
86400
86372
|
method: "POST",
|
|
86401
86373
|
headers: {
|
|
86402
86374
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -86411,13 +86383,14 @@ Prefer SOQL via the /query endpoint for filtered, joined, or aggregated reads ra
|
|
|
86411
86383
|
};
|
|
86412
86384
|
}
|
|
86413
86385
|
const tokenJson = await tokenRes.json();
|
|
86414
|
-
if (!tokenJson.access_token
|
|
86386
|
+
if (!tokenJson.access_token) {
|
|
86415
86387
|
return {
|
|
86416
86388
|
success: false,
|
|
86417
|
-
error: "access_token
|
|
86389
|
+
error: "access_token not found in token response"
|
|
86418
86390
|
};
|
|
86419
86391
|
}
|
|
86420
|
-
const
|
|
86392
|
+
const resolvedInstanceUrl = tokenJson.instance_url ?? instanceUrl;
|
|
86393
|
+
const url = `${resolvedInstanceUrl}${path5.startsWith("/") ? "" : "/"}${path5}`;
|
|
86421
86394
|
const controller = new AbortController();
|
|
86422
86395
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS59);
|
|
86423
86396
|
try {
|
|
@@ -86466,7 +86439,7 @@ Prefer SOQL via the /query endpoint for filtered, joined, or aggregated reads ra
|
|
|
86466
86439
|
var tools62 = { request: requestTool47 };
|
|
86467
86440
|
var salesforceConnector = new ConnectorPlugin({
|
|
86468
86441
|
slug: "salesforce",
|
|
86469
|
-
authType: AUTH_TYPES.
|
|
86442
|
+
authType: AUTH_TYPES.API_KEY,
|
|
86470
86443
|
name: "Salesforce",
|
|
86471
86444
|
description: "Connect to Salesforce CRM for accounts, contacts, opportunities, leads, cases, and custom objects via SOQL and the REST API.",
|
|
86472
86445
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6vZlbrUKhxXIiuvWJlb8YB/bbc5e08b88de46c8ed338a74c7d0abb3/salesforce-icon.png",
|
|
@@ -86476,7 +86449,7 @@ var salesforceConnector = new ConnectorPlugin({
|
|
|
86476
86449
|
systemPrompt: {
|
|
86477
86450
|
en: `### Tools
|
|
86478
86451
|
|
|
86479
|
-
- \`salesforce_request\`: The only way to call the Salesforce REST API. Use it to run SOQL queries, describe sObjects, and read/create/update/delete standard (Account, Contact, Opportunity, Lead, Case) and custom objects. Authentication (OAuth 2.0
|
|
86452
|
+
- \`salesforce_request\`: The only way to call the Salesforce REST API. Use it to run SOQL queries, describe sObjects, and read/create/update/delete standard (Account, Contact, Opportunity, Lead, Case) and custom objects. Authentication (OAuth 2.0 Client Credentials Flow against the External Client App / Connected App) is configured automatically \u2014 an access token is resolved on each request against the configured org instance URL. Prefer SOQL via \`GET /services/data/v60.0/query?q=...\` over paginating \`/sobjects/{Type}\` endpoints for filtered or joined reads.
|
|
86480
86453
|
|
|
86481
86454
|
### Business Logic
|
|
86482
86455
|
|
|
@@ -86522,9 +86495,8 @@ export default async function handler(c: Context) {
|
|
|
86522
86495
|
|
|
86523
86496
|
### Salesforce REST API Reference
|
|
86524
86497
|
|
|
86525
|
-
-
|
|
86526
|
-
-
|
|
86527
|
-
- Base path after login: \`{instance_url}/services/data/v60.0\`
|
|
86498
|
+
- Token endpoint: \`POST {instance_url}/services/oauth2/token\` (grant_type=client_credentials + client_id/secret)
|
|
86499
|
+
- Base path: \`{instance_url}/services/data/v60.0\` where instance_url is the org's My Domain URL
|
|
86528
86500
|
- Authentication: Bearer token (handled automatically per request)
|
|
86529
86501
|
- Pagination (SOQL): follow \`nextRecordsUrl\` from the response (absolute path starting with \`/services/data/v60.0/query/...\`)
|
|
86530
86502
|
|
|
@@ -86548,7 +86520,7 @@ export default async function handler(c: Context) {
|
|
|
86548
86520
|
- Parent-to-child subquery: \`SELECT Id, Name, (SELECT Id, Email FROM Contacts) FROM Account\``,
|
|
86549
86521
|
ja: `### \u30C4\u30FC\u30EB
|
|
86550
86522
|
|
|
86551
|
-
- \`salesforce_request\`: Salesforce REST API \u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002SOQL \u30AF\u30A8\u30EA\u306E\u5B9F\u884C\u3001sObject \u306E describe\u3001\u6A19\u6E96\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\uFF08Account, Contact, Opportunity, Lead, Case\uFF09\u3084\u30AB\u30B9\u30BF\u30E0\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\
|
|
86523
|
+
- \`salesforce_request\`: Salesforce REST API \u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002SOQL \u30AF\u30A8\u30EA\u306E\u5B9F\u884C\u3001sObject \u306E describe\u3001\u6A19\u6E96\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\uFF08Account, Contact, Opportunity, Lead, Case\uFF09\u3084\u30AB\u30B9\u30BF\u30E0\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08External Client App / Connected App + OAuth 2.0 Client Credentials Flow\uFF09\u306F\u81EA\u52D5\u3067\u884C\u308F\u308C\u3001\u8A2D\u5B9A\u3055\u308C\u305F\u7D44\u7E54\u306E instance URL \u306B\u5BFE\u3057\u3066\u30EA\u30AF\u30A8\u30B9\u30C8\u3054\u3068\u306B\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u304C\u89E3\u6C7A\u3055\u308C\u307E\u3059\u3002\u30D5\u30A3\u30EB\u30BF\u3084\u7D50\u5408\u306E\u3042\u308B\u8AAD\u307F\u53D6\u308A\u3067\u306F \`/sobjects/{Type}\` \u3092\u30DA\u30FC\u30B8\u30F3\u30B0\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u3001\`GET /services/data/v60.0/query?q=...\` \u306E SOQL \u3092\u512A\u5148\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
86552
86524
|
|
|
86553
86525
|
### Business Logic
|
|
86554
86526
|
|
|
@@ -86594,9 +86566,8 @@ export default async function handler(c: Context) {
|
|
|
86594
86566
|
|
|
86595
86567
|
### Salesforce REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
86596
86568
|
|
|
86597
|
-
- \
|
|
86598
|
-
- \
|
|
86599
|
-
- \u30ED\u30B0\u30A4\u30F3\u5F8C\u306E\u30D9\u30FC\u30B9\u30D1\u30B9: \`{instance_url}/services/data/v60.0\`
|
|
86569
|
+
- \u30C8\u30FC\u30AF\u30F3\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: \`POST {instance_url}/services/oauth2/token\`\uFF08grant_type=client_credentials + client_id/secret\uFF09
|
|
86570
|
+
- \u30D9\u30FC\u30B9\u30D1\u30B9: \`{instance_url}/services/data/v60.0\`\uFF08instance_url \u306F\u7D44\u7E54\u306E My Domain URL\uFF09
|
|
86600
86571
|
- \u8A8D\u8A3C: Bearer \u30C8\u30FC\u30AF\u30F3\uFF08\u30EA\u30AF\u30A8\u30B9\u30C8\u3054\u3068\u306B\u81EA\u52D5\u8A2D\u5B9A\uFF09
|
|
86601
86572
|
- \u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\uFF08SOQL\uFF09: \u30EC\u30B9\u30DD\u30F3\u30B9\u306E \`nextRecordsUrl\`\uFF08\`/services/data/v60.0/query/...\` \u304B\u3089\u59CB\u307E\u308B\u7D76\u5BFE\u30D1\u30B9\uFF09\u3092\u8FBF\u308B
|
|
86602
86573
|
|
|
@@ -86838,7 +86809,7 @@ var influxdbConnector = new ConnectorPlugin({
|
|
|
86838
86809
|
description: "Connect to InfluxDB (Cloud or OSS) to query time-series data with SQL, InfluxQL, or Flux and to write line protocol.",
|
|
86839
86810
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/J1JauVRNmahSVTVrpPfQK/18350d8d3f2dc3be25e8e36ee52914a0/influxdb.png",
|
|
86840
86811
|
parameters: parameters63,
|
|
86841
|
-
releaseFlag: { dev1: true, dev2:
|
|
86812
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
86842
86813
|
onboarding: influxdbOnboarding,
|
|
86843
86814
|
systemPrompt: {
|
|
86844
86815
|
en: `### Variant Detection
|