@squadbase/vite-server 0.1.4-dev.1 → 0.1.5-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +488 -102
- package/dist/connectors/amplitude.js +1 -1
- package/dist/connectors/asana.js +1 -1
- package/dist/connectors/attio.js +1 -1
- package/dist/connectors/backlog-api-key.js +1 -1
- package/dist/connectors/customerio.js +1 -1
- package/dist/connectors/gamma.js +1 -1
- package/dist/connectors/gmail.js +1 -1
- package/dist/connectors/google-docs.js +3 -1
- package/dist/connectors/hubspot.js +1 -1
- package/dist/connectors/intercom.js +1 -1
- package/dist/connectors/jira-api-key.js +1 -1
- package/dist/connectors/kintone-api-token.js +1 -1
- package/dist/connectors/mailchimp.js +1 -1
- package/dist/connectors/mixpanel.js +1 -1
- package/dist/connectors/notion-oauth.js +1 -1
- package/dist/connectors/notion.js +1 -1
- package/dist/connectors/salesforce.d.ts +5 -0
- package/dist/connectors/salesforce.js +862 -0
- package/dist/connectors/sentry.js +1 -1
- package/dist/connectors/stripe-api-key.js +1 -1
- package/dist/connectors/zendesk.js +1 -1
- package/dist/index.js +488 -102
- package/dist/main.js +488 -102
- package/dist/vite-plugin.js +488 -102
- package/package.json +5 -1
package/dist/vite-plugin.js
CHANGED
|
@@ -18863,14 +18863,14 @@ var init_NormalizedSchema = __esm({
|
|
|
18863
18863
|
throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
18864
18864
|
}
|
|
18865
18865
|
const struct = this.getSchema();
|
|
18866
|
-
const
|
|
18866
|
+
const z79 = struct[4].length;
|
|
18867
18867
|
let it = struct[anno.it];
|
|
18868
|
-
if (it &&
|
|
18868
|
+
if (it && z79 === it.length) {
|
|
18869
18869
|
yield* it;
|
|
18870
18870
|
return;
|
|
18871
18871
|
}
|
|
18872
|
-
it = Array(
|
|
18873
|
-
for (let i6 = 0; i6 <
|
|
18872
|
+
it = Array(z79);
|
|
18873
|
+
for (let i6 = 0; i6 < z79; ++i6) {
|
|
18874
18874
|
const k6 = struct[4][i6];
|
|
18875
18875
|
const v7 = member([struct[5][i6], 0], k6);
|
|
18876
18876
|
yield it[i6] = [k6, v7];
|
|
@@ -19546,12 +19546,12 @@ var init_split_header = __esm({
|
|
|
19546
19546
|
"../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js"() {
|
|
19547
19547
|
"use strict";
|
|
19548
19548
|
splitHeader = (value) => {
|
|
19549
|
-
const
|
|
19549
|
+
const z79 = value.length;
|
|
19550
19550
|
const values = [];
|
|
19551
19551
|
let withinQuotes = false;
|
|
19552
19552
|
let prevChar = void 0;
|
|
19553
19553
|
let anchor = 0;
|
|
19554
|
-
for (let i6 = 0; i6 <
|
|
19554
|
+
for (let i6 = 0; i6 < z79; ++i6) {
|
|
19555
19555
|
const char = value[i6];
|
|
19556
19556
|
switch (char) {
|
|
19557
19557
|
case `"`:
|
|
@@ -19572,12 +19572,12 @@ var init_split_header = __esm({
|
|
|
19572
19572
|
values.push(value.slice(anchor));
|
|
19573
19573
|
return values.map((v7) => {
|
|
19574
19574
|
v7 = v7.trim();
|
|
19575
|
-
const
|
|
19576
|
-
if (
|
|
19575
|
+
const z80 = v7.length;
|
|
19576
|
+
if (z80 < 2) {
|
|
19577
19577
|
return v7;
|
|
19578
19578
|
}
|
|
19579
|
-
if (v7[0] === `"` && v7[
|
|
19580
|
-
v7 = v7.slice(1,
|
|
19579
|
+
if (v7[0] === `"` && v7[z80 - 1] === `"`) {
|
|
19580
|
+
v7 = v7.slice(1, z80 - 1);
|
|
19581
19581
|
}
|
|
19582
19582
|
return v7.replace(/\\"/g, '"');
|
|
19583
19583
|
});
|
|
@@ -20975,11 +20975,11 @@ var init_EndpointCache = __esm({
|
|
|
20975
20975
|
}
|
|
20976
20976
|
hash(endpointParams) {
|
|
20977
20977
|
let buffer = "";
|
|
20978
|
-
const { parameters:
|
|
20979
|
-
if (
|
|
20978
|
+
const { parameters: parameters63 } = this;
|
|
20979
|
+
if (parameters63.length === 0) {
|
|
20980
20980
|
return false;
|
|
20981
20981
|
}
|
|
20982
|
-
for (const param of
|
|
20982
|
+
for (const param of parameters63) {
|
|
20983
20983
|
const val = String(endpointParams[param] ?? "");
|
|
20984
20984
|
if (val.includes("|;")) {
|
|
20985
20985
|
return false;
|
|
@@ -21696,15 +21696,15 @@ var init_resolveEndpoint = __esm({
|
|
|
21696
21696
|
init_utils();
|
|
21697
21697
|
resolveEndpoint = (ruleSetObject, options) => {
|
|
21698
21698
|
const { endpointParams, logger: logger2 } = options;
|
|
21699
|
-
const { parameters:
|
|
21699
|
+
const { parameters: parameters63, rules } = ruleSetObject;
|
|
21700
21700
|
options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
|
|
21701
|
-
const paramsWithDefault = Object.entries(
|
|
21701
|
+
const paramsWithDefault = Object.entries(parameters63).filter(([, v7]) => v7.default != null).map(([k6, v7]) => [k6, v7.default]);
|
|
21702
21702
|
if (paramsWithDefault.length > 0) {
|
|
21703
21703
|
for (const [paramKey, paramDefaultValue] of paramsWithDefault) {
|
|
21704
21704
|
endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
|
|
21705
21705
|
}
|
|
21706
21706
|
}
|
|
21707
|
-
const requiredParams = Object.entries(
|
|
21707
|
+
const requiredParams = Object.entries(parameters63).filter(([, v7]) => v7.required).map(([k6]) => k6);
|
|
21708
21708
|
for (const requiredParam of requiredParams) {
|
|
21709
21709
|
if (endpointParams[requiredParam] == null) {
|
|
21710
21710
|
throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
|
|
@@ -27314,8 +27314,8 @@ var init_ProtocolLib = __esm({
|
|
|
27314
27314
|
constructor(queryCompat = false) {
|
|
27315
27315
|
this.queryCompat = queryCompat;
|
|
27316
27316
|
}
|
|
27317
|
-
resolveRestContentType(defaultContentType,
|
|
27318
|
-
const members =
|
|
27317
|
+
resolveRestContentType(defaultContentType, inputSchema76) {
|
|
27318
|
+
const members = inputSchema76.getMemberSchemas();
|
|
27319
27319
|
const httpPayloadMember = Object.values(members).find((m6) => {
|
|
27320
27320
|
return !!m6.getMergedTraits().httpPayload;
|
|
27321
27321
|
});
|
|
@@ -27330,7 +27330,7 @@ var init_ProtocolLib = __esm({
|
|
|
27330
27330
|
} else {
|
|
27331
27331
|
return defaultContentType;
|
|
27332
27332
|
}
|
|
27333
|
-
} else if (!
|
|
27333
|
+
} else if (!inputSchema76.isUnitSchema()) {
|
|
27334
27334
|
const hasBody = Object.values(members).find((m6) => {
|
|
27335
27335
|
const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m6.getMergedTraits();
|
|
27336
27336
|
const noPrefixHeaders = httpPrefixHeaders === void 0;
|
|
@@ -28173,9 +28173,9 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
28173
28173
|
}
|
|
28174
28174
|
async serializeRequest(operationSchema, input, context) {
|
|
28175
28175
|
const request2 = await super.serializeRequest(operationSchema, input, context);
|
|
28176
|
-
const
|
|
28176
|
+
const inputSchema76 = NormalizedSchema.of(operationSchema.input);
|
|
28177
28177
|
if (!request2.headers["content-type"]) {
|
|
28178
|
-
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(),
|
|
28178
|
+
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema76);
|
|
28179
28179
|
if (contentType) {
|
|
28180
28180
|
request2.headers["content-type"] = contentType;
|
|
28181
28181
|
}
|
|
@@ -28187,8 +28187,8 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
28187
28187
|
}
|
|
28188
28188
|
async deserializeResponse(operationSchema, context, response) {
|
|
28189
28189
|
const output = await super.deserializeResponse(operationSchema, context, response);
|
|
28190
|
-
const
|
|
28191
|
-
for (const [name, member2] of
|
|
28190
|
+
const outputSchema76 = NormalizedSchema.of(operationSchema.output);
|
|
28191
|
+
for (const [name, member2] of outputSchema76.structIterator()) {
|
|
28192
28192
|
if (member2.getMemberTraits().httpPayload && !(name in output)) {
|
|
28193
28193
|
output[name] = null;
|
|
28194
28194
|
}
|
|
@@ -32052,22 +32052,22 @@ var init_loadCognitoIdentity = __esm({
|
|
|
32052
32052
|
});
|
|
32053
32053
|
|
|
32054
32054
|
// ../../node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/fromCognitoIdentity.js
|
|
32055
|
-
function fromCognitoIdentity(
|
|
32055
|
+
function fromCognitoIdentity(parameters63) {
|
|
32056
32056
|
return async (awsIdentityProperties) => {
|
|
32057
|
-
|
|
32057
|
+
parameters63.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");
|
|
32058
32058
|
const { GetCredentialsForIdentityCommand: GetCredentialsForIdentityCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));
|
|
32059
|
-
const fromConfigs = (property) =>
|
|
32060
|
-
const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(
|
|
32059
|
+
const fromConfigs = (property) => parameters63.clientConfig?.[property] ?? parameters63.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property];
|
|
32060
|
+
const { Credentials: { AccessKeyId = throwOnMissingAccessKeyId(parameters63.logger), Expiration, SecretKey = throwOnMissingSecretKey(parameters63.logger), SessionToken } = throwOnMissingCredentials(parameters63.logger) } = await (parameters63.client ?? new CognitoIdentityClient2(Object.assign({}, parameters63.clientConfig ?? {}, {
|
|
32061
32061
|
region: fromConfigs("region"),
|
|
32062
32062
|
profile: fromConfigs("profile"),
|
|
32063
32063
|
userAgentAppId: fromConfigs("userAgentAppId")
|
|
32064
32064
|
}))).send(new GetCredentialsForIdentityCommand2({
|
|
32065
|
-
CustomRoleArn:
|
|
32066
|
-
IdentityId:
|
|
32067
|
-
Logins:
|
|
32065
|
+
CustomRoleArn: parameters63.customRoleArn,
|
|
32066
|
+
IdentityId: parameters63.identityId,
|
|
32067
|
+
Logins: parameters63.logins ? await resolveLogins(parameters63.logins) : void 0
|
|
32068
32068
|
}));
|
|
32069
32069
|
return {
|
|
32070
|
-
identityId:
|
|
32070
|
+
identityId: parameters63.identityId,
|
|
32071
32071
|
accessKeyId: AccessKeyId,
|
|
32072
32072
|
secretAccessKey: SecretKey,
|
|
32073
32073
|
sessionToken: SessionToken,
|
|
@@ -44628,11 +44628,11 @@ var require_bignumber = __commonJS({
|
|
|
44628
44628
|
return n6 > 0 || n6 === i6 ? i6 : i6 - 1;
|
|
44629
44629
|
}
|
|
44630
44630
|
function coeffToString(a6) {
|
|
44631
|
-
var s6,
|
|
44631
|
+
var s6, z79, i6 = 1, j6 = a6.length, r6 = a6[0] + "";
|
|
44632
44632
|
for (; i6 < j6; ) {
|
|
44633
44633
|
s6 = a6[i6++] + "";
|
|
44634
|
-
|
|
44635
|
-
for (;
|
|
44634
|
+
z79 = LOG_BASE - s6.length;
|
|
44635
|
+
for (; z79--; s6 = "0" + s6) ;
|
|
44636
44636
|
r6 += s6;
|
|
44637
44637
|
}
|
|
44638
44638
|
for (j6 = r6.length; r6.charCodeAt(--j6) === 48; ) ;
|
|
@@ -44665,15 +44665,15 @@ var require_bignumber = __commonJS({
|
|
|
44665
44665
|
function toExponential(str, e6) {
|
|
44666
44666
|
return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e6 < 0 ? "e" : "e+") + e6;
|
|
44667
44667
|
}
|
|
44668
|
-
function toFixedPoint(str, e6,
|
|
44668
|
+
function toFixedPoint(str, e6, z79) {
|
|
44669
44669
|
var len, zs;
|
|
44670
44670
|
if (e6 < 0) {
|
|
44671
|
-
for (zs =
|
|
44671
|
+
for (zs = z79 + "."; ++e6; zs += z79) ;
|
|
44672
44672
|
str = zs + str;
|
|
44673
44673
|
} else {
|
|
44674
44674
|
len = str.length;
|
|
44675
44675
|
if (++e6 > len) {
|
|
44676
|
-
for (zs =
|
|
44676
|
+
for (zs = z79, e6 -= len; --e6; zs += z79) ;
|
|
44677
44677
|
str += zs;
|
|
44678
44678
|
} else if (e6 < len) {
|
|
44679
44679
|
str = str.slice(0, e6) + "." + str.slice(e6);
|
|
@@ -72100,7 +72100,9 @@ Authentication is handled automatically via OAuth proxy.`,
|
|
|
72100
72100
|
});
|
|
72101
72101
|
const data = await response.json();
|
|
72102
72102
|
if (!response.ok) {
|
|
72103
|
-
const
|
|
72103
|
+
const googleError = data?.error && typeof data.error === "object" ? data.error : null;
|
|
72104
|
+
const googleErrorMessage = googleError && typeof googleError.message === "string" ? googleError.status && typeof googleError.status === "string" ? `${googleError.status}: ${googleError.message}` : googleError.message : null;
|
|
72105
|
+
const errorMessage = googleErrorMessage ?? (typeof data?.error === "string" ? data.error : typeof data?.message === "string" ? data.message : `HTTP ${response.status} ${response.statusText}`);
|
|
72104
72106
|
return { success: false, error: errorMessage };
|
|
72105
72107
|
}
|
|
72106
72108
|
return { success: true, status: response.status, data };
|
|
@@ -74088,7 +74090,7 @@ var stripeApiKeyConnector = new ConnectorPlugin({
|
|
|
74088
74090
|
description: "Connect to Stripe for payment, customer, and subscription data using a Secret API Key or Restricted API Key.",
|
|
74089
74091
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2QNK0u2doqp41uL0POS4Ks/7a92367e2388ec77c7f4ada143606f9a/stripe.jpeg",
|
|
74090
74092
|
parameters: parameters22,
|
|
74091
|
-
releaseFlag: { dev1: true, dev2:
|
|
74093
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
74092
74094
|
onboarding: stripeApiKeyOnboarding,
|
|
74093
74095
|
systemPrompt: {
|
|
74094
74096
|
en: `### Tools
|
|
@@ -74979,7 +74981,7 @@ var kintoneApiTokenConnector = new ConnectorPlugin({
|
|
|
74979
74981
|
description: "Connect to kintone for business application data retrieval and analytics using API token authentication.",
|
|
74980
74982
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/76nPGMJFZkMFE3UQNo2JFy/e71dc5f5d5cec1306ce0e17aafbfd9f0/kintone.png",
|
|
74981
74983
|
parameters: parameters25,
|
|
74982
|
-
releaseFlag: { dev1: true, dev2:
|
|
74984
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
74983
74985
|
onboarding: kintoneApiTokenOnboarding,
|
|
74984
74986
|
systemPrompt: {
|
|
74985
74987
|
en: `### Tools
|
|
@@ -76317,7 +76319,7 @@ var amplitudeConnector = new ConnectorPlugin({
|
|
|
76317
76319
|
description: "Connect to Amplitude for product analytics and user behavior data.",
|
|
76318
76320
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2UBJSdRlFJaLq52WUCTBEB/308b59b374cf6c662ac70989860bffd7/amplitude-icon.svg",
|
|
76319
76321
|
parameters: parameters32,
|
|
76320
|
-
releaseFlag: { dev1: true, dev2:
|
|
76322
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
76321
76323
|
onboarding: amplitudeOnboarding,
|
|
76322
76324
|
systemPrompt: {
|
|
76323
76325
|
en: `### Tools
|
|
@@ -76570,7 +76572,7 @@ var attioConnector = new ConnectorPlugin({
|
|
|
76570
76572
|
description: "Connect to Attio for CRM data and relationship intelligence.",
|
|
76571
76573
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2qqx99vvXJojUM3tSrSWPX/1e7c35e13da6b365b8b475c1effe568f/attio.svg",
|
|
76572
76574
|
parameters: parameters33,
|
|
76573
|
-
releaseFlag: { dev1: true, dev2:
|
|
76575
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
76574
76576
|
onboarding: attioOnboarding,
|
|
76575
76577
|
systemPrompt: {
|
|
76576
76578
|
en: `### Tools
|
|
@@ -77587,7 +77589,7 @@ var hubspotConnector = new ConnectorPlugin({
|
|
|
77587
77589
|
description: "Connect to HubSpot CRM for contacts, deals, companies, and marketing data using a Personal Access Key.",
|
|
77588
77590
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5UcSkKkzhUMA4RsM45ynuo/43b967e36915ca0fc5d277684b204320/hubspot.svg",
|
|
77589
77591
|
parameters: parameters36,
|
|
77590
|
-
releaseFlag: { dev1: true, dev2:
|
|
77592
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
77591
77593
|
onboarding: hubspotOnboarding2,
|
|
77592
77594
|
systemPrompt: {
|
|
77593
77595
|
en: `### Tools
|
|
@@ -77855,7 +77857,7 @@ var jiraConnector = new ConnectorPlugin({
|
|
|
77855
77857
|
description: "Connect to Jira Cloud for issue tracking, project management, and workflow data retrieval using API token authentication.",
|
|
77856
77858
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/5zt4yjb36szSPPkCECYlPL/bc3e7223dc84fb16a1cce53a80f5afcc/jira.png",
|
|
77857
77859
|
parameters: parameters37,
|
|
77858
|
-
releaseFlag: { dev1: true, dev2:
|
|
77860
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
77859
77861
|
onboarding: jiraOnboarding,
|
|
77860
77862
|
systemPrompt: {
|
|
77861
77863
|
en: `### Tools
|
|
@@ -78130,7 +78132,7 @@ var linearConnector = new ConnectorPlugin({
|
|
|
78130
78132
|
description: "Connect to Linear for project management data \u2014 issues, projects, teams, cycles, and more.",
|
|
78131
78133
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6oR77h6TeniXGdmnp2P2LX/a2ac8630ae52d164363adb0c695d9f0b/linear.webp",
|
|
78132
78134
|
parameters: parameters38,
|
|
78133
|
-
releaseFlag: { dev1: true, dev2:
|
|
78135
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
78134
78136
|
onboarding: linearOnboarding,
|
|
78135
78137
|
systemPrompt: {
|
|
78136
78138
|
en: `### Tools
|
|
@@ -78392,7 +78394,7 @@ var asanaConnector = new ConnectorPlugin({
|
|
|
78392
78394
|
description: "Connect to Asana for project management, task tracking, and team collaboration data.",
|
|
78393
78395
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/3eIdaoqzIIZs2Md0OoDJMf/2fa66e0841adb985da4d3120466f3ec4/asana-icon.png",
|
|
78394
78396
|
parameters: parameters39,
|
|
78395
|
-
releaseFlag: { dev1: true, dev2:
|
|
78397
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
78396
78398
|
onboarding: asanaOnboarding,
|
|
78397
78399
|
systemPrompt: {
|
|
78398
78400
|
en: `### Tools
|
|
@@ -78717,7 +78719,7 @@ var clickhouseConnector = new ConnectorPlugin({
|
|
|
78717
78719
|
description: "Connect to ClickHouse for high-performance columnar analytics and real-time data processing.",
|
|
78718
78720
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/MencimqP92UmucqstLl51/d9f2b6160206f5454b26e223a763ab8f/clickhouse.png",
|
|
78719
78721
|
parameters: parameters40,
|
|
78720
|
-
releaseFlag: { dev1: true, dev2:
|
|
78722
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
78721
78723
|
onboarding: clickhouseOnboarding,
|
|
78722
78724
|
systemPrompt: {
|
|
78723
78725
|
en: `### Tools
|
|
@@ -79125,7 +79127,7 @@ var mongodbConnector = new ConnectorPlugin({
|
|
|
79125
79127
|
description: "Connect to MongoDB for document-oriented data storage and querying.",
|
|
79126
79128
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/48JSUx9HE6oSa9JrHGg2E1/12b4cac65924cac3641d4bafcef37dbe/mongodb-icon.webp",
|
|
79127
79129
|
parameters: parameters41,
|
|
79128
|
-
releaseFlag: { dev1: true, dev2:
|
|
79130
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
79129
79131
|
onboarding: mongodbOnboarding,
|
|
79130
79132
|
systemPrompt: {
|
|
79131
79133
|
en: `### Tools
|
|
@@ -79309,7 +79311,7 @@ var notionConnector = new ConnectorPlugin({
|
|
|
79309
79311
|
description: "Connect to Notion to query databases, pages, and workspace content using an Internal Integration Token.",
|
|
79310
79312
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/797V5GDDTA8bsfKUHBCoQO/290ec49b70b68ddb4acd3bf0a6ab8bda/notion-icon.webp",
|
|
79311
79313
|
parameters: parameters42,
|
|
79312
|
-
releaseFlag: { dev1: true, dev2:
|
|
79314
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
79313
79315
|
onboarding: notionOnboarding,
|
|
79314
79316
|
systemPrompt: {
|
|
79315
79317
|
en: `### Tools
|
|
@@ -79625,7 +79627,7 @@ var notionOauthConnector = new ConnectorPlugin({
|
|
|
79625
79627
|
description: "Connect to Notion to query databases, pages, and workspace content using OAuth.",
|
|
79626
79628
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/797V5GDDTA8bsfKUHBCoQO/290ec49b70b68ddb4acd3bf0a6ab8bda/notion-icon.webp",
|
|
79627
79629
|
parameters: parameters43,
|
|
79628
|
-
releaseFlag: { dev1: true, dev2:
|
|
79630
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
79629
79631
|
onboarding: notionOauthOnboarding,
|
|
79630
79632
|
proxyPolicy: {
|
|
79631
79633
|
allowlist: [
|
|
@@ -81238,7 +81240,7 @@ var mailchimpConnector = new ConnectorPlugin({
|
|
|
81238
81240
|
description: "Connect to Mailchimp for email marketing, audiences, campaigns, and analytics.",
|
|
81239
81241
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/19Rac6B8eGiLpQb4lKMbG3/10f567f85572aeb16f2ee6aaa6602987/mailchimp.png",
|
|
81240
81242
|
parameters: parameters47,
|
|
81241
|
-
releaseFlag: { dev1: true, dev2:
|
|
81243
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
81242
81244
|
onboarding: mailchimpOnboarding,
|
|
81243
81245
|
systemPrompt: {
|
|
81244
81246
|
en: `### Tools
|
|
@@ -81884,7 +81886,7 @@ var customerioConnector = new ConnectorPlugin({
|
|
|
81884
81886
|
description: "Connect to Customer.io App API for reading customer data, managing campaigns, segments, and sending transactional messages.",
|
|
81885
81887
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/nngohabT7oHDIgQYAVBpz/6f6c7662ef4692eb9869e3e69dd57114/customerio.png",
|
|
81886
81888
|
parameters: parameters49,
|
|
81887
|
-
releaseFlag: { dev1: true, dev2:
|
|
81889
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
81888
81890
|
onboarding: customerioOnboarding,
|
|
81889
81891
|
systemPrompt: {
|
|
81890
81892
|
en: `### Tools
|
|
@@ -82260,7 +82262,7 @@ var gmailConnector = new ConnectorPlugin({
|
|
|
82260
82262
|
description: "Connect to Gmail for email data access using a service account with domain-wide delegation. Read-only access to messages, threads, and labels.",
|
|
82261
82263
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4V3rfaSc1ksFIt2eHBNIwJ/7f3be41a154a6d96dcf229ed0e5858c9/Gmail_icon__2020_.svg.png",
|
|
82262
82264
|
parameters: parameters50,
|
|
82263
|
-
releaseFlag: { dev1: true, dev2:
|
|
82265
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
82264
82266
|
onboarding: gmailOnboarding,
|
|
82265
82267
|
systemPrompt: {
|
|
82266
82268
|
en: `### Tools
|
|
@@ -83529,7 +83531,7 @@ var zendeskConnector = new ConnectorPlugin({
|
|
|
83529
83531
|
description: "Connect to Zendesk Support for tickets, users, organizations, and customer service data using an API token.",
|
|
83530
83532
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7e9Q7PwV6MJRJMj543m2gl/55385fae903ccfa1599e35be9d3516aa/zendesk-icon.svg",
|
|
83531
83533
|
parameters: parameters53,
|
|
83532
|
-
releaseFlag: { dev1: true, dev2:
|
|
83534
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
83533
83535
|
onboarding: zendeskOnboarding,
|
|
83534
83536
|
systemPrompt: {
|
|
83535
83537
|
en: `### Tools
|
|
@@ -84152,7 +84154,7 @@ var intercomConnector = new ConnectorPlugin({
|
|
|
84152
84154
|
description: "Connect to Intercom for contacts, conversations, companies, and customer engagement data using an Access Token.",
|
|
84153
84155
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/sb2cRMGClpId0LKiSqsok/ae90a0849f21ffe3faf73e04a5676b45/intercom.svg",
|
|
84154
84156
|
parameters: parameters55,
|
|
84155
|
-
releaseFlag: { dev1: true, dev2:
|
|
84157
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
84156
84158
|
onboarding: intercomOnboarding,
|
|
84157
84159
|
systemPrompt: {
|
|
84158
84160
|
en: `### Tools
|
|
@@ -84872,7 +84874,7 @@ var mixpanelConnector = new ConnectorPlugin({
|
|
|
84872
84874
|
description: "Connect to Mixpanel for product analytics, event tracking, and user behavior analysis.",
|
|
84873
84875
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/7ykz0vNRjMqvTVrxS8wsj1/b2cd795be5b373877dee77cc6147c758/images__3_.png",
|
|
84874
84876
|
parameters: parameters57,
|
|
84875
|
-
releaseFlag: { dev1: true, dev2:
|
|
84877
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
84876
84878
|
onboarding: mixpanelOnboarding,
|
|
84877
84879
|
systemPrompt: {
|
|
84878
84880
|
en: `### Tools
|
|
@@ -85367,7 +85369,7 @@ var backlogConnector = new ConnectorPlugin({
|
|
|
85367
85369
|
description: "Connect to Nulab Backlog for project management, issue tracking, and wiki data retrieval using API key authentication.",
|
|
85368
85370
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6KcVBGf3mUHnuCOQgQMvtT/e8558c7990e40e3be46948e9476190fb/backlog-favicon.svg",
|
|
85369
85371
|
parameters: parameters59,
|
|
85370
|
-
releaseFlag: { dev1: true, dev2: true, prod:
|
|
85372
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
85371
85373
|
onboarding: backlogOnboarding,
|
|
85372
85374
|
systemPrompt: {
|
|
85373
85375
|
en: `### Tools
|
|
@@ -85805,7 +85807,7 @@ var gammaConnector = new ConnectorPlugin({
|
|
|
85805
85807
|
description: "Connect to Gamma for AI-powered presentation, document, webpage, and social post generation.",
|
|
85806
85808
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/KoMGPpPcgtB9oDYe1OBjS/1ba7eb061c4497106bf6d249866dc471/gamma.svg",
|
|
85807
85809
|
parameters: parameters60,
|
|
85808
|
-
releaseFlag: { dev1: true, dev2:
|
|
85810
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
85809
85811
|
onboarding: gammaOnboarding,
|
|
85810
85812
|
systemPrompt: {
|
|
85811
85813
|
en: `### Tools
|
|
@@ -86085,7 +86087,7 @@ var sentryConnector = new ConnectorPlugin({
|
|
|
86085
86087
|
description: "Connect to Sentry for error tracking and performance monitoring data.",
|
|
86086
86088
|
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/4B8ZEGFGjTeMWNnXQb1dAL/ac10f813f02353f5b0cbe64fb5c06d8f/sentry.svg",
|
|
86087
86089
|
parameters: parameters61,
|
|
86088
|
-
releaseFlag: { dev1: true, dev2:
|
|
86090
|
+
releaseFlag: { dev1: true, dev2: true, prod: true },
|
|
86089
86091
|
onboarding: sentryOnboarding,
|
|
86090
86092
|
systemPrompt: {
|
|
86091
86093
|
en: `### Tools
|
|
@@ -86289,6 +86291,389 @@ await sentry.updateIssue("12345", { status: "resolved" });
|
|
|
86289
86291
|
}
|
|
86290
86292
|
});
|
|
86291
86293
|
|
|
86294
|
+
// ../connectors/src/connectors/salesforce/setup.ts
|
|
86295
|
+
var salesforceOnboarding = new ConnectorOnboarding({
|
|
86296
|
+
connectionSetupInstructions: {
|
|
86297
|
+
en: `#### Create a Connected App in Salesforce
|
|
86298
|
+
1. In Salesforce Setup, go to App Manager \u2192 New Connected App
|
|
86299
|
+
2. Under API (Enable OAuth Settings), check "Enable OAuth Settings"
|
|
86300
|
+
3. Add OAuth scopes: "Manage user data via APIs (api)" and "Perform requests at any time (refresh_token, offline_access)"
|
|
86301
|
+
4. Save and note the Consumer Key (client_id) and Consumer Secret (client_secret)
|
|
86302
|
+
|
|
86303
|
+
#### Allow Username-Password Flow
|
|
86304
|
+
1. Go to Setup \u2192 Identity \u2192 OAuth and OpenID Connect Settings
|
|
86305
|
+
2. Enable "Allow OAuth Username-Password Flows"
|
|
86306
|
+
|
|
86307
|
+
#### Reset your Security Token
|
|
86308
|
+
1. Go to Settings \u2192 My Personal Information \u2192 Reset My Security Token
|
|
86309
|
+
2. Salesforce emails you a new security token \u2014 append it to your password when entering the Password parameter (password + securityToken)
|
|
86310
|
+
|
|
86311
|
+
#### Sandbox vs Production
|
|
86312
|
+
- Leave Use Sandbox as "false" (or empty) to connect to production (login.salesforce.com)
|
|
86313
|
+
- Set Use Sandbox to "true" to connect to a sandbox (test.salesforce.com)`,
|
|
86314
|
+
ja: `#### Salesforce \u3067 Connected App \u3092\u4F5C\u6210
|
|
86315
|
+
1. Setup \u2192 App Manager \u2192 New Connected App
|
|
86316
|
+
2. API (Enable OAuth Settings) \u30BB\u30AF\u30B7\u30E7\u30F3\u3067 "Enable OAuth Settings" \u3092\u6709\u52B9\u5316
|
|
86317
|
+
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
|
|
86318
|
+
4. \u4FDD\u5B58\u5F8C\u3001Consumer Key (client_id) \u3068 Consumer Secret (client_secret) \u3092\u63A7\u3048\u308B
|
|
86319
|
+
|
|
86320
|
+
#### Username-Password Flow \u3092\u8A31\u53EF
|
|
86321
|
+
1. Setup \u2192 Identity \u2192 OAuth and OpenID Connect Settings
|
|
86322
|
+
2. "Allow OAuth Username-Password Flows" \u3092\u6709\u52B9\u5316
|
|
86323
|
+
|
|
86324
|
+
#### Security Token \u306E\u767A\u884C
|
|
86325
|
+
1. \u500B\u4EBA\u8A2D\u5B9A \u2192 My Personal Information \u2192 Reset My Security Token
|
|
86326
|
+
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
|
|
86327
|
+
|
|
86328
|
+
#### Sandbox / Production
|
|
86329
|
+
- \u672C\u756A (login.salesforce.com) \u306E\u5834\u5408: Use Sandbox \u3092 "false" \u307E\u305F\u306F\u672A\u5165\u529B
|
|
86330
|
+
- Sandbox (test.salesforce.com) \u306E\u5834\u5408: Use Sandbox \u3092 "true" \u306B\u8A2D\u5B9A`
|
|
86331
|
+
},
|
|
86332
|
+
dataOverviewInstructions: {
|
|
86333
|
+
en: `1. Call salesforce_request with GET /services/data/v60.0/sobjects/ to list available sObjects (standard + custom)
|
|
86334
|
+
2. Call salesforce_request with GET /services/data/v60.0/sobjects/Account/describe to inspect Account fields; repeat for Contact, Opportunity, Lead as needed
|
|
86335
|
+
3. Run a sample SOQL query: GET /services/data/v60.0/query?q=SELECT+Id,Name,Industry+FROM+Account+LIMIT+5 to verify access and explore data`,
|
|
86336
|
+
ja: `1. salesforce_request \u3067 GET /services/data/v60.0/sobjects/ \u3092\u547C\u3073\u51FA\u3057\u3001\u5229\u7528\u53EF\u80FD\u306A sObject\uFF08\u6A19\u6E96 + \u30AB\u30B9\u30BF\u30E0\uFF09\u3092\u4E00\u89A7\u53D6\u5F97
|
|
86337
|
+
2. salesforce_request \u3067 GET /services/data/v60.0/sobjects/Account/describe \u3092\u547C\u3073\u51FA\u3057 Account \u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u78BA\u8A8D\u3002Contact / Opportunity / Lead \u306A\u3069\u5FC5\u8981\u306A sObject \u306B\u5BFE\u3057\u3066\u540C\u69D8\u306B\u5B9F\u884C
|
|
86338
|
+
3. \u30B5\u30F3\u30D7\u30EB SOQL \u3092\u5B9F\u884C: GET /services/data/v60.0/query?q=SELECT+Id,Name,Industry+FROM+Account+LIMIT+5 \u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u5426\u3068\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u78BA\u8A8D`
|
|
86339
|
+
}
|
|
86340
|
+
});
|
|
86341
|
+
|
|
86342
|
+
// ../connectors/src/connectors/salesforce/parameters.ts
|
|
86343
|
+
var parameters62 = {
|
|
86344
|
+
username: new ParameterDefinition({
|
|
86345
|
+
slug: "username",
|
|
86346
|
+
name: "Username",
|
|
86347
|
+
description: "Your Salesforce account username (the email you use to sign in).",
|
|
86348
|
+
envVarBaseKey: "SALESFORCE_USERNAME",
|
|
86349
|
+
type: "text",
|
|
86350
|
+
secret: false,
|
|
86351
|
+
required: true
|
|
86352
|
+
}),
|
|
86353
|
+
password: new ParameterDefinition({
|
|
86354
|
+
slug: "password",
|
|
86355
|
+
name: "Password",
|
|
86356
|
+
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.",
|
|
86357
|
+
envVarBaseKey: "SALESFORCE_PASSWORD",
|
|
86358
|
+
type: "text",
|
|
86359
|
+
secret: true,
|
|
86360
|
+
required: true
|
|
86361
|
+
}),
|
|
86362
|
+
clientId: new ParameterDefinition({
|
|
86363
|
+
slug: "client-id",
|
|
86364
|
+
name: "Consumer Key",
|
|
86365
|
+
description: "The Consumer Key (client_id) of your Salesforce Connected App. Enable OAuth Settings and 'Allow OAuth Username-Password Flows' in your org's identity settings.",
|
|
86366
|
+
envVarBaseKey: "SALESFORCE_CLIENT_ID",
|
|
86367
|
+
type: "text",
|
|
86368
|
+
secret: false,
|
|
86369
|
+
required: true
|
|
86370
|
+
}),
|
|
86371
|
+
clientSecret: new ParameterDefinition({
|
|
86372
|
+
slug: "client-secret",
|
|
86373
|
+
name: "Consumer Secret",
|
|
86374
|
+
description: "The Consumer Secret (client_secret) of your Salesforce Connected App.",
|
|
86375
|
+
envVarBaseKey: "SALESFORCE_CLIENT_SECRET",
|
|
86376
|
+
type: "text",
|
|
86377
|
+
secret: true,
|
|
86378
|
+
required: true
|
|
86379
|
+
}),
|
|
86380
|
+
isSandbox: new ParameterDefinition({
|
|
86381
|
+
slug: "is-sandbox",
|
|
86382
|
+
name: "Use Sandbox",
|
|
86383
|
+
description: 'Set to "true" to authenticate against a Salesforce sandbox (test.salesforce.com) instead of production (login.salesforce.com). Defaults to "false".',
|
|
86384
|
+
envVarBaseKey: "SALESFORCE_IS_SANDBOX",
|
|
86385
|
+
type: "text",
|
|
86386
|
+
secret: false,
|
|
86387
|
+
required: false
|
|
86388
|
+
})
|
|
86389
|
+
};
|
|
86390
|
+
|
|
86391
|
+
// ../connectors/src/connectors/salesforce/tools/request.ts
|
|
86392
|
+
import { z as z77 } from "zod";
|
|
86393
|
+
var REQUEST_TIMEOUT_MS59 = 6e4;
|
|
86394
|
+
var inputSchema75 = z77.object({
|
|
86395
|
+
toolUseIntent: z77.string().optional().describe(
|
|
86396
|
+
"Brief description of what you intend to accomplish with this tool call"
|
|
86397
|
+
),
|
|
86398
|
+
connectionId: z77.string().describe("ID of the Salesforce connection to use"),
|
|
86399
|
+
method: z77.enum(["GET", "POST", "PATCH", "DELETE"]).describe(
|
|
86400
|
+
"HTTP method. GET for reading resources and SOQL queries, POST for creating, PATCH for updating, DELETE for removing."
|
|
86401
|
+
),
|
|
86402
|
+
path: z77.string().describe(
|
|
86403
|
+
"API path appended to the instance URL (e.g., '/services/data/v60.0/sobjects/Account', '/services/data/v60.0/query?q=SELECT+Id,Name+FROM+Account+LIMIT+5'). Always start the path with '/services/data/'."
|
|
86404
|
+
),
|
|
86405
|
+
body: z77.record(z77.string(), z77.unknown()).optional().describe("Request body (JSON) for POST/PATCH requests")
|
|
86406
|
+
});
|
|
86407
|
+
var outputSchema75 = z77.discriminatedUnion("success", [
|
|
86408
|
+
z77.object({
|
|
86409
|
+
success: z77.literal(true),
|
|
86410
|
+
status: z77.number(),
|
|
86411
|
+
data: z77.record(z77.string(), z77.unknown())
|
|
86412
|
+
}),
|
|
86413
|
+
z77.object({
|
|
86414
|
+
success: z77.literal(false),
|
|
86415
|
+
error: z77.string()
|
|
86416
|
+
})
|
|
86417
|
+
]);
|
|
86418
|
+
var requestTool47 = new ConnectorTool({
|
|
86419
|
+
name: "request",
|
|
86420
|
+
description: `Send authenticated requests to the Salesforce REST API.
|
|
86421
|
+
Authentication is handled automatically using the OAuth 2.0 username-password flow (Connected App Consumer Key + Secret with the Salesforce account credentials). An access token and instance URL are obtained on each request, so the tool user only provides the API path.
|
|
86422
|
+
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.
|
|
86423
|
+
Prefer SOQL via the /query endpoint for filtered, joined, or aggregated reads rather than paginating /sobjects/{Type} endpoints.`,
|
|
86424
|
+
inputSchema: inputSchema75,
|
|
86425
|
+
outputSchema: outputSchema75,
|
|
86426
|
+
async execute({ connectionId, method, path: path4, body }, connections) {
|
|
86427
|
+
const connection = connections.find((c6) => c6.id === connectionId);
|
|
86428
|
+
if (!connection) {
|
|
86429
|
+
return {
|
|
86430
|
+
success: false,
|
|
86431
|
+
error: `Connection ${connectionId} not found`
|
|
86432
|
+
};
|
|
86433
|
+
}
|
|
86434
|
+
console.log(
|
|
86435
|
+
`[connector-request] salesforce/${connection.name}: ${method} ${path4}`
|
|
86436
|
+
);
|
|
86437
|
+
try {
|
|
86438
|
+
const username = parameters62.username.getValue(connection);
|
|
86439
|
+
const password = parameters62.password.getValue(connection);
|
|
86440
|
+
const clientId = parameters62.clientId.getValue(connection);
|
|
86441
|
+
const clientSecret = parameters62.clientSecret.getValue(connection);
|
|
86442
|
+
const isSandbox = parameters62.isSandbox.tryGetValue(connection)?.toLowerCase() === "true";
|
|
86443
|
+
const loginHost = isSandbox ? "https://test.salesforce.com" : "https://login.salesforce.com";
|
|
86444
|
+
const tokenBody = new URLSearchParams({
|
|
86445
|
+
grant_type: "password",
|
|
86446
|
+
client_id: clientId,
|
|
86447
|
+
client_secret: clientSecret,
|
|
86448
|
+
username,
|
|
86449
|
+
password
|
|
86450
|
+
});
|
|
86451
|
+
const tokenRes = await fetch(`${loginHost}/services/oauth2/token`, {
|
|
86452
|
+
method: "POST",
|
|
86453
|
+
headers: {
|
|
86454
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
86455
|
+
},
|
|
86456
|
+
body: tokenBody.toString()
|
|
86457
|
+
});
|
|
86458
|
+
if (!tokenRes.ok) {
|
|
86459
|
+
const errText = await tokenRes.text().catch(() => "(unreadable body)");
|
|
86460
|
+
return {
|
|
86461
|
+
success: false,
|
|
86462
|
+
error: `Failed to obtain access token: ${tokenRes.status} ${tokenRes.statusText} \u2014 ${errText}`
|
|
86463
|
+
};
|
|
86464
|
+
}
|
|
86465
|
+
const tokenJson = await tokenRes.json();
|
|
86466
|
+
if (!tokenJson.access_token || !tokenJson.instance_url) {
|
|
86467
|
+
return {
|
|
86468
|
+
success: false,
|
|
86469
|
+
error: "access_token or instance_url not found in token response"
|
|
86470
|
+
};
|
|
86471
|
+
}
|
|
86472
|
+
const url = `${tokenJson.instance_url}${path4.startsWith("/") ? "" : "/"}${path4}`;
|
|
86473
|
+
const controller = new AbortController();
|
|
86474
|
+
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS59);
|
|
86475
|
+
try {
|
|
86476
|
+
const response = await fetch(url, {
|
|
86477
|
+
method,
|
|
86478
|
+
headers: {
|
|
86479
|
+
Authorization: `Bearer ${tokenJson.access_token}`,
|
|
86480
|
+
"Content-Type": "application/json"
|
|
86481
|
+
},
|
|
86482
|
+
body: body ? JSON.stringify(body) : void 0,
|
|
86483
|
+
signal: controller.signal
|
|
86484
|
+
});
|
|
86485
|
+
const text = await response.text();
|
|
86486
|
+
let data;
|
|
86487
|
+
try {
|
|
86488
|
+
data = text ? JSON.parse(text) : {};
|
|
86489
|
+
} catch {
|
|
86490
|
+
data = { raw: text };
|
|
86491
|
+
}
|
|
86492
|
+
if (!response.ok) {
|
|
86493
|
+
let errorMessage = `HTTP ${response.status} ${response.statusText}`;
|
|
86494
|
+
if (Array.isArray(data) && data.length > 0) {
|
|
86495
|
+
const first = data[0];
|
|
86496
|
+
if (first.message) {
|
|
86497
|
+
errorMessage = first.errorCode ? `${first.errorCode}: ${first.message}` : first.message;
|
|
86498
|
+
}
|
|
86499
|
+
} else if (typeof data.message === "string") {
|
|
86500
|
+
errorMessage = data.message;
|
|
86501
|
+
} else if (typeof data.error === "string") {
|
|
86502
|
+
errorMessage = data.error;
|
|
86503
|
+
}
|
|
86504
|
+
return { success: false, error: errorMessage };
|
|
86505
|
+
}
|
|
86506
|
+
return { success: true, status: response.status, data };
|
|
86507
|
+
} finally {
|
|
86508
|
+
clearTimeout(timeout);
|
|
86509
|
+
}
|
|
86510
|
+
} catch (err) {
|
|
86511
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
86512
|
+
return { success: false, error: msg };
|
|
86513
|
+
}
|
|
86514
|
+
}
|
|
86515
|
+
});
|
|
86516
|
+
|
|
86517
|
+
// ../connectors/src/connectors/salesforce/index.ts
|
|
86518
|
+
var tools62 = { request: requestTool47 };
|
|
86519
|
+
var salesforceConnector = new ConnectorPlugin({
|
|
86520
|
+
slug: "salesforce",
|
|
86521
|
+
authType: AUTH_TYPES.USER_PASSWORD,
|
|
86522
|
+
name: "Salesforce",
|
|
86523
|
+
description: "Connect to Salesforce CRM for accounts, contacts, opportunities, leads, cases, and custom objects via SOQL and the REST API.",
|
|
86524
|
+
iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/6vZlbrUKhxXIiuvWJlb8YB/bbc5e08b88de46c8ed338a74c7d0abb3/salesforce-icon.png",
|
|
86525
|
+
parameters: parameters62,
|
|
86526
|
+
releaseFlag: { dev1: true, dev2: false, prod: false },
|
|
86527
|
+
onboarding: salesforceOnboarding,
|
|
86528
|
+
systemPrompt: {
|
|
86529
|
+
en: `### Tools
|
|
86530
|
+
|
|
86531
|
+
- \`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 username-password flow against the Connected App) is configured automatically \u2014 an access token and the org's instance URL are resolved on each request. Prefer SOQL via \`GET /services/data/v60.0/query?q=...\` over paginating \`/sobjects/{Type}\` endpoints for filtered or joined reads.
|
|
86532
|
+
|
|
86533
|
+
### Business Logic
|
|
86534
|
+
|
|
86535
|
+
The business logic type for this connector is "typescript". Use the connector SDK in your handler. Do NOT read credentials from environment variables.
|
|
86536
|
+
|
|
86537
|
+
SDK methods (client created via \`connection(connectionId)\`):
|
|
86538
|
+
- \`client.request(path, init?)\` \u2014 low-level authenticated fetch against the Salesforce instance URL
|
|
86539
|
+
- \`client.query(soql)\` \u2014 run a SOQL query and return \`{ totalSize, done, records, nextRecordsUrl? }\`
|
|
86540
|
+
- \`client.queryMore(nextRecordsUrl)\` \u2014 fetch the next page of SOQL results
|
|
86541
|
+
- \`client.describeSObject(objectType)\` \u2014 describe an sObject's metadata
|
|
86542
|
+
- \`client.getRecord(objectType, id, options?)\` \u2014 fetch a single record (optionally restrict fields)
|
|
86543
|
+
- \`client.createRecord(objectType, fields)\` \u2014 create a new record
|
|
86544
|
+
- \`client.updateRecord(objectType, id, fields)\` \u2014 patch an existing record
|
|
86545
|
+
- \`client.deleteRecord(objectType, id)\` \u2014 delete a record
|
|
86546
|
+
|
|
86547
|
+
\`\`\`ts
|
|
86548
|
+
import type { Context } from "hono";
|
|
86549
|
+
import { connection } from "@squadbase/vite-server/connectors/salesforce";
|
|
86550
|
+
|
|
86551
|
+
const salesforce = connection("<connectionId>");
|
|
86552
|
+
|
|
86553
|
+
export default async function handler(c: Context) {
|
|
86554
|
+
const { industry, limit = 50 } = await c.req.json<{
|
|
86555
|
+
industry?: string;
|
|
86556
|
+
limit?: number;
|
|
86557
|
+
}>();
|
|
86558
|
+
|
|
86559
|
+
const where = industry
|
|
86560
|
+
? \`WHERE Industry = '\${industry.replace(/'/g, "\\\\'")}'\`
|
|
86561
|
+
: "";
|
|
86562
|
+
const soql = \`SELECT Id, Name, Industry, AnnualRevenue FROM Account \${where} ORDER BY AnnualRevenue DESC NULLS LAST LIMIT \${limit}\`;
|
|
86563
|
+
|
|
86564
|
+
const { records } = await salesforce.query<{
|
|
86565
|
+
Id: string;
|
|
86566
|
+
Name: string;
|
|
86567
|
+
Industry: string | null;
|
|
86568
|
+
AnnualRevenue: number | null;
|
|
86569
|
+
}>(soql);
|
|
86570
|
+
|
|
86571
|
+
return c.json({ accounts: records });
|
|
86572
|
+
}
|
|
86573
|
+
\`\`\`
|
|
86574
|
+
|
|
86575
|
+
### Salesforce REST API Reference
|
|
86576
|
+
|
|
86577
|
+
- Login host: \`https://login.salesforce.com\` (production) or \`https://test.salesforce.com\` (sandbox)
|
|
86578
|
+
- Token endpoint: \`POST /services/oauth2/token\` (grant_type=password + client_id/secret + username/password)
|
|
86579
|
+
- Base path after login: \`{instance_url}/services/data/v60.0\`
|
|
86580
|
+
- Authentication: Bearer token (handled automatically per request)
|
|
86581
|
+
- Pagination (SOQL): follow \`nextRecordsUrl\` from the response (absolute path starting with \`/services/data/v60.0/query/...\`)
|
|
86582
|
+
|
|
86583
|
+
#### Common Endpoints
|
|
86584
|
+
- GET \`/services/data/\` \u2014 List available API versions
|
|
86585
|
+
- GET \`/services/data/v60.0/sobjects/\` \u2014 List all sObjects (standard + custom)
|
|
86586
|
+
- GET \`/services/data/v60.0/sobjects/{Type}/describe\` \u2014 Describe an sObject (fields, relationships, picklists)
|
|
86587
|
+
- GET \`/services/data/v60.0/sobjects/{Type}/{id}\` \u2014 Get a record (supports \`?fields=...\`)
|
|
86588
|
+
- POST \`/services/data/v60.0/sobjects/{Type}\` \u2014 Create a record
|
|
86589
|
+
- PATCH \`/services/data/v60.0/sobjects/{Type}/{id}\` \u2014 Update a record
|
|
86590
|
+
- DELETE \`/services/data/v60.0/sobjects/{Type}/{id}\` \u2014 Delete a record
|
|
86591
|
+
- GET \`/services/data/v60.0/query?q={soql}\` \u2014 Run SOQL
|
|
86592
|
+
- GET \`/services/data/v60.0/search?q={sosl}\` \u2014 Run SOSL
|
|
86593
|
+
|
|
86594
|
+
#### SOQL Reference
|
|
86595
|
+
- SELECT column list is required (no \`SELECT *\`)
|
|
86596
|
+
- Filter: \`WHERE\`, \`AND\` / \`OR\`, parent/child relationship fields (e.g., \`Account.Name\`)
|
|
86597
|
+
- Sort: \`ORDER BY field [ASC|DESC] [NULLS FIRST|NULLS LAST]\`
|
|
86598
|
+
- Paginate: \`LIMIT n\`, \`OFFSET m\`; for large result sets, follow \`nextRecordsUrl\` instead of OFFSET
|
|
86599
|
+
- Aggregate: \`GROUP BY\`, \`HAVING\`, \`COUNT()\`, \`SUM()\`, \`AVG()\`, \`MIN()\`, \`MAX()\`
|
|
86600
|
+
- Parent-to-child subquery: \`SELECT Id, Name, (SELECT Id, Email FROM Contacts) FROM Account\``,
|
|
86601
|
+
ja: `### \u30C4\u30FC\u30EB
|
|
86602
|
+
|
|
86603
|
+
- \`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\uFF08Connected App + OAuth 2.0 Username-Password Flow\uFF09\u306F\u81EA\u52D5\u3067\u884C\u308F\u308C\u3001\u30EA\u30AF\u30A8\u30B9\u30C8\u3054\u3068\u306B\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u3068\u7D44\u7E54\u306E instance URL \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
|
|
86604
|
+
|
|
86605
|
+
### Business Logic
|
|
86606
|
+
|
|
86607
|
+
\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\u30BF SDK \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
|
|
86608
|
+
|
|
86609
|
+
SDK\u30E1\u30BD\u30C3\u30C9 (\`connection(connectionId)\` \u3067\u4F5C\u6210\u3057\u305F\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8):
|
|
86610
|
+
- \`client.request(path, init?)\` \u2014 Salesforce \u306E instance URL \u306B\u5BFE\u3059\u308B\u4F4E\u30EC\u30D9\u30EB\u306E\u8A8D\u8A3C\u4ED8\u304D fetch
|
|
86611
|
+
- \`client.query(soql)\` \u2014 SOQL \u30AF\u30A8\u30EA\u3092\u5B9F\u884C\u3057 \`{ totalSize, done, records, nextRecordsUrl? }\` \u3092\u8FD4\u5374
|
|
86612
|
+
- \`client.queryMore(nextRecordsUrl)\` \u2014 SOQL \u7D50\u679C\u306E\u6B21\u30DA\u30FC\u30B8\u3092\u53D6\u5F97
|
|
86613
|
+
- \`client.describeSObject(objectType)\` \u2014 sObject \u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97
|
|
86614
|
+
- \`client.getRecord(objectType, id, options?)\` \u2014 1 \u4EF6\u306E\u30EC\u30B3\u30FC\u30C9\u3092\u53D6\u5F97\uFF08\u4EFB\u610F\u3067\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6307\u5B9A\uFF09
|
|
86615
|
+
- \`client.createRecord(objectType, fields)\` \u2014 \u30EC\u30B3\u30FC\u30C9\u3092\u65B0\u898F\u4F5C\u6210
|
|
86616
|
+
- \`client.updateRecord(objectType, id, fields)\` \u2014 \u65E2\u5B58\u30EC\u30B3\u30FC\u30C9\u3092\u66F4\u65B0\uFF08PATCH\uFF09
|
|
86617
|
+
- \`client.deleteRecord(objectType, id)\` \u2014 \u30EC\u30B3\u30FC\u30C9\u3092\u524A\u9664
|
|
86618
|
+
|
|
86619
|
+
\`\`\`ts
|
|
86620
|
+
import type { Context } from "hono";
|
|
86621
|
+
import { connection } from "@squadbase/vite-server/connectors/salesforce";
|
|
86622
|
+
|
|
86623
|
+
const salesforce = connection("<connectionId>");
|
|
86624
|
+
|
|
86625
|
+
export default async function handler(c: Context) {
|
|
86626
|
+
const { industry, limit = 50 } = await c.req.json<{
|
|
86627
|
+
industry?: string;
|
|
86628
|
+
limit?: number;
|
|
86629
|
+
}>();
|
|
86630
|
+
|
|
86631
|
+
const where = industry
|
|
86632
|
+
? \`WHERE Industry = '\${industry.replace(/'/g, "\\\\'")}'\`
|
|
86633
|
+
: "";
|
|
86634
|
+
const soql = \`SELECT Id, Name, Industry, AnnualRevenue FROM Account \${where} ORDER BY AnnualRevenue DESC NULLS LAST LIMIT \${limit}\`;
|
|
86635
|
+
|
|
86636
|
+
const { records } = await salesforce.query<{
|
|
86637
|
+
Id: string;
|
|
86638
|
+
Name: string;
|
|
86639
|
+
Industry: string | null;
|
|
86640
|
+
AnnualRevenue: number | null;
|
|
86641
|
+
}>(soql);
|
|
86642
|
+
|
|
86643
|
+
return c.json({ accounts: records });
|
|
86644
|
+
}
|
|
86645
|
+
\`\`\`
|
|
86646
|
+
|
|
86647
|
+
### Salesforce REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
86648
|
+
|
|
86649
|
+
- \u30ED\u30B0\u30A4\u30F3\u30DB\u30B9\u30C8: \`https://login.salesforce.com\`\uFF08\u672C\u756A\uFF09\u307E\u305F\u306F \`https://test.salesforce.com\`\uFF08Sandbox\uFF09
|
|
86650
|
+
- \u30C8\u30FC\u30AF\u30F3\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: \`POST /services/oauth2/token\`\uFF08grant_type=password + client_id/secret + username/password\uFF09
|
|
86651
|
+
- \u30ED\u30B0\u30A4\u30F3\u5F8C\u306E\u30D9\u30FC\u30B9\u30D1\u30B9: \`{instance_url}/services/data/v60.0\`
|
|
86652
|
+
- \u8A8D\u8A3C: Bearer \u30C8\u30FC\u30AF\u30F3\uFF08\u30EA\u30AF\u30A8\u30B9\u30C8\u3054\u3068\u306B\u81EA\u52D5\u8A2D\u5B9A\uFF09
|
|
86653
|
+
- \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
|
|
86654
|
+
|
|
86655
|
+
#### \u4E3B\u8981\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
|
|
86656
|
+
- GET \`/services/data/\` \u2014 \u5229\u7528\u53EF\u80FD\u306A API \u30D0\u30FC\u30B8\u30E7\u30F3\u4E00\u89A7
|
|
86657
|
+
- GET \`/services/data/v60.0/sobjects/\` \u2014 sObject \u4E00\u89A7\uFF08\u6A19\u6E96 + \u30AB\u30B9\u30BF\u30E0\uFF09
|
|
86658
|
+
- GET \`/services/data/v60.0/sobjects/{Type}/describe\` \u2014 sObject \u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u30FB\u30EA\u30EC\u30FC\u30B7\u30E7\u30F3\u30FB\u30D4\u30C3\u30AF\u30EA\u30B9\u30C8\u3092\u53D6\u5F97
|
|
86659
|
+
- GET \`/services/data/v60.0/sobjects/{Type}/{id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u53D6\u5F97\uFF08\`?fields=...\` \u3067\u7D5E\u308A\u8FBC\u307F\u53EF\uFF09
|
|
86660
|
+
- POST \`/services/data/v60.0/sobjects/{Type}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u4F5C\u6210
|
|
86661
|
+
- PATCH \`/services/data/v60.0/sobjects/{Type}/{id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u66F4\u65B0
|
|
86662
|
+
- DELETE \`/services/data/v60.0/sobjects/{Type}/{id}\` \u2014 \u30EC\u30B3\u30FC\u30C9\u524A\u9664
|
|
86663
|
+
- GET \`/services/data/v60.0/query?q={soql}\` \u2014 SOQL \u3092\u5B9F\u884C
|
|
86664
|
+
- GET \`/services/data/v60.0/search?q={sosl}\` \u2014 SOSL \u3092\u5B9F\u884C
|
|
86665
|
+
|
|
86666
|
+
#### SOQL \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
86667
|
+
- SELECT \u5217\u306E\u660E\u793A\u304C\u5FC5\u9808\uFF08\`SELECT *\` \u306F\u4E0D\u53EF\uFF09
|
|
86668
|
+
- \u30D5\u30A3\u30EB\u30BF: \`WHERE\`\u3001\`AND\` / \`OR\`\u3001\u89AA\u5B50\u30EA\u30EC\u30FC\u30B7\u30E7\u30F3\u53C2\u7167\uFF08\u4F8B: \`Account.Name\`\uFF09
|
|
86669
|
+
- \u4E26\u3073\u66FF\u3048: \`ORDER BY field [ASC|DESC] [NULLS FIRST|NULLS LAST]\`
|
|
86670
|
+
- \u30DA\u30FC\u30B8\u30F3\u30B0: \`LIMIT n\`, \`OFFSET m\`\u3002\u5927\u91CF\u30C7\u30FC\u30BF\u3067\u306F OFFSET \u3067\u306F\u306A\u304F \`nextRecordsUrl\` \u3092\u5229\u7528\u3059\u308B
|
|
86671
|
+
- \u96C6\u8A08: \`GROUP BY\`, \`HAVING\`, \`COUNT()\`, \`SUM()\`, \`AVG()\`, \`MIN()\`, \`MAX()\`
|
|
86672
|
+
- \u89AA\u2192\u5B50\u30B5\u30D6\u30AF\u30A8\u30EA: \`SELECT Id, Name, (SELECT Id, Email FROM Contacts) FROM Account\``
|
|
86673
|
+
},
|
|
86674
|
+
tools: tools62
|
|
86675
|
+
});
|
|
86676
|
+
|
|
86292
86677
|
// ../connectors/src/connectors/registry.ts
|
|
86293
86678
|
var plugins = {
|
|
86294
86679
|
snowflake: snowflakeConnector,
|
|
@@ -86351,7 +86736,8 @@ var plugins = {
|
|
|
86351
86736
|
grafana: grafanaConnector,
|
|
86352
86737
|
backlog: backlogConnector,
|
|
86353
86738
|
gamma: gammaConnector,
|
|
86354
|
-
sentry: sentryConnector
|
|
86739
|
+
sentry: sentryConnector,
|
|
86740
|
+
salesforce: salesforceConnector
|
|
86355
86741
|
};
|
|
86356
86742
|
var connectors = {
|
|
86357
86743
|
...plugins,
|
|
@@ -86562,62 +86948,62 @@ function resolveParams2(entry, connectionId, plugin) {
|
|
|
86562
86948
|
var { getQuery, loadConnections, reloadEnvFile, watchConnectionsFile } = createConnectorRegistry();
|
|
86563
86949
|
|
|
86564
86950
|
// src/types/server-logic.ts
|
|
86565
|
-
import { z as
|
|
86566
|
-
var parameterMetaSchema =
|
|
86567
|
-
name:
|
|
86568
|
-
type:
|
|
86569
|
-
description:
|
|
86570
|
-
required:
|
|
86571
|
-
default:
|
|
86572
|
-
});
|
|
86573
|
-
var serverLogicCacheConfigSchema =
|
|
86574
|
-
ttl:
|
|
86575
|
-
staleWhileRevalidate:
|
|
86576
|
-
});
|
|
86577
|
-
var serverLogicSchemaObjectSchema =
|
|
86578
|
-
() =>
|
|
86579
|
-
type:
|
|
86580
|
-
format:
|
|
86581
|
-
description:
|
|
86582
|
-
nullable:
|
|
86583
|
-
enum:
|
|
86951
|
+
import { z as z78 } from "zod";
|
|
86952
|
+
var parameterMetaSchema = z78.object({
|
|
86953
|
+
name: z78.string(),
|
|
86954
|
+
type: z78.enum(["string", "number", "boolean"]),
|
|
86955
|
+
description: z78.string(),
|
|
86956
|
+
required: z78.boolean().optional(),
|
|
86957
|
+
default: z78.union([z78.string(), z78.number(), z78.boolean()]).optional()
|
|
86958
|
+
});
|
|
86959
|
+
var serverLogicCacheConfigSchema = z78.object({
|
|
86960
|
+
ttl: z78.number(),
|
|
86961
|
+
staleWhileRevalidate: z78.boolean().optional()
|
|
86962
|
+
});
|
|
86963
|
+
var serverLogicSchemaObjectSchema = z78.lazy(
|
|
86964
|
+
() => z78.object({
|
|
86965
|
+
type: z78.enum(["string", "number", "integer", "boolean", "object", "array", "null"]).optional(),
|
|
86966
|
+
format: z78.string().optional(),
|
|
86967
|
+
description: z78.string().optional(),
|
|
86968
|
+
nullable: z78.boolean().optional(),
|
|
86969
|
+
enum: z78.array(z78.union([z78.string(), z78.number(), z78.boolean(), z78.null()])).optional(),
|
|
86584
86970
|
items: serverLogicSchemaObjectSchema.optional(),
|
|
86585
|
-
properties:
|
|
86586
|
-
required:
|
|
86587
|
-
additionalProperties:
|
|
86588
|
-
minimum:
|
|
86589
|
-
maximum:
|
|
86590
|
-
minLength:
|
|
86591
|
-
maxLength:
|
|
86592
|
-
pattern:
|
|
86971
|
+
properties: z78.record(z78.string(), serverLogicSchemaObjectSchema).optional(),
|
|
86972
|
+
required: z78.array(z78.string()).optional(),
|
|
86973
|
+
additionalProperties: z78.union([z78.boolean(), serverLogicSchemaObjectSchema]).optional(),
|
|
86974
|
+
minimum: z78.number().optional(),
|
|
86975
|
+
maximum: z78.number().optional(),
|
|
86976
|
+
minLength: z78.number().optional(),
|
|
86977
|
+
maxLength: z78.number().optional(),
|
|
86978
|
+
pattern: z78.string().optional()
|
|
86593
86979
|
})
|
|
86594
86980
|
);
|
|
86595
|
-
var serverLogicMediaTypeSchema =
|
|
86981
|
+
var serverLogicMediaTypeSchema = z78.object({
|
|
86596
86982
|
schema: serverLogicSchemaObjectSchema.optional(),
|
|
86597
|
-
example:
|
|
86983
|
+
example: z78.unknown().optional()
|
|
86598
86984
|
});
|
|
86599
|
-
var serverLogicResponseSchema =
|
|
86600
|
-
description:
|
|
86601
|
-
content:
|
|
86985
|
+
var serverLogicResponseSchema = z78.object({
|
|
86986
|
+
description: z78.string().optional(),
|
|
86987
|
+
content: z78.record(z78.string(), serverLogicMediaTypeSchema).optional()
|
|
86602
86988
|
});
|
|
86603
86989
|
var jsonBaseFields = {
|
|
86604
|
-
description:
|
|
86605
|
-
parameters:
|
|
86990
|
+
description: z78.string(),
|
|
86991
|
+
parameters: z78.array(parameterMetaSchema).optional(),
|
|
86606
86992
|
response: serverLogicResponseSchema.optional(),
|
|
86607
86993
|
cache: serverLogicCacheConfigSchema.optional()
|
|
86608
86994
|
};
|
|
86609
|
-
var jsonSqlServerLogicSchema =
|
|
86995
|
+
var jsonSqlServerLogicSchema = z78.object({
|
|
86610
86996
|
...jsonBaseFields,
|
|
86611
|
-
type:
|
|
86612
|
-
query:
|
|
86613
|
-
connectionId:
|
|
86997
|
+
type: z78.literal("sql").optional(),
|
|
86998
|
+
query: z78.string(),
|
|
86999
|
+
connectionId: z78.string()
|
|
86614
87000
|
});
|
|
86615
|
-
var jsonTypeScriptServerLogicSchema =
|
|
87001
|
+
var jsonTypeScriptServerLogicSchema = z78.object({
|
|
86616
87002
|
...jsonBaseFields,
|
|
86617
|
-
type:
|
|
86618
|
-
handlerPath:
|
|
87003
|
+
type: z78.literal("typescript"),
|
|
87004
|
+
handlerPath: z78.string()
|
|
86619
87005
|
});
|
|
86620
|
-
var anyJsonServerLogicSchema =
|
|
87006
|
+
var anyJsonServerLogicSchema = z78.union([
|
|
86621
87007
|
jsonTypeScriptServerLogicSchema,
|
|
86622
87008
|
jsonSqlServerLogicSchema
|
|
86623
87009
|
]);
|