@composio/core 0.13.1 → 0.14.1
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/README.md +62 -247
- package/dist/BaseProvider-Dc5yKZhk.d.mts +29394 -0
- package/dist/{CustomTool-DLf7JeKt.d.mts → CustomTool-4nVuwLzO.d.mts} +1 -2
- package/dist/{CustomTool-D9qwyMrv.mjs → CustomTool-l-j5HtEf.mjs} +17 -15
- package/dist/FileModifierErrors-B8V8_3VE.mjs +97 -0
- package/dist/{FileModifierErrors-3fSwIWoa.mjs → SsrfErrors-DNJt57GL.mjs} +24 -85
- package/dist/{Telemetry-DhGI_J4G.mjs → Telemetry-CF0rNHu2.mjs} +40 -8
- package/dist/{jsonSchema-CFKdONpP.mjs → cancellation-BbJ-UQ__.mjs} +64 -19
- package/dist/{composio-BHSQwOUz.d.mts → composio-ChU3eD9F.d.mts} +1083 -1061
- package/dist/{customTool.types-9yFqPjdw.d.mts → customTool.types-CX2-LbfI.d.mts} +634 -601
- package/dist/docs/reference/sdk-reference/typescript/index.mdx +1 -22
- package/dist/docs/reference/sdk-reference/typescript/session-files.mdx +2 -0
- package/dist/{errors-DSIlYfl5.mjs → errors-BcEUHZbq.mjs} +75 -74
- package/dist/experimental/index.d.mts +2 -2
- package/dist/experimental/index.mjs +1 -1
- package/dist/{fileUtils.node-BiO1JQsJ.mjs → fileUtils.node-DOkW4PBg.mjs} +36 -70
- package/dist/index.d.mts +2446 -1563
- package/dist/index.mjs +1415 -1381
- package/dist/models/Files.node.d.mts +2 -11
- package/dist/models/Files.node.mjs +2 -2
- package/dist/models/Files.workerd.d.mts +0 -1
- package/dist/platform/node.d.mts +1 -2
- package/dist/platform/node.mjs +3 -0
- package/dist/platform/workerd.d.mts +1 -2
- package/dist/platform/workerd.mjs +30 -3
- package/dist/sensitiveFileUploadPaths-C43dHP7S.mjs +164 -0
- package/dist/{types-BJLCRj9q.d.mts → types-D5N60gUD.d.mts} +2 -3
- package/dist/{types-DdoCRzLj.d.mts → types-DY1r-kN9.d.mts} +9 -0
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -2
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -2
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -2
- package/dist/utils/modifiers/FileToolModifier.node.mjs +6 -5
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -2
- package/dist/utils/ssrfGuard.node.d.mts +22 -0
- package/dist/utils/ssrfGuard.node.mjs +152 -0
- package/dist/utils/ssrfGuard.workerd.d.mts +9 -0
- package/dist/utils/ssrfGuard.workerd.mjs +17 -0
- package/package.json +20 -15
- package/src/errors/SsrfErrors.ts +48 -0
- package/src/errors/index.ts +3 -0
- package/src/index.ts +10 -0
- package/src/models/CustomTool.ts +1 -3
- package/src/models/ToolRouterSession.ts +38 -16
- package/src/models/ToolRouterSessionFileMount.ts +7 -3
- package/src/models/Tools.ts +32 -2
- package/src/models/Triggers.ts +16 -76
- package/src/platform/node.ts +4 -0
- package/src/platform/types.ts +10 -0
- package/src/platform/workerd.ts +36 -3
- package/src/provider/OpenAIProvider.ts +19 -14
- package/src/telemetry/Telemetry.ts +9 -6
- package/src/telemetry/redact.ts +40 -0
- package/src/types/tool.types.ts +36 -32
- package/src/utils/fileUtils.node.ts +29 -6
- package/src/utils/jsonSchema.ts +58 -0
- package/src/utils/modifiers/FileToolModifier.node.ts +2 -1
- package/src/utils/readResponseBody.ts +63 -0
- package/src/utils/sdk.ts +5 -4
- package/src/utils/{sensitiveFileUploadPaths.node.ts → sensitiveFileUploadPaths.ts} +29 -13
- package/src/utils/ssrfGuard.node.ts +202 -0
- package/src/utils/ssrfGuard.workerd.ts +19 -0
- package/src/utils/toolkitVersion.ts +21 -2
- package/dist/BaseProvider-Brb3o86-.d.mts +0 -29425
- package/dist/CustomTool-NpHpqdnU.d.mts +0 -74
- package/dist/buffer-PcbMMsgm.mjs +0 -33
- package/dist/composio-DfPD7BAi.d.mts +0 -5666
- package/dist/customTool.types-D-6YqFdW.d.mts +0 -2826
- package/dist/types-CCh8qvui.d.mts +0 -12
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as
|
|
4
|
-
import { i as getRandomShortId, t as arrayBufferToBase64 } from "./buffer-PcbMMsgm.mjs";
|
|
1
|
+
import { a as COMPOSIO_DIR, c as DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID, d as USER_DATA_FILE_NAME, f as constants_exports, i as logger, l as IS_DEVELOPMENT_OR_CI, m as getEnvsWithPrefix, n as SsrfErrorCodes, o as COMPOSIO_LOG_LEVEL, p as getEnvVariable, r as ComposioError, s as DEFAULT_BASE_URL, t as ComposioBlockedInternalUrlError, u as TEMP_FILES_DIRECTORY_NAME } from "./SsrfErrors-DNJt57GL.mjs";
|
|
2
|
+
import { A as ToolErrorCodes, B as ComposioSharedAccessDeniedError, C as ComposioInvalidExecuteFunctionError, D as ComposioToolExecutionError, E as ComposioProviderNotDefinedError, F as ComposioAclOnlyForSharedError, H as ConnectedAccountErrorCodes, I as ComposioConnectedAccountNotFoundError, L as ComposioFailedToCreateConnectedAccountLink, M as ConnectionRequestErrorCodes, N as ConnectionRequestFailedError, O as ComposioToolNotFoundError, P as ConnectionRequestTimeoutError, R as ComposioLegacyConnectedAccountsEndpointRetiredError, S as ComposioGlobalExecuteToolFnNotSetError, T as ComposioInvalidToolArgumentsError, U as AuthConfigErrorCodes, V as ComposioSharedConnectionNotAccessibleError, W as ComposioAuthConfigNotFoundError, _ as ValidationError, a as ComposioFailedToSubscribeToPusherChannelError, b as ComposioToolkitNotFoundError, c as ComposioWebhookPayloadError, d as ComposioNoAPIKeyError, f as ComposioRequestCancelledError, g as JsonSchemaToZodError, h as JsonSchemaRefResolutionError, i as ComposioFailedToGetSDKRealtimeCredentialsError, j as handleToolExecutionError, k as ComposioToolVersionRequiredError, l as ComposioWebhookSignatureVerificationError, m as isRequestAbortError, n as RemoteFileErrorCodes, o as ComposioFailedToUnsubscribeFromPusherChannelError, p as SDKErrorCodes, r as ComposioFailedToCreatePusherClientError, s as ComposioTriggerTypeNotFoundError, t as RemoteFileDownloadError, u as TriggerErrorCodes, v as ValidationErrorCodes, w as ComposioInvalidModifierError, x as ToolkitErrorCodes, y as ComposioToolkitFetchError, z as ComposioMultipleConnectedAccountsError } from "./errors-BcEUHZbq.mjs";
|
|
3
|
+
import { a as ComposioSensitiveFilePathBlockedError, i as ComposioFileUploadPathNotAllowedError, n as ComposioFileUploadAbortedError, o as FileModifierErrorCodes, r as ComposioFileUploadError, t as ComposioFileNotFoundError } from "./FileModifierErrors-B8V8_3VE.mjs";
|
|
5
4
|
import { r as schemaHasFileUploadable, t as isPlainObject } from "./FileToolModifier.utils.neutral-B5rT711M.mjs";
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
5
|
+
import { a as removeNonRequiredProperties, i as jsonSchemaToZodSchema, n as deduplicateJsonSchemaRequiredArrays, r as dereferenceJsonSchema, t as withCancellation } from "./cancellation-BbJ-UQ__.mjs";
|
|
6
|
+
import { t as telemetry } from "./Telemetry-CF0rNHu2.mjs";
|
|
7
|
+
import { a as arrayBufferToBase64, c as getRandomShortId, i as readResponseBodyWithLimit, n as assertSafeFileUploadPath, r as isBlockedSensitiveFileUploadPath, t as BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS } from "./sensitiveFileUploadPaths-C43dHP7S.mjs";
|
|
8
|
+
import { a as createCustomToolkit, c as getPreloadedCustomToolSlugs, d as CreateCustomToolBaseSchema, f as CreateCustomToolkitBaseSchema, i as createCustomTool, l as serializeCustomToolkits, n as buildCustomToolsMap, o as findCustomToolMapEntryByFinalSlug, p as CustomToolSlugSchema, r as buildCustomToolsMapFromResponse, s as findCustomToolMapEntryByToolkitAndOriginalSlug, t as assertNoCustomToolSlugsInPreload, u as serializeCustomTools } from "./CustomTool-l-j5HtEf.mjs";
|
|
8
9
|
import ComposioClient, { APIError, BadRequestError } from "@composio/client";
|
|
9
10
|
import { FileToolModifier } from "#file_tool_modifier";
|
|
10
|
-
import z
|
|
11
|
+
import z, { z as z$1 } from "zod/v3";
|
|
11
12
|
import { CONFIG_DEFAULTS } from "#config_defaults";
|
|
12
13
|
import { platform } from "#platform";
|
|
13
14
|
import { APIError as APIError$1 } from "openai";
|
|
14
15
|
import semver from "semver";
|
|
15
16
|
import { Files } from "#files";
|
|
17
|
+
import { ssrfSafeFetch } from "#ssrf_guard";
|
|
16
18
|
|
|
17
19
|
//#region src/types/authConfigs.types.ts
|
|
18
20
|
const AuthConfigTypes = {
|
|
@@ -35,12 +37,12 @@ const AuthSchemeTypes = {
|
|
|
35
37
|
DCR_OAUTH: "DCR_OAUTH",
|
|
36
38
|
S2S_OAUTH2: "S2S_OAUTH2"
|
|
37
39
|
};
|
|
38
|
-
const AuthConfigCreationToolAccessConfigSchema = z.object({ toolsForConnectedAccountCreation: z.array(z.string()).optional() });
|
|
39
|
-
const AuthConfigToolAccessConfigSchema = z.object({
|
|
40
|
-
toolsAvailableForExecution: z.array(z.string()).optional(),
|
|
41
|
-
toolsForConnectedAccountCreation: z.array(z.string()).optional()
|
|
40
|
+
const AuthConfigCreationToolAccessConfigSchema = z$1.object({ toolsForConnectedAccountCreation: z$1.array(z$1.string()).optional() });
|
|
41
|
+
const AuthConfigToolAccessConfigSchema = z$1.object({
|
|
42
|
+
toolsAvailableForExecution: z$1.array(z$1.string()).optional(),
|
|
43
|
+
toolsForConnectedAccountCreation: z$1.array(z$1.string()).optional()
|
|
42
44
|
});
|
|
43
|
-
const AuthSchemeEnum = z.enum([
|
|
45
|
+
const AuthSchemeEnum = z$1.enum([
|
|
44
46
|
"OAUTH2",
|
|
45
47
|
"OAUTH1",
|
|
46
48
|
"API_KEY",
|
|
@@ -56,102 +58,102 @@ const AuthSchemeEnum = z.enum([
|
|
|
56
58
|
"DCR_OAUTH",
|
|
57
59
|
"S2S_OAUTH2"
|
|
58
60
|
]);
|
|
59
|
-
const CreateCustomAuthConfigParamsSchema = z.object({
|
|
60
|
-
type: z.literal("use_custom_auth"),
|
|
61
|
-
name: z.string().optional(),
|
|
62
|
-
credentials: z.record(z.string(), z.union([
|
|
63
|
-
z.string(),
|
|
64
|
-
z.number(),
|
|
65
|
-
z.boolean()
|
|
61
|
+
const CreateCustomAuthConfigParamsSchema = z$1.object({
|
|
62
|
+
type: z$1.literal("use_custom_auth"),
|
|
63
|
+
name: z$1.string().optional(),
|
|
64
|
+
credentials: z$1.record(z$1.string(), z$1.union([
|
|
65
|
+
z$1.string(),
|
|
66
|
+
z$1.number(),
|
|
67
|
+
z$1.boolean()
|
|
66
68
|
])),
|
|
67
69
|
authScheme: AuthSchemeEnum,
|
|
68
|
-
proxyConfig: z.object({
|
|
69
|
-
proxyUrl: z.string(),
|
|
70
|
-
proxyAuthKey: z.string().optional()
|
|
70
|
+
proxyConfig: z$1.object({
|
|
71
|
+
proxyUrl: z$1.string(),
|
|
72
|
+
proxyAuthKey: z$1.string().optional()
|
|
71
73
|
}).optional(),
|
|
72
74
|
toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
|
|
73
|
-
isEnabledForToolRouter: z.boolean().optional()
|
|
75
|
+
isEnabledForToolRouter: z$1.boolean().optional()
|
|
74
76
|
});
|
|
75
|
-
const CreateComposioManagedAuthConfigParamsSchema = z.object({
|
|
76
|
-
type: z.literal("use_composio_managed_auth"),
|
|
77
|
-
name: z.string().optional(),
|
|
78
|
-
credentials: z.object({
|
|
79
|
-
scopes: z.union([z.string(), z.array(z.string())]).optional(),
|
|
80
|
-
user_scopes: z.union([z.string(), z.array(z.string())]).optional()
|
|
77
|
+
const CreateComposioManagedAuthConfigParamsSchema = z$1.object({
|
|
78
|
+
type: z$1.literal("use_composio_managed_auth"),
|
|
79
|
+
name: z$1.string().optional(),
|
|
80
|
+
credentials: z$1.object({
|
|
81
|
+
scopes: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional(),
|
|
82
|
+
user_scopes: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional()
|
|
81
83
|
}).passthrough().optional(),
|
|
82
84
|
toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
|
|
83
|
-
isEnabledForToolRouter: z.boolean().optional()
|
|
85
|
+
isEnabledForToolRouter: z$1.boolean().optional()
|
|
84
86
|
});
|
|
85
87
|
/**
|
|
86
88
|
* Discriminated union of all possible auth config types.
|
|
87
89
|
*/
|
|
88
|
-
const CreateAuthConfigParamsSchema = z.discriminatedUnion("type", [CreateCustomAuthConfigParamsSchema, CreateComposioManagedAuthConfigParamsSchema]);
|
|
89
|
-
const CreateAuthConfigResponseSchema = z.object({
|
|
90
|
-
id: z.string(),
|
|
91
|
-
authScheme: z.string(),
|
|
92
|
-
isComposioManaged: z.boolean(),
|
|
93
|
-
toolkit: z.string()
|
|
90
|
+
const CreateAuthConfigParamsSchema = z$1.discriminatedUnion("type", [CreateCustomAuthConfigParamsSchema, CreateComposioManagedAuthConfigParamsSchema]);
|
|
91
|
+
const CreateAuthConfigResponseSchema = z$1.object({
|
|
92
|
+
id: z$1.string(),
|
|
93
|
+
authScheme: z$1.string(),
|
|
94
|
+
isComposioManaged: z$1.boolean(),
|
|
95
|
+
toolkit: z$1.string()
|
|
94
96
|
});
|
|
95
|
-
const AuthConfigRetrieveResponseSchema = z.object({
|
|
96
|
-
id: z.string(),
|
|
97
|
-
name: z.string(),
|
|
98
|
-
toolkit: z.object({
|
|
99
|
-
logo: z.string(),
|
|
100
|
-
slug: z.string()
|
|
97
|
+
const AuthConfigRetrieveResponseSchema = z$1.object({
|
|
98
|
+
id: z$1.string(),
|
|
99
|
+
name: z$1.string(),
|
|
100
|
+
toolkit: z$1.object({
|
|
101
|
+
logo: z$1.string(),
|
|
102
|
+
slug: z$1.string()
|
|
101
103
|
}),
|
|
102
|
-
noOfConnections: z.number(),
|
|
103
|
-
status: z.enum(["ENABLED", "DISABLED"]),
|
|
104
|
+
noOfConnections: z$1.number(),
|
|
105
|
+
status: z$1.enum(["ENABLED", "DISABLED"]),
|
|
104
106
|
authScheme: AuthSchemeEnum.optional(),
|
|
105
|
-
credentials: z.record(z.string(), z.unknown()).optional(),
|
|
106
|
-
expectedInputFields: z.array(z.unknown()).optional(),
|
|
107
|
-
isEnabledForToolRouter: z.boolean().optional(),
|
|
107
|
+
credentials: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
108
|
+
expectedInputFields: z$1.array(z$1.unknown()).optional(),
|
|
109
|
+
isEnabledForToolRouter: z$1.boolean().optional(),
|
|
108
110
|
/**
|
|
109
111
|
* @deprecated - use tool access config to determine the tools that the user can perform on the auth config.
|
|
110
112
|
*/
|
|
111
|
-
restrictToFollowingTools: z.array(z.string()).optional(),
|
|
112
|
-
isComposioManaged: z.boolean().optional(),
|
|
113
|
-
createdBy: z.string().optional(),
|
|
114
|
-
createdAt: z.string().optional(),
|
|
115
|
-
lastUpdatedAt: z.string().optional(),
|
|
113
|
+
restrictToFollowingTools: z$1.array(z$1.string()).optional(),
|
|
114
|
+
isComposioManaged: z$1.boolean().optional(),
|
|
115
|
+
createdBy: z$1.string().optional(),
|
|
116
|
+
createdAt: z$1.string().optional(),
|
|
117
|
+
lastUpdatedAt: z$1.string().optional(),
|
|
116
118
|
toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
|
|
117
119
|
});
|
|
118
|
-
const AuthConfigListParamsSchema = z.object({
|
|
119
|
-
cursor: z.string().optional(),
|
|
120
|
-
isComposioManaged: z.boolean().optional(),
|
|
121
|
-
limit: z.number().optional(),
|
|
122
|
-
search: z.string().optional(),
|
|
123
|
-
showDisabled: z.boolean().optional(),
|
|
124
|
-
toolkit: z.string().optional()
|
|
120
|
+
const AuthConfigListParamsSchema = z$1.object({
|
|
121
|
+
cursor: z$1.string().optional(),
|
|
122
|
+
isComposioManaged: z$1.boolean().optional(),
|
|
123
|
+
limit: z$1.number().optional(),
|
|
124
|
+
search: z$1.string().optional(),
|
|
125
|
+
showDisabled: z$1.boolean().optional(),
|
|
126
|
+
toolkit: z$1.string().optional()
|
|
125
127
|
});
|
|
126
|
-
const AuthConfigListResponseSchema = z.object({
|
|
127
|
-
items: z.array(AuthConfigRetrieveResponseSchema),
|
|
128
|
-
nextCursor: z.string().nullable(),
|
|
129
|
-
totalPages: z.number()
|
|
128
|
+
const AuthConfigListResponseSchema = z$1.object({
|
|
129
|
+
items: z$1.array(AuthConfigRetrieveResponseSchema),
|
|
130
|
+
nextCursor: z$1.string().nullable(),
|
|
131
|
+
totalPages: z$1.number()
|
|
130
132
|
});
|
|
131
|
-
const AuthCustomConfigUpdateParamsSchema = z.object({
|
|
132
|
-
type: z.literal("custom"),
|
|
133
|
-
credentials: z.object({
|
|
134
|
-
scopes: z.union([z.string(), z.array(z.string())]).optional(),
|
|
135
|
-
user_scopes: z.union([z.string(), z.array(z.string())]).optional()
|
|
133
|
+
const AuthCustomConfigUpdateParamsSchema = z$1.object({
|
|
134
|
+
type: z$1.literal("custom"),
|
|
135
|
+
credentials: z$1.object({
|
|
136
|
+
scopes: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional(),
|
|
137
|
+
user_scopes: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional()
|
|
136
138
|
}).passthrough().optional(),
|
|
137
|
-
isEnabledForToolRouter: z.boolean().optional(),
|
|
139
|
+
isEnabledForToolRouter: z$1.boolean().optional(),
|
|
138
140
|
/**
|
|
139
141
|
* @deprecated - use tool access config to determine the tools that the user can perform on the auth config.
|
|
140
142
|
*/
|
|
141
|
-
restrictToFollowingTools: z.array(z.string()).optional(),
|
|
143
|
+
restrictToFollowingTools: z$1.array(z$1.string()).optional(),
|
|
142
144
|
toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
|
|
143
145
|
});
|
|
144
|
-
const AuthDefaultConfigUpdateParamsSchema = z.object({
|
|
145
|
-
type: z.literal("default"),
|
|
146
|
-
scopes: z.string().optional(),
|
|
147
|
-
isEnabledForToolRouter: z.boolean().optional(),
|
|
146
|
+
const AuthDefaultConfigUpdateParamsSchema = z$1.object({
|
|
147
|
+
type: z$1.literal("default"),
|
|
148
|
+
scopes: z$1.string().optional(),
|
|
149
|
+
isEnabledForToolRouter: z$1.boolean().optional(),
|
|
148
150
|
/**
|
|
149
151
|
* @deprecated - use tool access config to determine the tools that the user can perform on the auth config.
|
|
150
152
|
*/
|
|
151
|
-
restrictToFollowingTools: z.array(z.string()).optional(),
|
|
153
|
+
restrictToFollowingTools: z$1.array(z$1.string()).optional(),
|
|
152
154
|
toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
|
|
153
155
|
});
|
|
154
|
-
const AuthConfigUpdateParamsSchema = z.discriminatedUnion("type", [AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema]);
|
|
156
|
+
const AuthConfigUpdateParamsSchema = z$1.discriminatedUnion("type", [AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema]);
|
|
155
157
|
|
|
156
158
|
//#endregion
|
|
157
159
|
//#region src/types/connectedAccountAuthStates.types.ts
|
|
@@ -164,107 +166,107 @@ const ConnectionStatuses = {
|
|
|
164
166
|
INACTIVE: "INACTIVE",
|
|
165
167
|
REVOKED: "REVOKED"
|
|
166
168
|
};
|
|
167
|
-
const RedirectableAuthSchemeSchema = z.enum([AuthSchemeTypes.OAUTH1, AuthSchemeTypes.OAUTH2]);
|
|
168
|
-
const BaseSchemeRaw = z.object({
|
|
169
|
-
subdomain: z.string().optional(),
|
|
170
|
-
["your-domain"]: z.string().optional(),
|
|
171
|
-
region: z.string().optional(),
|
|
172
|
-
shop: z.string().optional(),
|
|
173
|
-
account_url: z.string().optional(),
|
|
174
|
-
COMPANYDOMAIN: z.string().optional(),
|
|
175
|
-
extension: z.string().optional(),
|
|
176
|
-
form_api_base_url: z.string().optional(),
|
|
177
|
-
instanceEndpoint: z.string().optional(),
|
|
178
|
-
api_url: z.string().optional(),
|
|
179
|
-
borneo_dashboard_url: z.string().optional(),
|
|
180
|
-
proxy_username: z.string().optional(),
|
|
181
|
-
proxy_password: z.string().optional(),
|
|
182
|
-
domain: z.string().optional(),
|
|
183
|
-
version: z.string().optional(),
|
|
184
|
-
dc: z.string().optional(),
|
|
185
|
-
site_name: z.string().optional(),
|
|
186
|
-
instanceName: z.string().optional(),
|
|
187
|
-
account_id: z.string().optional(),
|
|
188
|
-
your_server: z.string().optional(),
|
|
189
|
-
server_location: z.string().optional(),
|
|
190
|
-
base_url: z.string().optional(),
|
|
191
|
-
api_key: z.string().optional(),
|
|
192
|
-
generic_api_key: z.string().optional(),
|
|
193
|
-
bearer_token: z.string().optional(),
|
|
194
|
-
basic_encoded: z.string().optional(),
|
|
195
|
-
long_redirect_url: z.boolean().optional(),
|
|
196
|
-
state_prefix: z.string().optional(),
|
|
197
|
-
registration_access_token: z.string().optional(),
|
|
198
|
-
registration_client_uri: z.string().optional(),
|
|
199
|
-
composio_link_redirect_url: z.string().optional()
|
|
200
|
-
}).catchall(z.unknown());
|
|
201
|
-
const Oauth2InitiatingConnectionDataSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
169
|
+
const RedirectableAuthSchemeSchema = z$1.enum([AuthSchemeTypes.OAUTH1, AuthSchemeTypes.OAUTH2]);
|
|
170
|
+
const BaseSchemeRaw = z$1.object({
|
|
171
|
+
subdomain: z$1.string().optional(),
|
|
172
|
+
["your-domain"]: z$1.string().optional(),
|
|
173
|
+
region: z$1.string().optional(),
|
|
174
|
+
shop: z$1.string().optional(),
|
|
175
|
+
account_url: z$1.string().optional(),
|
|
176
|
+
COMPANYDOMAIN: z$1.string().optional(),
|
|
177
|
+
extension: z$1.string().optional(),
|
|
178
|
+
form_api_base_url: z$1.string().optional(),
|
|
179
|
+
instanceEndpoint: z$1.string().optional(),
|
|
180
|
+
api_url: z$1.string().optional(),
|
|
181
|
+
borneo_dashboard_url: z$1.string().optional(),
|
|
182
|
+
proxy_username: z$1.string().optional(),
|
|
183
|
+
proxy_password: z$1.string().optional(),
|
|
184
|
+
domain: z$1.string().optional(),
|
|
185
|
+
version: z$1.string().optional(),
|
|
186
|
+
dc: z$1.string().optional(),
|
|
187
|
+
site_name: z$1.string().optional(),
|
|
188
|
+
instanceName: z$1.string().optional(),
|
|
189
|
+
account_id: z$1.string().optional(),
|
|
190
|
+
your_server: z$1.string().optional(),
|
|
191
|
+
server_location: z$1.string().optional(),
|
|
192
|
+
base_url: z$1.string().optional(),
|
|
193
|
+
api_key: z$1.string().optional(),
|
|
194
|
+
generic_api_key: z$1.string().optional(),
|
|
195
|
+
bearer_token: z$1.string().optional(),
|
|
196
|
+
basic_encoded: z$1.string().optional(),
|
|
197
|
+
long_redirect_url: z$1.boolean().optional(),
|
|
198
|
+
state_prefix: z$1.string().optional(),
|
|
199
|
+
registration_access_token: z$1.string().optional(),
|
|
200
|
+
registration_client_uri: z$1.string().optional(),
|
|
201
|
+
composio_link_redirect_url: z$1.string().optional()
|
|
202
|
+
}).catchall(z$1.unknown());
|
|
203
|
+
const Oauth2InitiatingConnectionDataSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
202
204
|
const Oauth2InitiatedConnectionDataSchema = Oauth2InitiatingConnectionDataSchema.extend({
|
|
203
|
-
status: z.literal(ConnectionStatuses.INITIATED),
|
|
204
|
-
code_verifier: z.string().optional(),
|
|
205
|
-
redirectUrl: z.string(),
|
|
206
|
-
callback_url: z.string().optional(),
|
|
207
|
-
finalRedirectUri: z.string().optional(),
|
|
208
|
-
webhook_signature: z.string().optional()
|
|
209
|
-
}).catchall(z.unknown());
|
|
205
|
+
status: z$1.literal(ConnectionStatuses.INITIATED),
|
|
206
|
+
code_verifier: z$1.string().optional(),
|
|
207
|
+
redirectUrl: z$1.string(),
|
|
208
|
+
callback_url: z$1.string().optional(),
|
|
209
|
+
finalRedirectUri: z$1.string().optional(),
|
|
210
|
+
webhook_signature: z$1.string().optional()
|
|
211
|
+
}).catchall(z$1.unknown());
|
|
210
212
|
const Oauth2ActiveConnectionDataSchema = Oauth2InitiatingConnectionDataSchema.extend({
|
|
211
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
212
|
-
access_token: z.string(),
|
|
213
|
-
id_token: z.string().optional(),
|
|
214
|
-
token_type: z.string().optional(),
|
|
215
|
-
refresh_token: z.string().nullish(),
|
|
216
|
-
expires_in: z.union([
|
|
217
|
-
z.string(),
|
|
218
|
-
z.number(),
|
|
219
|
-
z.null()
|
|
213
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
214
|
+
access_token: z$1.string(),
|
|
215
|
+
id_token: z$1.string().optional(),
|
|
216
|
+
token_type: z$1.string().optional(),
|
|
217
|
+
refresh_token: z$1.string().nullish(),
|
|
218
|
+
expires_in: z$1.union([
|
|
219
|
+
z$1.string(),
|
|
220
|
+
z$1.number(),
|
|
221
|
+
z$1.null()
|
|
220
222
|
]).optional(),
|
|
221
|
-
scope: z.union([
|
|
222
|
-
z.string(),
|
|
223
|
-
z.array(z.string()),
|
|
224
|
-
z.null()
|
|
223
|
+
scope: z$1.union([
|
|
224
|
+
z$1.string(),
|
|
225
|
+
z$1.array(z$1.string()),
|
|
226
|
+
z$1.null()
|
|
225
227
|
]).optional(),
|
|
226
|
-
webhook_signature: z.string().optional(),
|
|
227
|
-
authed_user: z.object({
|
|
228
|
-
access_token: z.string().optional(),
|
|
229
|
-
scope: z.string().optional()
|
|
228
|
+
webhook_signature: z$1.string().optional(),
|
|
229
|
+
authed_user: z$1.object({
|
|
230
|
+
access_token: z$1.string().optional(),
|
|
231
|
+
scope: z$1.string().optional()
|
|
230
232
|
}).optional().describe("for slack user scopes")
|
|
231
|
-
}).catchall(z.unknown());
|
|
233
|
+
}).catchall(z$1.unknown());
|
|
232
234
|
const Oauth2FailedConnectionDataSchema = Oauth2InitiatingConnectionDataSchema.extend({
|
|
233
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
234
|
-
error: z.string().optional(),
|
|
235
|
-
error_description: z.string().optional()
|
|
236
|
-
}).catchall(z.unknown());
|
|
235
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
236
|
+
error: z$1.string().optional(),
|
|
237
|
+
error_description: z$1.string().optional()
|
|
238
|
+
}).catchall(z$1.unknown());
|
|
237
239
|
const Oauth2ExpiredConnectionDataSchema = Oauth2InitiatingConnectionDataSchema.extend({
|
|
238
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
239
|
-
expired_at: z.string().optional()
|
|
240
|
-
}).catchall(z.unknown());
|
|
240
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
241
|
+
expired_at: z$1.string().optional()
|
|
242
|
+
}).catchall(z$1.unknown());
|
|
241
243
|
const Oauth2InactiveConnectionDataSchema = Oauth2InitiatingConnectionDataSchema.extend({
|
|
242
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
243
|
-
access_token: z.string(),
|
|
244
|
-
id_token: z.string().optional(),
|
|
245
|
-
token_type: z.string().optional(),
|
|
246
|
-
refresh_token: z.string().nullish(),
|
|
247
|
-
expires_in: z.union([
|
|
248
|
-
z.string(),
|
|
249
|
-
z.number(),
|
|
250
|
-
z.null()
|
|
244
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
245
|
+
access_token: z$1.string(),
|
|
246
|
+
id_token: z$1.string().optional(),
|
|
247
|
+
token_type: z$1.string().optional(),
|
|
248
|
+
refresh_token: z$1.string().nullish(),
|
|
249
|
+
expires_in: z$1.union([
|
|
250
|
+
z$1.string(),
|
|
251
|
+
z$1.number(),
|
|
252
|
+
z$1.null()
|
|
251
253
|
]).optional(),
|
|
252
|
-
scope: z.union([
|
|
253
|
-
z.string(),
|
|
254
|
-
z.array(z.string()),
|
|
255
|
-
z.null()
|
|
254
|
+
scope: z$1.union([
|
|
255
|
+
z$1.string(),
|
|
256
|
+
z$1.array(z$1.string()),
|
|
257
|
+
z$1.null()
|
|
256
258
|
]).optional(),
|
|
257
|
-
webhook_signature: z.string().optional(),
|
|
258
|
-
authed_user: z.object({
|
|
259
|
-
access_token: z.string().optional(),
|
|
260
|
-
scope: z.string().optional()
|
|
259
|
+
webhook_signature: z$1.string().optional(),
|
|
260
|
+
authed_user: z$1.object({
|
|
261
|
+
access_token: z$1.string().optional(),
|
|
262
|
+
scope: z$1.string().optional()
|
|
261
263
|
}).optional().describe("for slack user scopes")
|
|
262
|
-
}).catchall(z.unknown());
|
|
264
|
+
}).catchall(z$1.unknown());
|
|
263
265
|
const Oauth2RevokedConnectionDataSchema = Oauth2InitiatingConnectionDataSchema.extend({
|
|
264
|
-
status: z.literal(ConnectionStatuses.REVOKED),
|
|
265
|
-
revoked_at: z.string().optional()
|
|
266
|
-
}).catchall(z.unknown());
|
|
267
|
-
const Oauth2ConnectionDataSchema = z.discriminatedUnion("status", [
|
|
266
|
+
status: z$1.literal(ConnectionStatuses.REVOKED),
|
|
267
|
+
revoked_at: z$1.string().optional()
|
|
268
|
+
}).catchall(z$1.unknown());
|
|
269
|
+
const Oauth2ConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
268
270
|
Oauth2InitiatingConnectionDataSchema,
|
|
269
271
|
Oauth2InitiatedConnectionDataSchema,
|
|
270
272
|
Oauth2ActiveConnectionDataSchema,
|
|
@@ -274,111 +276,111 @@ const Oauth2ConnectionDataSchema = z.discriminatedUnion("status", [
|
|
|
274
276
|
Oauth2RevokedConnectionDataSchema
|
|
275
277
|
]);
|
|
276
278
|
const CustomOauth2ConnectionDataSchema = Oauth2ActiveConnectionDataSchema.omit({ status: true });
|
|
277
|
-
const S2SOauth2BaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
278
|
-
const S2SOauth2ConnectionDataSchema = z.discriminatedUnion("status", [
|
|
279
|
+
const S2SOauth2BaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
280
|
+
const S2SOauth2ConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
279
281
|
S2SOauth2BaseSchema,
|
|
280
|
-
S2SOauth2BaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
282
|
+
S2SOauth2BaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
281
283
|
S2SOauth2BaseSchema.extend({
|
|
282
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
283
|
-
access_token: z.string().optional(),
|
|
284
|
-
id_token: z.string().optional(),
|
|
285
|
-
token_type: z.string().optional(),
|
|
286
|
-
refresh_token: z.string().nullish(),
|
|
287
|
-
expires_in: z.union([
|
|
288
|
-
z.string(),
|
|
289
|
-
z.number(),
|
|
290
|
-
z.null()
|
|
284
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
285
|
+
access_token: z$1.string().optional(),
|
|
286
|
+
id_token: z$1.string().optional(),
|
|
287
|
+
token_type: z$1.string().optional(),
|
|
288
|
+
refresh_token: z$1.string().nullish(),
|
|
289
|
+
expires_in: z$1.union([
|
|
290
|
+
z$1.string(),
|
|
291
|
+
z$1.number(),
|
|
292
|
+
z$1.null()
|
|
291
293
|
]).optional(),
|
|
292
|
-
scope: z.union([
|
|
293
|
-
z.string(),
|
|
294
|
-
z.array(z.string()),
|
|
295
|
-
z.null()
|
|
294
|
+
scope: z$1.union([
|
|
295
|
+
z$1.string(),
|
|
296
|
+
z$1.array(z$1.string()),
|
|
297
|
+
z$1.null()
|
|
296
298
|
]).optional()
|
|
297
|
-
}).catchall(z.unknown()),
|
|
299
|
+
}).catchall(z$1.unknown()),
|
|
298
300
|
S2SOauth2BaseSchema.extend({
|
|
299
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
300
|
-
access_token: z.string().optional(),
|
|
301
|
-
id_token: z.string().optional(),
|
|
302
|
-
token_type: z.string().optional(),
|
|
303
|
-
refresh_token: z.string().nullish(),
|
|
304
|
-
expires_in: z.union([
|
|
305
|
-
z.string(),
|
|
306
|
-
z.number(),
|
|
307
|
-
z.null()
|
|
301
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
302
|
+
access_token: z$1.string().optional(),
|
|
303
|
+
id_token: z$1.string().optional(),
|
|
304
|
+
token_type: z$1.string().optional(),
|
|
305
|
+
refresh_token: z$1.string().nullish(),
|
|
306
|
+
expires_in: z$1.union([
|
|
307
|
+
z$1.string(),
|
|
308
|
+
z$1.number(),
|
|
309
|
+
z$1.null()
|
|
308
310
|
]).optional(),
|
|
309
|
-
scope: z.union([
|
|
310
|
-
z.string(),
|
|
311
|
-
z.array(z.string()),
|
|
312
|
-
z.null()
|
|
311
|
+
scope: z$1.union([
|
|
312
|
+
z$1.string(),
|
|
313
|
+
z$1.array(z$1.string()),
|
|
314
|
+
z$1.null()
|
|
313
315
|
]).optional()
|
|
314
|
-
}).catchall(z.unknown()),
|
|
316
|
+
}).catchall(z$1.unknown()),
|
|
315
317
|
S2SOauth2BaseSchema.extend({
|
|
316
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
317
|
-
error: z.string().optional(),
|
|
318
|
-
error_description: z.string().optional()
|
|
319
|
-
}).catchall(z.unknown()),
|
|
318
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
319
|
+
error: z$1.string().optional(),
|
|
320
|
+
error_description: z$1.string().optional()
|
|
321
|
+
}).catchall(z$1.unknown()),
|
|
320
322
|
S2SOauth2BaseSchema.extend({
|
|
321
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
322
|
-
expired_at: z.string().optional()
|
|
323
|
-
}).catchall(z.unknown()),
|
|
323
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
324
|
+
expired_at: z$1.string().optional()
|
|
325
|
+
}).catchall(z$1.unknown()),
|
|
324
326
|
S2SOauth2BaseSchema.extend({
|
|
325
|
-
status: z.literal(ConnectionStatuses.REVOKED),
|
|
326
|
-
revoked_at: z.string().optional()
|
|
327
|
-
}).catchall(z.unknown())
|
|
327
|
+
status: z$1.literal(ConnectionStatuses.REVOKED),
|
|
328
|
+
revoked_at: z$1.string().optional()
|
|
329
|
+
}).catchall(z$1.unknown())
|
|
328
330
|
]);
|
|
329
331
|
const CustomS2SOauth2ConnectionDataSchema = BaseSchemeRaw.extend({
|
|
330
|
-
access_token: z.string().optional(),
|
|
331
|
-
id_token: z.string().optional(),
|
|
332
|
-
token_type: z.string().optional(),
|
|
333
|
-
refresh_token: z.string().nullish().optional(),
|
|
334
|
-
expires_in: z.union([
|
|
335
|
-
z.string(),
|
|
336
|
-
z.number(),
|
|
337
|
-
z.null()
|
|
332
|
+
access_token: z$1.string().optional(),
|
|
333
|
+
id_token: z$1.string().optional(),
|
|
334
|
+
token_type: z$1.string().optional(),
|
|
335
|
+
refresh_token: z$1.string().nullish().optional(),
|
|
336
|
+
expires_in: z$1.union([
|
|
337
|
+
z$1.string(),
|
|
338
|
+
z$1.number(),
|
|
339
|
+
z$1.null()
|
|
338
340
|
]).optional(),
|
|
339
|
-
scope: z.union([
|
|
340
|
-
z.string(),
|
|
341
|
-
z.array(z.string()),
|
|
342
|
-
z.null()
|
|
341
|
+
scope: z$1.union([
|
|
342
|
+
z$1.string(),
|
|
343
|
+
z$1.array(z$1.string()),
|
|
344
|
+
z$1.null()
|
|
343
345
|
]).optional()
|
|
344
|
-
}).catchall(z.unknown());
|
|
345
|
-
const Oauth1InitiatingConnectionDataSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
346
|
+
}).catchall(z$1.unknown());
|
|
347
|
+
const Oauth1InitiatingConnectionDataSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
346
348
|
const Oauth1InitiatedConnectionDataSchema = Oauth1InitiatingConnectionDataSchema.extend({
|
|
347
|
-
status: z.literal(ConnectionStatuses.INITIATED),
|
|
348
|
-
authUri: z.string(),
|
|
349
|
-
oauth_token: z.string(),
|
|
350
|
-
oauth_token_secret: z.string(),
|
|
351
|
-
redirectUrl: z.string(),
|
|
352
|
-
callbackUrl: z.string().optional()
|
|
353
|
-
}).catchall(z.unknown());
|
|
349
|
+
status: z$1.literal(ConnectionStatuses.INITIATED),
|
|
350
|
+
authUri: z$1.string(),
|
|
351
|
+
oauth_token: z$1.string(),
|
|
352
|
+
oauth_token_secret: z$1.string(),
|
|
353
|
+
redirectUrl: z$1.string(),
|
|
354
|
+
callbackUrl: z$1.string().optional()
|
|
355
|
+
}).catchall(z$1.unknown());
|
|
354
356
|
const Oauth1ActiveConnectionDataSchema = Oauth1InitiatingConnectionDataSchema.extend({
|
|
355
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
356
|
-
oauth_token: z.string(),
|
|
357
|
-
oauth_token_secret: z.string(),
|
|
358
|
-
consumer_key: z.string().optional(),
|
|
359
|
-
oauth_verifier: z.string().optional(),
|
|
360
|
-
redirectUrl: z.string().optional(),
|
|
361
|
-
callback_url: z.string().optional()
|
|
362
|
-
}).catchall(z.unknown());
|
|
357
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
358
|
+
oauth_token: z$1.string(),
|
|
359
|
+
oauth_token_secret: z$1.string(),
|
|
360
|
+
consumer_key: z$1.string().optional(),
|
|
361
|
+
oauth_verifier: z$1.string().optional(),
|
|
362
|
+
redirectUrl: z$1.string().optional(),
|
|
363
|
+
callback_url: z$1.string().optional()
|
|
364
|
+
}).catchall(z$1.unknown());
|
|
363
365
|
const Oauth1FailedConnectionDataSchema = Oauth1InitiatingConnectionDataSchema.extend({
|
|
364
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
365
|
-
error: z.string().optional(),
|
|
366
|
-
error_description: z.string().optional()
|
|
367
|
-
}).catchall(z.unknown());
|
|
366
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
367
|
+
error: z$1.string().optional(),
|
|
368
|
+
error_description: z$1.string().optional()
|
|
369
|
+
}).catchall(z$1.unknown());
|
|
368
370
|
const Oauth1ExpiredConnectionDataSchema = Oauth1InitiatingConnectionDataSchema.extend({
|
|
369
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
370
|
-
expired_at: z.string().optional()
|
|
371
|
-
}).catchall(z.unknown());
|
|
371
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
372
|
+
expired_at: z$1.string().optional()
|
|
373
|
+
}).catchall(z$1.unknown());
|
|
372
374
|
const Oauth1InactiveConnectionDataSchema = Oauth1InitiatingConnectionDataSchema.extend({
|
|
373
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
374
|
-
oauth_token: z.string(),
|
|
375
|
-
oauth_token_secret: z.string(),
|
|
376
|
-
consumer_key: z.string().optional(),
|
|
377
|
-
oauth_verifier: z.string().optional(),
|
|
378
|
-
redirectUrl: z.string().optional(),
|
|
379
|
-
callback_url: z.string().optional()
|
|
380
|
-
}).catchall(z.unknown());
|
|
381
|
-
const Oauth1ConnectionDataSchema = z.discriminatedUnion("status", [
|
|
375
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
376
|
+
oauth_token: z$1.string(),
|
|
377
|
+
oauth_token_secret: z$1.string(),
|
|
378
|
+
consumer_key: z$1.string().optional(),
|
|
379
|
+
oauth_verifier: z$1.string().optional(),
|
|
380
|
+
redirectUrl: z$1.string().optional(),
|
|
381
|
+
callback_url: z$1.string().optional()
|
|
382
|
+
}).catchall(z$1.unknown());
|
|
383
|
+
const Oauth1ConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
382
384
|
Oauth1InitiatingConnectionDataSchema,
|
|
383
385
|
Oauth1InitiatedConnectionDataSchema,
|
|
384
386
|
Oauth1ActiveConnectionDataSchema,
|
|
@@ -387,461 +389,461 @@ const Oauth1ConnectionDataSchema = z.discriminatedUnion("status", [
|
|
|
387
389
|
Oauth1InactiveConnectionDataSchema
|
|
388
390
|
]);
|
|
389
391
|
const CustomOauth1ConnectionDataSchema = Oauth1ActiveConnectionDataSchema.omit({ status: true });
|
|
390
|
-
const BillcomAuthInitiatingSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
391
|
-
const BillcomAuthConnectionDataSchema = z.discriminatedUnion("status", [
|
|
392
|
+
const BillcomAuthInitiatingSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
393
|
+
const BillcomAuthConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
392
394
|
BillcomAuthInitiatingSchema,
|
|
393
395
|
BillcomAuthInitiatingSchema.extend({
|
|
394
|
-
status: z.literal(ConnectionStatuses.INITIATED),
|
|
395
|
-
redirectUrl: z.string()
|
|
396
|
-
}).catchall(z.unknown()),
|
|
396
|
+
status: z$1.literal(ConnectionStatuses.INITIATED),
|
|
397
|
+
redirectUrl: z$1.string()
|
|
398
|
+
}).catchall(z$1.unknown()),
|
|
397
399
|
BillcomAuthInitiatingSchema.extend({
|
|
398
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
399
|
-
sessionId: z.string(),
|
|
400
|
-
devKey: z.string()
|
|
401
|
-
}).catchall(z.unknown()),
|
|
400
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
401
|
+
sessionId: z$1.string(),
|
|
402
|
+
devKey: z$1.string()
|
|
403
|
+
}).catchall(z$1.unknown()),
|
|
402
404
|
BillcomAuthInitiatingSchema.extend({
|
|
403
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
404
|
-
error: z.string().optional(),
|
|
405
|
-
error_description: z.string().optional()
|
|
406
|
-
}).catchall(z.unknown()),
|
|
405
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
406
|
+
error: z$1.string().optional(),
|
|
407
|
+
error_description: z$1.string().optional()
|
|
408
|
+
}).catchall(z$1.unknown()),
|
|
407
409
|
BillcomAuthInitiatingSchema.extend({
|
|
408
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
409
|
-
expired_at: z.string().optional()
|
|
410
|
-
}).catchall(z.unknown()),
|
|
411
|
-
BillcomAuthInitiatingSchema.extend({ status: z.literal(ConnectionStatuses.INACTIVE) }).catchall(z.unknown())
|
|
410
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
411
|
+
expired_at: z$1.string().optional()
|
|
412
|
+
}).catchall(z$1.unknown()),
|
|
413
|
+
BillcomAuthInitiatingSchema.extend({ status: z$1.literal(ConnectionStatuses.INACTIVE) }).catchall(z$1.unknown())
|
|
412
414
|
]);
|
|
413
|
-
const BasicBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
414
|
-
const BasicConnectionDataSchema = z.discriminatedUnion("status", [
|
|
415
|
+
const BasicBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
416
|
+
const BasicConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
415
417
|
BasicBaseSchema,
|
|
416
|
-
BasicBaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
418
|
+
BasicBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
417
419
|
BasicBaseSchema.extend({
|
|
418
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
419
|
-
username: z.string(),
|
|
420
|
-
password: z.string()
|
|
421
|
-
}).catchall(z.unknown()),
|
|
420
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
421
|
+
username: z$1.string(),
|
|
422
|
+
password: z$1.string()
|
|
423
|
+
}).catchall(z$1.unknown()),
|
|
422
424
|
BasicBaseSchema.extend({
|
|
423
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
424
|
-
username: z.string(),
|
|
425
|
-
password: z.string()
|
|
426
|
-
}).catchall(z.unknown()),
|
|
425
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
426
|
+
username: z$1.string(),
|
|
427
|
+
password: z$1.string()
|
|
428
|
+
}).catchall(z$1.unknown()),
|
|
427
429
|
BasicBaseSchema.extend({
|
|
428
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
429
|
-
username: z.string(),
|
|
430
|
-
password: z.string(),
|
|
431
|
-
error: z.string().optional(),
|
|
432
|
-
error_description: z.string().optional()
|
|
433
|
-
}).catchall(z.unknown()),
|
|
430
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
431
|
+
username: z$1.string(),
|
|
432
|
+
password: z$1.string(),
|
|
433
|
+
error: z$1.string().optional(),
|
|
434
|
+
error_description: z$1.string().optional()
|
|
435
|
+
}).catchall(z$1.unknown()),
|
|
434
436
|
BasicBaseSchema.extend({
|
|
435
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
436
|
-
username: z.string(),
|
|
437
|
-
password: z.string(),
|
|
438
|
-
expired_at: z.string().optional()
|
|
439
|
-
}).catchall(z.unknown())
|
|
437
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
438
|
+
username: z$1.string(),
|
|
439
|
+
password: z$1.string(),
|
|
440
|
+
expired_at: z$1.string().optional()
|
|
441
|
+
}).catchall(z$1.unknown())
|
|
440
442
|
]);
|
|
441
443
|
const CustomBasicConnectionDataSchema = BaseSchemeRaw.extend({
|
|
442
|
-
username: z.string(),
|
|
443
|
-
password: z.string()
|
|
444
|
-
}).catchall(z.unknown());
|
|
445
|
-
const ApiKeyBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
446
|
-
const ApiKeyConnectionDataSchema = z.discriminatedUnion("status", [
|
|
444
|
+
username: z$1.string(),
|
|
445
|
+
password: z$1.string()
|
|
446
|
+
}).catchall(z$1.unknown());
|
|
447
|
+
const ApiKeyBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
448
|
+
const ApiKeyConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
447
449
|
ApiKeyBaseSchema,
|
|
448
|
-
ApiKeyBaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
450
|
+
ApiKeyBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
449
451
|
ApiKeyBaseSchema.extend({
|
|
450
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
451
|
-
api_key: z.string().optional(),
|
|
452
|
-
generic_api_key: z.string().optional()
|
|
453
|
-
}).catchall(z.unknown()),
|
|
452
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
453
|
+
api_key: z$1.string().optional(),
|
|
454
|
+
generic_api_key: z$1.string().optional()
|
|
455
|
+
}).catchall(z$1.unknown()),
|
|
454
456
|
ApiKeyBaseSchema.extend({
|
|
455
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
456
|
-
api_key: z.string().optional(),
|
|
457
|
-
generic_api_key: z.string().optional()
|
|
458
|
-
}).catchall(z.unknown()),
|
|
457
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
458
|
+
api_key: z$1.string().optional(),
|
|
459
|
+
generic_api_key: z$1.string().optional()
|
|
460
|
+
}).catchall(z$1.unknown()),
|
|
459
461
|
ApiKeyBaseSchema.extend({
|
|
460
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
461
|
-
error: z.string().optional(),
|
|
462
|
-
error_description: z.string().optional()
|
|
463
|
-
}).catchall(z.unknown()),
|
|
462
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
463
|
+
error: z$1.string().optional(),
|
|
464
|
+
error_description: z$1.string().optional()
|
|
465
|
+
}).catchall(z$1.unknown()),
|
|
464
466
|
ApiKeyBaseSchema.extend({
|
|
465
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
466
|
-
expired_at: z.string().optional()
|
|
467
|
-
}).catchall(z.unknown())
|
|
467
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
468
|
+
expired_at: z$1.string().optional()
|
|
469
|
+
}).catchall(z$1.unknown())
|
|
468
470
|
]);
|
|
469
471
|
const CustomApiKeyConnectionDataSchema = BaseSchemeRaw.extend({
|
|
470
|
-
api_key: z.string().optional(),
|
|
471
|
-
generic_api_key: z.string().optional()
|
|
472
|
-
}).catchall(z.unknown());
|
|
473
|
-
const BearerTokenBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
474
|
-
const BearerTokenConnectionDataSchema = z.discriminatedUnion("status", [
|
|
472
|
+
api_key: z$1.string().optional(),
|
|
473
|
+
generic_api_key: z$1.string().optional()
|
|
474
|
+
}).catchall(z$1.unknown());
|
|
475
|
+
const BearerTokenBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
476
|
+
const BearerTokenConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
475
477
|
BearerTokenBaseSchema,
|
|
476
|
-
BearerTokenBaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
478
|
+
BearerTokenBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
477
479
|
BearerTokenBaseSchema.extend({
|
|
478
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
479
|
-
token: z.string()
|
|
480
|
-
}).catchall(z.unknown()),
|
|
480
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
481
|
+
token: z$1.string()
|
|
482
|
+
}).catchall(z$1.unknown()),
|
|
481
483
|
BearerTokenBaseSchema.extend({
|
|
482
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
483
|
-
token: z.string()
|
|
484
|
-
}).catchall(z.unknown()),
|
|
484
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
485
|
+
token: z$1.string()
|
|
486
|
+
}).catchall(z$1.unknown()),
|
|
485
487
|
BearerTokenBaseSchema.extend({
|
|
486
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
487
|
-
error: z.string().optional(),
|
|
488
|
-
error_description: z.string().optional()
|
|
489
|
-
}).catchall(z.unknown()),
|
|
488
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
489
|
+
error: z$1.string().optional(),
|
|
490
|
+
error_description: z$1.string().optional()
|
|
491
|
+
}).catchall(z$1.unknown()),
|
|
490
492
|
BearerTokenBaseSchema.extend({
|
|
491
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
492
|
-
expired_at: z.string().optional()
|
|
493
|
-
}).catchall(z.unknown())
|
|
493
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
494
|
+
expired_at: z$1.string().optional()
|
|
495
|
+
}).catchall(z$1.unknown())
|
|
494
496
|
]);
|
|
495
|
-
const CustomBearerTokenConnectionDataSchema = BaseSchemeRaw.extend({ token: z.string() }).catchall(z.unknown());
|
|
496
|
-
const GoogleServiceAccountBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
497
|
-
const GoogleServiceAccountConnectionDataSchema = z.discriminatedUnion("status", [
|
|
497
|
+
const CustomBearerTokenConnectionDataSchema = BaseSchemeRaw.extend({ token: z$1.string() }).catchall(z$1.unknown());
|
|
498
|
+
const GoogleServiceAccountBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
499
|
+
const GoogleServiceAccountConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
498
500
|
GoogleServiceAccountBaseSchema,
|
|
499
501
|
GoogleServiceAccountBaseSchema.extend({
|
|
500
|
-
status: z.literal(ConnectionStatuses.INITIATED),
|
|
501
|
-
redirectUrl: z.string(),
|
|
502
|
-
composio_link_redirect_url: z.string().optional()
|
|
503
|
-
}).catchall(z.unknown()),
|
|
502
|
+
status: z$1.literal(ConnectionStatuses.INITIATED),
|
|
503
|
+
redirectUrl: z$1.string(),
|
|
504
|
+
composio_link_redirect_url: z$1.string().optional()
|
|
505
|
+
}).catchall(z$1.unknown()),
|
|
504
506
|
GoogleServiceAccountBaseSchema.extend({
|
|
505
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
506
|
-
credentials_json: z.string()
|
|
507
|
-
}).catchall(z.unknown()),
|
|
507
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
508
|
+
credentials_json: z$1.string()
|
|
509
|
+
}).catchall(z$1.unknown()),
|
|
508
510
|
GoogleServiceAccountBaseSchema.extend({
|
|
509
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
510
|
-
credentials_json: z.string()
|
|
511
|
-
}).catchall(z.unknown()),
|
|
511
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
512
|
+
credentials_json: z$1.string()
|
|
513
|
+
}).catchall(z$1.unknown()),
|
|
512
514
|
GoogleServiceAccountBaseSchema.extend({
|
|
513
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
514
|
-
error: z.string().optional(),
|
|
515
|
-
error_description: z.string().optional()
|
|
516
|
-
}).catchall(z.unknown()),
|
|
515
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
516
|
+
error: z$1.string().optional(),
|
|
517
|
+
error_description: z$1.string().optional()
|
|
518
|
+
}).catchall(z$1.unknown()),
|
|
517
519
|
GoogleServiceAccountBaseSchema.extend({
|
|
518
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
519
|
-
expired_at: z.string().optional()
|
|
520
|
-
}).catchall(z.unknown())
|
|
520
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
521
|
+
expired_at: z$1.string().optional()
|
|
522
|
+
}).catchall(z$1.unknown())
|
|
521
523
|
]);
|
|
522
|
-
const NoAuthBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
523
|
-
const NoAuthConnectionDataSchema = z.discriminatedUnion("status", [
|
|
524
|
+
const NoAuthBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
525
|
+
const NoAuthConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
524
526
|
NoAuthBaseSchema,
|
|
525
|
-
NoAuthBaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
526
|
-
NoAuthBaseSchema.extend({ status: z.literal(ConnectionStatuses.ACTIVE) }).catchall(z.unknown()),
|
|
527
|
-
NoAuthBaseSchema.extend({ status: z.literal(ConnectionStatuses.INACTIVE) }).catchall(z.unknown()),
|
|
527
|
+
NoAuthBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
528
|
+
NoAuthBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.ACTIVE) }).catchall(z$1.unknown()),
|
|
529
|
+
NoAuthBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INACTIVE) }).catchall(z$1.unknown()),
|
|
528
530
|
NoAuthBaseSchema.extend({
|
|
529
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
530
|
-
error: z.string().optional(),
|
|
531
|
-
error_description: z.string().optional()
|
|
532
|
-
}).catchall(z.unknown()),
|
|
531
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
532
|
+
error: z$1.string().optional(),
|
|
533
|
+
error_description: z$1.string().optional()
|
|
534
|
+
}).catchall(z$1.unknown()),
|
|
533
535
|
NoAuthBaseSchema.extend({
|
|
534
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
535
|
-
expired_at: z.string().optional()
|
|
536
|
-
}).catchall(z.unknown())
|
|
536
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
537
|
+
expired_at: z$1.string().optional()
|
|
538
|
+
}).catchall(z$1.unknown())
|
|
537
539
|
]);
|
|
538
|
-
const CustomNoAuthConnectionDataSchema = BaseSchemeRaw.catchall(z.unknown());
|
|
539
|
-
const CalcomAuthBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
540
|
-
const CalcomAuthConnectionDataSchema = z.discriminatedUnion("status", [
|
|
540
|
+
const CustomNoAuthConnectionDataSchema = BaseSchemeRaw.catchall(z$1.unknown());
|
|
541
|
+
const CalcomAuthBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
542
|
+
const CalcomAuthConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
541
543
|
CalcomAuthBaseSchema,
|
|
542
|
-
CalcomAuthBaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
543
|
-
CalcomAuthBaseSchema.extend({ status: z.literal(ConnectionStatuses.ACTIVE) }).catchall(z.unknown()),
|
|
544
|
-
CalcomAuthBaseSchema.extend({ status: z.literal(ConnectionStatuses.INACTIVE) }).catchall(z.unknown()),
|
|
544
|
+
CalcomAuthBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
545
|
+
CalcomAuthBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.ACTIVE) }).catchall(z$1.unknown()),
|
|
546
|
+
CalcomAuthBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INACTIVE) }).catchall(z$1.unknown()),
|
|
545
547
|
CalcomAuthBaseSchema.extend({
|
|
546
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
547
|
-
error: z.string().optional(),
|
|
548
|
-
error_description: z.string().optional()
|
|
549
|
-
}).catchall(z.unknown()),
|
|
548
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
549
|
+
error: z$1.string().optional(),
|
|
550
|
+
error_description: z$1.string().optional()
|
|
551
|
+
}).catchall(z$1.unknown()),
|
|
550
552
|
CalcomAuthBaseSchema.extend({
|
|
551
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
552
|
-
expired_at: z.string().optional()
|
|
553
|
-
}).catchall(z.unknown())
|
|
553
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
554
|
+
expired_at: z$1.string().optional()
|
|
555
|
+
}).catchall(z$1.unknown())
|
|
554
556
|
]);
|
|
555
|
-
const BasicWithJwtBaseSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
556
|
-
const BasicWithJwtConnectionDataSchema = z.discriminatedUnion("status", [
|
|
557
|
+
const BasicWithJwtBaseSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
558
|
+
const BasicWithJwtConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
557
559
|
BasicWithJwtBaseSchema,
|
|
558
|
-
BasicWithJwtBaseSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
560
|
+
BasicWithJwtBaseSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
559
561
|
BasicWithJwtBaseSchema.extend({
|
|
560
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
561
|
-
username: z.string(),
|
|
562
|
-
password: z.string()
|
|
563
|
-
}).catchall(z.unknown()),
|
|
562
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
563
|
+
username: z$1.string(),
|
|
564
|
+
password: z$1.string()
|
|
565
|
+
}).catchall(z$1.unknown()),
|
|
564
566
|
BasicWithJwtBaseSchema.extend({
|
|
565
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
566
|
-
username: z.string(),
|
|
567
|
-
password: z.string()
|
|
568
|
-
}).catchall(z.unknown()),
|
|
567
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
568
|
+
username: z$1.string(),
|
|
569
|
+
password: z$1.string()
|
|
570
|
+
}).catchall(z$1.unknown()),
|
|
569
571
|
BasicWithJwtBaseSchema.extend({
|
|
570
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
571
|
-
username: z.string(),
|
|
572
|
-
password: z.string(),
|
|
573
|
-
error: z.string().optional(),
|
|
574
|
-
error_description: z.string().optional()
|
|
575
|
-
}).catchall(z.unknown()),
|
|
572
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
573
|
+
username: z$1.string(),
|
|
574
|
+
password: z$1.string(),
|
|
575
|
+
error: z$1.string().optional(),
|
|
576
|
+
error_description: z$1.string().optional()
|
|
577
|
+
}).catchall(z$1.unknown()),
|
|
576
578
|
BasicWithJwtBaseSchema.extend({
|
|
577
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
578
|
-
username: z.string(),
|
|
579
|
-
password: z.string(),
|
|
580
|
-
expired_at: z.string().optional()
|
|
581
|
-
}).catchall(z.unknown())
|
|
579
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
580
|
+
username: z$1.string(),
|
|
581
|
+
password: z$1.string(),
|
|
582
|
+
expired_at: z$1.string().optional()
|
|
583
|
+
}).catchall(z$1.unknown())
|
|
582
584
|
]);
|
|
583
585
|
const CustomBasicWithJwtConnectionDataSchema = BaseSchemeRaw.extend({
|
|
584
|
-
username: z.string(),
|
|
585
|
-
password: z.string()
|
|
586
|
-
}).catchall(z.unknown());
|
|
587
|
-
const ServiceAccountInitiatingSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
588
|
-
const ServiceAccountConnectionDataSchema = z.discriminatedUnion("status", [
|
|
586
|
+
username: z$1.string(),
|
|
587
|
+
password: z$1.string()
|
|
588
|
+
}).catchall(z$1.unknown());
|
|
589
|
+
const ServiceAccountInitiatingSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
590
|
+
const ServiceAccountConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
589
591
|
ServiceAccountInitiatingSchema,
|
|
590
|
-
ServiceAccountInitiatingSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
592
|
+
ServiceAccountInitiatingSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
591
593
|
ServiceAccountInitiatingSchema.extend({
|
|
592
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
593
|
-
application_id: z.string(),
|
|
594
|
-
installation_id: z.string(),
|
|
595
|
-
private_key: z.string()
|
|
596
|
-
}).catchall(z.unknown()),
|
|
594
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
595
|
+
application_id: z$1.string(),
|
|
596
|
+
installation_id: z$1.string(),
|
|
597
|
+
private_key: z$1.string()
|
|
598
|
+
}).catchall(z$1.unknown()),
|
|
597
599
|
ServiceAccountInitiatingSchema.extend({
|
|
598
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
599
|
-
application_id: z.string(),
|
|
600
|
-
installation_id: z.string(),
|
|
601
|
-
private_key: z.string()
|
|
602
|
-
}).catchall(z.unknown())
|
|
600
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
601
|
+
application_id: z$1.string(),
|
|
602
|
+
installation_id: z$1.string(),
|
|
603
|
+
private_key: z$1.string()
|
|
604
|
+
}).catchall(z$1.unknown())
|
|
603
605
|
]);
|
|
604
|
-
const CustomServiceAccountConnectionDataSchema = z.object({
|
|
605
|
-
application_id: z.string(),
|
|
606
|
-
installation_id: z.string(),
|
|
607
|
-
private_key: z.string()
|
|
608
|
-
}).merge(BaseSchemeRaw).catchall(z.unknown());
|
|
609
|
-
const SamlInitiatingSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
610
|
-
const SamlConnectionDataSchema = z.discriminatedUnion("status", [
|
|
606
|
+
const CustomServiceAccountConnectionDataSchema = z$1.object({
|
|
607
|
+
application_id: z$1.string(),
|
|
608
|
+
installation_id: z$1.string(),
|
|
609
|
+
private_key: z$1.string()
|
|
610
|
+
}).merge(BaseSchemeRaw).catchall(z$1.unknown());
|
|
611
|
+
const SamlInitiatingSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
612
|
+
const SamlConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
611
613
|
SamlInitiatingSchema,
|
|
612
|
-
SamlInitiatingSchema.extend({ status: z.literal(ConnectionStatuses.INITIATED) }).catchall(z.unknown()),
|
|
613
|
-
SamlInitiatingSchema.extend({ status: z.literal(ConnectionStatuses.ACTIVE) }).catchall(z.unknown()),
|
|
614
|
-
SamlInitiatingSchema.extend({ status: z.literal(ConnectionStatuses.INACTIVE) }).catchall(z.unknown()),
|
|
614
|
+
SamlInitiatingSchema.extend({ status: z$1.literal(ConnectionStatuses.INITIATED) }).catchall(z$1.unknown()),
|
|
615
|
+
SamlInitiatingSchema.extend({ status: z$1.literal(ConnectionStatuses.ACTIVE) }).catchall(z$1.unknown()),
|
|
616
|
+
SamlInitiatingSchema.extend({ status: z$1.literal(ConnectionStatuses.INACTIVE) }).catchall(z$1.unknown()),
|
|
615
617
|
SamlInitiatingSchema.extend({
|
|
616
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
617
|
-
error: z.string().optional(),
|
|
618
|
-
error_description: z.string().optional()
|
|
619
|
-
}).catchall(z.unknown()),
|
|
618
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
619
|
+
error: z$1.string().optional(),
|
|
620
|
+
error_description: z$1.string().optional()
|
|
621
|
+
}).catchall(z$1.unknown()),
|
|
620
622
|
SamlInitiatingSchema.extend({
|
|
621
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
622
|
-
expired_at: z.string().optional()
|
|
623
|
-
}).catchall(z.unknown())
|
|
623
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
624
|
+
expired_at: z$1.string().optional()
|
|
625
|
+
}).catchall(z$1.unknown())
|
|
624
626
|
]);
|
|
625
|
-
BaseSchemeRaw.catchall(z.unknown());
|
|
626
|
-
const DcrOauthInitiatingSchema = BaseSchemeRaw.extend({ status: z.literal(ConnectionStatuses.INITIALIZING) }).catchall(z.unknown());
|
|
627
|
-
const DcrOauthConnectionDataSchema = z.discriminatedUnion("status", [
|
|
627
|
+
BaseSchemeRaw.catchall(z$1.unknown());
|
|
628
|
+
const DcrOauthInitiatingSchema = BaseSchemeRaw.extend({ status: z$1.literal(ConnectionStatuses.INITIALIZING) }).catchall(z$1.unknown());
|
|
629
|
+
const DcrOauthConnectionDataSchema = z$1.discriminatedUnion("status", [
|
|
628
630
|
DcrOauthInitiatingSchema,
|
|
629
631
|
DcrOauthInitiatingSchema.extend({
|
|
630
|
-
status: z.literal(ConnectionStatuses.INITIATED),
|
|
631
|
-
client_id: z.string(),
|
|
632
|
-
redirectUrl: z.string(),
|
|
633
|
-
client_secret: z.string().optional(),
|
|
634
|
-
callback_url: z.string().optional(),
|
|
635
|
-
client_id_issued_at: z.number().optional(),
|
|
636
|
-
client_secret_expires_at: z.number().optional(),
|
|
637
|
-
code_verifier: z.string().optional(),
|
|
638
|
-
finalRedirectUri: z.string().optional()
|
|
639
|
-
}).catchall(z.unknown()),
|
|
632
|
+
status: z$1.literal(ConnectionStatuses.INITIATED),
|
|
633
|
+
client_id: z$1.string(),
|
|
634
|
+
redirectUrl: z$1.string(),
|
|
635
|
+
client_secret: z$1.string().optional(),
|
|
636
|
+
callback_url: z$1.string().optional(),
|
|
637
|
+
client_id_issued_at: z$1.number().optional(),
|
|
638
|
+
client_secret_expires_at: z$1.number().optional(),
|
|
639
|
+
code_verifier: z$1.string().optional(),
|
|
640
|
+
finalRedirectUri: z$1.string().optional()
|
|
641
|
+
}).catchall(z$1.unknown()),
|
|
640
642
|
DcrOauthInitiatingSchema.extend({
|
|
641
|
-
status: z.literal(ConnectionStatuses.ACTIVE),
|
|
642
|
-
access_token: z.string(),
|
|
643
|
-
client_id: z.string(),
|
|
644
|
-
token_type: z.string().optional(),
|
|
645
|
-
refresh_token: z.string().nullish(),
|
|
646
|
-
expires_in: z.union([
|
|
647
|
-
z.string(),
|
|
648
|
-
z.number(),
|
|
649
|
-
z.null()
|
|
643
|
+
status: z$1.literal(ConnectionStatuses.ACTIVE),
|
|
644
|
+
access_token: z$1.string(),
|
|
645
|
+
client_id: z$1.string(),
|
|
646
|
+
token_type: z$1.string().optional(),
|
|
647
|
+
refresh_token: z$1.string().nullish(),
|
|
648
|
+
expires_in: z$1.union([
|
|
649
|
+
z$1.string(),
|
|
650
|
+
z$1.number(),
|
|
651
|
+
z$1.null()
|
|
650
652
|
]).optional(),
|
|
651
|
-
scope: z.union([
|
|
652
|
-
z.string(),
|
|
653
|
-
z.array(z.string()),
|
|
654
|
-
z.null()
|
|
653
|
+
scope: z$1.union([
|
|
654
|
+
z$1.string(),
|
|
655
|
+
z$1.array(z$1.string()),
|
|
656
|
+
z$1.null()
|
|
655
657
|
]).optional(),
|
|
656
|
-
id_token: z.string().optional(),
|
|
657
|
-
client_secret: z.string().optional(),
|
|
658
|
-
client_id_issued_at: z.number().optional(),
|
|
659
|
-
client_secret_expires_at: z.number().optional()
|
|
660
|
-
}).catchall(z.unknown()),
|
|
658
|
+
id_token: z$1.string().optional(),
|
|
659
|
+
client_secret: z$1.string().optional(),
|
|
660
|
+
client_id_issued_at: z$1.number().optional(),
|
|
661
|
+
client_secret_expires_at: z$1.number().optional()
|
|
662
|
+
}).catchall(z$1.unknown()),
|
|
661
663
|
DcrOauthInitiatingSchema.extend({
|
|
662
|
-
status: z.literal(ConnectionStatuses.INACTIVE),
|
|
663
|
-
access_token: z.string(),
|
|
664
|
-
client_id: z.string(),
|
|
665
|
-
token_type: z.string().optional(),
|
|
666
|
-
refresh_token: z.string().nullish(),
|
|
667
|
-
expires_in: z.union([
|
|
668
|
-
z.string(),
|
|
669
|
-
z.number(),
|
|
670
|
-
z.null()
|
|
664
|
+
status: z$1.literal(ConnectionStatuses.INACTIVE),
|
|
665
|
+
access_token: z$1.string(),
|
|
666
|
+
client_id: z$1.string(),
|
|
667
|
+
token_type: z$1.string().optional(),
|
|
668
|
+
refresh_token: z$1.string().nullish(),
|
|
669
|
+
expires_in: z$1.union([
|
|
670
|
+
z$1.string(),
|
|
671
|
+
z$1.number(),
|
|
672
|
+
z$1.null()
|
|
671
673
|
]).optional(),
|
|
672
|
-
scope: z.union([
|
|
673
|
-
z.string(),
|
|
674
|
-
z.array(z.string()),
|
|
675
|
-
z.null()
|
|
674
|
+
scope: z$1.union([
|
|
675
|
+
z$1.string(),
|
|
676
|
+
z$1.array(z$1.string()),
|
|
677
|
+
z$1.null()
|
|
676
678
|
]).optional(),
|
|
677
|
-
id_token: z.string().optional(),
|
|
678
|
-
client_secret: z.string().optional(),
|
|
679
|
-
client_id_issued_at: z.number().optional(),
|
|
680
|
-
client_secret_expires_at: z.number().optional()
|
|
681
|
-
}).catchall(z.unknown()),
|
|
679
|
+
id_token: z$1.string().optional(),
|
|
680
|
+
client_secret: z$1.string().optional(),
|
|
681
|
+
client_id_issued_at: z$1.number().optional(),
|
|
682
|
+
client_secret_expires_at: z$1.number().optional()
|
|
683
|
+
}).catchall(z$1.unknown()),
|
|
682
684
|
DcrOauthInitiatingSchema.extend({
|
|
683
|
-
status: z.literal(ConnectionStatuses.FAILED),
|
|
684
|
-
error: z.string().optional(),
|
|
685
|
-
error_description: z.string().optional()
|
|
686
|
-
}).catchall(z.unknown()),
|
|
685
|
+
status: z$1.literal(ConnectionStatuses.FAILED),
|
|
686
|
+
error: z$1.string().optional(),
|
|
687
|
+
error_description: z$1.string().optional()
|
|
688
|
+
}).catchall(z$1.unknown()),
|
|
687
689
|
DcrOauthInitiatingSchema.extend({
|
|
688
|
-
status: z.literal(ConnectionStatuses.EXPIRED),
|
|
689
|
-
expired_at: z.string().optional()
|
|
690
|
-
}).catchall(z.unknown())
|
|
690
|
+
status: z$1.literal(ConnectionStatuses.EXPIRED),
|
|
691
|
+
expired_at: z$1.string().optional()
|
|
692
|
+
}).catchall(z$1.unknown())
|
|
691
693
|
]);
|
|
692
|
-
const CustomDcrOauthConnectionDataSchema = z.object({
|
|
693
|
-
access_token: z.string(),
|
|
694
|
-
client_id: z.string()
|
|
695
|
-
}).merge(BaseSchemeRaw).catchall(z.unknown());
|
|
696
|
-
const ConnectionDataSchema = z.discriminatedUnion("authScheme", [
|
|
697
|
-
z.object({
|
|
698
|
-
authScheme: z.literal(AuthSchemeTypes.OAUTH1),
|
|
694
|
+
const CustomDcrOauthConnectionDataSchema = z$1.object({
|
|
695
|
+
access_token: z$1.string(),
|
|
696
|
+
client_id: z$1.string()
|
|
697
|
+
}).merge(BaseSchemeRaw).catchall(z$1.unknown());
|
|
698
|
+
const ConnectionDataSchema = z$1.discriminatedUnion("authScheme", [
|
|
699
|
+
z$1.object({
|
|
700
|
+
authScheme: z$1.literal(AuthSchemeTypes.OAUTH1),
|
|
699
701
|
/**
|
|
700
702
|
* the main connection data discriminated by auth scheme
|
|
701
703
|
*/
|
|
702
704
|
val: Oauth1ConnectionDataSchema
|
|
703
705
|
}),
|
|
704
|
-
z.object({
|
|
705
|
-
authScheme: z.literal(AuthSchemeTypes.OAUTH2),
|
|
706
|
+
z$1.object({
|
|
707
|
+
authScheme: z$1.literal(AuthSchemeTypes.OAUTH2),
|
|
706
708
|
/**
|
|
707
709
|
* the main connection data discriminated by auth scheme
|
|
708
710
|
*/
|
|
709
711
|
val: Oauth2ConnectionDataSchema
|
|
710
712
|
}),
|
|
711
|
-
z.object({
|
|
712
|
-
authScheme: z.literal(AuthSchemeTypes.S2S_OAUTH2),
|
|
713
|
+
z$1.object({
|
|
714
|
+
authScheme: z$1.literal(AuthSchemeTypes.S2S_OAUTH2),
|
|
713
715
|
/**
|
|
714
716
|
* the main connection data discriminated by auth scheme
|
|
715
717
|
*/
|
|
716
718
|
val: S2SOauth2ConnectionDataSchema
|
|
717
719
|
}),
|
|
718
|
-
z.object({
|
|
719
|
-
authScheme: z.literal(AuthSchemeTypes.API_KEY),
|
|
720
|
+
z$1.object({
|
|
721
|
+
authScheme: z$1.literal(AuthSchemeTypes.API_KEY),
|
|
720
722
|
/**
|
|
721
723
|
* the main connection data discriminated by auth scheme
|
|
722
724
|
*/
|
|
723
725
|
val: ApiKeyConnectionDataSchema
|
|
724
726
|
}),
|
|
725
|
-
z.object({
|
|
726
|
-
authScheme: z.literal(AuthSchemeTypes.BASIC),
|
|
727
|
+
z$1.object({
|
|
728
|
+
authScheme: z$1.literal(AuthSchemeTypes.BASIC),
|
|
727
729
|
/**
|
|
728
730
|
* the main connection data discriminated by auth scheme
|
|
729
731
|
*/
|
|
730
732
|
val: BasicConnectionDataSchema
|
|
731
733
|
}),
|
|
732
|
-
z.object({
|
|
733
|
-
authScheme: z.literal(AuthSchemeTypes.BEARER_TOKEN),
|
|
734
|
+
z$1.object({
|
|
735
|
+
authScheme: z$1.literal(AuthSchemeTypes.BEARER_TOKEN),
|
|
734
736
|
/**
|
|
735
737
|
* the main connection data discriminated by auth scheme
|
|
736
738
|
*/
|
|
737
739
|
val: BearerTokenConnectionDataSchema
|
|
738
740
|
}),
|
|
739
|
-
z.object({
|
|
740
|
-
authScheme: z.literal(AuthSchemeTypes.GOOGLE_SERVICE_ACCOUNT),
|
|
741
|
+
z$1.object({
|
|
742
|
+
authScheme: z$1.literal(AuthSchemeTypes.GOOGLE_SERVICE_ACCOUNT),
|
|
741
743
|
/**
|
|
742
744
|
* the main connection data discriminated by auth scheme
|
|
743
745
|
*/
|
|
744
746
|
val: GoogleServiceAccountConnectionDataSchema
|
|
745
747
|
}),
|
|
746
|
-
z.object({
|
|
747
|
-
authScheme: z.literal(AuthSchemeTypes.NO_AUTH),
|
|
748
|
+
z$1.object({
|
|
749
|
+
authScheme: z$1.literal(AuthSchemeTypes.NO_AUTH),
|
|
748
750
|
/**
|
|
749
751
|
* the main connection data discriminated by auth scheme
|
|
750
752
|
*/
|
|
751
753
|
val: NoAuthConnectionDataSchema
|
|
752
754
|
}),
|
|
753
|
-
z.object({
|
|
754
|
-
authScheme: z.literal(AuthSchemeTypes.CALCOM_AUTH),
|
|
755
|
+
z$1.object({
|
|
756
|
+
authScheme: z$1.literal(AuthSchemeTypes.CALCOM_AUTH),
|
|
755
757
|
/**
|
|
756
758
|
* the main connection data discriminated by auth scheme
|
|
757
759
|
*/
|
|
758
760
|
val: CalcomAuthConnectionDataSchema
|
|
759
761
|
}),
|
|
760
|
-
z.object({
|
|
761
|
-
authScheme: z.literal(AuthSchemeTypes.BILLCOM_AUTH),
|
|
762
|
+
z$1.object({
|
|
763
|
+
authScheme: z$1.literal(AuthSchemeTypes.BILLCOM_AUTH),
|
|
762
764
|
/**
|
|
763
765
|
* the main connection data discriminated by auth scheme
|
|
764
766
|
*/
|
|
765
767
|
val: BillcomAuthConnectionDataSchema
|
|
766
768
|
}),
|
|
767
|
-
z.object({
|
|
768
|
-
authScheme: z.literal(AuthSchemeTypes.BASIC_WITH_JWT),
|
|
769
|
+
z$1.object({
|
|
770
|
+
authScheme: z$1.literal(AuthSchemeTypes.BASIC_WITH_JWT),
|
|
769
771
|
/**
|
|
770
772
|
* the main connection data discriminated by auth scheme
|
|
771
773
|
*/
|
|
772
774
|
val: BasicWithJwtConnectionDataSchema
|
|
773
775
|
}),
|
|
774
|
-
z.object({
|
|
775
|
-
authScheme: z.literal(AuthSchemeTypes.SERVICE_ACCOUNT),
|
|
776
|
+
z$1.object({
|
|
777
|
+
authScheme: z$1.literal(AuthSchemeTypes.SERVICE_ACCOUNT),
|
|
776
778
|
/**
|
|
777
779
|
* the main connection data discriminated by auth scheme
|
|
778
780
|
*/
|
|
779
781
|
val: ServiceAccountConnectionDataSchema
|
|
780
782
|
}),
|
|
781
|
-
z.object({
|
|
782
|
-
authScheme: z.literal(AuthSchemeTypes.SAML),
|
|
783
|
+
z$1.object({
|
|
784
|
+
authScheme: z$1.literal(AuthSchemeTypes.SAML),
|
|
783
785
|
/**
|
|
784
786
|
* the main connection data discriminated by auth scheme
|
|
785
787
|
*/
|
|
786
788
|
val: SamlConnectionDataSchema
|
|
787
789
|
}),
|
|
788
|
-
z.object({
|
|
789
|
-
authScheme: z.literal(AuthSchemeTypes.DCR_OAUTH),
|
|
790
|
+
z$1.object({
|
|
791
|
+
authScheme: z$1.literal(AuthSchemeTypes.DCR_OAUTH),
|
|
790
792
|
/**
|
|
791
793
|
* the main connection data discriminated by auth scheme
|
|
792
794
|
*/
|
|
793
795
|
val: DcrOauthConnectionDataSchema
|
|
794
796
|
})
|
|
795
797
|
]);
|
|
796
|
-
const CustomConnectionDataSchema = z.discriminatedUnion("authScheme", [
|
|
797
|
-
z.object({
|
|
798
|
-
authScheme: z.literal(AuthSchemeTypes.OAUTH2),
|
|
799
|
-
toolkitSlug: z.string(),
|
|
798
|
+
const CustomConnectionDataSchema = z$1.discriminatedUnion("authScheme", [
|
|
799
|
+
z$1.object({
|
|
800
|
+
authScheme: z$1.literal(AuthSchemeTypes.OAUTH2),
|
|
801
|
+
toolkitSlug: z$1.string(),
|
|
800
802
|
val: CustomOauth2ConnectionDataSchema
|
|
801
803
|
}),
|
|
802
|
-
z.object({
|
|
803
|
-
authScheme: z.literal(AuthSchemeTypes.S2S_OAUTH2),
|
|
804
|
-
toolkitSlug: z.string(),
|
|
804
|
+
z$1.object({
|
|
805
|
+
authScheme: z$1.literal(AuthSchemeTypes.S2S_OAUTH2),
|
|
806
|
+
toolkitSlug: z$1.string(),
|
|
805
807
|
val: CustomS2SOauth2ConnectionDataSchema
|
|
806
808
|
}),
|
|
807
|
-
z.object({
|
|
808
|
-
authScheme: z.literal(AuthSchemeTypes.DCR_OAUTH),
|
|
809
|
-
toolkitSlug: z.string(),
|
|
809
|
+
z$1.object({
|
|
810
|
+
authScheme: z$1.literal(AuthSchemeTypes.DCR_OAUTH),
|
|
811
|
+
toolkitSlug: z$1.string(),
|
|
810
812
|
val: CustomDcrOauthConnectionDataSchema
|
|
811
813
|
}),
|
|
812
|
-
z.object({
|
|
813
|
-
authScheme: z.literal(AuthSchemeTypes.API_KEY),
|
|
814
|
-
toolkitSlug: z.string(),
|
|
814
|
+
z$1.object({
|
|
815
|
+
authScheme: z$1.literal(AuthSchemeTypes.API_KEY),
|
|
816
|
+
toolkitSlug: z$1.string(),
|
|
815
817
|
val: CustomApiKeyConnectionDataSchema
|
|
816
818
|
}),
|
|
817
|
-
z.object({
|
|
818
|
-
authScheme: z.literal(AuthSchemeTypes.BASIC_WITH_JWT),
|
|
819
|
-
toolkitSlug: z.string(),
|
|
819
|
+
z$1.object({
|
|
820
|
+
authScheme: z$1.literal(AuthSchemeTypes.BASIC_WITH_JWT),
|
|
821
|
+
toolkitSlug: z$1.string(),
|
|
820
822
|
val: CustomBasicWithJwtConnectionDataSchema
|
|
821
823
|
}),
|
|
822
|
-
z.object({
|
|
823
|
-
authScheme: z.literal(AuthSchemeTypes.BASIC),
|
|
824
|
-
toolkitSlug: z.string(),
|
|
824
|
+
z$1.object({
|
|
825
|
+
authScheme: z$1.literal(AuthSchemeTypes.BASIC),
|
|
826
|
+
toolkitSlug: z$1.string(),
|
|
825
827
|
val: CustomBasicConnectionDataSchema
|
|
826
828
|
}),
|
|
827
|
-
z.object({
|
|
828
|
-
authScheme: z.literal(AuthSchemeTypes.BEARER_TOKEN),
|
|
829
|
-
toolkitSlug: z.string(),
|
|
829
|
+
z$1.object({
|
|
830
|
+
authScheme: z$1.literal(AuthSchemeTypes.BEARER_TOKEN),
|
|
831
|
+
toolkitSlug: z$1.string(),
|
|
830
832
|
val: CustomBearerTokenConnectionDataSchema
|
|
831
833
|
}),
|
|
832
|
-
z.object({
|
|
833
|
-
authScheme: z.literal(AuthSchemeTypes.OAUTH1),
|
|
834
|
-
toolkitSlug: z.string(),
|
|
834
|
+
z$1.object({
|
|
835
|
+
authScheme: z$1.literal(AuthSchemeTypes.OAUTH1),
|
|
836
|
+
toolkitSlug: z$1.string(),
|
|
835
837
|
val: CustomOauth1ConnectionDataSchema
|
|
836
838
|
}),
|
|
837
|
-
z.object({
|
|
838
|
-
authScheme: z.literal(AuthSchemeTypes.NO_AUTH),
|
|
839
|
-
toolkitSlug: z.string(),
|
|
839
|
+
z$1.object({
|
|
840
|
+
authScheme: z$1.literal(AuthSchemeTypes.NO_AUTH),
|
|
841
|
+
toolkitSlug: z$1.string(),
|
|
840
842
|
val: CustomNoAuthConnectionDataSchema
|
|
841
843
|
}),
|
|
842
|
-
z.object({
|
|
843
|
-
authScheme: z.literal(AuthSchemeTypes.SERVICE_ACCOUNT),
|
|
844
|
-
toolkitSlug: z.string(),
|
|
844
|
+
z$1.object({
|
|
845
|
+
authScheme: z$1.literal(AuthSchemeTypes.SERVICE_ACCOUNT),
|
|
846
|
+
toolkitSlug: z$1.string(),
|
|
845
847
|
val: CustomServiceAccountConnectionDataSchema
|
|
846
848
|
})
|
|
847
849
|
]);
|
|
@@ -854,12 +856,12 @@ const CustomConnectionDataSchema = z.discriminatedUnion("authScheme", [
|
|
|
854
856
|
*
|
|
855
857
|
* eg. Google Toolkit, which provides tools like Google Search, Google Maps, Google Translate, etc.
|
|
856
858
|
*/
|
|
857
|
-
const ToolkitSchema = z.object({
|
|
858
|
-
slug: z.string().describe("The slug of the toolkit"),
|
|
859
|
-
name: z.string().describe("The name of the toolkit"),
|
|
860
|
-
logo: z.string().describe("The logo of the toolkit").optional()
|
|
859
|
+
const ToolkitSchema = z$1.object({
|
|
860
|
+
slug: z$1.string().describe("The slug of the toolkit"),
|
|
861
|
+
name: z$1.string().describe("The name of the toolkit"),
|
|
862
|
+
logo: z$1.string().describe("The logo of the toolkit").optional()
|
|
861
863
|
});
|
|
862
|
-
const JSONSchemaType = z.enum([
|
|
864
|
+
const JSONSchemaType = z$1.enum([
|
|
863
865
|
"string",
|
|
864
866
|
"number",
|
|
865
867
|
"integer",
|
|
@@ -868,121 +870,121 @@ const JSONSchemaType = z.enum([
|
|
|
868
870
|
"array",
|
|
869
871
|
"null"
|
|
870
872
|
]);
|
|
871
|
-
const JSONSchemaPropertySchema = z.object({
|
|
872
|
-
type: z.union([JSONSchemaType, z.array(JSONSchemaType)]).optional(),
|
|
873
|
-
description: z.string().optional(),
|
|
874
|
-
anyOf: z.lazy(() => z.array(JSONSchemaPropertySchema)).optional(),
|
|
875
|
-
oneOf: z.lazy(() => z.array(JSONSchemaPropertySchema)).optional(),
|
|
876
|
-
allOf: z.lazy(() => z.array(JSONSchemaPropertySchema)).optional(),
|
|
877
|
-
not: z.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
878
|
-
title: z.string().optional(),
|
|
879
|
-
default: z.any().optional(),
|
|
880
|
-
nullable: z.boolean().optional(),
|
|
881
|
-
properties: z.lazy(() => z.record(z.string(), JSONSchemaPropertySchema)).optional(),
|
|
882
|
-
required: z.array(z.string()).optional(),
|
|
883
|
-
file_uploadable: z.boolean().optional(),
|
|
884
|
-
file_downloadable: z.boolean().optional(),
|
|
885
|
-
items: z.lazy(() => z.union([JSONSchemaPropertySchema, z.array(JSONSchemaPropertySchema)])).optional(),
|
|
886
|
-
enum: z.array(z.any()).optional(),
|
|
887
|
-
const: z.any().optional(),
|
|
888
|
-
minimum: z.number().optional(),
|
|
889
|
-
maximum: z.number().optional(),
|
|
890
|
-
exclusiveMinimum: z.number().optional(),
|
|
891
|
-
exclusiveMaximum: z.number().optional(),
|
|
892
|
-
multipleOf: z.number().optional(),
|
|
893
|
-
minLength: z.number().optional(),
|
|
894
|
-
maxLength: z.number().optional(),
|
|
895
|
-
pattern: z.string().optional(),
|
|
896
|
-
format: z.string().optional(),
|
|
897
|
-
minItems: z.number().optional(),
|
|
898
|
-
maxItems: z.number().optional(),
|
|
899
|
-
uniqueItems: z.boolean().optional(),
|
|
900
|
-
minProperties: z.number().optional(),
|
|
901
|
-
maxProperties: z.number().optional(),
|
|
902
|
-
patternProperties: z.lazy(() => z.record(z.string(), JSONSchemaPropertySchema)).optional(),
|
|
903
|
-
additionalProperties: z.union([z.boolean(), z.lazy(() => JSONSchemaPropertySchema)]).optional(),
|
|
904
|
-
examples: z.array(z.any()).optional(),
|
|
905
|
-
readOnly: z.boolean().optional(),
|
|
906
|
-
writeOnly: z.boolean().optional(),
|
|
907
|
-
if: z.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
908
|
-
then: z.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
909
|
-
else: z.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
910
|
-
$ref: z.string().optional(),
|
|
911
|
-
definitions: z.record(z.string(), z.lazy(() => JSONSchemaPropertySchema)).optional(),
|
|
912
|
-
$defs: z.record(z.string(), z.lazy(() => JSONSchemaPropertySchema)).optional()
|
|
873
|
+
const JSONSchemaPropertySchema = z$1.object({
|
|
874
|
+
type: z$1.union([JSONSchemaType, z$1.array(JSONSchemaType)]).optional(),
|
|
875
|
+
description: z$1.string().optional(),
|
|
876
|
+
anyOf: z$1.lazy(() => z$1.array(JSONSchemaPropertySchema)).optional(),
|
|
877
|
+
oneOf: z$1.lazy(() => z$1.array(JSONSchemaPropertySchema)).optional(),
|
|
878
|
+
allOf: z$1.lazy(() => z$1.array(JSONSchemaPropertySchema)).optional(),
|
|
879
|
+
not: z$1.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
880
|
+
title: z$1.string().optional(),
|
|
881
|
+
default: z$1.any().optional(),
|
|
882
|
+
nullable: z$1.boolean().optional(),
|
|
883
|
+
properties: z$1.lazy(() => z$1.record(z$1.string(), JSONSchemaPropertySchema)).optional(),
|
|
884
|
+
required: z$1.array(z$1.string()).optional(),
|
|
885
|
+
file_uploadable: z$1.boolean().optional(),
|
|
886
|
+
file_downloadable: z$1.boolean().optional(),
|
|
887
|
+
items: z$1.lazy(() => z$1.union([JSONSchemaPropertySchema, z$1.array(JSONSchemaPropertySchema)])).optional(),
|
|
888
|
+
enum: z$1.array(z$1.any()).optional(),
|
|
889
|
+
const: z$1.any().optional(),
|
|
890
|
+
minimum: z$1.number().optional(),
|
|
891
|
+
maximum: z$1.number().optional(),
|
|
892
|
+
exclusiveMinimum: z$1.number().optional(),
|
|
893
|
+
exclusiveMaximum: z$1.number().optional(),
|
|
894
|
+
multipleOf: z$1.number().optional(),
|
|
895
|
+
minLength: z$1.number().optional(),
|
|
896
|
+
maxLength: z$1.number().optional(),
|
|
897
|
+
pattern: z$1.string().optional(),
|
|
898
|
+
format: z$1.string().optional(),
|
|
899
|
+
minItems: z$1.number().optional(),
|
|
900
|
+
maxItems: z$1.number().optional(),
|
|
901
|
+
uniqueItems: z$1.boolean().optional(),
|
|
902
|
+
minProperties: z$1.number().optional(),
|
|
903
|
+
maxProperties: z$1.number().optional(),
|
|
904
|
+
patternProperties: z$1.lazy(() => z$1.record(z$1.string(), JSONSchemaPropertySchema)).optional(),
|
|
905
|
+
additionalProperties: z$1.union([z$1.boolean(), z$1.lazy(() => JSONSchemaPropertySchema)]).optional(),
|
|
906
|
+
examples: z$1.array(z$1.any()).optional(),
|
|
907
|
+
readOnly: z$1.boolean().optional(),
|
|
908
|
+
writeOnly: z$1.boolean().optional(),
|
|
909
|
+
if: z$1.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
910
|
+
then: z$1.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
911
|
+
else: z$1.lazy(() => JSONSchemaPropertySchema).optional(),
|
|
912
|
+
$ref: z$1.string().optional(),
|
|
913
|
+
definitions: z$1.record(z$1.string(), z$1.lazy(() => JSONSchemaPropertySchema)).optional(),
|
|
914
|
+
$defs: z$1.record(z$1.string(), z$1.lazy(() => JSONSchemaPropertySchema)).optional()
|
|
913
915
|
});
|
|
914
|
-
const ParametersSchema = z.object({
|
|
915
|
-
type: z.literal("object"),
|
|
916
|
-
anyOf: z.array(JSONSchemaPropertySchema).optional(),
|
|
917
|
-
oneOf: z.array(JSONSchemaPropertySchema).optional(),
|
|
918
|
-
allOf: z.array(JSONSchemaPropertySchema).optional(),
|
|
916
|
+
const ParametersSchema = z$1.preprocess(deduplicateJsonSchemaRequiredArrays, z$1.object({
|
|
917
|
+
type: z$1.literal("object"),
|
|
918
|
+
anyOf: z$1.array(JSONSchemaPropertySchema).optional(),
|
|
919
|
+
oneOf: z$1.array(JSONSchemaPropertySchema).optional(),
|
|
920
|
+
allOf: z$1.array(JSONSchemaPropertySchema).optional(),
|
|
919
921
|
not: JSONSchemaPropertySchema.optional(),
|
|
920
|
-
properties: z.record(z.string(), JSONSchemaPropertySchema),
|
|
921
|
-
required: z.array(z.string()).optional(),
|
|
922
|
-
title: z.string().optional(),
|
|
923
|
-
default: z.any().optional(),
|
|
924
|
-
nullable: z.boolean().optional(),
|
|
925
|
-
description: z.string().optional(),
|
|
926
|
-
additionalProperties: z.boolean().default(false).optional(),
|
|
927
|
-
$defs: z.record(z.string(), z.lazy(() => JSONSchemaPropertySchema)).optional(),
|
|
928
|
-
definitions: z.record(z.string(), z.lazy(() => JSONSchemaPropertySchema)).optional()
|
|
929
|
-
});
|
|
922
|
+
properties: z$1.record(z$1.string(), JSONSchemaPropertySchema),
|
|
923
|
+
required: z$1.array(z$1.string()).optional(),
|
|
924
|
+
title: z$1.string().optional(),
|
|
925
|
+
default: z$1.any().optional(),
|
|
926
|
+
nullable: z$1.boolean().optional(),
|
|
927
|
+
description: z$1.string().optional(),
|
|
928
|
+
additionalProperties: z$1.boolean().default(false).optional(),
|
|
929
|
+
$defs: z$1.record(z$1.string(), z$1.lazy(() => JSONSchemaPropertySchema)).optional(),
|
|
930
|
+
definitions: z$1.record(z$1.string(), z$1.lazy(() => JSONSchemaPropertySchema)).optional()
|
|
931
|
+
}));
|
|
930
932
|
/**
|
|
931
933
|
* Tool is a single action that can be performed by a toolkit.
|
|
932
934
|
* Tool is simlar to an action that an app can perform.
|
|
933
935
|
*
|
|
934
936
|
* eg. Google Search, Google Maps, Google Translate, etc.
|
|
935
937
|
*/
|
|
936
|
-
const ToolSchema = z.object({
|
|
937
|
-
slug: z.string().describe("The slug of the tool. eg. \"GOOGLE_SEARCH\""),
|
|
938
|
-
name: z.string().describe(`The name of the tool. eg. "Google Search"`),
|
|
939
|
-
description: z.string().optional().describe("The description of the tool"),
|
|
938
|
+
const ToolSchema = z$1.object({
|
|
939
|
+
slug: z$1.string().describe("The slug of the tool. eg. \"GOOGLE_SEARCH\""),
|
|
940
|
+
name: z$1.string().describe(`The name of the tool. eg. "Google Search"`),
|
|
941
|
+
description: z$1.string().optional().describe("The description of the tool"),
|
|
940
942
|
inputParameters: ParametersSchema.optional().describe("The input parameters of the tool"),
|
|
941
943
|
outputParameters: ParametersSchema.optional().describe("The output parameters of the tool"),
|
|
942
|
-
tags: z.array(z.string()).describe("The tags of the tool. eg: Important").default([]).optional(),
|
|
944
|
+
tags: z$1.array(z$1.string()).describe("The tags of the tool. eg: Important").default([]).optional(),
|
|
943
945
|
toolkit: ToolkitSchema.describe("The toolkit of the tool").optional(),
|
|
944
|
-
version: z.string().describe("The version of the tool, e.g. \"20250909_00\"").optional(),
|
|
945
|
-
isDeprecated: z.boolean().describe("Whether the tool is deprecated").optional(),
|
|
946
|
-
availableVersions: z.array(z.string()).describe("Available versions of the tool.").default([]).optional(),
|
|
947
|
-
scopes: z.array(z.string()).describe("The scopes of the tool. eg: [\"task:add\"]").optional(),
|
|
948
|
-
isNoAuth: z.boolean().describe("Do the tool support no auth?").optional()
|
|
946
|
+
version: z$1.string().describe("The version of the tool, e.g. \"20250909_00\"").optional(),
|
|
947
|
+
isDeprecated: z$1.boolean().describe("Whether the tool is deprecated").optional(),
|
|
948
|
+
availableVersions: z$1.array(z$1.string()).describe("Available versions of the tool.").default([]).optional(),
|
|
949
|
+
scopes: z$1.array(z$1.string()).describe("The scopes of the tool. eg: [\"task:add\"]").optional(),
|
|
950
|
+
isNoAuth: z$1.boolean().describe("Do the tool support no auth?").optional()
|
|
949
951
|
});
|
|
950
952
|
/**
|
|
951
953
|
* ToolListResponse Schema
|
|
952
954
|
*/
|
|
953
|
-
const ToolListResponseSchema = z.object({
|
|
954
|
-
items: z.array(ToolSchema),
|
|
955
|
-
nextCursor: z.string().nullable().optional(),
|
|
956
|
-
totalPages: z.number()
|
|
955
|
+
const ToolListResponseSchema = z$1.object({
|
|
956
|
+
items: z$1.array(ToolSchema),
|
|
957
|
+
nextCursor: z$1.string().nullable().optional(),
|
|
958
|
+
totalPages: z$1.number()
|
|
957
959
|
});
|
|
958
|
-
const ToolkitLatestVersionSchema = z.literal("latest");
|
|
959
|
-
const ToolkitVersionSchema = z.union([ToolkitLatestVersionSchema, z.string()]);
|
|
960
|
-
const ToolkitVersionsSchema = z.record(z.string(), ToolkitVersionSchema);
|
|
961
|
-
const ToolkitVersionParamSchema = z.union([
|
|
960
|
+
const ToolkitLatestVersionSchema = z$1.literal("latest");
|
|
961
|
+
const ToolkitVersionSchema = z$1.union([ToolkitLatestVersionSchema, z$1.string()]);
|
|
962
|
+
const ToolkitVersionsSchema = z$1.record(z$1.string(), ToolkitVersionSchema);
|
|
963
|
+
const ToolkitVersionParamSchema = z$1.union([
|
|
962
964
|
ToolkitVersionsSchema,
|
|
963
965
|
ToolkitLatestVersionSchema,
|
|
964
|
-
z.undefined()
|
|
966
|
+
z$1.undefined()
|
|
965
967
|
]).describe("The versioning of the toolkits. eg: { \"github\": \"latest\", \"slack\": \"20250902_00\" }");
|
|
966
|
-
const ToolListParamsSchema = z.object({
|
|
967
|
-
tools: z.array(z.string()).optional(),
|
|
968
|
-
toolkits: z.array(z.string()).optional(),
|
|
969
|
-
scopes: z.array(z.string()).optional(),
|
|
970
|
-
tags: z.array(z.string()).optional(),
|
|
971
|
-
limit: z.number().optional(),
|
|
972
|
-
search: z.string().optional(),
|
|
973
|
-
authConfigIds: z.array(z.string()).optional(),
|
|
974
|
-
important: z.boolean().optional()
|
|
968
|
+
const ToolListParamsSchema = z$1.object({
|
|
969
|
+
tools: z$1.array(z$1.string()).optional(),
|
|
970
|
+
toolkits: z$1.array(z$1.string()).optional(),
|
|
971
|
+
scopes: z$1.array(z$1.string()).optional(),
|
|
972
|
+
tags: z$1.array(z$1.string()).optional(),
|
|
973
|
+
limit: z$1.number().optional(),
|
|
974
|
+
search: z$1.string().optional(),
|
|
975
|
+
authConfigIds: z$1.array(z$1.string()).optional(),
|
|
976
|
+
important: z$1.boolean().optional()
|
|
975
977
|
});
|
|
976
978
|
/**
|
|
977
979
|
* CustomAuthParams is the parameters for the custom authentication.
|
|
978
980
|
*/
|
|
979
|
-
const CustomAuthParamsSchema = z.object({
|
|
980
|
-
baseURL: z.string().optional(),
|
|
981
|
-
body: z.record(z.string(), z.unknown()).optional(),
|
|
982
|
-
parameters: z.array(z.object({
|
|
983
|
-
in: z.enum(["query", "header"]),
|
|
984
|
-
name: z.string(),
|
|
985
|
-
value: z.union([z.string(), z.number()])
|
|
981
|
+
const CustomAuthParamsSchema = z$1.object({
|
|
982
|
+
baseURL: z$1.string().optional(),
|
|
983
|
+
body: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
984
|
+
parameters: z$1.array(z$1.object({
|
|
985
|
+
in: z$1.enum(["query", "header"]),
|
|
986
|
+
name: z$1.string(),
|
|
987
|
+
value: z$1.union([z$1.string(), z$1.number()])
|
|
986
988
|
}))
|
|
987
989
|
});
|
|
988
990
|
/**
|
|
@@ -1021,47 +1023,47 @@ const CustomAuthParamsSchema = z.object({
|
|
|
1021
1023
|
* };
|
|
1022
1024
|
* ```
|
|
1023
1025
|
*/
|
|
1024
|
-
const ToolExecuteParamsSchema = z.object({
|
|
1025
|
-
allowTracing: z.boolean().optional(),
|
|
1026
|
-
connectedAccountId: z.string().optional(),
|
|
1026
|
+
const ToolExecuteParamsSchema = z$1.object({
|
|
1027
|
+
allowTracing: z$1.boolean().optional(),
|
|
1028
|
+
connectedAccountId: z$1.string().optional(),
|
|
1027
1029
|
customAuthParams: CustomAuthParamsSchema.optional(),
|
|
1028
1030
|
customConnectionData: CustomConnectionDataSchema.optional(),
|
|
1029
|
-
arguments: z.record(z.string(), z.unknown()).optional(),
|
|
1030
|
-
userId: z.string().optional(),
|
|
1031
|
-
version: z.union([z.literal("latest"), z.string()]).optional(),
|
|
1032
|
-
dangerouslySkipVersionCheck: z.boolean().optional(),
|
|
1033
|
-
text: z.string().optional()
|
|
1031
|
+
arguments: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
1032
|
+
userId: z$1.string().optional(),
|
|
1033
|
+
version: z$1.union([z$1.literal("latest"), z$1.string()]).optional(),
|
|
1034
|
+
dangerouslySkipVersionCheck: z$1.boolean().optional(),
|
|
1035
|
+
text: z$1.string().optional()
|
|
1034
1036
|
});
|
|
1035
|
-
const ToolExecuteMetaParamsSchema = z.object({
|
|
1036
|
-
sessionId: z.string(),
|
|
1037
|
-
arguments: z.record(z.string(), z.unknown()).optional()
|
|
1037
|
+
const ToolExecuteMetaParamsSchema = z$1.object({
|
|
1038
|
+
sessionId: z$1.string(),
|
|
1039
|
+
arguments: z$1.record(z$1.string(), z$1.unknown()).optional()
|
|
1038
1040
|
});
|
|
1039
1041
|
/**
|
|
1040
1042
|
* ToolResponse Schema
|
|
1041
1043
|
*/
|
|
1042
|
-
const ToolExecuteResponseSchema = z.object({
|
|
1043
|
-
data: z.record(z.string(), z.unknown()),
|
|
1044
|
-
error: z.string().nullable(),
|
|
1045
|
-
successful: z.boolean(),
|
|
1046
|
-
logId: z.string().optional(),
|
|
1047
|
-
sessionInfo: z.unknown().optional()
|
|
1044
|
+
const ToolExecuteResponseSchema = z$1.object({
|
|
1045
|
+
data: z$1.record(z$1.string(), z$1.unknown()),
|
|
1046
|
+
error: z$1.string().nullable(),
|
|
1047
|
+
successful: z$1.boolean(),
|
|
1048
|
+
logId: z$1.string().optional(),
|
|
1049
|
+
sessionInfo: z$1.unknown().optional()
|
|
1048
1050
|
});
|
|
1049
|
-
const ToolProxyParamsSchema = z.object({
|
|
1050
|
-
endpoint: z.string(),
|
|
1051
|
-
method: z.enum([
|
|
1051
|
+
const ToolProxyParamsSchema = z$1.object({
|
|
1052
|
+
endpoint: z$1.string(),
|
|
1053
|
+
method: z$1.enum([
|
|
1052
1054
|
"GET",
|
|
1053
1055
|
"POST",
|
|
1054
1056
|
"PUT",
|
|
1055
1057
|
"DELETE",
|
|
1056
1058
|
"PATCH"
|
|
1057
1059
|
]),
|
|
1058
|
-
body: z.unknown().optional(),
|
|
1059
|
-
parameters: z.array(z.object({
|
|
1060
|
-
in: z.enum(["query", "header"]),
|
|
1061
|
-
name: z.string(),
|
|
1062
|
-
value: z.union([z.string(), z.number()])
|
|
1060
|
+
body: z$1.unknown().optional(),
|
|
1061
|
+
parameters: z$1.array(z$1.object({
|
|
1062
|
+
in: z$1.enum(["query", "header"]),
|
|
1063
|
+
name: z$1.string(),
|
|
1064
|
+
value: z$1.union([z$1.string(), z$1.number()])
|
|
1063
1065
|
})).optional(),
|
|
1064
|
-
connectedAccountId: z.string().optional(),
|
|
1066
|
+
connectedAccountId: z$1.string().optional(),
|
|
1065
1067
|
/**
|
|
1066
1068
|
* @deprecated
|
|
1067
1069
|
*/
|
|
@@ -1071,6 +1073,22 @@ const ToolProxyParamsSchema = z.object({
|
|
|
1071
1073
|
//#endregion
|
|
1072
1074
|
//#region src/utils/toolkitVersion.ts
|
|
1073
1075
|
/**
|
|
1076
|
+
* Canonicalizes a toolkit slug into the form used as a version-map key.
|
|
1077
|
+
*
|
|
1078
|
+
* Toolkit slugs are matched case-insensitively. This is the single source of
|
|
1079
|
+
* truth for that rule: every write into a version map (env vars, user-supplied
|
|
1080
|
+
* objects — see `getToolkitVersionsFromEnv`) and every read out of one MUST go
|
|
1081
|
+
* through this helper so the two sides can never drift apart and silently miss a
|
|
1082
|
+
* configured pin.
|
|
1083
|
+
*
|
|
1084
|
+
* Kept intentionally equivalent to the Python SDK's `normalize_toolkit_slug`
|
|
1085
|
+
* (see python/composio/utils/toolkit_version.py).
|
|
1086
|
+
*
|
|
1087
|
+
* @param toolkitSlug - The slug/name of the toolkit, in any casing
|
|
1088
|
+
* @returns The normalized (lowercase) slug used as a version-map key
|
|
1089
|
+
*/
|
|
1090
|
+
const normalizeToolkitSlug = (toolkitSlug) => toolkitSlug.toLowerCase();
|
|
1091
|
+
/**
|
|
1074
1092
|
* Gets the version for a specific toolkit based on the provided toolkit versions configuration.
|
|
1075
1093
|
*
|
|
1076
1094
|
* @param toolkitSlug - The slug/name of the toolkit to get the version for
|
|
@@ -1079,7 +1097,7 @@ const ToolProxyParamsSchema = z.object({
|
|
|
1079
1097
|
*/
|
|
1080
1098
|
const getToolkitVersion = (toolkitSlug, toolkitVersions) => {
|
|
1081
1099
|
if (typeof toolkitVersions === "string") return toolkitVersions;
|
|
1082
|
-
if (toolkitVersions && Object.keys(toolkitVersions).length > 0) return toolkitVersions[toolkitSlug] ?? "latest";
|
|
1100
|
+
if (toolkitVersions && Object.keys(toolkitVersions).length > 0) return toolkitVersions[normalizeToolkitSlug(toolkitSlug)] ?? "latest";
|
|
1083
1101
|
return "latest";
|
|
1084
1102
|
};
|
|
1085
1103
|
|
|
@@ -1194,6 +1212,10 @@ var Tools = class {
|
|
|
1194
1212
|
* Scoped per-instance so a fresh `Composio` starts with a clean slate.
|
|
1195
1213
|
*/
|
|
1196
1214
|
warnedAutoUploadDisabledForTool = /* @__PURE__ */ new Set();
|
|
1215
|
+
/**
|
|
1216
|
+
* Lazily-built sibling client with retries disabled; see `clientWithoutRetries`.
|
|
1217
|
+
*/
|
|
1218
|
+
clientWithoutRetriesCache;
|
|
1197
1219
|
constructor(client, config) {
|
|
1198
1220
|
if (!client) throw new Error("ComposioClient is required");
|
|
1199
1221
|
if (!config?.provider) throw new ComposioProviderNotDefinedError("Provider not passed into Tools instance");
|
|
@@ -1214,6 +1236,24 @@ var Tools = class {
|
|
|
1214
1236
|
telemetry.instrument(this, "Tools");
|
|
1215
1237
|
}
|
|
1216
1238
|
/**
|
|
1239
|
+
* A cached sibling client that never retries requests, mirroring Python's
|
|
1240
|
+
* `client.without_retries`.
|
|
1241
|
+
*
|
|
1242
|
+
* Used for non-idempotent writes (`tools.execute` / `tools.proxy`), where a
|
|
1243
|
+
* silent retry after a read timeout can duplicate a side effect (e.g. send an
|
|
1244
|
+
* email twice). Reads keep the default retry behaviour, and so do other writes
|
|
1245
|
+
* (`toolRouter.session.execute`, auth-config and connected-account mutations):
|
|
1246
|
+
* the durable fix there is backend-honoured idempotency keys, tracked
|
|
1247
|
+
* separately.
|
|
1248
|
+
*
|
|
1249
|
+
* Cached rather than rebuilt per call because `withOptions` constructs a fresh
|
|
1250
|
+
* client; its options never change, so one per `Tools` instance suffices.
|
|
1251
|
+
*/
|
|
1252
|
+
get clientWithoutRetries() {
|
|
1253
|
+
if (!this.clientWithoutRetriesCache) this.clientWithoutRetriesCache = this.client.withOptions({ maxRetries: 0 });
|
|
1254
|
+
return this.clientWithoutRetriesCache;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1217
1257
|
* Transforms tool data from snake_case API format to camelCase for internal SDK use.
|
|
1218
1258
|
*
|
|
1219
1259
|
* This method standardizes the property naming convention for tools retrieved from the Composio API,
|
|
@@ -1667,7 +1707,7 @@ var Tools = class {
|
|
|
1667
1707
|
version: toolkitVersion,
|
|
1668
1708
|
text: body.text
|
|
1669
1709
|
};
|
|
1670
|
-
const result = await withCancellation(() => this.
|
|
1710
|
+
const result = await withCancellation(() => this.clientWithoutRetries.tools.execute(tool.slug, executeBody, requestOptions), requestOptions?.signal);
|
|
1671
1711
|
return this.transformToolExecuteResponse(result);
|
|
1672
1712
|
} catch (error) {
|
|
1673
1713
|
if (error instanceof ComposioRequestCancelledError) throw error;
|
|
@@ -1903,7 +1943,7 @@ var Tools = class {
|
|
|
1903
1943
|
*/
|
|
1904
1944
|
custom_connection_data: toolProxyParams.data.customConnectionData
|
|
1905
1945
|
};
|
|
1906
|
-
return withCancellation(() => this.
|
|
1946
|
+
return withCancellation(() => this.clientWithoutRetries.tools.proxy(proxyBody, requestOptions), requestOptions?.signal);
|
|
1907
1947
|
}
|
|
1908
1948
|
};
|
|
1909
1949
|
|
|
@@ -1912,96 +1952,96 @@ var Tools = class {
|
|
|
1912
1952
|
/**
|
|
1913
1953
|
* Toolkit list params
|
|
1914
1954
|
*/
|
|
1915
|
-
const ToolkitMangedByEnumSchema = z.enum([
|
|
1955
|
+
const ToolkitMangedByEnumSchema = z$1.enum([
|
|
1916
1956
|
"all",
|
|
1917
1957
|
"composio",
|
|
1918
1958
|
"project"
|
|
1919
1959
|
]);
|
|
1920
|
-
const ToolkitSortByEnumSchema = z.enum(["usage", "alphabetically"]);
|
|
1921
|
-
const ToolkitsListParamsSchema = z.object({
|
|
1922
|
-
category: z.string().optional(),
|
|
1960
|
+
const ToolkitSortByEnumSchema = z$1.enum(["usage", "alphabetically"]);
|
|
1961
|
+
const ToolkitsListParamsSchema = z$1.object({
|
|
1962
|
+
category: z$1.string().optional(),
|
|
1923
1963
|
managedBy: ToolkitMangedByEnumSchema.optional(),
|
|
1924
1964
|
sortBy: ToolkitSortByEnumSchema.optional(),
|
|
1925
|
-
cursor: z.string().optional(),
|
|
1926
|
-
limit: z.number().optional()
|
|
1965
|
+
cursor: z$1.string().optional(),
|
|
1966
|
+
limit: z$1.number().optional()
|
|
1927
1967
|
});
|
|
1928
1968
|
/**
|
|
1929
1969
|
* Toolkits response
|
|
1930
1970
|
*/
|
|
1931
|
-
const ToolKitMetaSchema = z.object({
|
|
1932
|
-
categories: z.array(z.object({
|
|
1933
|
-
slug: z.string(),
|
|
1934
|
-
name: z.string()
|
|
1971
|
+
const ToolKitMetaSchema = z$1.object({
|
|
1972
|
+
categories: z$1.array(z$1.object({
|
|
1973
|
+
slug: z$1.string(),
|
|
1974
|
+
name: z$1.string()
|
|
1935
1975
|
})).optional(),
|
|
1936
|
-
appUrl: z.string().optional(),
|
|
1937
|
-
createdAt: z.string().optional(),
|
|
1938
|
-
description: z.string().optional(),
|
|
1939
|
-
logo: z.string().optional(),
|
|
1940
|
-
toolsCount: z.number().optional(),
|
|
1941
|
-
triggersCount: z.number().optional(),
|
|
1942
|
-
updatedAt: z.string().optional(),
|
|
1943
|
-
availableVersions: z.array(z.string()).optional()
|
|
1976
|
+
appUrl: z$1.string().optional(),
|
|
1977
|
+
createdAt: z$1.string().optional(),
|
|
1978
|
+
description: z$1.string().optional(),
|
|
1979
|
+
logo: z$1.string().optional(),
|
|
1980
|
+
toolsCount: z$1.number().optional(),
|
|
1981
|
+
triggersCount: z$1.number().optional(),
|
|
1982
|
+
updatedAt: z$1.string().optional(),
|
|
1983
|
+
availableVersions: z$1.array(z$1.string()).optional()
|
|
1944
1984
|
});
|
|
1945
|
-
const ToolKitItemSchema = z.object({
|
|
1946
|
-
name: z.string(),
|
|
1947
|
-
slug: z.string(),
|
|
1985
|
+
const ToolKitItemSchema = z$1.object({
|
|
1986
|
+
name: z$1.string(),
|
|
1987
|
+
slug: z$1.string(),
|
|
1948
1988
|
meta: ToolKitMetaSchema,
|
|
1949
|
-
isLocalToolkit: z.boolean(),
|
|
1950
|
-
authSchemes: z.array(z.string()).optional(),
|
|
1951
|
-
composioManagedAuthSchemes: z.array(z.string()).optional(),
|
|
1952
|
-
noAuth: z.boolean().optional()
|
|
1989
|
+
isLocalToolkit: z$1.boolean(),
|
|
1990
|
+
authSchemes: z$1.array(z$1.string()).optional(),
|
|
1991
|
+
composioManagedAuthSchemes: z$1.array(z$1.string()).optional(),
|
|
1992
|
+
noAuth: z$1.boolean().optional()
|
|
1953
1993
|
});
|
|
1954
|
-
const ToolKitListResponseSchema = z.array(ToolKitItemSchema);
|
|
1994
|
+
const ToolKitListResponseSchema = z$1.array(ToolKitItemSchema);
|
|
1955
1995
|
/**
|
|
1956
1996
|
* Toolkit retrieve response
|
|
1957
1997
|
*/
|
|
1958
|
-
const ToolkitAuthFieldSchema = z.object({
|
|
1959
|
-
description: z.string(),
|
|
1960
|
-
displayName: z.string(),
|
|
1961
|
-
required: z.boolean(),
|
|
1962
|
-
name: z.string(),
|
|
1963
|
-
type: z.string(),
|
|
1964
|
-
default: z.string().nullable().optional()
|
|
1998
|
+
const ToolkitAuthFieldSchema = z$1.object({
|
|
1999
|
+
description: z$1.string(),
|
|
2000
|
+
displayName: z$1.string(),
|
|
2001
|
+
required: z$1.boolean(),
|
|
2002
|
+
name: z$1.string(),
|
|
2003
|
+
type: z$1.string(),
|
|
2004
|
+
default: z$1.string().nullable().optional()
|
|
1965
2005
|
});
|
|
1966
|
-
const ToolkitAuthConfigDetailsSchema = z.object({
|
|
1967
|
-
name: z.string(),
|
|
1968
|
-
mode: z.string(),
|
|
1969
|
-
fields: z.object({
|
|
1970
|
-
authConfigCreation: z.object({
|
|
1971
|
-
optional: z.array(ToolkitAuthFieldSchema),
|
|
1972
|
-
required: z.array(ToolkitAuthFieldSchema)
|
|
2006
|
+
const ToolkitAuthConfigDetailsSchema = z$1.object({
|
|
2007
|
+
name: z$1.string(),
|
|
2008
|
+
mode: z$1.string(),
|
|
2009
|
+
fields: z$1.object({
|
|
2010
|
+
authConfigCreation: z$1.object({
|
|
2011
|
+
optional: z$1.array(ToolkitAuthFieldSchema),
|
|
2012
|
+
required: z$1.array(ToolkitAuthFieldSchema)
|
|
1973
2013
|
}),
|
|
1974
|
-
connectedAccountInitiation: z.object({
|
|
1975
|
-
optional: z.array(ToolkitAuthFieldSchema),
|
|
1976
|
-
required: z.array(ToolkitAuthFieldSchema)
|
|
2014
|
+
connectedAccountInitiation: z$1.object({
|
|
2015
|
+
optional: z$1.array(ToolkitAuthFieldSchema),
|
|
2016
|
+
required: z$1.array(ToolkitAuthFieldSchema)
|
|
1977
2017
|
})
|
|
1978
2018
|
}),
|
|
1979
|
-
proxy: z.object({ baseUrl: z.string().optional() }).optional()
|
|
2019
|
+
proxy: z$1.object({ baseUrl: z$1.string().optional() }).optional()
|
|
1980
2020
|
});
|
|
1981
|
-
const ToolkitRetrieveResponseSchema = z.object({
|
|
1982
|
-
name: z.string(),
|
|
1983
|
-
slug: z.string(),
|
|
2021
|
+
const ToolkitRetrieveResponseSchema = z$1.object({
|
|
2022
|
+
name: z$1.string(),
|
|
2023
|
+
slug: z$1.string(),
|
|
1984
2024
|
meta: ToolKitMetaSchema,
|
|
1985
|
-
isLocalToolkit: z.boolean(),
|
|
1986
|
-
composioManagedAuthSchemes: z.array(z.string()).optional(),
|
|
1987
|
-
authConfigDetails: z.array(ToolkitAuthConfigDetailsSchema).optional(),
|
|
1988
|
-
baseUrl: z.string().optional(),
|
|
1989
|
-
getCurrentUserEndpoint: z.string().optional(),
|
|
1990
|
-
getCurrentUserEndpointMethod: z.string().optional()
|
|
2025
|
+
isLocalToolkit: z$1.boolean(),
|
|
2026
|
+
composioManagedAuthSchemes: z$1.array(z$1.string()).optional(),
|
|
2027
|
+
authConfigDetails: z$1.array(ToolkitAuthConfigDetailsSchema).optional(),
|
|
2028
|
+
baseUrl: z$1.string().optional(),
|
|
2029
|
+
getCurrentUserEndpoint: z$1.string().optional(),
|
|
2030
|
+
getCurrentUserEndpointMethod: z$1.string().optional()
|
|
1991
2031
|
});
|
|
1992
2032
|
/**
|
|
1993
2033
|
* Toolkit categories response
|
|
1994
2034
|
*/
|
|
1995
|
-
const ToolkitCategorySchema = z.object({
|
|
1996
|
-
id: z.string(),
|
|
1997
|
-
name: z.string()
|
|
2035
|
+
const ToolkitCategorySchema = z$1.object({
|
|
2036
|
+
id: z$1.string(),
|
|
2037
|
+
name: z$1.string()
|
|
1998
2038
|
});
|
|
1999
|
-
const ToolkitRetrieveCategoriesResponseSchema = z.object({
|
|
2000
|
-
items: z.array(ToolkitCategorySchema),
|
|
2001
|
-
nextCursor: z.string().nullable(),
|
|
2002
|
-
totalPages: z.number()
|
|
2039
|
+
const ToolkitRetrieveCategoriesResponseSchema = z$1.object({
|
|
2040
|
+
items: z$1.array(ToolkitCategorySchema),
|
|
2041
|
+
nextCursor: z$1.string().nullable(),
|
|
2042
|
+
totalPages: z$1.number()
|
|
2003
2043
|
});
|
|
2004
|
-
const ToolkitAuthFieldsResponseSchema = z.array(ToolkitAuthFieldSchema.extend({ required: z.boolean().optional() }));
|
|
2044
|
+
const ToolkitAuthFieldsResponseSchema = z$1.array(ToolkitAuthFieldSchema.extend({ required: z$1.boolean().optional() }));
|
|
2005
2045
|
|
|
2006
2046
|
//#endregion
|
|
2007
2047
|
//#region src/utils/transform.ts
|
|
@@ -2381,7 +2421,7 @@ const ConnectedAccountStatuses = {
|
|
|
2381
2421
|
INACTIVE: "INACTIVE",
|
|
2382
2422
|
REVOKED: "REVOKED"
|
|
2383
2423
|
};
|
|
2384
|
-
const ConnectedAccountStatusSchema = z.enum([
|
|
2424
|
+
const ConnectedAccountStatusSchema = z$1.enum([
|
|
2385
2425
|
ConnectedAccountStatuses.INITIALIZING,
|
|
2386
2426
|
ConnectedAccountStatuses.INITIATED,
|
|
2387
2427
|
ConnectedAccountStatuses.ACTIVE,
|
|
@@ -2403,7 +2443,7 @@ const ConnectedAccountTypes = {
|
|
|
2403
2443
|
PRIVATE: "PRIVATE",
|
|
2404
2444
|
SHARED: "SHARED"
|
|
2405
2445
|
};
|
|
2406
|
-
const ConnectedAccountTypeSchema = z.enum([ConnectedAccountTypes.PRIVATE, ConnectedAccountTypes.SHARED]);
|
|
2446
|
+
const ConnectedAccountTypeSchema = z$1.enum([ConnectedAccountTypes.PRIVATE, ConnectedAccountTypes.SHARED]);
|
|
2407
2447
|
/**
|
|
2408
2448
|
* Per-user access control for a SHARED connected account. Ignored for
|
|
2409
2449
|
* PRIVATE.
|
|
@@ -2427,21 +2467,21 @@ const ConnectedAccountTypeSchema = z.enum([ConnectedAccountTypes.PRIVATE, Connec
|
|
|
2427
2467
|
* 1..256 characters.
|
|
2428
2468
|
*/
|
|
2429
2469
|
const ACL_LIST_MAX_LENGTH = 1e3;
|
|
2430
|
-
const aclUserIdString = z.string().min(1).max(256);
|
|
2431
|
-
const ConnectedAccountAclConfigSchema = z.object({
|
|
2432
|
-
allowAllUsers: z.boolean().optional().describe("When true, any `userId` may use this SHARED connection (subject to the deny list). Default false."),
|
|
2433
|
-
allowedUserIds: z.array(aclUserIdString).max(ACL_LIST_MAX_LENGTH).optional().describe("Explicit list of `userId` strings allowed to use this SHARED connection. Default []."),
|
|
2434
|
-
notAllowedUserIds: z.array(aclUserIdString).max(ACL_LIST_MAX_LENGTH).optional().describe("Explicit list of `userId` strings denied access. Wins over allow on conflict. Default [].")
|
|
2470
|
+
const aclUserIdString = z$1.string().min(1).max(256);
|
|
2471
|
+
const ConnectedAccountAclConfigSchema = z$1.object({
|
|
2472
|
+
allowAllUsers: z$1.boolean().optional().describe("When true, any `userId` may use this SHARED connection (subject to the deny list). Default false."),
|
|
2473
|
+
allowedUserIds: z$1.array(aclUserIdString).max(ACL_LIST_MAX_LENGTH).optional().describe("Explicit list of `userId` strings allowed to use this SHARED connection. Default []."),
|
|
2474
|
+
notAllowedUserIds: z$1.array(aclUserIdString).max(ACL_LIST_MAX_LENGTH).optional().describe("Explicit list of `userId` strings denied access. Wins over allow on conflict. Default [].")
|
|
2435
2475
|
});
|
|
2436
2476
|
/**
|
|
2437
2477
|
* Resolved ACL as it appears on responses. All three fields are populated
|
|
2438
2478
|
* when the field is visible; the field itself is `undefined` for callers
|
|
2439
2479
|
* not authorised to see it.
|
|
2440
2480
|
*/
|
|
2441
|
-
const ConnectedAccountAclConfigResponseSchema = z.object({
|
|
2442
|
-
allowAllUsers: z.boolean(),
|
|
2443
|
-
allowedUserIds: z.array(z.string()),
|
|
2444
|
-
notAllowedUserIds: z.array(z.string())
|
|
2481
|
+
const ConnectedAccountAclConfigResponseSchema = z$1.object({
|
|
2482
|
+
allowAllUsers: z$1.boolean(),
|
|
2483
|
+
allowedUserIds: z$1.array(z$1.string()),
|
|
2484
|
+
notAllowedUserIds: z$1.array(z$1.string())
|
|
2445
2485
|
});
|
|
2446
2486
|
/**
|
|
2447
2487
|
* Experimental options for SHARED connections, passed at create / link time.
|
|
@@ -2450,7 +2490,7 @@ const ConnectedAccountAclConfigResponseSchema = z.object({
|
|
|
2450
2490
|
* dedicated `experimental` block on every input and response so the
|
|
2451
2491
|
* experimental status is visible at every call site.
|
|
2452
2492
|
*/
|
|
2453
|
-
const ConnectedAccountExperimentalSchema = z.object({
|
|
2493
|
+
const ConnectedAccountExperimentalSchema = z$1.object({
|
|
2454
2494
|
accountType: ConnectedAccountTypeSchema.optional(),
|
|
2455
2495
|
aclConfigForShared: ConnectedAccountAclConfigSchema.optional()
|
|
2456
2496
|
});
|
|
@@ -2459,98 +2499,98 @@ const ConnectedAccountExperimentalSchema = z.object({
|
|
|
2459
2499
|
* is always present when the block is; `aclConfigForShared` is only
|
|
2460
2500
|
* present when the caller is authorised to see the ACL.
|
|
2461
2501
|
*/
|
|
2462
|
-
const ConnectedAccountExperimentalResponseSchema = z.object({
|
|
2502
|
+
const ConnectedAccountExperimentalResponseSchema = z$1.object({
|
|
2463
2503
|
accountType: ConnectedAccountTypeSchema.optional(),
|
|
2464
2504
|
aclConfigForShared: ConnectedAccountAclConfigResponseSchema.optional()
|
|
2465
2505
|
});
|
|
2466
|
-
const CreateConnectedAccountParamsSchema = z.object({
|
|
2467
|
-
authConfig: z.object({ id: z.string() }),
|
|
2468
|
-
connection: z.object({
|
|
2469
|
-
data: z.record(z.string(), z.unknown()).optional(),
|
|
2470
|
-
callbackUrl: z.string().optional(),
|
|
2471
|
-
userId: z.string().optional()
|
|
2506
|
+
const CreateConnectedAccountParamsSchema = z$1.object({
|
|
2507
|
+
authConfig: z$1.object({ id: z$1.string() }),
|
|
2508
|
+
connection: z$1.object({
|
|
2509
|
+
data: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
2510
|
+
callbackUrl: z$1.string().optional(),
|
|
2511
|
+
userId: z$1.string().optional()
|
|
2472
2512
|
})
|
|
2473
2513
|
});
|
|
2474
|
-
const DefaultCreateConnectedAccountParamsSchema = z.object({
|
|
2475
|
-
auth_config: z.object({ id: z.string() }),
|
|
2476
|
-
connection: z.object({
|
|
2514
|
+
const DefaultCreateConnectedAccountParamsSchema = z$1.object({
|
|
2515
|
+
auth_config: z$1.object({ id: z$1.string() }),
|
|
2516
|
+
connection: z$1.object({
|
|
2477
2517
|
state: ConnectionDataSchema.optional(),
|
|
2478
|
-
data: z.record(z.string(), z.unknown()).optional(),
|
|
2479
|
-
callback_url: z.string().optional(),
|
|
2480
|
-
user_id: z.string().optional(),
|
|
2481
|
-
alias: z.string().optional()
|
|
2518
|
+
data: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
2519
|
+
callback_url: z$1.string().optional(),
|
|
2520
|
+
user_id: z$1.string().optional(),
|
|
2521
|
+
alias: z$1.string().optional()
|
|
2482
2522
|
})
|
|
2483
2523
|
});
|
|
2484
|
-
const CreateConnectedAccountOptionsSchema = z.object({
|
|
2485
|
-
allowMultiple: z.boolean().optional(),
|
|
2486
|
-
callbackUrl: z.string().optional(),
|
|
2524
|
+
const CreateConnectedAccountOptionsSchema = z$1.object({
|
|
2525
|
+
allowMultiple: z$1.boolean().optional(),
|
|
2526
|
+
callbackUrl: z$1.string().optional(),
|
|
2487
2527
|
config: ConnectionDataSchema.optional(),
|
|
2488
|
-
alias: z.string().optional()
|
|
2528
|
+
alias: z$1.string().optional()
|
|
2489
2529
|
});
|
|
2490
2530
|
/**
|
|
2491
2531
|
* Connected Account create response
|
|
2492
2532
|
*/
|
|
2493
|
-
const CreateConnectedAccountResponseSchema = z.object({
|
|
2494
|
-
id: z.string(),
|
|
2533
|
+
const CreateConnectedAccountResponseSchema = z$1.object({
|
|
2534
|
+
id: z$1.string(),
|
|
2495
2535
|
status: ConnectedAccountStatusSchema,
|
|
2496
|
-
redirectUrl: z.string().nullable()
|
|
2536
|
+
redirectUrl: z$1.string().nullable()
|
|
2497
2537
|
});
|
|
2498
|
-
const ConnectedAccountAuthConfigSchema = z.object({
|
|
2499
|
-
id: z.string(),
|
|
2538
|
+
const ConnectedAccountAuthConfigSchema = z$1.object({
|
|
2539
|
+
id: z$1.string(),
|
|
2500
2540
|
/** @deprecated Use `connectedAccount.state.authScheme` instead. */
|
|
2501
2541
|
authScheme: AuthSchemeEnum.optional(),
|
|
2502
|
-
isComposioManaged: z.boolean(),
|
|
2503
|
-
isDisabled: z.boolean()
|
|
2542
|
+
isComposioManaged: z$1.boolean(),
|
|
2543
|
+
isDisabled: z$1.boolean()
|
|
2504
2544
|
});
|
|
2505
|
-
const ConnectedAccountRetrieveResponseSchema = z.object({
|
|
2506
|
-
id: z.string(),
|
|
2545
|
+
const ConnectedAccountRetrieveResponseSchema = z$1.object({
|
|
2546
|
+
id: z$1.string(),
|
|
2507
2547
|
authConfig: ConnectedAccountAuthConfigSchema,
|
|
2508
|
-
wordId: z.string().nullable().optional(),
|
|
2509
|
-
alias: z.string().nullable().optional(),
|
|
2548
|
+
wordId: z$1.string().nullable().optional(),
|
|
2549
|
+
alias: z$1.string().nullable().optional(),
|
|
2510
2550
|
/**
|
|
2511
2551
|
* @deprecated Use `connectedAccount.state` instead — `data` is a legacy raw credential field.
|
|
2512
2552
|
*/
|
|
2513
|
-
data: z.record(z.string(), z.unknown()).optional(),
|
|
2553
|
+
data: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
2514
2554
|
/**
|
|
2515
2555
|
* @deprecated Use `connectedAccount.state` instead — `params` is a legacy raw credential field.
|
|
2516
2556
|
*/
|
|
2517
|
-
params: z.record(z.string(), z.unknown()).optional(),
|
|
2557
|
+
params: z$1.record(z$1.string(), z$1.unknown()).optional(),
|
|
2518
2558
|
status: ConnectedAccountStatusSchema,
|
|
2519
|
-
statusReason: z.string().nullable(),
|
|
2520
|
-
toolkit: z.object({ slug: z.string() }),
|
|
2559
|
+
statusReason: z$1.string().nullable(),
|
|
2560
|
+
toolkit: z$1.object({ slug: z$1.string() }),
|
|
2521
2561
|
state: ConnectionDataSchema.optional(),
|
|
2522
|
-
testRequestEndpoint: z.string().optional(),
|
|
2523
|
-
isDisabled: z.boolean(),
|
|
2524
|
-
createdAt: z.string(),
|
|
2525
|
-
updatedAt: z.string(),
|
|
2562
|
+
testRequestEndpoint: z$1.string().optional(),
|
|
2563
|
+
isDisabled: z$1.boolean(),
|
|
2564
|
+
createdAt: z$1.string(),
|
|
2565
|
+
updatedAt: z$1.string(),
|
|
2526
2566
|
experimental: ConnectedAccountExperimentalResponseSchema.optional()
|
|
2527
2567
|
});
|
|
2528
|
-
const ConnectedAccountListParamsSchema = z.object({
|
|
2529
|
-
authConfigIds: z.array(z.string()).nullable().optional().describe("The auth config ids of the connected accounts"),
|
|
2530
|
-
cursor: z.string().nullish().describe("The cursor to paginate through the connected accounts"),
|
|
2531
|
-
limit: z.number().nullable().optional().describe("The limit of the connected accounts to return"),
|
|
2532
|
-
orderBy: z.enum(["created_at", "updated_at"]).optional().describe("The order by of the connected accounts"),
|
|
2533
|
-
statuses: z.array(ConnectedAccountStatusSchema).nullable().optional().describe("The statuses of the connected accounts"),
|
|
2534
|
-
toolkitSlugs: z.array(z.string()).nullable().optional().describe("The toolkit slugs of the connected accounts"),
|
|
2535
|
-
userIds: z.array(z.string()).nullable().optional().describe("The user ids of the connected accounts"),
|
|
2568
|
+
const ConnectedAccountListParamsSchema = z$1.object({
|
|
2569
|
+
authConfigIds: z$1.array(z$1.string()).nullable().optional().describe("The auth config ids of the connected accounts"),
|
|
2570
|
+
cursor: z$1.string().nullish().describe("The cursor to paginate through the connected accounts"),
|
|
2571
|
+
limit: z$1.number().nullable().optional().describe("The limit of the connected accounts to return"),
|
|
2572
|
+
orderBy: z$1.enum(["created_at", "updated_at"]).optional().describe("The order by of the connected accounts"),
|
|
2573
|
+
statuses: z$1.array(ConnectedAccountStatusSchema).nullable().optional().describe("The statuses of the connected accounts"),
|
|
2574
|
+
toolkitSlugs: z$1.array(z$1.string()).nullable().optional().describe("The toolkit slugs of the connected accounts"),
|
|
2575
|
+
userIds: z$1.array(z$1.string()).nullable().optional().describe("The user ids of the connected accounts"),
|
|
2536
2576
|
/**
|
|
2537
2577
|
* Experimental — shape may change in future releases. Filter by sharing
|
|
2538
2578
|
* model. Default (omitted) returns PRIVATE only. Pass `'SHARED'` for only
|
|
2539
2579
|
* shared accounts, or `'ALL'` for `PRIVATE` + `SHARED`. Kept flat because
|
|
2540
2580
|
* the wire is a query string and can't carry nested objects.
|
|
2541
2581
|
*/
|
|
2542
|
-
accountType: z.enum([
|
|
2582
|
+
accountType: z$1.enum([
|
|
2543
2583
|
"PRIVATE",
|
|
2544
2584
|
"SHARED",
|
|
2545
2585
|
"ALL"
|
|
2546
2586
|
]).optional()
|
|
2547
2587
|
});
|
|
2548
|
-
const ConnectedAccountListResponseSchema = z.object({
|
|
2549
|
-
items: z.array(ConnectedAccountRetrieveResponseSchema).describe("The list of connected accounts"),
|
|
2550
|
-
nextCursor: z.string().nullish().describe("The next cursor to paginate through the connected accounts"),
|
|
2551
|
-
totalPages: z.number().describe("The total number of pages of connected accounts")
|
|
2588
|
+
const ConnectedAccountListResponseSchema = z$1.object({
|
|
2589
|
+
items: z$1.array(ConnectedAccountRetrieveResponseSchema).describe("The list of connected accounts"),
|
|
2590
|
+
nextCursor: z$1.string().nullish().describe("The next cursor to paginate through the connected accounts"),
|
|
2591
|
+
totalPages: z$1.number().describe("The total number of pages of connected accounts")
|
|
2552
2592
|
});
|
|
2553
|
-
const CreateConnectedAccountLinkOptionsSchema = z.object({
|
|
2593
|
+
const CreateConnectedAccountLinkOptionsSchema = z$1.object({
|
|
2554
2594
|
/**
|
|
2555
2595
|
* The url to redirect the user to post connecting their account.
|
|
2556
2596
|
*
|
|
@@ -2560,11 +2600,11 @@ const CreateConnectedAccountLinkOptionsSchema = z.object({
|
|
|
2560
2600
|
* @example https://your-app.com/callback
|
|
2561
2601
|
*
|
|
2562
2602
|
*/
|
|
2563
|
-
callbackUrl: z.string().optional(),
|
|
2603
|
+
callbackUrl: z$1.string().optional(),
|
|
2564
2604
|
/**
|
|
2565
2605
|
* Human-readable alias for the connected account. Must be unique per userId and toolkit within the project.
|
|
2566
2606
|
*/
|
|
2567
|
-
alias: z.string().optional(),
|
|
2607
|
+
alias: z$1.string().optional(),
|
|
2568
2608
|
/**
|
|
2569
2609
|
* Whether to allow multiple connected accounts for the same user and auth config.
|
|
2570
2610
|
* When `false` (default), `link()` throws `ComposioMultipleConnectedAccountsError`
|
|
@@ -2572,7 +2612,7 @@ const CreateConnectedAccountLinkOptionsSchema = z.object({
|
|
|
2572
2612
|
* the guard on `initiate()`. Pair with `alias` and a session-level
|
|
2573
2613
|
* `multiAccount` config to disambiguate at execution time.
|
|
2574
2614
|
*/
|
|
2575
|
-
allowMultiple: z.boolean().optional(),
|
|
2615
|
+
allowMultiple: z$1.boolean().optional(),
|
|
2576
2616
|
/**
|
|
2577
2617
|
* Experimental options for SHARED connections. Pass `accountType: 'SHARED'`
|
|
2578
2618
|
* (and optionally `aclConfigForShared`) to create a connection that can
|
|
@@ -2589,12 +2629,12 @@ const CreateConnectedAccountLinkOptionsSchema = z.object({
|
|
|
2589
2629
|
*/
|
|
2590
2630
|
experimental: ConnectedAccountExperimentalSchema.optional()
|
|
2591
2631
|
});
|
|
2592
|
-
const CreateConnectedAccountLinkResponseSchema = z.object({ redirectUrl: z.string() });
|
|
2593
|
-
const ConnectedAccountRefreshOptionsSchema = z.object({
|
|
2594
|
-
redirectUrl: z.string().optional(),
|
|
2595
|
-
validateCredentials: z.boolean().optional()
|
|
2632
|
+
const CreateConnectedAccountLinkResponseSchema = z$1.object({ redirectUrl: z$1.string() });
|
|
2633
|
+
const ConnectedAccountRefreshOptionsSchema = z$1.object({
|
|
2634
|
+
redirectUrl: z$1.string().optional(),
|
|
2635
|
+
validateCredentials: z$1.boolean().optional()
|
|
2596
2636
|
});
|
|
2597
|
-
const UpdateConnectedAccountParamsSchema = z.object({ enabled: z.boolean() });
|
|
2637
|
+
const UpdateConnectedAccountParamsSchema = z$1.object({ enabled: z$1.boolean() });
|
|
2598
2638
|
/**
|
|
2599
2639
|
* Params for `composio.connectedAccounts.updateAcl()`. Mirrors the inner
|
|
2600
2640
|
* shape of the wire's `acl_config_for_shared` block — the SDK adds the
|
|
@@ -3603,148 +3643,148 @@ const TriggerStatuses = {
|
|
|
3603
3643
|
ENABLE: "enable",
|
|
3604
3644
|
DISABLE: "disable"
|
|
3605
3645
|
};
|
|
3606
|
-
const TriggerStatusEnum = z.enum(["enable", "disable"]);
|
|
3607
|
-
const TriggerSubscribeParamSchema = z.object({
|
|
3608
|
-
toolkits: z.array(z.string()).optional(),
|
|
3609
|
-
triggerId: z.string().optional(),
|
|
3610
|
-
connectedAccountId: z.string().optional(),
|
|
3611
|
-
authConfigId: z.string().optional(),
|
|
3612
|
-
triggerSlug: z.array(z.string()).optional(),
|
|
3613
|
-
triggerData: z.string().optional(),
|
|
3614
|
-
userId: z.string().optional()
|
|
3646
|
+
const TriggerStatusEnum = z$1.enum(["enable", "disable"]);
|
|
3647
|
+
const TriggerSubscribeParamSchema = z$1.object({
|
|
3648
|
+
toolkits: z$1.array(z$1.string()).optional(),
|
|
3649
|
+
triggerId: z$1.string().optional(),
|
|
3650
|
+
connectedAccountId: z$1.string().optional(),
|
|
3651
|
+
authConfigId: z$1.string().optional(),
|
|
3652
|
+
triggerSlug: z$1.array(z$1.string()).optional(),
|
|
3653
|
+
triggerData: z$1.string().optional(),
|
|
3654
|
+
userId: z$1.string().optional()
|
|
3615
3655
|
});
|
|
3616
|
-
const TriggerInstanceListActiveParamsSchema = z.object({
|
|
3617
|
-
authConfigIds: z.array(z.string()).nullable().optional(),
|
|
3618
|
-
connectedAccountIds: z.array(z.string()).nullable().optional(),
|
|
3619
|
-
limit: z.number().optional(),
|
|
3620
|
-
cursor: z.string().optional(),
|
|
3621
|
-
showDisabled: z.boolean().nullable().optional(),
|
|
3622
|
-
triggerIds: z.array(z.string()).nullable().optional(),
|
|
3623
|
-
triggerNames: z.array(z.string()).nullable().optional()
|
|
3656
|
+
const TriggerInstanceListActiveParamsSchema = z$1.object({
|
|
3657
|
+
authConfigIds: z$1.array(z$1.string()).nullable().optional(),
|
|
3658
|
+
connectedAccountIds: z$1.array(z$1.string()).nullable().optional(),
|
|
3659
|
+
limit: z$1.number().optional(),
|
|
3660
|
+
cursor: z$1.string().optional(),
|
|
3661
|
+
showDisabled: z$1.boolean().nullable().optional(),
|
|
3662
|
+
triggerIds: z$1.array(z$1.string()).nullable().optional(),
|
|
3663
|
+
triggerNames: z$1.array(z$1.string()).nullable().optional()
|
|
3624
3664
|
});
|
|
3625
|
-
const TriggerInstanceListActiveResponseItemSchema = z.object({
|
|
3626
|
-
id: z.string(),
|
|
3627
|
-
connectedAccountId: z.string(),
|
|
3628
|
-
disabledAt: z.string().nullable(),
|
|
3629
|
-
state: z.record(z.unknown()),
|
|
3630
|
-
triggerConfig: z.record(z.unknown()),
|
|
3631
|
-
triggerName: z.string(),
|
|
3632
|
-
updatedAt: z.string(),
|
|
3633
|
-
triggerData: z.string().optional(),
|
|
3634
|
-
uuid: z.string().optional()
|
|
3665
|
+
const TriggerInstanceListActiveResponseItemSchema = z$1.object({
|
|
3666
|
+
id: z$1.string(),
|
|
3667
|
+
connectedAccountId: z$1.string(),
|
|
3668
|
+
disabledAt: z$1.string().nullable(),
|
|
3669
|
+
state: z$1.record(z$1.unknown()),
|
|
3670
|
+
triggerConfig: z$1.record(z$1.unknown()),
|
|
3671
|
+
triggerName: z$1.string(),
|
|
3672
|
+
updatedAt: z$1.string(),
|
|
3673
|
+
triggerData: z$1.string().optional(),
|
|
3674
|
+
uuid: z$1.string().optional()
|
|
3635
3675
|
});
|
|
3636
|
-
const TriggerInstanceListActiveResponseSchema = z.object({
|
|
3637
|
-
items: z.array(TriggerInstanceListActiveResponseItemSchema),
|
|
3638
|
-
nextCursor: z.string().nullable(),
|
|
3639
|
-
totalPages: z.number()
|
|
3676
|
+
const TriggerInstanceListActiveResponseSchema = z$1.object({
|
|
3677
|
+
items: z$1.array(TriggerInstanceListActiveResponseItemSchema),
|
|
3678
|
+
nextCursor: z$1.string().nullable(),
|
|
3679
|
+
totalPages: z$1.number()
|
|
3640
3680
|
});
|
|
3641
|
-
const TriggerInstanceUpsertParamsSchema = z.object({
|
|
3642
|
-
connectedAccountId: z.string().optional(),
|
|
3643
|
-
triggerConfig: z.record(z.unknown()).optional()
|
|
3681
|
+
const TriggerInstanceUpsertParamsSchema = z$1.object({
|
|
3682
|
+
connectedAccountId: z$1.string().optional(),
|
|
3683
|
+
triggerConfig: z$1.record(z$1.unknown()).optional()
|
|
3644
3684
|
});
|
|
3645
|
-
const TriggerInstanceUpsertResponseSchema = z.object({ triggerId: z.string() });
|
|
3646
|
-
const TriggerInstanceManageUpdateParamsSchema = z.object({ status: z.enum(["enable", "disable"]) });
|
|
3647
|
-
const TriggerInstanceManageUpdateResponseSchema = z.object({ status: z.enum(["success"]) });
|
|
3648
|
-
const TriggerInstanceManageDeleteResponseSchema = z.object({ triggerId: z.string() });
|
|
3649
|
-
const IncomingTriggerPayloadSchema = z.object({
|
|
3650
|
-
id: z.string().describe("The ID of the trigger"),
|
|
3651
|
-
uuid: z.string().describe("The UUID of the trigger"),
|
|
3652
|
-
triggerSlug: z.string().describe("The slug of the trigger that triggered the event"),
|
|
3653
|
-
toolkitSlug: z.string().describe("The slug of the toolkit that triggered the event"),
|
|
3654
|
-
userId: z.string().describe("The ID of the user that triggered the event"),
|
|
3655
|
-
payload: z.record(z.unknown()).describe("The payload of the trigger").optional(),
|
|
3656
|
-
originalPayload: z.record(z.unknown()).describe("The original payload of the trigger").optional(),
|
|
3657
|
-
metadata: z.object({
|
|
3658
|
-
id: z.string(),
|
|
3659
|
-
uuid: z.string(),
|
|
3660
|
-
toolkitSlug: z.string(),
|
|
3661
|
-
triggerSlug: z.string(),
|
|
3662
|
-
triggerData: z.string().optional(),
|
|
3663
|
-
triggerConfig: z.record(z.unknown()),
|
|
3664
|
-
connectedAccount: z.object({
|
|
3665
|
-
id: z.string(),
|
|
3666
|
-
uuid: z.string(),
|
|
3667
|
-
authConfigId: z.string(),
|
|
3668
|
-
authConfigUUID: z.string(),
|
|
3669
|
-
userId: z.string(),
|
|
3670
|
-
status: z.enum(["ACTIVE", "INACTIVE"])
|
|
3685
|
+
const TriggerInstanceUpsertResponseSchema = z$1.object({ triggerId: z$1.string() });
|
|
3686
|
+
const TriggerInstanceManageUpdateParamsSchema = z$1.object({ status: z$1.enum(["enable", "disable"]) });
|
|
3687
|
+
const TriggerInstanceManageUpdateResponseSchema = z$1.object({ status: z$1.enum(["success"]) });
|
|
3688
|
+
const TriggerInstanceManageDeleteResponseSchema = z$1.object({ triggerId: z$1.string() });
|
|
3689
|
+
const IncomingTriggerPayloadSchema = z$1.object({
|
|
3690
|
+
id: z$1.string().describe("The ID of the trigger"),
|
|
3691
|
+
uuid: z$1.string().describe("The UUID of the trigger"),
|
|
3692
|
+
triggerSlug: z$1.string().describe("The slug of the trigger that triggered the event"),
|
|
3693
|
+
toolkitSlug: z$1.string().describe("The slug of the toolkit that triggered the event"),
|
|
3694
|
+
userId: z$1.string().describe("The ID of the user that triggered the event"),
|
|
3695
|
+
payload: z$1.record(z$1.unknown()).describe("The payload of the trigger").optional(),
|
|
3696
|
+
originalPayload: z$1.record(z$1.unknown()).describe("The original payload of the trigger").optional(),
|
|
3697
|
+
metadata: z$1.object({
|
|
3698
|
+
id: z$1.string(),
|
|
3699
|
+
uuid: z$1.string(),
|
|
3700
|
+
toolkitSlug: z$1.string(),
|
|
3701
|
+
triggerSlug: z$1.string(),
|
|
3702
|
+
triggerData: z$1.string().optional(),
|
|
3703
|
+
triggerConfig: z$1.record(z$1.unknown()),
|
|
3704
|
+
connectedAccount: z$1.object({
|
|
3705
|
+
id: z$1.string(),
|
|
3706
|
+
uuid: z$1.string(),
|
|
3707
|
+
authConfigId: z$1.string(),
|
|
3708
|
+
authConfigUUID: z$1.string(),
|
|
3709
|
+
userId: z$1.string(),
|
|
3710
|
+
status: z$1.enum(["ACTIVE", "INACTIVE"])
|
|
3671
3711
|
})
|
|
3672
3712
|
})
|
|
3673
3713
|
});
|
|
3674
|
-
const TriggersTypeListParamsSchema = z.object({
|
|
3675
|
-
cursor: z.string().optional(),
|
|
3676
|
-
limit: z.number().nullish(),
|
|
3677
|
-
toolkits: z.array(z.string()).nullish()
|
|
3714
|
+
const TriggersTypeListParamsSchema = z$1.object({
|
|
3715
|
+
cursor: z$1.string().optional(),
|
|
3716
|
+
limit: z$1.number().nullish(),
|
|
3717
|
+
toolkits: z$1.array(z$1.string()).nullish()
|
|
3678
3718
|
});
|
|
3679
|
-
const TriggerTypeSchema = z.object({
|
|
3680
|
-
slug: z.string(),
|
|
3681
|
-
name: z.string(),
|
|
3682
|
-
description: z.string(),
|
|
3683
|
-
instructions: z.string().optional(),
|
|
3684
|
-
toolkit: z.object({
|
|
3685
|
-
logo: z.string(),
|
|
3686
|
-
slug: z.string(),
|
|
3687
|
-
name: z.string()
|
|
3719
|
+
const TriggerTypeSchema = z$1.object({
|
|
3720
|
+
slug: z$1.string(),
|
|
3721
|
+
name: z$1.string(),
|
|
3722
|
+
description: z$1.string(),
|
|
3723
|
+
instructions: z$1.string().optional(),
|
|
3724
|
+
toolkit: z$1.object({
|
|
3725
|
+
logo: z$1.string(),
|
|
3726
|
+
slug: z$1.string(),
|
|
3727
|
+
name: z$1.string()
|
|
3688
3728
|
}),
|
|
3689
|
-
payload: z.record(z.unknown()),
|
|
3690
|
-
config: z.record(z.unknown()),
|
|
3691
|
-
version: z.string().optional()
|
|
3729
|
+
payload: z$1.record(z$1.unknown()),
|
|
3730
|
+
config: z$1.record(z$1.unknown()),
|
|
3731
|
+
version: z$1.string().optional()
|
|
3692
3732
|
});
|
|
3693
|
-
const TriggersTypeListResponseSchema = z.object({
|
|
3694
|
-
items: z.array(TriggerTypeSchema),
|
|
3695
|
-
nextCursor: z.string().nullish(),
|
|
3696
|
-
totalPages: z.number()
|
|
3733
|
+
const TriggersTypeListResponseSchema = z$1.object({
|
|
3734
|
+
items: z$1.array(TriggerTypeSchema),
|
|
3735
|
+
nextCursor: z$1.string().nullish(),
|
|
3736
|
+
totalPages: z$1.number()
|
|
3697
3737
|
});
|
|
3698
3738
|
/**
|
|
3699
3739
|
* Webhook payload schemas for V1, V2, V3 versions
|
|
3700
3740
|
* These schemas represent the raw payload structure sent by Composio's webhook system
|
|
3701
3741
|
*/
|
|
3702
3742
|
/** V1 webhook payload - legacy format */
|
|
3703
|
-
const WebhookPayloadV1Schema = z.object({
|
|
3704
|
-
trigger_name: z.string(),
|
|
3705
|
-
connection_id: z.string(),
|
|
3706
|
-
trigger_id: z.string(),
|
|
3707
|
-
payload: z.record(z.unknown()),
|
|
3708
|
-
log_id: z.string()
|
|
3743
|
+
const WebhookPayloadV1Schema = z$1.object({
|
|
3744
|
+
trigger_name: z$1.string(),
|
|
3745
|
+
connection_id: z$1.string(),
|
|
3746
|
+
trigger_id: z$1.string(),
|
|
3747
|
+
payload: z$1.record(z$1.unknown()),
|
|
3748
|
+
log_id: z$1.string()
|
|
3709
3749
|
});
|
|
3710
3750
|
/** V2 webhook payload - includes timestamp and nested data */
|
|
3711
|
-
const WebhookPayloadV2Schema = z.object({
|
|
3712
|
-
type: z.string(),
|
|
3713
|
-
timestamp: z.string(),
|
|
3714
|
-
log_id: z.string(),
|
|
3715
|
-
data: z.object({
|
|
3716
|
-
connection_id: z.string(),
|
|
3717
|
-
connection_nano_id: z.string(),
|
|
3718
|
-
trigger_nano_id: z.string(),
|
|
3719
|
-
trigger_id: z.string(),
|
|
3720
|
-
user_id: z.string()
|
|
3751
|
+
const WebhookPayloadV2Schema = z$1.object({
|
|
3752
|
+
type: z$1.string(),
|
|
3753
|
+
timestamp: z$1.string(),
|
|
3754
|
+
log_id: z$1.string(),
|
|
3755
|
+
data: z$1.object({
|
|
3756
|
+
connection_id: z$1.string(),
|
|
3757
|
+
connection_nano_id: z$1.string(),
|
|
3758
|
+
trigger_nano_id: z$1.string(),
|
|
3759
|
+
trigger_id: z$1.string(),
|
|
3760
|
+
user_id: z$1.string()
|
|
3721
3761
|
}).passthrough()
|
|
3722
3762
|
});
|
|
3723
3763
|
/** V3 webhook payload - generic envelope for all composio.* events */
|
|
3724
|
-
const WebhookPayloadV3Schema = z.object({
|
|
3725
|
-
id: z.string(),
|
|
3726
|
-
timestamp: z.string(),
|
|
3727
|
-
type: z.string().refine((val) => val.startsWith("composio."), { message: "V3 event type must start with 'composio.'" }),
|
|
3728
|
-
metadata: z.record(z.unknown()),
|
|
3729
|
-
data: z.record(z.unknown())
|
|
3764
|
+
const WebhookPayloadV3Schema = z$1.object({
|
|
3765
|
+
id: z$1.string(),
|
|
3766
|
+
timestamp: z$1.string(),
|
|
3767
|
+
type: z$1.string().refine((val) => val.startsWith("composio."), { message: "V3 event type must start with 'composio.'" }),
|
|
3768
|
+
metadata: z$1.record(z$1.unknown()),
|
|
3769
|
+
data: z$1.record(z$1.unknown())
|
|
3730
3770
|
});
|
|
3731
3771
|
/** V3 trigger-specific payload - has trigger metadata fields */
|
|
3732
|
-
const WebhookTriggerPayloadV3Schema = z.object({
|
|
3733
|
-
id: z.string(),
|
|
3734
|
-
timestamp: z.string(),
|
|
3735
|
-
type: z.string(),
|
|
3736
|
-
metadata: z.object({
|
|
3737
|
-
log_id: z.string(),
|
|
3738
|
-
trigger_slug: z.string(),
|
|
3739
|
-
trigger_id: z.string(),
|
|
3740
|
-
connected_account_id: z.string(),
|
|
3741
|
-
auth_config_id: z.string(),
|
|
3742
|
-
user_id: z.string()
|
|
3772
|
+
const WebhookTriggerPayloadV3Schema = z$1.object({
|
|
3773
|
+
id: z$1.string(),
|
|
3774
|
+
timestamp: z$1.string(),
|
|
3775
|
+
type: z$1.string(),
|
|
3776
|
+
metadata: z$1.object({
|
|
3777
|
+
log_id: z$1.string(),
|
|
3778
|
+
trigger_slug: z$1.string(),
|
|
3779
|
+
trigger_id: z$1.string(),
|
|
3780
|
+
connected_account_id: z$1.string(),
|
|
3781
|
+
auth_config_id: z$1.string(),
|
|
3782
|
+
user_id: z$1.string()
|
|
3743
3783
|
}).passthrough(),
|
|
3744
|
-
data: z.record(z.unknown())
|
|
3784
|
+
data: z$1.record(z$1.unknown())
|
|
3745
3785
|
});
|
|
3746
3786
|
/** Union of all webhook payload versions */
|
|
3747
|
-
const WebhookPayloadSchema = z.union([
|
|
3787
|
+
const WebhookPayloadSchema = z$1.union([
|
|
3748
3788
|
WebhookPayloadV3Schema,
|
|
3749
3789
|
WebhookPayloadV2Schema,
|
|
3750
3790
|
WebhookPayloadV1Schema
|
|
@@ -3756,13 +3796,13 @@ const WebhookVersions = {
|
|
|
3756
3796
|
V3: "V3"
|
|
3757
3797
|
};
|
|
3758
3798
|
const DefaultWebhookSubscriptionEvents = ["composio.trigger.message"];
|
|
3759
|
-
const SetWebhookSubscriptionParamsSchema = z.object({
|
|
3799
|
+
const SetWebhookSubscriptionParamsSchema = z$1.object({
|
|
3760
3800
|
/** HTTPS URL to receive webhook events. */
|
|
3761
|
-
webhookUrl: z.string().min(1),
|
|
3801
|
+
webhookUrl: z$1.string().min(1),
|
|
3762
3802
|
/** Event types to subscribe to. Defaults to trigger messages. */
|
|
3763
|
-
enabledEvents: z.array(z.string()).min(1).optional(),
|
|
3803
|
+
enabledEvents: z$1.array(z$1.string()).min(1).optional(),
|
|
3764
3804
|
/** Webhook payload version. Defaults to V3. */
|
|
3765
|
-
version: z.enum([
|
|
3805
|
+
version: z$1.enum([
|
|
3766
3806
|
"V1",
|
|
3767
3807
|
"V2",
|
|
3768
3808
|
"V3"
|
|
@@ -3771,22 +3811,22 @@ const SetWebhookSubscriptionParamsSchema = z.object({
|
|
|
3771
3811
|
/**
|
|
3772
3812
|
* Parameters for verifying a webhook signature
|
|
3773
3813
|
*/
|
|
3774
|
-
const VerifyWebhookParamsSchema = z.object({
|
|
3814
|
+
const VerifyWebhookParamsSchema = z$1.object({
|
|
3775
3815
|
/**
|
|
3776
3816
|
* The webhook message ID from the 'webhook-id' header.
|
|
3777
3817
|
* Format: 'msg_xxx'
|
|
3778
3818
|
*/
|
|
3779
|
-
id: z.string({
|
|
3819
|
+
id: z$1.string({
|
|
3780
3820
|
required_error: "Missing 'id' parameter. Pass the value of the 'webhook-id' HTTP header.",
|
|
3781
3821
|
invalid_type_error: "Invalid 'id' parameter. Expected string from 'webhook-id' HTTP header."
|
|
3782
3822
|
}),
|
|
3783
3823
|
/** The raw webhook payload as a string (request body) */
|
|
3784
|
-
payload: z.string({
|
|
3824
|
+
payload: z$1.string({
|
|
3785
3825
|
required_error: "Missing 'payload' parameter. Pass the raw request body as a string (do not parse it).",
|
|
3786
3826
|
invalid_type_error: "Invalid 'payload' parameter. Expected string (raw request body)."
|
|
3787
3827
|
}),
|
|
3788
3828
|
/** The webhook secret used to sign the payload (from Composio dashboard) */
|
|
3789
|
-
secret: z.string({
|
|
3829
|
+
secret: z$1.string({
|
|
3790
3830
|
required_error: "Missing 'secret' parameter. Get your webhook secret from the Composio dashboard.",
|
|
3791
3831
|
invalid_type_error: "Invalid 'secret' parameter. Expected string."
|
|
3792
3832
|
}),
|
|
@@ -3794,7 +3834,7 @@ const VerifyWebhookParamsSchema = z.object({
|
|
|
3794
3834
|
* The signature from the 'webhook-signature' header.
|
|
3795
3835
|
* Format: 'v1,base64EncodedSignature'
|
|
3796
3836
|
*/
|
|
3797
|
-
signature: z.string({
|
|
3837
|
+
signature: z$1.string({
|
|
3798
3838
|
required_error: "Missing 'signature' parameter. Pass the value of the 'webhook-signature' HTTP header.",
|
|
3799
3839
|
invalid_type_error: "Invalid 'signature' parameter. Expected string from 'webhook-signature' HTTP header."
|
|
3800
3840
|
}),
|
|
@@ -3802,7 +3842,7 @@ const VerifyWebhookParamsSchema = z.object({
|
|
|
3802
3842
|
* The webhook timestamp from the 'webhook-timestamp' header.
|
|
3803
3843
|
* This is the Unix timestamp in seconds when the webhook was sent.
|
|
3804
3844
|
*/
|
|
3805
|
-
timestamp: z.string({
|
|
3845
|
+
timestamp: z$1.string({
|
|
3806
3846
|
required_error: "Missing 'timestamp' parameter. Pass the value of the 'webhook-timestamp' HTTP header.",
|
|
3807
3847
|
invalid_type_error: "Invalid 'timestamp' parameter. Expected string from 'webhook-timestamp' HTTP header."
|
|
3808
3848
|
}),
|
|
@@ -3812,15 +3852,15 @@ const VerifyWebhookParamsSchema = z.object({
|
|
|
3812
3852
|
* Set to 0 to disable timestamp validation.
|
|
3813
3853
|
* @default 300 (5 minutes)
|
|
3814
3854
|
*/
|
|
3815
|
-
tolerance: z.number().optional().default(300)
|
|
3855
|
+
tolerance: z$1.number().optional().default(300)
|
|
3816
3856
|
});
|
|
3817
3857
|
|
|
3818
3858
|
//#endregion
|
|
3819
3859
|
//#region src/services/internal/InternalService.types.ts
|
|
3820
|
-
const SDKRealtimeCredentialsResponseSchema = z.object({
|
|
3821
|
-
projectId: z.string().describe("The project ID"),
|
|
3822
|
-
pusherKey: z.string().describe("The Pusher key"),
|
|
3823
|
-
pusherCluster: z.string().describe("The Pusher cluster")
|
|
3860
|
+
const SDKRealtimeCredentialsResponseSchema = z$1.object({
|
|
3861
|
+
projectId: z$1.string().describe("The project ID"),
|
|
3862
|
+
pusherKey: z$1.string().describe("The Pusher key"),
|
|
3863
|
+
pusherCluster: z$1.string().describe("The Pusher cluster")
|
|
3824
3864
|
});
|
|
3825
3865
|
|
|
3826
3866
|
//#endregion
|
|
@@ -4132,7 +4172,8 @@ const transformWebhookSubscription = (subscription) => {
|
|
|
4132
4172
|
};
|
|
4133
4173
|
};
|
|
4134
4174
|
const firstWebhookSubscriptionId = (response) => {
|
|
4135
|
-
|
|
4175
|
+
const firstItem = Array.isArray(response.items) ? response.items[0] : void 0;
|
|
4176
|
+
return firstString(asRecord(firstItem).id);
|
|
4136
4177
|
};
|
|
4137
4178
|
/**
|
|
4138
4179
|
* The signature header names Composio sends with every webhook delivery.
|
|
@@ -4212,8 +4253,10 @@ var Triggers = class {
|
|
|
4212
4253
|
enabled_events: parsedParams.data.enabledEvents ?? [...DefaultWebhookSubscriptionEvents],
|
|
4213
4254
|
version: parsedParams.data.version ?? WebhookVersions.V3
|
|
4214
4255
|
};
|
|
4215
|
-
const
|
|
4216
|
-
|
|
4256
|
+
const existing = await this.client.get(WEBHOOK_SUBSCRIPTIONS_PATH, { query: { limit: 1 } });
|
|
4257
|
+
const subscriptionId = firstWebhookSubscriptionId(existing);
|
|
4258
|
+
const subscription = subscriptionId ? await this.client.patch(`${WEBHOOK_SUBSCRIPTIONS_PATH}/${encodeURIComponent(subscriptionId)}`, { body }) : await this.client.post(WEBHOOK_SUBSCRIPTIONS_PATH, { body });
|
|
4259
|
+
return transformWebhookSubscription(subscription);
|
|
4217
4260
|
}
|
|
4218
4261
|
/**
|
|
4219
4262
|
* Fetch list of all the active triggers
|
|
@@ -4256,13 +4299,11 @@ var Triggers = class {
|
|
|
4256
4299
|
* @returns {Promise<TriggerInstanceUpsertResponse>} The created trigger instance
|
|
4257
4300
|
*/
|
|
4258
4301
|
async create(userId, slug, body, requestOptions) {
|
|
4302
|
+
if (!userId?.trim()) throw new ValidationError(`A non-empty userId is required to create a trigger`);
|
|
4259
4303
|
const parsedBody = TriggerInstanceUpsertParamsSchema.safeParse(body ?? {});
|
|
4260
4304
|
if (!parsedBody.success) throw new ValidationError(`Invalid parameters passed to create trigger`, { cause: parsedBody.error });
|
|
4261
|
-
let triggerType;
|
|
4262
|
-
let toolkitSlug;
|
|
4263
4305
|
try {
|
|
4264
|
-
|
|
4265
|
-
toolkitSlug = triggerType.toolkit.slug;
|
|
4306
|
+
await this.getType(slug, requestOptions);
|
|
4266
4307
|
} catch (error) {
|
|
4267
4308
|
if (error instanceof APIError && (error.status === 400 || error.status === 404)) throw new ComposioTriggerTypeNotFoundError(`Trigger type ${slug} not found`, {
|
|
4268
4309
|
cause: error,
|
|
@@ -4272,37 +4313,10 @@ var Triggers = class {
|
|
|
4272
4313
|
`Visit the toolkit page to see the available triggers`
|
|
4273
4314
|
]
|
|
4274
4315
|
});
|
|
4275
|
-
else throw error;
|
|
4276
|
-
}
|
|
4277
|
-
let connectedAccountId = body?.connectedAccountId;
|
|
4278
|
-
try {
|
|
4279
|
-
const connectedAccountListParams = {
|
|
4280
|
-
user_ids: [userId],
|
|
4281
|
-
toolkit_slugs: [toolkitSlug]
|
|
4282
|
-
};
|
|
4283
|
-
const { items: connectedAccounts } = await withCancellation(() => this.client.connectedAccounts.list(connectedAccountListParams, requestOptions), requestOptions?.signal);
|
|
4284
|
-
if (connectedAccounts.length === 0) throw new ComposioConnectedAccountNotFoundError(`No connected account found for user ${userId} for toolkit ${toolkitSlug}`, {
|
|
4285
|
-
cause: /* @__PURE__ */ new Error(`No connected account found for user ${userId}`),
|
|
4286
|
-
possibleFixes: [`Create a new connected account for user ${userId}`]
|
|
4287
|
-
});
|
|
4288
|
-
const accountExists = connectedAccounts.some((acc) => acc.id === connectedAccountId);
|
|
4289
|
-
if (connectedAccountId && !accountExists) throw new ComposioConnectedAccountNotFoundError(`Connected account ID ${connectedAccountId} not found for user ${userId}`, {
|
|
4290
|
-
cause: /* @__PURE__ */ new Error(`Connected account ID ${connectedAccountId} not found for user ${userId}`),
|
|
4291
|
-
possibleFixes: [`Create a new connected account for user ${userId}`, `Verify the connected account ID`]
|
|
4292
|
-
});
|
|
4293
|
-
if (!connectedAccountId) {
|
|
4294
|
-
connectedAccountId = connectedAccounts[0].id;
|
|
4295
|
-
logger.warn(`[Warn] Multiple connected accounts found for user ${userId}, using the first one. Pass connectedAccountId to select a specific account.`);
|
|
4296
|
-
}
|
|
4297
|
-
} catch (error) {
|
|
4298
|
-
if (error instanceof APIError && [400, 404].includes(error.status)) throw new ComposioConnectedAccountNotFoundError(`No connected account found for user ${userId} for toolkit ${toolkitSlug}`, {
|
|
4299
|
-
cause: error,
|
|
4300
|
-
possibleFixes: [`Create a new connected account for user ${userId}`]
|
|
4301
|
-
});
|
|
4302
4316
|
throw error;
|
|
4303
4317
|
}
|
|
4304
4318
|
const upsertParams = {
|
|
4305
|
-
connected_account_id: connectedAccountId,
|
|
4319
|
+
connected_account_id: parsedBody.data.connectedAccountId,
|
|
4306
4320
|
trigger_config: parsedBody.data.triggerConfig,
|
|
4307
4321
|
toolkit_versions: this.toolkitVersions,
|
|
4308
4322
|
user_id: userId
|
|
@@ -4917,105 +4931,105 @@ var Triggers = class {
|
|
|
4917
4931
|
|
|
4918
4932
|
//#endregion
|
|
4919
4933
|
//#region src/types/mcp.experimental.types.ts
|
|
4920
|
-
const MCPServerInstanceSchema = z
|
|
4921
|
-
id: z
|
|
4922
|
-
name: z
|
|
4923
|
-
type: z
|
|
4924
|
-
url: z
|
|
4925
|
-
userId: z
|
|
4926
|
-
allowedTools: z
|
|
4927
|
-
authConfigs: z
|
|
4934
|
+
const MCPServerInstanceSchema = z.object({
|
|
4935
|
+
id: z.string(),
|
|
4936
|
+
name: z.string(),
|
|
4937
|
+
type: z.literal("streamable_http"),
|
|
4938
|
+
url: z.string(),
|
|
4939
|
+
userId: z.string(),
|
|
4940
|
+
allowedTools: z.array(z.string()),
|
|
4941
|
+
authConfigs: z.array(z.string())
|
|
4928
4942
|
});
|
|
4929
4943
|
/**
|
|
4930
4944
|
* MCP Create Method Input Types
|
|
4931
4945
|
*/
|
|
4932
|
-
const MCPConfigToolkitsSchema = z
|
|
4933
|
-
toolkit: z
|
|
4934
|
-
authConfigId: z
|
|
4946
|
+
const MCPConfigToolkitsSchema = z.object({
|
|
4947
|
+
toolkit: z.string().describe("Id of the toolkit").optional(),
|
|
4948
|
+
authConfigId: z.string().describe("Id of the auth config").optional()
|
|
4935
4949
|
});
|
|
4936
|
-
const MCPConfigCreationParamsSchema = z
|
|
4937
|
-
toolkits: z
|
|
4938
|
-
allowedTools: z
|
|
4939
|
-
manuallyManageConnections: z
|
|
4950
|
+
const MCPConfigCreationParamsSchema = z.object({
|
|
4951
|
+
toolkits: z.array(z.union([MCPConfigToolkitsSchema, z.string()])),
|
|
4952
|
+
allowedTools: z.array(z.string()).optional(),
|
|
4953
|
+
manuallyManageConnections: z.boolean().default(false).optional().describe(`Whether to manually manage accounts. If true, you need to manage accounts manually connect user accounts.
|
|
4940
4954
|
If set to false, composio will inject account maangement tools into your mcp server for agents to request and authenticate accounts.
|
|
4941
4955
|
defaults to false`)
|
|
4942
4956
|
});
|
|
4943
|
-
const MCPConfigResponseSchema = z
|
|
4957
|
+
const MCPConfigResponseSchema = z.object({
|
|
4944
4958
|
/**
|
|
4945
4959
|
* Unique identifier for the newly created custom MCP server
|
|
4946
4960
|
*/
|
|
4947
|
-
id: z
|
|
4961
|
+
id: z.string(),
|
|
4948
4962
|
/**
|
|
4949
4963
|
* Human-readable name of the custom MCP server
|
|
4950
4964
|
*/
|
|
4951
|
-
name: z
|
|
4965
|
+
name: z.string(),
|
|
4952
4966
|
/**
|
|
4953
4967
|
* List of tool identifiers that are enabled for this server
|
|
4954
4968
|
*/
|
|
4955
|
-
allowedTools: z
|
|
4969
|
+
allowedTools: z.array(z.string()),
|
|
4956
4970
|
/**
|
|
4957
4971
|
* ID references to the auth configurations used by this server
|
|
4958
4972
|
*/
|
|
4959
|
-
authConfigIds: z
|
|
4973
|
+
authConfigIds: z.array(z.string()),
|
|
4960
4974
|
/**
|
|
4961
4975
|
* Set of command line instructions for connecting various clients to this MCP server
|
|
4962
4976
|
*/
|
|
4963
|
-
commands: z
|
|
4977
|
+
commands: z.object({
|
|
4964
4978
|
/**
|
|
4965
4979
|
* Command line instruction for Claude client setup
|
|
4966
4980
|
*/
|
|
4967
|
-
claude: z
|
|
4981
|
+
claude: z.string(),
|
|
4968
4982
|
/**
|
|
4969
4983
|
* Command line instruction for Cursor client setup
|
|
4970
4984
|
*/
|
|
4971
|
-
cursor: z
|
|
4985
|
+
cursor: z.string(),
|
|
4972
4986
|
/**
|
|
4973
4987
|
* Command line instruction for Windsurf client setup
|
|
4974
4988
|
*/
|
|
4975
|
-
windsurf: z
|
|
4989
|
+
windsurf: z.string()
|
|
4976
4990
|
}),
|
|
4977
4991
|
/**
|
|
4978
4992
|
* URL endpoint for establishing Server-Sent Events (SSE) connection to this MCP server
|
|
4979
4993
|
*/
|
|
4980
|
-
MCPUrl: z
|
|
4994
|
+
MCPUrl: z.string()
|
|
4981
4995
|
});
|
|
4982
|
-
const MCPGetInstanceParamsSchema = z
|
|
4996
|
+
const MCPGetInstanceParamsSchema = z.object({ manuallyManageConnections: z.boolean().default(false).optional().describe(`Whether to manually manage accounts. If true, you need to manage accounts manually connect user accounts.
|
|
4983
4997
|
If set to false, composio will inject account maangement tools into your mcp server for agents to request and authenticate accounts.
|
|
4984
4998
|
defaults to false`) });
|
|
4985
|
-
const MCPListParamsSchema = z
|
|
4986
|
-
page: z
|
|
4987
|
-
limit: z
|
|
4988
|
-
toolkits: z
|
|
4989
|
-
authConfigs: z
|
|
4990
|
-
name: z
|
|
4999
|
+
const MCPListParamsSchema = z.object({
|
|
5000
|
+
page: z.number().optional().default(1),
|
|
5001
|
+
limit: z.number().optional().default(10),
|
|
5002
|
+
toolkits: z.array(z.string()).optional().default([]),
|
|
5003
|
+
authConfigs: z.array(z.string()).optional().default([]),
|
|
5004
|
+
name: z.string().optional()
|
|
4991
5005
|
});
|
|
4992
|
-
const MCPItemSchema = MCPConfigResponseSchema.extend({ ...z
|
|
4993
|
-
toolkitIcons: z
|
|
4994
|
-
serverInstanceCount: z
|
|
4995
|
-
toolkits: z
|
|
5006
|
+
const MCPItemSchema = MCPConfigResponseSchema.extend({ ...z.object({
|
|
5007
|
+
toolkitIcons: z.record(z.string(), z.string()),
|
|
5008
|
+
serverInstanceCount: z.number(),
|
|
5009
|
+
toolkits: z.array(z.string())
|
|
4996
5010
|
}).shape });
|
|
4997
|
-
const MCPListResponseSchema = z
|
|
4998
|
-
items: z
|
|
4999
|
-
currentPage: z
|
|
5000
|
-
totalPages: z
|
|
5011
|
+
const MCPListResponseSchema = z.object({
|
|
5012
|
+
items: z.array(MCPItemSchema),
|
|
5013
|
+
currentPage: z.number(),
|
|
5014
|
+
totalPages: z.number()
|
|
5001
5015
|
});
|
|
5002
|
-
const MCPUpdateParamsSchema = z
|
|
5003
|
-
name: z
|
|
5004
|
-
toolkits: z
|
|
5005
|
-
allowedTools: z
|
|
5006
|
-
manuallyManageConnections: z
|
|
5016
|
+
const MCPUpdateParamsSchema = z.object({
|
|
5017
|
+
name: z.string().optional(),
|
|
5018
|
+
toolkits: z.array(z.union([MCPConfigToolkitsSchema, z.string()])).optional(),
|
|
5019
|
+
allowedTools: z.array(z.string()).optional(),
|
|
5020
|
+
manuallyManageConnections: z.boolean().optional().describe(`Whether to manually manage accounts. If true, you need to manage accounts manually connect user accounts.
|
|
5007
5021
|
If set to false, composio will inject account maangement tools into your mcp server for agents to request and authenticate accounts.
|
|
5008
5022
|
defaults to false`)
|
|
5009
5023
|
});
|
|
5010
|
-
const MCPServerConnectionStatus = z
|
|
5011
|
-
connected: z
|
|
5012
|
-
toolkit: z
|
|
5013
|
-
connectedAccountId: z
|
|
5024
|
+
const MCPServerConnectionStatus = z.object({
|
|
5025
|
+
connected: z.boolean(),
|
|
5026
|
+
toolkit: z.string(),
|
|
5027
|
+
connectedAccountId: z.string()
|
|
5014
5028
|
});
|
|
5015
|
-
const MCPServerConnectedAccountsSchema = z
|
|
5016
|
-
toolkit: z
|
|
5017
|
-
authConfigId: z
|
|
5018
|
-
connectedAccountId: z
|
|
5029
|
+
const MCPServerConnectedAccountsSchema = z.record(z.string(), z.array(z.object({
|
|
5030
|
+
toolkit: z.string(),
|
|
5031
|
+
authConfigId: z.string(),
|
|
5032
|
+
connectedAccountId: z.string()
|
|
5019
5033
|
})));
|
|
5020
5034
|
|
|
5021
5035
|
//#endregion
|
|
@@ -5419,11 +5433,11 @@ function getToolkitVersionsFromEnv(defaultVersions) {
|
|
|
5419
5433
|
const envPrefixedVersions = getEnvsWithPrefix(`COMPOSIO_TOOLKIT_VERSION_`);
|
|
5420
5434
|
const toolkitVersionsFromEnv = Object.entries(envPrefixedVersions).reduce((acc, [key, value]) => {
|
|
5421
5435
|
const toolkitName = key.replace("COMPOSIO_TOOLKIT_VERSION_", "");
|
|
5422
|
-
acc[toolkitName
|
|
5436
|
+
acc[normalizeToolkitSlug(toolkitName)] = value;
|
|
5423
5437
|
return acc;
|
|
5424
5438
|
}, {});
|
|
5425
5439
|
let userProvidedToolkitVersions = {};
|
|
5426
|
-
if (defaultVersions && typeof defaultVersions === "object") userProvidedToolkitVersions = Object.fromEntries(Object.entries(defaultVersions).map(([key, value]) => [key
|
|
5440
|
+
if (defaultVersions && typeof defaultVersions === "object") userProvidedToolkitVersions = Object.fromEntries(Object.entries(defaultVersions).map(([key, value]) => [normalizeToolkitSlug(key), value]));
|
|
5427
5441
|
const toolkitVersions = {
|
|
5428
5442
|
...toolkitVersionsFromEnv,
|
|
5429
5443
|
...userProvidedToolkitVersions
|
|
@@ -5634,7 +5648,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5634
5648
|
function: {
|
|
5635
5649
|
name: tool.slug,
|
|
5636
5650
|
description: tool.description,
|
|
5637
|
-
parameters: tool.inputParameters
|
|
5651
|
+
parameters: deduplicateJsonSchemaRequiredArrays(tool.inputParameters)
|
|
5638
5652
|
}
|
|
5639
5653
|
};
|
|
5640
5654
|
};
|
|
@@ -5766,11 +5780,13 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5766
5780
|
*/
|
|
5767
5781
|
async handleToolCalls(userId, chatCompletion, options, modifiers) {
|
|
5768
5782
|
const outputs = [];
|
|
5769
|
-
|
|
5770
|
-
|
|
5783
|
+
const [choice] = chatCompletion.choices;
|
|
5784
|
+
for (const toolCall of choice?.message.tool_calls ?? []) {
|
|
5785
|
+
if (toolCall.type !== "function") continue;
|
|
5786
|
+
const toolResult = await this.executeToolCall(userId, toolCall, options, modifiers);
|
|
5771
5787
|
outputs.push({
|
|
5772
5788
|
role: "tool",
|
|
5773
|
-
tool_call_id:
|
|
5789
|
+
tool_call_id: toolCall.id,
|
|
5774
5790
|
content: toolResult
|
|
5775
5791
|
});
|
|
5776
5792
|
}
|
|
@@ -5990,7 +6006,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5990
6006
|
|
|
5991
6007
|
//#endregion
|
|
5992
6008
|
//#region package.json
|
|
5993
|
-
var version = "0.
|
|
6009
|
+
var version = "0.14.1";
|
|
5994
6010
|
|
|
5995
6011
|
//#endregion
|
|
5996
6012
|
//#region src/utils/session.ts
|
|
@@ -6034,7 +6050,7 @@ const getDefaultHeaders = (headers, provider) => {
|
|
|
6034
6050
|
//#endregion
|
|
6035
6051
|
//#region src/types/toolRouter.types.ts
|
|
6036
6052
|
const SessionPreset = { DIRECT_TOOLS: "direct_tools" };
|
|
6037
|
-
const MCPServerTypeSchema = z
|
|
6053
|
+
const MCPServerTypeSchema = z.enum(["http", "sse"]);
|
|
6038
6054
|
/**
|
|
6039
6055
|
* Sandbox compute tier for the session sandbox.
|
|
6040
6056
|
*
|
|
@@ -6047,41 +6063,41 @@ const MCPServerTypeSchema = z$1.enum(["http", "sse"]);
|
|
|
6047
6063
|
*
|
|
6048
6064
|
* Defaults to `standard` server-side when omitted.
|
|
6049
6065
|
*/
|
|
6050
|
-
const SandboxSizeSchema = z
|
|
6066
|
+
const SandboxSizeSchema = z.enum([
|
|
6051
6067
|
"standard",
|
|
6052
6068
|
"medium",
|
|
6053
6069
|
"large",
|
|
6054
6070
|
"xlarge"
|
|
6055
6071
|
]);
|
|
6056
|
-
const ToolRouterSandboxConfigSchema = z
|
|
6057
|
-
enable: z
|
|
6058
|
-
enableProxyExecution: z
|
|
6059
|
-
autoOffloadThreshold: z
|
|
6072
|
+
const ToolRouterSandboxConfigSchema = z.object({
|
|
6073
|
+
enable: z.boolean().default(true).describe("Whether to enable the sandbox entirely. Defaults to true. When set to false, no code execution tools (COMPOSIO_REMOTE_WORKBENCH, COMPOSIO_REMOTE_BASH_TOOL) are available in the session."),
|
|
6074
|
+
enableProxyExecution: z.boolean().optional().describe("Whether to enable proxy execution in the session sandbox"),
|
|
6075
|
+
autoOffloadThreshold: z.number().optional().describe("The auto offload threshold in characters for tool execution to move into the sandbox"),
|
|
6060
6076
|
sandboxSize: SandboxSizeSchema.optional().describe("Sandbox compute tier. One of \"standard\" (1 vCPU / 1 GB), \"medium\" (2 vCPU / 2 GB), \"large\" (4 vCPU / 4 GB), or \"xlarge\" (8 vCPU / 8 GB). Defaults to \"standard\" server-side. Changing this on an existing session recreates the session sandbox on next access; the in-memory FS is lost, but /mnt/files/ persists.")
|
|
6061
6077
|
});
|
|
6062
|
-
const ToolRouterConfigManageConnectionsSchema = z
|
|
6063
|
-
enable: z
|
|
6064
|
-
callbackUrl: z
|
|
6065
|
-
waitForConnections: z
|
|
6078
|
+
const ToolRouterConfigManageConnectionsSchema = z.object({
|
|
6079
|
+
enable: z.boolean().default(true).optional().describe("Whether to use tools to manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually"),
|
|
6080
|
+
callbackUrl: z.string().optional().describe("The callback uri to use in the tool router session"),
|
|
6081
|
+
waitForConnections: z.boolean().optional().describe("Whether to wait for users to finish authenticating connections before proceeding to the next step. Defaults to false, if set to true, a wait for connections tool call will happen and finish when the connections are ready")
|
|
6066
6082
|
}).strict();
|
|
6067
|
-
const ToolRouterToolkitsParamSchema = z
|
|
6068
|
-
const ToolRouterToolkitsDisabledConfigSchema = z
|
|
6069
|
-
const ToolRouterToolkitsEnabledConfigSchema = z
|
|
6070
|
-
const ToolRouterManageConnectionsConfigSchema = z
|
|
6071
|
-
enable: z
|
|
6072
|
-
callbackUrl: z
|
|
6083
|
+
const ToolRouterToolkitsParamSchema = z.array(z.string()).describe("List of toolkits to enable in the tool router session");
|
|
6084
|
+
const ToolRouterToolkitsDisabledConfigSchema = z.object({ disable: ToolRouterToolkitsParamSchema.describe("List of toolkits to disable in the tool router session") }).strict();
|
|
6085
|
+
const ToolRouterToolkitsEnabledConfigSchema = z.object({ enable: ToolRouterToolkitsParamSchema.describe("List of toolkits to enable in the tool router session") }).strict();
|
|
6086
|
+
const ToolRouterManageConnectionsConfigSchema = z.object({
|
|
6087
|
+
enable: z.boolean().optional().describe("Whether to use tools to manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually").default(true),
|
|
6088
|
+
callbackUrl: z.string().optional().describe("The callback url to use in the tool router session")
|
|
6073
6089
|
});
|
|
6074
|
-
const ToolRouterTagsParamSchema = z
|
|
6090
|
+
const ToolRouterTagsParamSchema = z.array(z.enum([
|
|
6075
6091
|
"readOnlyHint",
|
|
6076
6092
|
"destructiveHint",
|
|
6077
6093
|
"idempotentHint",
|
|
6078
6094
|
"openWorldHint"
|
|
6079
6095
|
])).describe("The tags to filter the tools by");
|
|
6080
|
-
const ToolRouterTagsEnableDisableSchema = z
|
|
6096
|
+
const ToolRouterTagsEnableDisableSchema = z.object({
|
|
6081
6097
|
enable: ToolRouterTagsParamSchema.optional().describe("The tags to enable in the tool router session"),
|
|
6082
6098
|
disable: ToolRouterTagsParamSchema.optional().describe("The tags to disable in the tool router session")
|
|
6083
6099
|
}).strict();
|
|
6084
|
-
const ToolRouterConfigTagsSchema = z
|
|
6100
|
+
const ToolRouterConfigTagsSchema = z.union([ToolRouterTagsParamSchema, ToolRouterTagsEnableDisableSchema]).describe("The tags to use in the tool router session");
|
|
6085
6101
|
/**
|
|
6086
6102
|
* Tools config - Configure tools per toolkit using toolkit slug as key
|
|
6087
6103
|
* @example
|
|
@@ -6104,51 +6120,51 @@ const ToolRouterConfigTagsSchema = z$1.union([ToolRouterTagsParamSchema, ToolRou
|
|
|
6104
6120
|
* }
|
|
6105
6121
|
* ```
|
|
6106
6122
|
*/
|
|
6107
|
-
const ToolRouterToolsParamSchema = z
|
|
6108
|
-
const ToolRouterConfigToolsSchema = z
|
|
6123
|
+
const ToolRouterToolsParamSchema = z.array(z.string()).describe("The tools to use in the tool router session");
|
|
6124
|
+
const ToolRouterConfigToolsSchema = z.union([
|
|
6109
6125
|
ToolRouterToolsParamSchema,
|
|
6110
|
-
z
|
|
6111
|
-
z
|
|
6112
|
-
z
|
|
6126
|
+
z.object({ enable: ToolRouterToolsParamSchema.describe("The tools to enable in the tool router session") }).strict(),
|
|
6127
|
+
z.object({ disable: ToolRouterToolsParamSchema.describe("The tools to disable in the tool router session") }).strict(),
|
|
6128
|
+
z.object({ tags: ToolRouterConfigTagsSchema.describe("The tags to filter the tools by, this will override the global tags") }).strict()
|
|
6113
6129
|
]).superRefine((val, ctx) => {
|
|
6114
6130
|
if (typeof val === "object" && !Array.isArray(val)) {
|
|
6115
6131
|
const keys = Object.keys(val);
|
|
6116
6132
|
if (keys.length > 1) ctx.addIssue({
|
|
6117
|
-
code: z
|
|
6133
|
+
code: z.ZodIssueCode.custom,
|
|
6118
6134
|
message: `Only one of 'enable', 'disable', or 'tags' can be specified, but found: ${keys.join(", ")}`,
|
|
6119
6135
|
path: keys
|
|
6120
6136
|
});
|
|
6121
6137
|
}
|
|
6122
6138
|
});
|
|
6123
|
-
const ToolRouterCreateSessionConfigBaseSchema = z
|
|
6124
|
-
sessionPreset: z
|
|
6125
|
-
mcp: z
|
|
6126
|
-
tools: z
|
|
6139
|
+
const ToolRouterCreateSessionConfigBaseSchema = z.object({
|
|
6140
|
+
sessionPreset: z.literal(SessionPreset.DIRECT_TOOLS).optional().describe("Shortcut to expose every tool allowed by the session filters directly in session.tools() and the MCP tool list. This disables meta tools by default (search, multi-execute, manage-connections, and workbench). Use when all tools are known upfront and helper/meta tools are not needed. Without this preset, ToolRouter uses its default configuration with meta tools enabled."),
|
|
6141
|
+
mcp: z.boolean().optional().describe("When true, the returned session surfaces its hosted MCP endpoint (`session.mcp.url` / `session.mcp.headers`) in the type. The endpoint exists on every session at runtime regardless of this flag, but is only typed when `mcp: true` is passed. Default native tools (`session.tools()`) are unaffected. See https://docs.composio.dev/docs/sessions-via-mcp"),
|
|
6142
|
+
tools: z.record(z.string(), z.union([ToolRouterToolsParamSchema, ToolRouterConfigToolsSchema])).optional().describe("The tools to use in the tool router session"),
|
|
6127
6143
|
tags: ToolRouterConfigTagsSchema.optional().describe("Global tags to filter the tools by"),
|
|
6128
|
-
toolkits: z
|
|
6144
|
+
toolkits: z.union([
|
|
6129
6145
|
ToolRouterToolkitsParamSchema,
|
|
6130
6146
|
ToolRouterToolkitsDisabledConfigSchema,
|
|
6131
6147
|
ToolRouterToolkitsEnabledConfigSchema
|
|
6132
6148
|
]).optional().describe("The toolkits to use in the tool router session"),
|
|
6133
|
-
authConfigs: z
|
|
6134
|
-
connectedAccounts: z
|
|
6135
|
-
manageConnections: z
|
|
6149
|
+
authConfigs: z.record(z.string(), z.string()).describe("The auth configs to use in the tool router session. The key is the toolkit slug, the value is the auth config id.").default({}),
|
|
6150
|
+
connectedAccounts: z.record(z.string(), z.union([z.string(), z.array(z.string())])).describe("The connected accounts to use in the tool router session. The key is the toolkit slug, the value is a connected account id or an array of ids. Only one account per toolkit is allowed when multi-account mode is disabled.").default({}),
|
|
6151
|
+
manageConnections: z.union([z.boolean(), ToolRouterConfigManageConnectionsSchema]).optional().default(true).describe("The config for the manage connections in the tool router session. Defaults to true, if set to false, you need to manage connections manually. If set to an object, you can configure the manage connections settings."),
|
|
6136
6152
|
sandbox: ToolRouterSandboxConfigSchema.optional().describe("The sandbox config for this session. Prefer this over workbench."),
|
|
6137
6153
|
workbench: ToolRouterSandboxConfigSchema.optional().describe("Deprecated alias for sandbox. Accepted for backwards compatibility."),
|
|
6138
|
-
multiAccount: z
|
|
6139
|
-
enable: z
|
|
6140
|
-
maxAccountsPerToolkit: z
|
|
6141
|
-
requireExplicitSelection: z
|
|
6154
|
+
multiAccount: z.object({
|
|
6155
|
+
enable: z.boolean().default(false).describe("When true, enables multi-account mode for this session. Defaults to false."),
|
|
6156
|
+
maxAccountsPerToolkit: z.number().int().min(2).max(10).optional().describe("Maximum number of connected accounts allowed per toolkit. Defaults to 5 when multi-account is enabled."),
|
|
6157
|
+
requireExplicitSelection: z.boolean().optional().describe("When true, require explicit account selection when multiple accounts are connected. When false (default), use the first/default account.")
|
|
6142
6158
|
}).optional().describe("Multi-account configuration for this session"),
|
|
6143
|
-
preload: z
|
|
6144
|
-
experimental: z
|
|
6145
|
-
assistivePrompt: z
|
|
6146
|
-
customTools: z
|
|
6147
|
-
customToolkits: z
|
|
6159
|
+
preload: z.object({ tools: z.union([z.array(z.string()), z.literal("all")]).optional().describe("Tool slugs to preload into session.tools() and the MCP tool list, or \"all\" to preload every app tool allowed by the session filters. \"all\" requires a positive filter such as toolkits, tools, or tags; the backend validates and caps the final tool set.") }).strict().optional().describe("Preload configuration for tools that should be exposed without search."),
|
|
6160
|
+
experimental: z.object({
|
|
6161
|
+
assistivePrompt: z.object({ userTimezone: z.string().optional().describe("IANA timezone identifier (e.g., \"America/New_York\", \"Europe/London\") for timezone-aware assistive prompts") }).optional().describe("Configuration for assistive prompt generation"),
|
|
6162
|
+
customTools: z.array(z.custom()).optional().describe("Custom tools to include in this session. Created via createCustomTool() from @composio/core/experimental."),
|
|
6163
|
+
customToolkits: z.array(z.custom()).optional().describe("Custom toolkits to include in this session. Created via createCustomToolkit() from @composio/core/experimental.")
|
|
6148
6164
|
}).optional().describe("Experimental features configuration - not stable, may be modified or removed")
|
|
6149
6165
|
}).partial().superRefine((config, ctx) => {
|
|
6150
6166
|
if (config.sandbox !== void 0 && config.workbench !== void 0) ctx.addIssue({
|
|
6151
|
-
code: z
|
|
6167
|
+
code: z.ZodIssueCode.custom,
|
|
6152
6168
|
message: "Pass either sandbox or workbench, not both. workbench is a backwards-compatible alias for sandbox.",
|
|
6153
6169
|
path: ["sandbox"]
|
|
6154
6170
|
});
|
|
@@ -6165,115 +6181,115 @@ const applyDirectToolsPresetDefaults = (value) => {
|
|
|
6165
6181
|
preload: config.preload === void 0 ? { tools: "all" } : config.preload
|
|
6166
6182
|
};
|
|
6167
6183
|
};
|
|
6168
|
-
const ToolRouterCreateSessionConfigSchema = z
|
|
6169
|
-
const ToolkitConnectionStateSchema = z
|
|
6170
|
-
slug: z
|
|
6171
|
-
name: z
|
|
6172
|
-
logo: z
|
|
6173
|
-
isNoAuth: z
|
|
6174
|
-
connection: z
|
|
6175
|
-
isActive: z
|
|
6176
|
-
authConfig: z
|
|
6177
|
-
id: z
|
|
6178
|
-
mode: z
|
|
6179
|
-
isComposioManaged: z
|
|
6184
|
+
const ToolRouterCreateSessionConfigSchema = z.preprocess(applyDirectToolsPresetDefaults, ToolRouterCreateSessionConfigBaseSchema).describe("The config for the tool router session");
|
|
6185
|
+
const ToolkitConnectionStateSchema = z.object({
|
|
6186
|
+
slug: z.string().describe("The slug of a toolkit"),
|
|
6187
|
+
name: z.string().describe("The name of a toolkit"),
|
|
6188
|
+
logo: z.string().optional().describe("The logo of a toolkit"),
|
|
6189
|
+
isNoAuth: z.boolean().default(false).describe("Whether the toolkit is no auth or not"),
|
|
6190
|
+
connection: z.object({
|
|
6191
|
+
isActive: z.boolean().describe("Whether the connection is active or not"),
|
|
6192
|
+
authConfig: z.object({
|
|
6193
|
+
id: z.string().describe("The id of the auth config"),
|
|
6194
|
+
mode: z.string().describe("The auth scheme used by the auth config"),
|
|
6195
|
+
isComposioManaged: z.boolean().describe("Whether the auth config is managed by Composio")
|
|
6180
6196
|
}).nullish().describe("The auth config of a toolkit"),
|
|
6181
|
-
connectedAccount: z
|
|
6182
|
-
id: z
|
|
6183
|
-
status: z
|
|
6197
|
+
connectedAccount: z.object({
|
|
6198
|
+
id: z.string().describe("The id of the connected account"),
|
|
6199
|
+
status: z.string().describe("The status of the connected account")
|
|
6184
6200
|
}).optional().describe("The connected account of a toolkit")
|
|
6185
6201
|
}).optional().describe("The connection of a toolkit")
|
|
6186
6202
|
}).describe("The connection state of a toolkit");
|
|
6187
|
-
const ToolkitConnectionsDetailsSchema = z
|
|
6188
|
-
items: z
|
|
6189
|
-
cursor: z
|
|
6190
|
-
totalPages: z
|
|
6203
|
+
const ToolkitConnectionsDetailsSchema = z.object({
|
|
6204
|
+
items: z.array(ToolkitConnectionStateSchema),
|
|
6205
|
+
cursor: z.string().optional(),
|
|
6206
|
+
totalPages: z.number()
|
|
6191
6207
|
});
|
|
6192
|
-
const ToolRouterMCPServerConfigSchema = z
|
|
6208
|
+
const ToolRouterMCPServerConfigSchema = z.object({
|
|
6193
6209
|
type: MCPServerTypeSchema,
|
|
6194
|
-
url: z
|
|
6195
|
-
headers: z
|
|
6210
|
+
url: z.string(),
|
|
6211
|
+
headers: z.record(z.string(), z.string()).optional()
|
|
6196
6212
|
});
|
|
6197
|
-
const ToolRouterToolkitsOptionsSchema = z
|
|
6198
|
-
toolkits: z
|
|
6199
|
-
cursor: z
|
|
6200
|
-
limit: z
|
|
6201
|
-
isConnected: z
|
|
6202
|
-
search: z
|
|
6213
|
+
const ToolRouterToolkitsOptionsSchema = z.object({
|
|
6214
|
+
toolkits: z.array(z.string()).optional(),
|
|
6215
|
+
cursor: z.string().optional(),
|
|
6216
|
+
limit: z.number().optional(),
|
|
6217
|
+
isConnected: z.boolean().optional(),
|
|
6218
|
+
search: z.string().optional()
|
|
6203
6219
|
});
|
|
6204
|
-
const ToolRouterSessionSearchResultReferenceWorkbenchSnippetSchema = z
|
|
6205
|
-
code: z
|
|
6206
|
-
description: z
|
|
6220
|
+
const ToolRouterSessionSearchResultReferenceWorkbenchSnippetSchema = z.object({
|
|
6221
|
+
code: z.string(),
|
|
6222
|
+
description: z.string()
|
|
6207
6223
|
});
|
|
6208
|
-
const ToolRouterSessionSearchResultSchema = z
|
|
6209
|
-
index: z
|
|
6210
|
-
useCase: z
|
|
6211
|
-
primaryToolSlugs: z
|
|
6212
|
-
relatedToolSlugs: z
|
|
6213
|
-
toolkits: z
|
|
6214
|
-
difficulty: z
|
|
6215
|
-
error: z
|
|
6216
|
-
executionGuidance: z
|
|
6217
|
-
knownPitfalls: z
|
|
6218
|
-
memory: z
|
|
6219
|
-
planId: z
|
|
6220
|
-
recommendedPlanSteps: z
|
|
6221
|
-
referenceWorkbenchSnippets: z
|
|
6224
|
+
const ToolRouterSessionSearchResultSchema = z.object({
|
|
6225
|
+
index: z.number(),
|
|
6226
|
+
useCase: z.string(),
|
|
6227
|
+
primaryToolSlugs: z.array(z.string()),
|
|
6228
|
+
relatedToolSlugs: z.array(z.string()),
|
|
6229
|
+
toolkits: z.array(z.string()),
|
|
6230
|
+
difficulty: z.string().optional(),
|
|
6231
|
+
error: z.string().nullable().optional(),
|
|
6232
|
+
executionGuidance: z.string().optional(),
|
|
6233
|
+
knownPitfalls: z.array(z.string()).optional(),
|
|
6234
|
+
memory: z.record(z.string(), z.array(z.string())).optional(),
|
|
6235
|
+
planId: z.string().optional(),
|
|
6236
|
+
recommendedPlanSteps: z.array(z.string()).optional(),
|
|
6237
|
+
referenceWorkbenchSnippets: z.array(ToolRouterSessionSearchResultReferenceWorkbenchSnippetSchema).optional()
|
|
6222
6238
|
});
|
|
6223
|
-
const ToolRouterSessionSearchSessionSchema = z
|
|
6224
|
-
id: z
|
|
6225
|
-
generateId: z
|
|
6226
|
-
instructions: z
|
|
6239
|
+
const ToolRouterSessionSearchSessionSchema = z.object({
|
|
6240
|
+
id: z.string(),
|
|
6241
|
+
generateId: z.boolean(),
|
|
6242
|
+
instructions: z.string()
|
|
6227
6243
|
});
|
|
6228
|
-
const ToolRouterSessionSearchTimeInfoSchema = z
|
|
6229
|
-
currentTimeUtc: z
|
|
6230
|
-
currentTimeUtcEpochSeconds: z
|
|
6231
|
-
message: z
|
|
6244
|
+
const ToolRouterSessionSearchTimeInfoSchema = z.object({
|
|
6245
|
+
currentTimeUtc: z.string(),
|
|
6246
|
+
currentTimeUtcEpochSeconds: z.number(),
|
|
6247
|
+
message: z.string()
|
|
6232
6248
|
});
|
|
6233
|
-
const ToolRouterSessionSearchToolSchemasSchemaRefSchema = z
|
|
6234
|
-
args: z
|
|
6235
|
-
message: z
|
|
6236
|
-
tool: z
|
|
6249
|
+
const ToolRouterSessionSearchToolSchemasSchemaRefSchema = z.object({
|
|
6250
|
+
args: z.object({ toolSlugs: z.array(z.string()) }),
|
|
6251
|
+
message: z.string().optional(),
|
|
6252
|
+
tool: z.literal("COMPOSIO_GET_TOOL_SCHEMAS")
|
|
6237
6253
|
});
|
|
6238
|
-
const ToolRouterSessionSearchToolSchemaSchema = z
|
|
6239
|
-
toolSlug: z
|
|
6240
|
-
toolkit: z
|
|
6241
|
-
description: z
|
|
6242
|
-
hasFullSchema: z
|
|
6243
|
-
inputSchema: z
|
|
6244
|
-
outputSchema: z
|
|
6254
|
+
const ToolRouterSessionSearchToolSchemaSchema = z.object({
|
|
6255
|
+
toolSlug: z.string(),
|
|
6256
|
+
toolkit: z.string(),
|
|
6257
|
+
description: z.string().optional(),
|
|
6258
|
+
hasFullSchema: z.boolean().optional(),
|
|
6259
|
+
inputSchema: z.record(z.string(), z.unknown()).optional(),
|
|
6260
|
+
outputSchema: z.record(z.string(), z.unknown()).optional(),
|
|
6245
6261
|
schemaRef: ToolRouterSessionSearchToolSchemasSchemaRefSchema.optional()
|
|
6246
6262
|
});
|
|
6247
|
-
const ToolRouterSessionSearchToolkitConnectionStatusSchema = z
|
|
6248
|
-
toolkit: z
|
|
6249
|
-
description: z
|
|
6250
|
-
hasActiveConnection: z
|
|
6251
|
-
statusMessage: z
|
|
6252
|
-
connectionDetails: z
|
|
6253
|
-
currentUserInfo: z
|
|
6263
|
+
const ToolRouterSessionSearchToolkitConnectionStatusSchema = z.object({
|
|
6264
|
+
toolkit: z.string(),
|
|
6265
|
+
description: z.string(),
|
|
6266
|
+
hasActiveConnection: z.boolean(),
|
|
6267
|
+
statusMessage: z.string(),
|
|
6268
|
+
connectionDetails: z.record(z.string(), z.unknown()).optional(),
|
|
6269
|
+
currentUserInfo: z.record(z.string(), z.unknown()).optional()
|
|
6254
6270
|
});
|
|
6255
|
-
const ToolRouterSessionSearchResponseSchema = z
|
|
6256
|
-
success: z
|
|
6257
|
-
error: z
|
|
6258
|
-
results: z
|
|
6259
|
-
toolSchemas: z
|
|
6260
|
-
toolkitConnectionStatuses: z
|
|
6261
|
-
nextStepsGuidance: z
|
|
6271
|
+
const ToolRouterSessionSearchResponseSchema = z.object({
|
|
6272
|
+
success: z.boolean(),
|
|
6273
|
+
error: z.string().nullable(),
|
|
6274
|
+
results: z.array(ToolRouterSessionSearchResultSchema),
|
|
6275
|
+
toolSchemas: z.record(z.string(), ToolRouterSessionSearchToolSchemaSchema),
|
|
6276
|
+
toolkitConnectionStatuses: z.array(ToolRouterSessionSearchToolkitConnectionStatusSchema),
|
|
6277
|
+
nextStepsGuidance: z.array(z.string()),
|
|
6262
6278
|
session: ToolRouterSessionSearchSessionSchema,
|
|
6263
6279
|
timeInfo: ToolRouterSessionSearchTimeInfoSchema
|
|
6264
6280
|
});
|
|
6265
|
-
const ToolRouterSessionExecuteResponseSchema = z
|
|
6266
|
-
data: z
|
|
6267
|
-
error: z
|
|
6268
|
-
logId: z
|
|
6281
|
+
const ToolRouterSessionExecuteResponseSchema = z.object({
|
|
6282
|
+
data: z.record(z.string(), z.unknown()),
|
|
6283
|
+
error: z.string().nullable(),
|
|
6284
|
+
logId: z.string()
|
|
6269
6285
|
});
|
|
6270
|
-
const SessionProxyExecuteParamsSchema = z
|
|
6286
|
+
const SessionProxyExecuteParamsSchema = z.object({
|
|
6271
6287
|
/** The toolkit whose connected account to use for auth (e.g. 'gmail', 'github') */
|
|
6272
|
-
toolkit: z
|
|
6288
|
+
toolkit: z.string(),
|
|
6273
6289
|
/** The API endpoint URL to call */
|
|
6274
|
-
endpoint: z
|
|
6290
|
+
endpoint: z.string(),
|
|
6275
6291
|
/** HTTP method */
|
|
6276
|
-
method: z
|
|
6292
|
+
method: z.enum([
|
|
6277
6293
|
"GET",
|
|
6278
6294
|
"POST",
|
|
6279
6295
|
"PUT",
|
|
@@ -6281,47 +6297,47 @@ const SessionProxyExecuteParamsSchema = z$1.object({
|
|
|
6281
6297
|
"PATCH"
|
|
6282
6298
|
]),
|
|
6283
6299
|
/** Request body (for POST/PUT/PATCH) */
|
|
6284
|
-
body: z
|
|
6300
|
+
body: z.unknown().optional(),
|
|
6285
6301
|
/** Query params or headers to include */
|
|
6286
|
-
parameters: z
|
|
6287
|
-
in: z
|
|
6288
|
-
name: z
|
|
6289
|
-
value: z
|
|
6302
|
+
parameters: z.array(z.object({
|
|
6303
|
+
in: z.enum(["query", "header"]),
|
|
6304
|
+
name: z.string(),
|
|
6305
|
+
value: z.union([z.string(), z.number()])
|
|
6290
6306
|
})).optional()
|
|
6291
6307
|
});
|
|
6292
|
-
const ToolRouterUpdateSessionConfigSchema = z
|
|
6293
|
-
toolkits: z
|
|
6308
|
+
const ToolRouterUpdateSessionConfigSchema = z.object({
|
|
6309
|
+
toolkits: z.union([
|
|
6294
6310
|
ToolRouterToolkitsParamSchema,
|
|
6295
6311
|
ToolRouterToolkitsDisabledConfigSchema,
|
|
6296
6312
|
ToolRouterToolkitsEnabledConfigSchema
|
|
6297
6313
|
]).optional(),
|
|
6298
|
-
tools: z
|
|
6314
|
+
tools: z.record(z.string(), z.union([ToolRouterToolsParamSchema, ToolRouterConfigToolsSchema])).optional(),
|
|
6299
6315
|
tags: ToolRouterConfigTagsSchema.optional(),
|
|
6300
|
-
authConfigs: z
|
|
6301
|
-
connectedAccounts: z
|
|
6316
|
+
authConfigs: z.record(z.string(), z.string()).optional(),
|
|
6317
|
+
connectedAccounts: z.record(z.string(), z.union([z.string(), z.array(z.string())])).transform((rec) => {
|
|
6302
6318
|
const out = {};
|
|
6303
6319
|
for (const [k, v] of Object.entries(rec)) out[k] = typeof v === "string" ? [v] : v;
|
|
6304
6320
|
return out;
|
|
6305
6321
|
}).optional(),
|
|
6306
|
-
manageConnections: z
|
|
6322
|
+
manageConnections: z.union([z.boolean(), ToolRouterConfigManageConnectionsSchema]).nullable().optional(),
|
|
6307
6323
|
sandbox: ToolRouterSandboxConfigSchema.partial().nullable().optional(),
|
|
6308
6324
|
workbench: ToolRouterSandboxConfigSchema.partial().nullable().optional(),
|
|
6309
|
-
multiAccount: z
|
|
6310
|
-
enable: z
|
|
6311
|
-
maxAccountsPerToolkit: z
|
|
6312
|
-
requireExplicitSelection: z
|
|
6325
|
+
multiAccount: z.object({
|
|
6326
|
+
enable: z.boolean().optional(),
|
|
6327
|
+
maxAccountsPerToolkit: z.number().int().min(2).max(10).optional(),
|
|
6328
|
+
requireExplicitSelection: z.boolean().optional()
|
|
6313
6329
|
}).nullable().optional(),
|
|
6314
|
-
preload: z
|
|
6330
|
+
preload: z.object({ tools: z.union([z.array(z.string()), z.literal("all")]).optional() }).strict().optional()
|
|
6315
6331
|
}).partial().superRefine((config, ctx) => {
|
|
6316
6332
|
if (config.sandbox !== void 0 && config.workbench !== void 0) ctx.addIssue({
|
|
6317
|
-
code: z
|
|
6333
|
+
code: z.ZodIssueCode.custom,
|
|
6318
6334
|
message: "Pass either sandbox or workbench, not both. workbench is a backwards-compatible alias for sandbox.",
|
|
6319
6335
|
path: ["sandbox"]
|
|
6320
6336
|
});
|
|
6321
6337
|
});
|
|
6322
|
-
const ToolRouterSessionDeleteResponseSchema = z
|
|
6323
|
-
sessionId: z
|
|
6324
|
-
deleted: z
|
|
6338
|
+
const ToolRouterSessionDeleteResponseSchema = z.object({
|
|
6339
|
+
sessionId: z.string(),
|
|
6340
|
+
deleted: z.literal(true)
|
|
6325
6341
|
});
|
|
6326
6342
|
|
|
6327
6343
|
//#endregion
|
|
@@ -6531,23 +6547,23 @@ function transformExecuteResponse(raw) {
|
|
|
6531
6547
|
|
|
6532
6548
|
//#endregion
|
|
6533
6549
|
//#region src/types/ToolRouterSessionFilesMount.types.ts
|
|
6534
|
-
const ToolRouterSessionFilesMountListOptionsSchema = z
|
|
6535
|
-
path: z
|
|
6536
|
-
mountId: z
|
|
6550
|
+
const ToolRouterSessionFilesMountListOptionsSchema = z.object({
|
|
6551
|
+
path: z.string().optional(),
|
|
6552
|
+
mountId: z.string().default(DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID),
|
|
6537
6553
|
/** Pagination cursor from the previous response nextCursor field */
|
|
6538
|
-
cursor: z
|
|
6554
|
+
cursor: z.string().optional(),
|
|
6539
6555
|
/** Maximum number of files to return per page (1-500) */
|
|
6540
|
-
limit: z
|
|
6556
|
+
limit: z.number().min(1).max(500).optional()
|
|
6541
6557
|
});
|
|
6542
|
-
const FileListItemSchema = z
|
|
6543
|
-
last_modified: z
|
|
6544
|
-
mount_relative_path: z
|
|
6545
|
-
sandbox_mount_prefix: z
|
|
6546
|
-
size: z
|
|
6558
|
+
const FileListItemSchema = z.object({
|
|
6559
|
+
last_modified: z.string(),
|
|
6560
|
+
mount_relative_path: z.string(),
|
|
6561
|
+
sandbox_mount_prefix: z.string(),
|
|
6562
|
+
size: z.number()
|
|
6547
6563
|
});
|
|
6548
|
-
const FileListResponseSchema = z
|
|
6549
|
-
items: z
|
|
6550
|
-
next_cursor: z
|
|
6564
|
+
const FileListResponseSchema = z.object({
|
|
6565
|
+
items: z.array(FileListItemSchema),
|
|
6566
|
+
next_cursor: z.string().optional()
|
|
6551
6567
|
}).transform((data) => ({
|
|
6552
6568
|
items: data.items.map((item) => ({
|
|
6553
6569
|
lastModified: item.last_modified,
|
|
@@ -6557,29 +6573,29 @@ const FileListResponseSchema = z$1.object({
|
|
|
6557
6573
|
})),
|
|
6558
6574
|
nextCursor: data.next_cursor
|
|
6559
6575
|
}));
|
|
6560
|
-
const ToolRouterSessionFilesMountUploadOptionsSchema = z
|
|
6576
|
+
const ToolRouterSessionFilesMountUploadOptionsSchema = z.object({
|
|
6561
6577
|
/** Remote path/filename on the mount. When passing a buffer, either mimetype or remotePath is required. */
|
|
6562
|
-
remotePath: z
|
|
6563
|
-
mountId: z
|
|
6578
|
+
remotePath: z.string().optional(),
|
|
6579
|
+
mountId: z.string().default(DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID),
|
|
6564
6580
|
/** MIME type. When passing a buffer, either mimetype or remotePath is required. Ignored when passing File (uses file.type). */
|
|
6565
|
-
mimetype: z
|
|
6581
|
+
mimetype: z.string().optional()
|
|
6566
6582
|
});
|
|
6567
|
-
const ToolRouterSessionFilesMountDownloadOptionsSchema = z
|
|
6568
|
-
const ToolRouterSessionFilesMountDeleteOptionsSchema = z
|
|
6569
|
-
const RemoteFileDataSchema = z
|
|
6570
|
-
expires_at: z
|
|
6571
|
-
mount_relative_path: z
|
|
6572
|
-
sandbox_mount_prefix: z
|
|
6573
|
-
download_url: z
|
|
6583
|
+
const ToolRouterSessionFilesMountDownloadOptionsSchema = z.object({ mountId: z.string().default(DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID) });
|
|
6584
|
+
const ToolRouterSessionFilesMountDeleteOptionsSchema = z.object({ mountId: z.string().default(DEFAULT_TOOL_ROUTER_SESSION_FILES_MOUNT_ID) });
|
|
6585
|
+
const RemoteFileDataSchema = z.object({
|
|
6586
|
+
expires_at: z.string(),
|
|
6587
|
+
mount_relative_path: z.string(),
|
|
6588
|
+
sandbox_mount_prefix: z.string(),
|
|
6589
|
+
download_url: z.string()
|
|
6574
6590
|
}).transform((data) => ({
|
|
6575
6591
|
expiresAt: data.expires_at,
|
|
6576
6592
|
mountRelativePath: data.mount_relative_path,
|
|
6577
6593
|
sandboxMountPrefix: data.sandbox_mount_prefix,
|
|
6578
6594
|
downloadUrl: data.download_url
|
|
6579
6595
|
}));
|
|
6580
|
-
const FileDeleteResponseSchema = z
|
|
6581
|
-
mount_relative_path: z
|
|
6582
|
-
sandbox_mount_prefix: z
|
|
6596
|
+
const FileDeleteResponseSchema = z.object({
|
|
6597
|
+
mount_relative_path: z.string(),
|
|
6598
|
+
sandbox_mount_prefix: z.string()
|
|
6583
6599
|
}).transform((data) => ({
|
|
6584
6600
|
mountRelativePath: data.mount_relative_path,
|
|
6585
6601
|
sandboxMountPrefix: data.sandbox_mount_prefix
|
|
@@ -6847,9 +6863,9 @@ var ToolRouterSessionFilesMount = class {
|
|
|
6847
6863
|
async normalizeUploadInput(input, options) {
|
|
6848
6864
|
if (typeof input === "string") {
|
|
6849
6865
|
if (input.startsWith("http://") || input.startsWith("https://")) {
|
|
6850
|
-
const response = await
|
|
6866
|
+
const response = await ssrfSafeFetch(input);
|
|
6851
6867
|
if (!response.ok) throw new Error(`Failed to fetch file from URL: ${response.statusText}`);
|
|
6852
|
-
const
|
|
6868
|
+
const content = await readResponseBodyWithLimit(response);
|
|
6853
6869
|
const mimeType = (response.headers.get("content-type") || "application/octet-stream").split(";")[0].trim();
|
|
6854
6870
|
const segments = new URL(input).pathname.split("/").filter(Boolean);
|
|
6855
6871
|
let filename = segments.length > 0 ? segments[segments.length - 1] : "";
|
|
@@ -6858,7 +6874,7 @@ var ToolRouterSessionFilesMount = class {
|
|
|
6858
6874
|
filename = `${getRandomShortId()}.${extension}`;
|
|
6859
6875
|
}
|
|
6860
6876
|
return {
|
|
6861
|
-
fileToUpload: new File([
|
|
6877
|
+
fileToUpload: new File([content], filename, { type: mimeType }),
|
|
6862
6878
|
remotePath: options.remotePath ?? filename,
|
|
6863
6879
|
mimetype: mimeType
|
|
6864
6880
|
};
|
|
@@ -6894,6 +6910,8 @@ var ToolRouterSessionFilesMount = class {
|
|
|
6894
6910
|
*
|
|
6895
6911
|
* Accepts a file path (local or URL), a native File object, or a raw buffer.
|
|
6896
6912
|
* The file is stored in the virtual filesystem associated with the tool router session.
|
|
6913
|
+
* URL inputs require a Node.js or Bun runtime so the destination can be DNS-validated;
|
|
6914
|
+
* edge runtimes must fetch the file themselves and pass a File or ArrayBuffer.
|
|
6897
6915
|
*
|
|
6898
6916
|
* @param input - File path (string), native File, or raw buffer (ArrayBuffer | Uint8Array).
|
|
6899
6917
|
* @param options - Optional configuration. When passing a buffer, remotePath is required.
|
|
@@ -7221,9 +7239,9 @@ const DIRECT_CUSTOM_TOOL_DESCRIPTION_PREFIX = "[Direct tool - call directly, no
|
|
|
7221
7239
|
* `composio.connectedAccounts.link()` path (≤1000 entries per list, each
|
|
7222
7240
|
* `userId` 1..256 characters).
|
|
7223
7241
|
*/
|
|
7224
|
-
const AuthorizeOptionsSchema = z.object({
|
|
7225
|
-
callbackUrl: z.string().optional(),
|
|
7226
|
-
alias: z.string().optional(),
|
|
7242
|
+
const AuthorizeOptionsSchema = z$1.object({
|
|
7243
|
+
callbackUrl: z$1.string().optional(),
|
|
7244
|
+
alias: z$1.string().optional(),
|
|
7227
7245
|
experimental: ConnectedAccountExperimentalSchema.optional()
|
|
7228
7246
|
});
|
|
7229
7247
|
/**
|
|
@@ -7638,10 +7656,22 @@ var ToolRouterSession = class {
|
|
|
7638
7656
|
};
|
|
7639
7657
|
remotePromise = this.executeBackendSessionTool(ToolsModel, COMPOSIO_MULTI_EXECUTE_TOOL, remoteInput, modifiers, multiExecuteTool);
|
|
7640
7658
|
}
|
|
7641
|
-
const [localResults,
|
|
7659
|
+
const [localResults, remoteOutcome] = await Promise.all([Promise.all(localPromises), remotePromise ? remotePromise.then((result) => ({ result })).catch((error) => ({ error })) : void 0]);
|
|
7660
|
+
const remoteTransportFailed = !!remoteOutcome && "error" in remoteOutcome;
|
|
7661
|
+
const remoteTransportError = remoteTransportFailed ? remoteOutcome.error : null;
|
|
7662
|
+
const remoteErrorMessage = remoteTransportFailed ? (remoteTransportError instanceof Error ? remoteTransportError.message : String(remoteTransportError)) || "Remote tool execution failed" : null;
|
|
7663
|
+
const remoteResult = remoteOutcome && "result" in remoteOutcome ? remoteOutcome.result : void 0;
|
|
7642
7664
|
if (remoteIndices.length === 0 && localResults.length === 1) return localResults[0].result;
|
|
7643
7665
|
const remoteData = remoteResult?.data && typeof remoteResult.data === "object" && !Array.isArray(remoteResult.data) ? remoteResult.data : {};
|
|
7644
|
-
const remoteResults =
|
|
7666
|
+
const remoteResults = remoteErrorMessage ? remoteIndices.map((index) => ({
|
|
7667
|
+
response: {
|
|
7668
|
+
successful: false,
|
|
7669
|
+
data: {},
|
|
7670
|
+
error: remoteErrorMessage
|
|
7671
|
+
},
|
|
7672
|
+
tool_slug: parsed[index].tool_slug,
|
|
7673
|
+
error: remoteErrorMessage
|
|
7674
|
+
})) : Array.isArray(remoteData.results) ? remoteData.results : [];
|
|
7645
7675
|
const localEntries = localResults.map(({ index, result }) => ({
|
|
7646
7676
|
response: {
|
|
7647
7677
|
successful: result.successful,
|
|
@@ -7649,9 +7679,13 @@ var ToolRouterSession = class {
|
|
|
7649
7679
|
...result.error ? { error: result.error } : {}
|
|
7650
7680
|
},
|
|
7651
7681
|
tool_slug: parsed[index].tool_slug,
|
|
7682
|
+
index,
|
|
7652
7683
|
...result.error ? { error: result.error } : {}
|
|
7653
7684
|
}));
|
|
7654
|
-
const allResults = [...remoteResults
|
|
7685
|
+
const allResults = [...remoteResults.map((entry, remotePosition) => ({
|
|
7686
|
+
...entry,
|
|
7687
|
+
index: remoteIndices[remotePosition] ?? remotePosition
|
|
7688
|
+
})), ...localEntries].sort((a, b) => Number(a.index) - Number(b.index)).map((entry, i) => ({
|
|
7655
7689
|
...entry,
|
|
7656
7690
|
index: i
|
|
7657
7691
|
}));
|
|
@@ -7660,16 +7694,16 @@ var ToolRouterSession = class {
|
|
|
7660
7694
|
...remoteData,
|
|
7661
7695
|
results: allResults
|
|
7662
7696
|
};
|
|
7663
|
-
if (localEntries.length > 0 && [
|
|
7697
|
+
if (localEntries.length > 0 && (remoteErrorMessage || [
|
|
7664
7698
|
"total_count",
|
|
7665
7699
|
"success_count",
|
|
7666
7700
|
"error_count"
|
|
7667
|
-
].some((key) => key in remoteData)) {
|
|
7701
|
+
].some((key) => key in remoteData))) {
|
|
7668
7702
|
mergedData.total_count = allResults.length;
|
|
7669
7703
|
mergedData.success_count = allResults.length - failedCount;
|
|
7670
7704
|
mergedData.error_count = failedCount;
|
|
7671
7705
|
}
|
|
7672
|
-
const remoteError = typeof remoteResult?.error === "string" ? remoteResult.error : null;
|
|
7706
|
+
const remoteError = remoteErrorMessage ?? (typeof remoteResult?.error === "string" ? remoteResult.error : null);
|
|
7673
7707
|
const hasAnyError = localResults.some((r) => r.result.error) || !!remoteError;
|
|
7674
7708
|
return {
|
|
7675
7709
|
data: mergedData,
|
|
@@ -8596,17 +8630,17 @@ const WebhookEventTypes = {
|
|
|
8596
8630
|
*
|
|
8597
8631
|
* @see ConnectedAccountAuthConfigSchema in connectedAccounts.types.ts for the camelCase SDK version
|
|
8598
8632
|
*/
|
|
8599
|
-
const WebhookConnectedAccountAuthConfigSchema = z.object({
|
|
8633
|
+
const WebhookConnectedAccountAuthConfigSchema = z$1.object({
|
|
8600
8634
|
/** The nano ID of the auth config */
|
|
8601
|
-
id: z.string(),
|
|
8635
|
+
id: z$1.string(),
|
|
8602
8636
|
/** @deprecated - use state.authScheme instead */
|
|
8603
|
-
auth_scheme: z.nativeEnum(AuthSchemeTypes),
|
|
8637
|
+
auth_scheme: z$1.nativeEnum(AuthSchemeTypes),
|
|
8604
8638
|
/** Whether this auth config is managed by Composio */
|
|
8605
|
-
is_composio_managed: z.boolean(),
|
|
8639
|
+
is_composio_managed: z$1.boolean(),
|
|
8606
8640
|
/** Whether the auth config is disabled */
|
|
8607
|
-
is_disabled: z.boolean(),
|
|
8641
|
+
is_disabled: z$1.boolean(),
|
|
8608
8642
|
/** @deprecated */
|
|
8609
|
-
deprecated: z.object({ uuid: z.string() }).optional()
|
|
8643
|
+
deprecated: z$1.object({ uuid: z$1.string() }).optional()
|
|
8610
8644
|
}).passthrough();
|
|
8611
8645
|
/**
|
|
8612
8646
|
* Simplified connection state schema for webhook payloads (raw API format).
|
|
@@ -8622,11 +8656,11 @@ const WebhookConnectedAccountAuthConfigSchema = z.object({
|
|
|
8622
8656
|
*
|
|
8623
8657
|
* @see ConnectionDataSchema in connectedAccountAuthStates.types.ts for the full typed version
|
|
8624
8658
|
*/
|
|
8625
|
-
const WebhookConnectionStateSchema = z.object({
|
|
8659
|
+
const WebhookConnectionStateSchema = z$1.object({
|
|
8626
8660
|
/** The auth scheme type (e.g., 'OAUTH2', 'API_KEY') */
|
|
8627
|
-
authScheme: z.nativeEnum(AuthSchemeTypes),
|
|
8661
|
+
authScheme: z$1.nativeEnum(AuthSchemeTypes),
|
|
8628
8662
|
/** Connection state values - varies by auth scheme */
|
|
8629
|
-
val: z.record(z.unknown())
|
|
8663
|
+
val: z$1.record(z$1.unknown())
|
|
8630
8664
|
}).passthrough();
|
|
8631
8665
|
/**
|
|
8632
8666
|
* Connected account data schema for webhook payloads (raw API format, snake_case).
|
|
@@ -8644,37 +8678,37 @@ const WebhookConnectionStateSchema = z.object({
|
|
|
8644
8678
|
* @see ConnectedAccountRetrieveResponseSchema in connectedAccounts.types.ts for the camelCase SDK version
|
|
8645
8679
|
* @see utils/transformers/connectedAccounts.ts for the snake-to-camel transformation
|
|
8646
8680
|
*/
|
|
8647
|
-
const SingleConnectedAccountDetailedResponseSchema = z.object({
|
|
8681
|
+
const SingleConnectedAccountDetailedResponseSchema = z$1.object({
|
|
8648
8682
|
/** Toolkit information */
|
|
8649
|
-
toolkit: z.object({ slug: z.string().describe("The slug of the toolkit") }).passthrough(),
|
|
8683
|
+
toolkit: z$1.object({ slug: z$1.string().describe("The slug of the toolkit") }).passthrough(),
|
|
8650
8684
|
/** Auth config details */
|
|
8651
8685
|
auth_config: WebhookConnectedAccountAuthConfigSchema,
|
|
8652
8686
|
/** The nano ID of the connected account */
|
|
8653
|
-
id: z.string(),
|
|
8687
|
+
id: z$1.string(),
|
|
8654
8688
|
/** @deprecated - user ID of the connection owner */
|
|
8655
|
-
user_id: z.string(),
|
|
8689
|
+
user_id: z$1.string(),
|
|
8656
8690
|
/** Connection status */
|
|
8657
|
-
status: z.nativeEnum(ConnectionStatuses),
|
|
8691
|
+
status: z$1.nativeEnum(ConnectionStatuses),
|
|
8658
8692
|
/** ISO-8601 timestamp of creation */
|
|
8659
|
-
created_at: z.string(),
|
|
8693
|
+
created_at: z$1.string(),
|
|
8660
8694
|
/** ISO-8601 timestamp of last update */
|
|
8661
|
-
updated_at: z.string(),
|
|
8695
|
+
updated_at: z$1.string(),
|
|
8662
8696
|
/** Connection state data (auth scheme + state values) */
|
|
8663
8697
|
state: WebhookConnectionStateSchema,
|
|
8664
8698
|
/** @deprecated - use state instead */
|
|
8665
|
-
data: z.record(z.unknown()),
|
|
8699
|
+
data: z$1.record(z$1.unknown()),
|
|
8666
8700
|
/** @deprecated - use state instead */
|
|
8667
|
-
params: z.record(z.unknown()),
|
|
8701
|
+
params: z$1.record(z$1.unknown()),
|
|
8668
8702
|
/** Reason for the current status (e.g., expiration reason) */
|
|
8669
|
-
status_reason: z.string().nullable(),
|
|
8703
|
+
status_reason: z$1.string().nullable(),
|
|
8670
8704
|
/** Whether the connection is disabled */
|
|
8671
|
-
is_disabled: z.boolean(),
|
|
8705
|
+
is_disabled: z$1.boolean(),
|
|
8672
8706
|
/** Endpoint for making test requests */
|
|
8673
|
-
test_request_endpoint: z.string().optional(),
|
|
8707
|
+
test_request_endpoint: z$1.string().optional(),
|
|
8674
8708
|
/** @deprecated */
|
|
8675
|
-
deprecated: z.object({
|
|
8676
|
-
labels: z.array(z.string()),
|
|
8677
|
-
uuid: z.string()
|
|
8709
|
+
deprecated: z$1.object({
|
|
8710
|
+
labels: z$1.array(z$1.string()),
|
|
8711
|
+
uuid: z$1.string()
|
|
8678
8712
|
}).optional()
|
|
8679
8713
|
}).passthrough();
|
|
8680
8714
|
/**
|
|
@@ -8683,11 +8717,11 @@ const SingleConnectedAccountDetailedResponseSchema = z.object({
|
|
|
8683
8717
|
*
|
|
8684
8718
|
* Uses .passthrough() to accept unknown fields the API may add in the future.
|
|
8685
8719
|
*/
|
|
8686
|
-
const WebhookConnectionMetadataSchema = z.object({
|
|
8720
|
+
const WebhookConnectionMetadataSchema = z$1.object({
|
|
8687
8721
|
/** Project nano ID */
|
|
8688
|
-
project_id: z.string(),
|
|
8722
|
+
project_id: z$1.string(),
|
|
8689
8723
|
/** Organization UUID */
|
|
8690
|
-
org_id: z.string()
|
|
8724
|
+
org_id: z$1.string()
|
|
8691
8725
|
}).passthrough();
|
|
8692
8726
|
/**
|
|
8693
8727
|
* Connection expired webhook event payload.
|
|
@@ -8709,13 +8743,13 @@ const WebhookConnectionMetadataSchema = z.object({
|
|
|
8709
8743
|
* }
|
|
8710
8744
|
* ```
|
|
8711
8745
|
*/
|
|
8712
|
-
const ConnectionExpiredEventSchema = z.object({
|
|
8746
|
+
const ConnectionExpiredEventSchema = z$1.object({
|
|
8713
8747
|
/** Unique message ID (e.g., "msg_847cdfcd-d219-4f18-a6dd-91acd42ca94a") */
|
|
8714
|
-
id: z.string(),
|
|
8748
|
+
id: z$1.string(),
|
|
8715
8749
|
/** ISO-8601 timestamp of when the event was emitted */
|
|
8716
|
-
timestamp: z.string(),
|
|
8750
|
+
timestamp: z$1.string(),
|
|
8717
8751
|
/** Event type identifier */
|
|
8718
|
-
type: z.literal(WebhookEventTypes.CONNECTION_EXPIRED),
|
|
8752
|
+
type: z$1.literal(WebhookEventTypes.CONNECTION_EXPIRED),
|
|
8719
8753
|
/** Connected account data (same as GET /api/v3/connected_accounts/{id}) */
|
|
8720
8754
|
data: SingleConnectedAccountDetailedResponseSchema,
|
|
8721
8755
|
/** Event metadata */
|
|
@@ -8732,109 +8766,109 @@ const ConnectionExpiredEventSchema = z.object({
|
|
|
8732
8766
|
* Trigger events (composio.trigger.message) are handled through the
|
|
8733
8767
|
* WebhookTriggerPayloadV3Schema in triggers.types.ts and the TriggerEvent type.
|
|
8734
8768
|
*/
|
|
8735
|
-
const WebhookEventSchema = z.discriminatedUnion("type", [ConnectionExpiredEventSchema]);
|
|
8769
|
+
const WebhookEventSchema = z$1.discriminatedUnion("type", [ConnectionExpiredEventSchema]);
|
|
8736
8770
|
|
|
8737
8771
|
//#endregion
|
|
8738
8772
|
//#region src/types/mcp.types.ts
|
|
8739
8773
|
/**
|
|
8740
8774
|
* @deprecated
|
|
8741
8775
|
*/
|
|
8742
|
-
const MCPToolkitConfigSchema = z.object({
|
|
8743
|
-
toolkit: z.string().min(1, "Toolkit name cannot be empty"),
|
|
8744
|
-
authConfigId: z.string().min(1, "Auth config ID cannot be empty"),
|
|
8745
|
-
allowedTools: z.array(z.string().min(1, "Tool name cannot be empty")).min(1, "At least one tool must be specified")
|
|
8776
|
+
const MCPToolkitConfigSchema = z$1.object({
|
|
8777
|
+
toolkit: z$1.string().min(1, "Toolkit name cannot be empty"),
|
|
8778
|
+
authConfigId: z$1.string().min(1, "Auth config ID cannot be empty"),
|
|
8779
|
+
allowedTools: z$1.array(z$1.string().min(1, "Tool name cannot be empty")).min(1, "At least one tool must be specified")
|
|
8746
8780
|
});
|
|
8747
8781
|
/**
|
|
8748
8782
|
* @deprecated
|
|
8749
8783
|
*/
|
|
8750
|
-
const MCPToolkitConfigsArraySchema = z.array(MCPToolkitConfigSchema).min(1, "At least one toolkit configuration is required").refine((configs) => {
|
|
8784
|
+
const MCPToolkitConfigsArraySchema = z$1.array(MCPToolkitConfigSchema).min(1, "At least one toolkit configuration is required").refine((configs) => {
|
|
8751
8785
|
const toolkits = configs.map((config) => config.toolkit);
|
|
8752
8786
|
return new Set(toolkits).size === toolkits.length;
|
|
8753
8787
|
}, "Duplicate toolkits are not allowed. Each toolkit must be unique.");
|
|
8754
8788
|
/**
|
|
8755
8789
|
* @deprecated
|
|
8756
8790
|
*/
|
|
8757
|
-
const MCPAuthOptionsSchema = z.object({ isChatAuth: z.boolean().optional() });
|
|
8758
|
-
const MCPGetServerParamsSchema = z.object({
|
|
8759
|
-
userId: z.string().min(1, "User ID cannot be empty").optional(),
|
|
8760
|
-
connectedAccountIds: z.record(z.string(), z.string().min(1, "Account ID cannot be empty")).optional()
|
|
8791
|
+
const MCPAuthOptionsSchema = z$1.object({ isChatAuth: z$1.boolean().optional() });
|
|
8792
|
+
const MCPGetServerParamsSchema = z$1.object({
|
|
8793
|
+
userId: z$1.string().min(1, "User ID cannot be empty").optional(),
|
|
8794
|
+
connectedAccountIds: z$1.record(z$1.string(), z$1.string().min(1, "Account ID cannot be empty")).optional()
|
|
8761
8795
|
}).refine((data) => {
|
|
8762
8796
|
return !!data.userId !== (!!data.connectedAccountIds && Object.keys(data.connectedAccountIds).length > 0);
|
|
8763
8797
|
}, { message: "Must provide either userId or connectedAccountIds, but not both" });
|
|
8764
|
-
const MCPGenerateURLParamsSchema = z.object({
|
|
8765
|
-
userIds: z.array(z.string()).optional(),
|
|
8766
|
-
connectedAccountIds: z.array(z.string()).optional(),
|
|
8767
|
-
isChatAuth: z.boolean().optional()
|
|
8798
|
+
const MCPGenerateURLParamsSchema = z$1.object({
|
|
8799
|
+
userIds: z$1.array(z$1.string()).optional(),
|
|
8800
|
+
connectedAccountIds: z$1.array(z$1.string()).optional(),
|
|
8801
|
+
isChatAuth: z$1.boolean().optional()
|
|
8768
8802
|
});
|
|
8769
|
-
const ComposioGenerateURLParamsSchema = z.object({
|
|
8770
|
-
user_ids: z.array(z.string()).optional(),
|
|
8771
|
-
connected_account_ids: z.array(z.string()).optional(),
|
|
8772
|
-
mcp_server_id: z.string(),
|
|
8773
|
-
managed_auth_by_composio: z.boolean().optional()
|
|
8803
|
+
const ComposioGenerateURLParamsSchema = z$1.object({
|
|
8804
|
+
user_ids: z$1.array(z$1.string()).optional(),
|
|
8805
|
+
connected_account_ids: z$1.array(z$1.string()).optional(),
|
|
8806
|
+
mcp_server_id: z$1.string(),
|
|
8807
|
+
managed_auth_by_composio: z$1.boolean().optional()
|
|
8774
8808
|
});
|
|
8775
|
-
const GenerateURLParamsSchema = z.object({
|
|
8776
|
-
userIds: z.array(z.string()).optional(),
|
|
8777
|
-
connectedAccountIds: z.array(z.string()).optional(),
|
|
8778
|
-
mcpServerId: z.string(),
|
|
8779
|
-
composioManagedAuth: z.boolean().optional()
|
|
8809
|
+
const GenerateURLParamsSchema = z$1.object({
|
|
8810
|
+
userIds: z$1.array(z$1.string()).optional(),
|
|
8811
|
+
connectedAccountIds: z$1.array(z$1.string()).optional(),
|
|
8812
|
+
mcpServerId: z$1.string(),
|
|
8813
|
+
composioManagedAuth: z$1.boolean().optional()
|
|
8780
8814
|
});
|
|
8781
|
-
const GenerateURLResponseSchema = z.object({
|
|
8782
|
-
connectedAccountUrls: z.array(z.string()).optional(),
|
|
8783
|
-
userIdsUrl: z.array(z.string()).optional(),
|
|
8784
|
-
mcpUrl: z.string().min(1, "MCP URL cannot be empty")
|
|
8815
|
+
const GenerateURLResponseSchema = z$1.object({
|
|
8816
|
+
connectedAccountUrls: z$1.array(z$1.string()).optional(),
|
|
8817
|
+
userIdsUrl: z$1.array(z$1.string()).optional(),
|
|
8818
|
+
mcpUrl: z$1.string().min(1, "MCP URL cannot be empty")
|
|
8785
8819
|
});
|
|
8786
|
-
const ComposioGenerateURLResponseSchema = z.object({
|
|
8787
|
-
connected_account_urls: z.array(z.string()).optional(),
|
|
8788
|
-
user_ids_url: z.array(z.string()).optional(),
|
|
8789
|
-
mcp_url: z.string().min(1, "MCP URL cannot be empty")
|
|
8820
|
+
const ComposioGenerateURLResponseSchema = z$1.object({
|
|
8821
|
+
connected_account_urls: z$1.array(z$1.string()).optional(),
|
|
8822
|
+
user_ids_url: z$1.array(z$1.string()).optional(),
|
|
8823
|
+
mcp_url: z$1.string().min(1, "MCP URL cannot be empty")
|
|
8790
8824
|
});
|
|
8791
8825
|
/**
|
|
8792
8826
|
* MCP Server Type (Single App)
|
|
8793
8827
|
*/
|
|
8794
|
-
const MCPSingleAppServerSchema = z.object({
|
|
8795
|
-
name: z.string().describe("Name of the MCP server"),
|
|
8796
|
-
tools: z.array(z.string()).describe("List of allowed tools"),
|
|
8797
|
-
authConfigId: z.string().optional().describe("Auth config ID for the server")
|
|
8828
|
+
const MCPSingleAppServerSchema = z$1.object({
|
|
8829
|
+
name: z$1.string().describe("Name of the MCP server"),
|
|
8830
|
+
tools: z$1.array(z$1.string()).describe("List of allowed tools"),
|
|
8831
|
+
authConfigId: z$1.string().optional().describe("Auth config ID for the server")
|
|
8798
8832
|
});
|
|
8799
8833
|
/**
|
|
8800
8834
|
* MCP Server Type (Multi App)
|
|
8801
8835
|
*/
|
|
8802
|
-
const MCPMultiAppServerSchema = z.object({
|
|
8803
|
-
name: z.string().describe("Name of the MCP server"),
|
|
8804
|
-
tools: z.array(z.string()).describe("List of allowed tools across toolkits"),
|
|
8805
|
-
toolkits: z.array(z.string()).describe("List of allowed toolkits")
|
|
8836
|
+
const MCPMultiAppServerSchema = z$1.object({
|
|
8837
|
+
name: z$1.string().describe("Name of the MCP server"),
|
|
8838
|
+
tools: z$1.array(z$1.string()).describe("List of allowed tools across toolkits"),
|
|
8839
|
+
toolkits: z$1.array(z$1.string()).describe("List of allowed toolkits")
|
|
8806
8840
|
});
|
|
8807
8841
|
/**
|
|
8808
8842
|
* MCP Server Type (Combined)
|
|
8809
8843
|
*/
|
|
8810
|
-
const MCPServerSchema = z.object({
|
|
8811
|
-
id: z.string().describe("Unique identifier for the MCP server"),
|
|
8812
|
-
type: z.enum(["single", "multi"]).describe("Type of MCP server"),
|
|
8813
|
-
createdAt: z.string().describe("Creation timestamp"),
|
|
8814
|
-
updatedAt: z.string().describe("Last update timestamp"),
|
|
8815
|
-
status: z.enum([
|
|
8844
|
+
const MCPServerSchema = z$1.object({
|
|
8845
|
+
id: z$1.string().describe("Unique identifier for the MCP server"),
|
|
8846
|
+
type: z$1.enum(["single", "multi"]).describe("Type of MCP server"),
|
|
8847
|
+
createdAt: z$1.string().describe("Creation timestamp"),
|
|
8848
|
+
updatedAt: z$1.string().describe("Last update timestamp"),
|
|
8849
|
+
status: z$1.enum([
|
|
8816
8850
|
"active",
|
|
8817
8851
|
"inactive",
|
|
8818
8852
|
"error"
|
|
8819
8853
|
]).default("active"),
|
|
8820
|
-
config: z.union([MCPSingleAppServerSchema, MCPMultiAppServerSchema])
|
|
8854
|
+
config: z$1.union([MCPSingleAppServerSchema, MCPMultiAppServerSchema])
|
|
8821
8855
|
});
|
|
8822
8856
|
/**
|
|
8823
8857
|
* MCP Server List Response
|
|
8824
8858
|
*/
|
|
8825
|
-
const MCPServerListResponseSchema = z.object({
|
|
8826
|
-
items: z.array(MCPServerSchema),
|
|
8827
|
-
total: z.number(),
|
|
8828
|
-
page: z.number(),
|
|
8829
|
-
pageSize: z.number()
|
|
8859
|
+
const MCPServerListResponseSchema = z$1.object({
|
|
8860
|
+
items: z$1.array(MCPServerSchema),
|
|
8861
|
+
total: z$1.number(),
|
|
8862
|
+
page: z$1.number(),
|
|
8863
|
+
pageSize: z$1.number()
|
|
8830
8864
|
});
|
|
8831
8865
|
/**
|
|
8832
8866
|
* MCP Server Update Parameters
|
|
8833
8867
|
*/
|
|
8834
|
-
const MCPServerUpdateParamsSchema = z.object({
|
|
8835
|
-
name: z.string().optional().describe("New name for the server"),
|
|
8836
|
-
toolkits: z.array(z.string()).optional().describe("Updated list of toolkits"),
|
|
8837
|
-
allowedTools: z.array(z.string()).optional().describe("Updated list of allowed tools")
|
|
8868
|
+
const MCPServerUpdateParamsSchema = z$1.object({
|
|
8869
|
+
name: z$1.string().optional().describe("New name for the server"),
|
|
8870
|
+
toolkits: z$1.array(z$1.string()).optional().describe("Updated list of toolkits"),
|
|
8871
|
+
allowedTools: z$1.array(z$1.string()).optional().describe("Updated list of allowed tools")
|
|
8838
8872
|
});
|
|
8839
8873
|
/**
|
|
8840
8874
|
* MCP Server Create Response
|
|
@@ -8845,89 +8879,89 @@ let ConnectionStatus = /* @__PURE__ */ function(ConnectionStatus) {
|
|
|
8845
8879
|
ConnectionStatus["DISCONNECTED"] = "DISCONNECTED";
|
|
8846
8880
|
return ConnectionStatus;
|
|
8847
8881
|
}({});
|
|
8848
|
-
const CustomCreateResponseSchema = z.object({
|
|
8849
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8850
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8851
|
-
createdAt: z.string().nullish(),
|
|
8852
|
-
updatedAt: z.string().nullish(),
|
|
8853
|
-
status: z.string().nullish()
|
|
8882
|
+
const CustomCreateResponseSchema = z$1.object({
|
|
8883
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8884
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8885
|
+
createdAt: z$1.string().nullish(),
|
|
8886
|
+
updatedAt: z$1.string().nullish(),
|
|
8887
|
+
status: z$1.string().nullish()
|
|
8854
8888
|
});
|
|
8855
|
-
const ComposioCustomCreateResponseSchema = z.object({
|
|
8856
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8857
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8858
|
-
created_at: z.string().nullish(),
|
|
8859
|
-
updated_at: z.string().nullish(),
|
|
8860
|
-
status: z.string().nullish()
|
|
8889
|
+
const ComposioCustomCreateResponseSchema = z$1.object({
|
|
8890
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8891
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8892
|
+
created_at: z$1.string().nullish(),
|
|
8893
|
+
updated_at: z$1.string().nullish(),
|
|
8894
|
+
status: z$1.string().nullish()
|
|
8861
8895
|
});
|
|
8862
|
-
const McpListResponseSchema = z.object({ items: z.array(z.object({
|
|
8863
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8864
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8865
|
-
createdAt: z.string().optional(),
|
|
8866
|
-
updatedAt: z.string().optional(),
|
|
8867
|
-
status: z.string().optional()
|
|
8896
|
+
const McpListResponseSchema = z$1.object({ items: z$1.array(z$1.object({
|
|
8897
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8898
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8899
|
+
createdAt: z$1.string().optional(),
|
|
8900
|
+
updatedAt: z$1.string().optional(),
|
|
8901
|
+
status: z$1.string().optional()
|
|
8868
8902
|
})).optional() });
|
|
8869
|
-
const ComposioMcpListResponseSchema = z.object({ items: z.array(z.object({
|
|
8870
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8871
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8872
|
-
created_at: z.string().optional(),
|
|
8873
|
-
updated_at: z.string().optional(),
|
|
8874
|
-
status: z.string().optional()
|
|
8903
|
+
const ComposioMcpListResponseSchema = z$1.object({ items: z$1.array(z$1.object({
|
|
8904
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8905
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8906
|
+
created_at: z$1.string().optional(),
|
|
8907
|
+
updated_at: z$1.string().optional(),
|
|
8908
|
+
status: z$1.string().optional()
|
|
8875
8909
|
})).optional() });
|
|
8876
|
-
const McpRetrieveResponseSchema = z.object({
|
|
8877
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8878
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8879
|
-
createdAt: z.string().optional(),
|
|
8880
|
-
updatedAt: z.string().optional(),
|
|
8881
|
-
status: z.string().optional(),
|
|
8882
|
-
toolkits: z.array(z.string()).optional(),
|
|
8883
|
-
tools: z.array(z.string()).optional(),
|
|
8884
|
-
managedAuthViaComposio: z.boolean().optional(),
|
|
8885
|
-
authConfigIds: z.array(z.string()).optional(),
|
|
8886
|
-
mcpUrl: z.string(),
|
|
8887
|
-
commands: z.object({
|
|
8888
|
-
claude: z.string(),
|
|
8889
|
-
cursor: z.string(),
|
|
8890
|
-
windsurf: z.string()
|
|
8910
|
+
const McpRetrieveResponseSchema = z$1.object({
|
|
8911
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8912
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8913
|
+
createdAt: z$1.string().optional(),
|
|
8914
|
+
updatedAt: z$1.string().optional(),
|
|
8915
|
+
status: z$1.string().optional(),
|
|
8916
|
+
toolkits: z$1.array(z$1.string()).optional(),
|
|
8917
|
+
tools: z$1.array(z$1.string()).optional(),
|
|
8918
|
+
managedAuthViaComposio: z$1.boolean().optional(),
|
|
8919
|
+
authConfigIds: z$1.array(z$1.string()).optional(),
|
|
8920
|
+
mcpUrl: z$1.string(),
|
|
8921
|
+
commands: z$1.object({
|
|
8922
|
+
claude: z$1.string(),
|
|
8923
|
+
cursor: z$1.string(),
|
|
8924
|
+
windsurf: z$1.string()
|
|
8891
8925
|
})
|
|
8892
8926
|
});
|
|
8893
|
-
const ComposioMcpRetrieveResponseSchema = z.object({
|
|
8894
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8895
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8896
|
-
created_at: z.string().optional(),
|
|
8897
|
-
updated_at: z.string().optional(),
|
|
8898
|
-
status: z.string().optional(),
|
|
8899
|
-
toolkits: z.array(z.string()).optional(),
|
|
8900
|
-
tools: z.array(z.string()).optional(),
|
|
8901
|
-
managed_auth_via_composio: z.boolean().optional()
|
|
8927
|
+
const ComposioMcpRetrieveResponseSchema = z$1.object({
|
|
8928
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8929
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8930
|
+
created_at: z$1.string().optional(),
|
|
8931
|
+
updated_at: z$1.string().optional(),
|
|
8932
|
+
status: z$1.string().optional(),
|
|
8933
|
+
toolkits: z$1.array(z$1.string()).optional(),
|
|
8934
|
+
tools: z$1.array(z$1.string()).optional(),
|
|
8935
|
+
managed_auth_via_composio: z$1.boolean().optional()
|
|
8902
8936
|
});
|
|
8903
|
-
const McpDeleteResponseSchema = z.object({
|
|
8904
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8905
|
-
deleted: z.boolean().optional(),
|
|
8906
|
-
message: z.string().optional()
|
|
8937
|
+
const McpDeleteResponseSchema = z$1.object({
|
|
8938
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8939
|
+
deleted: z$1.boolean().optional(),
|
|
8940
|
+
message: z$1.string().optional()
|
|
8907
8941
|
});
|
|
8908
|
-
const ComposioMcpDeleteResponseSchema = z.object({
|
|
8909
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8910
|
-
deleted: z.boolean().optional(),
|
|
8911
|
-
message: z.string().optional()
|
|
8942
|
+
const ComposioMcpDeleteResponseSchema = z$1.object({
|
|
8943
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8944
|
+
deleted: z$1.boolean().optional(),
|
|
8945
|
+
message: z$1.string().optional()
|
|
8912
8946
|
});
|
|
8913
|
-
const McpUpdateResponseSchema = z.object({
|
|
8914
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8915
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8916
|
-
createdAt: z.string().optional(),
|
|
8917
|
-
updatedAt: z.string().optional(),
|
|
8918
|
-
status: z.string().optional(),
|
|
8919
|
-
toolkits: z.array(z.string()).optional(),
|
|
8920
|
-
tools: z.array(z.string()).optional()
|
|
8947
|
+
const McpUpdateResponseSchema = z$1.object({
|
|
8948
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8949
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8950
|
+
createdAt: z$1.string().optional(),
|
|
8951
|
+
updatedAt: z$1.string().optional(),
|
|
8952
|
+
status: z$1.string().optional(),
|
|
8953
|
+
toolkits: z$1.array(z$1.string()).optional(),
|
|
8954
|
+
tools: z$1.array(z$1.string()).optional()
|
|
8921
8955
|
});
|
|
8922
|
-
const ComposioMcpUpdateResponseSchema = z.object({
|
|
8923
|
-
id: z.string().min(1, "Server ID cannot be empty"),
|
|
8924
|
-
name: z.string().min(1, "Server name cannot be empty"),
|
|
8925
|
-
created_at: z.string().optional(),
|
|
8926
|
-
updated_at: z.string().optional(),
|
|
8927
|
-
status: z.string().optional(),
|
|
8928
|
-
toolkits: z.array(z.string()).optional(),
|
|
8929
|
-
tools: z.array(z.string()).optional()
|
|
8956
|
+
const ComposioMcpUpdateResponseSchema = z$1.object({
|
|
8957
|
+
id: z$1.string().min(1, "Server ID cannot be empty"),
|
|
8958
|
+
name: z$1.string().min(1, "Server name cannot be empty"),
|
|
8959
|
+
created_at: z$1.string().optional(),
|
|
8960
|
+
updated_at: z$1.string().optional(),
|
|
8961
|
+
status: z$1.string().optional(),
|
|
8962
|
+
toolkits: z$1.array(z$1.string()).optional(),
|
|
8963
|
+
tools: z$1.array(z$1.string()).optional()
|
|
8930
8964
|
});
|
|
8931
8965
|
|
|
8932
8966
|
//#endregion
|
|
8933
|
-
export { AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, AuthConfigListParamsSchema, AuthConfigListResponseSchema, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, AuthConfigTypes, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, AuthSchemeTypes, BaseAgenticProvider, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, ComposioAclOnlyForSharedError, ComposioAuthConfigNotFoundError, ComposioConnectedAccountNotFoundError, ComposioCustomCreateResponseSchema, ComposioError, ComposioFailedToCreateConnectedAccountLink, ComposioFailedToCreatePusherClientError, ComposioFailedToGetSDKRealtimeCredentialsError, ComposioFailedToSubscribeToPusherChannelError, ComposioFailedToUnsubscribeFromPusherChannelError, ComposioFileNotFoundError, ComposioFileUploadAbortedError, ComposioFileUploadError, ComposioFileUploadPathNotAllowedError, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioInvalidToolArgumentsError, ComposioLegacyConnectedAccountsEndpointRetiredError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioRequestCancelledError, ComposioSensitiveFilePathBlockedError, ComposioSharedAccessDeniedError, ComposioSharedConnectionNotAccessibleError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ComposioTriggerTypeNotFoundError, ComposioWebhookPayloadError, ComposioWebhookSignatureVerificationError, ConnectedAccountAclConfigResponseSchema, ConnectedAccountAclConfigSchema, ConnectedAccountAuthConfigSchema, ConnectedAccountErrorCodes, ConnectedAccountExperimentalResponseSchema, ConnectedAccountExperimentalSchema, ConnectedAccountListParamsSchema, ConnectedAccountListResponseSchema, ConnectedAccountRefreshOptionsSchema, ConnectedAccountRetrieveResponseSchema, ConnectedAccountStatusSchema, ConnectedAccountStatuses, ConnectedAccountTypeSchema, ConnectedAccountTypes, ConnectionDataSchema, ConnectionExpiredEventSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConnectionStatus, ConnectionStatuses, CreateAuthConfigParamsSchema, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateConnectedAccountLinkOptionsSchema, CreateConnectedAccountLinkResponseSchema, CreateConnectedAccountOptionsSchema, CreateConnectedAccountParamsSchema, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, CreateCustomToolBaseSchema, CreateCustomToolkitBaseSchema, CustomAuthParamsSchema, CustomConnectionDataSchema, CustomCreateResponseSchema, CustomOauth1ConnectionDataSchema, CustomOauth2ConnectionDataSchema, CustomToolSlugSchema, DefaultCreateConnectedAccountParamsSchema, DefaultWebhookSubscriptionEvents, Experimental, FileDeleteResponseSchema, FileListResponseSchema, FileModifierErrorCodes, GenerateURLParamsSchema, GenerateURLResponseSchema, IncomingTriggerPayloadSchema, JSONSchemaPropertySchema, JsonSchemaRefResolutionError, JsonSchemaToZodError, MCP, MCPAuthOptionsSchema, MCPGenerateURLParamsSchema, MCPGetServerParamsSchema, MCPMultiAppServerSchema, MCPServerCreateResponseSchema, MCPServerListResponseSchema, MCPServerSchema, MCPServerTypeSchema, MCPServerUpdateParamsSchema, MCPSingleAppServerSchema, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, McpDeleteResponseSchema, McpListResponseSchema, McpRetrieveResponseSchema, McpUpdateResponseSchema, Oauth1ActiveConnectionDataSchema, Oauth1ConnectionDataSchema, Oauth1ExpiredConnectionDataSchema, Oauth1FailedConnectionDataSchema, Oauth1InactiveConnectionDataSchema, Oauth1InitiatedConnectionDataSchema, Oauth1InitiatingConnectionDataSchema, Oauth2ActiveConnectionDataSchema, Oauth2ConnectionDataSchema, Oauth2ExpiredConnectionDataSchema, Oauth2FailedConnectionDataSchema, Oauth2InactiveConnectionDataSchema, Oauth2InitiatedConnectionDataSchema, Oauth2InitiatingConnectionDataSchema, Oauth2RevokedConnectionDataSchema, OpenAIProvider, RedirectableAuthSchemeSchema, RemoteFile, RemoteFileDataSchema, RemoteFileDownloadError, RemoteFileErrorCodes, SDKErrorCodes, SandboxSizeSchema, SessionPreset, SessionProxyExecuteParamsSchema, Sessions, SetWebhookSubscriptionParamsSchema, SingleConnectedAccountDetailedResponseSchema, ToolErrorCodes, ToolExecuteMetaParamsSchema, ToolExecuteParamsSchema, ToolExecuteResponseSchema, ToolKitItemSchema, ToolKitListResponseSchema, ToolKitMetaSchema, ToolListParamsSchema, ToolListResponseSchema, ToolProxyParamsSchema, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, ToolRouterConfigToolsSchema, ToolRouterCreateSessionConfigSchema, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, ToolRouterSandboxConfigSchema, ToolRouterSession, ToolRouterSessionDeleteResponseSchema, ToolRouterSessionExecuteResponseSchema, ToolRouterSessionFilesMountDeleteOptionsSchema, ToolRouterSessionFilesMountDownloadOptionsSchema, ToolRouterSessionFilesMountListOptionsSchema, ToolRouterSessionFilesMountUploadOptionsSchema, ToolRouterSessionSearchResponseSchema, ToolRouterTagsEnableDisableSchema, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, ToolRouterToolsParamSchema, ToolRouterUpdateSessionConfigSchema, ToolSchema, ToolkitAuthConfigDetailsSchema, ToolkitAuthFieldSchema, ToolkitAuthFieldsResponseSchema, ToolkitCategorySchema, ToolkitConnectionStateSchema, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, ToolkitLatestVersionSchema, ToolkitMangedByEnumSchema, ToolkitRetrieveCategoriesResponseSchema, ToolkitRetrieveResponseSchema, ToolkitSchema, ToolkitSortByEnumSchema, ToolkitVersionParamSchema, ToolkitVersionSchema, ToolkitVersionsSchema, ToolkitsListParamsSchema, TriggerErrorCodes, TriggerInstanceListActiveParamsSchema, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, TriggerInstanceManageDeleteResponseSchema, TriggerInstanceManageUpdateParamsSchema, TriggerInstanceManageUpdateResponseSchema, TriggerInstanceUpsertParamsSchema, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, TriggerStatuses, TriggerSubscribeParamSchema, TriggerTypeSchema, TriggersTypeListParamsSchema, TriggersTypeListResponseSchema, UpdateConnectedAccountAclParamsSchema, UpdateConnectedAccountParamsSchema, ValidationError, ValidationErrorCodes, VerifyWebhookParamsSchema, WebhookConnectedAccountAuthConfigSchema, WebhookConnectionMetadataSchema, WebhookConnectionStateSchema, WebhookEventSchema, WebhookEventTypes, WebhookPayloadSchema, WebhookPayloadV1Schema, WebhookPayloadV2Schema, WebhookPayloadV3Schema, WebhookTriggerPayloadV3Schema, WebhookVersions, constants_exports as constants, createConnectionRequest, dereferenceJsonSchema, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit, getExtensionFromMimeType, handleToolExecutionError, isRequestAbortError, jsonSchemaToZodSchema, logger, mappingHasRenames, normalizeToolArguments, removeNonRequiredProperties, restoreOriginalKeys, sanitizeSchemaPropertyKeys, telemetry };
|
|
8967
|
+
export { AuthConfigCreationToolAccessConfigSchema, AuthConfigErrorCodes, AuthConfigListParamsSchema, AuthConfigListResponseSchema, AuthConfigRetrieveResponseSchema, AuthConfigToolAccessConfigSchema, AuthConfigTypes, AuthConfigUpdateParamsSchema, AuthCustomConfigUpdateParamsSchema, AuthDefaultConfigUpdateParamsSchema, AuthScheme, AuthSchemeEnum, AuthSchemeTypes, BUILTIN_FILE_UPLOAD_PATH_DENY_SEGMENTS, BaseAgenticProvider, BaseNonAgenticProvider, BillcomAuthConnectionDataSchema, Composio, ComposioAclOnlyForSharedError, ComposioAuthConfigNotFoundError, ComposioBlockedInternalUrlError, ComposioConnectedAccountNotFoundError, ComposioCustomCreateResponseSchema, ComposioError, ComposioFailedToCreateConnectedAccountLink, ComposioFailedToCreatePusherClientError, ComposioFailedToGetSDKRealtimeCredentialsError, ComposioFailedToSubscribeToPusherChannelError, ComposioFailedToUnsubscribeFromPusherChannelError, ComposioFileNotFoundError, ComposioFileUploadAbortedError, ComposioFileUploadError, ComposioFileUploadPathNotAllowedError, ComposioGenerateURLParamsSchema, ComposioGenerateURLResponseSchema, ComposioGlobalExecuteToolFnNotSetError, ComposioInvalidExecuteFunctionError, ComposioInvalidModifierError, ComposioInvalidToolArgumentsError, ComposioLegacyConnectedAccountsEndpointRetiredError, ComposioMcpDeleteResponseSchema, ComposioMcpListResponseSchema, ComposioMcpRetrieveResponseSchema, ComposioMcpUpdateResponseSchema, ComposioMultipleConnectedAccountsError, ComposioNoAPIKeyError, ComposioProvider, ComposioProviderNotDefinedError, ComposioRequestCancelledError, ComposioSensitiveFilePathBlockedError, ComposioSharedAccessDeniedError, ComposioSharedConnectionNotAccessibleError, ComposioToolExecutionError, ComposioToolNotFoundError, ComposioToolVersionRequiredError, ComposioToolkitFetchError, ComposioToolkitNotFoundError, ComposioTriggerTypeNotFoundError, ComposioWebhookPayloadError, ComposioWebhookSignatureVerificationError, ConnectedAccountAclConfigResponseSchema, ConnectedAccountAclConfigSchema, ConnectedAccountAuthConfigSchema, ConnectedAccountErrorCodes, ConnectedAccountExperimentalResponseSchema, ConnectedAccountExperimentalSchema, ConnectedAccountListParamsSchema, ConnectedAccountListResponseSchema, ConnectedAccountRefreshOptionsSchema, ConnectedAccountRetrieveResponseSchema, ConnectedAccountStatusSchema, ConnectedAccountStatuses, ConnectedAccountTypeSchema, ConnectedAccountTypes, ConnectionDataSchema, ConnectionExpiredEventSchema, ConnectionRequestErrorCodes, ConnectionRequestFailedError, ConnectionRequestTimeoutError, ConnectionStatus, ConnectionStatuses, CreateAuthConfigParamsSchema, CreateAuthConfigResponseSchema, CreateComposioManagedAuthConfigParamsSchema, CreateConnectedAccountLinkOptionsSchema, CreateConnectedAccountLinkResponseSchema, CreateConnectedAccountOptionsSchema, CreateConnectedAccountParamsSchema, CreateConnectedAccountResponseSchema, CreateCustomAuthConfigParamsSchema, CreateCustomToolBaseSchema, CreateCustomToolkitBaseSchema, CustomAuthParamsSchema, CustomConnectionDataSchema, CustomCreateResponseSchema, CustomOauth1ConnectionDataSchema, CustomOauth2ConnectionDataSchema, CustomToolSlugSchema, DefaultCreateConnectedAccountParamsSchema, DefaultWebhookSubscriptionEvents, Experimental, FileDeleteResponseSchema, FileListResponseSchema, FileModifierErrorCodes, GenerateURLParamsSchema, GenerateURLResponseSchema, IncomingTriggerPayloadSchema, JSONSchemaPropertySchema, JsonSchemaRefResolutionError, JsonSchemaToZodError, MCP, MCPAuthOptionsSchema, MCPGenerateURLParamsSchema, MCPGetServerParamsSchema, MCPMultiAppServerSchema, MCPServerCreateResponseSchema, MCPServerListResponseSchema, MCPServerSchema, MCPServerTypeSchema, MCPServerUpdateParamsSchema, MCPSingleAppServerSchema, MCPToolkitConfigSchema, MCPToolkitConfigsArraySchema, McpDeleteResponseSchema, McpListResponseSchema, McpRetrieveResponseSchema, McpUpdateResponseSchema, Oauth1ActiveConnectionDataSchema, Oauth1ConnectionDataSchema, Oauth1ExpiredConnectionDataSchema, Oauth1FailedConnectionDataSchema, Oauth1InactiveConnectionDataSchema, Oauth1InitiatedConnectionDataSchema, Oauth1InitiatingConnectionDataSchema, Oauth2ActiveConnectionDataSchema, Oauth2ConnectionDataSchema, Oauth2ExpiredConnectionDataSchema, Oauth2FailedConnectionDataSchema, Oauth2InactiveConnectionDataSchema, Oauth2InitiatedConnectionDataSchema, Oauth2InitiatingConnectionDataSchema, Oauth2RevokedConnectionDataSchema, OpenAIProvider, RedirectableAuthSchemeSchema, RemoteFile, RemoteFileDataSchema, RemoteFileDownloadError, RemoteFileErrorCodes, SDKErrorCodes, SandboxSizeSchema, SessionPreset, SessionProxyExecuteParamsSchema, Sessions, SetWebhookSubscriptionParamsSchema, SingleConnectedAccountDetailedResponseSchema, SsrfErrorCodes, ToolErrorCodes, ToolExecuteMetaParamsSchema, ToolExecuteParamsSchema, ToolExecuteResponseSchema, ToolKitItemSchema, ToolKitListResponseSchema, ToolKitMetaSchema, ToolListParamsSchema, ToolListResponseSchema, ToolProxyParamsSchema, ToolRouterConfigManageConnectionsSchema, ToolRouterConfigTagsSchema, ToolRouterConfigToolsSchema, ToolRouterCreateSessionConfigSchema, ToolRouterMCPServerConfigSchema, ToolRouterManageConnectionsConfigSchema, ToolRouterSandboxConfigSchema, ToolRouterSession, ToolRouterSessionDeleteResponseSchema, ToolRouterSessionExecuteResponseSchema, ToolRouterSessionFilesMountDeleteOptionsSchema, ToolRouterSessionFilesMountDownloadOptionsSchema, ToolRouterSessionFilesMountListOptionsSchema, ToolRouterSessionFilesMountUploadOptionsSchema, ToolRouterSessionSearchResponseSchema, ToolRouterTagsEnableDisableSchema, ToolRouterTagsParamSchema, ToolRouterToolkitsDisabledConfigSchema, ToolRouterToolkitsEnabledConfigSchema, ToolRouterToolkitsOptionsSchema, ToolRouterToolkitsParamSchema, ToolRouterToolsParamSchema, ToolRouterUpdateSessionConfigSchema, ToolSchema, ToolkitAuthConfigDetailsSchema, ToolkitAuthFieldSchema, ToolkitAuthFieldsResponseSchema, ToolkitCategorySchema, ToolkitConnectionStateSchema, ToolkitConnectionsDetailsSchema, ToolkitErrorCodes, ToolkitLatestVersionSchema, ToolkitMangedByEnumSchema, ToolkitRetrieveCategoriesResponseSchema, ToolkitRetrieveResponseSchema, ToolkitSchema, ToolkitSortByEnumSchema, ToolkitVersionParamSchema, ToolkitVersionSchema, ToolkitVersionsSchema, ToolkitsListParamsSchema, TriggerErrorCodes, TriggerInstanceListActiveParamsSchema, TriggerInstanceListActiveResponseItemSchema, TriggerInstanceListActiveResponseSchema, TriggerInstanceManageDeleteResponseSchema, TriggerInstanceManageUpdateParamsSchema, TriggerInstanceManageUpdateResponseSchema, TriggerInstanceUpsertParamsSchema, TriggerInstanceUpsertResponseSchema, TriggerStatusEnum, TriggerStatuses, TriggerSubscribeParamSchema, TriggerTypeSchema, TriggersTypeListParamsSchema, TriggersTypeListResponseSchema, UpdateConnectedAccountAclParamsSchema, UpdateConnectedAccountParamsSchema, ValidationError, ValidationErrorCodes, VerifyWebhookParamsSchema, WebhookConnectedAccountAuthConfigSchema, WebhookConnectionMetadataSchema, WebhookConnectionStateSchema, WebhookEventSchema, WebhookEventTypes, WebhookPayloadSchema, WebhookPayloadV1Schema, WebhookPayloadV2Schema, WebhookPayloadV3Schema, WebhookTriggerPayloadV3Schema, WebhookVersions, assertSafeFileUploadPath, constants_exports as constants, createConnectionRequest, deduplicateJsonSchemaRequiredArrays, dereferenceJsonSchema, createCustomTool as experimental_createTool, createCustomToolkit as experimental_createToolkit, getExtensionFromMimeType, handleToolExecutionError, isBlockedSensitiveFileUploadPath, isRequestAbortError, jsonSchemaToZodSchema, logger, mappingHasRenames, normalizeToolArguments, removeNonRequiredProperties, restoreOriginalKeys, sanitizeSchemaPropertyKeys, telemetry };
|