@composio/core 0.5.0 → 0.5.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/dist/index.cjs +22 -10
- package/dist/index.d.cts +126 -34
- package/dist/index.d.mts +126 -34
- package/dist/index.mjs +22 -10
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -68,17 +68,18 @@ const CreateCustomAuthConfigParamsSchema = zod_v3.z.object({
|
|
|
68
68
|
proxyUrl: zod_v3.z.string(),
|
|
69
69
|
proxyAuthKey: zod_v3.z.string().optional()
|
|
70
70
|
}).optional(),
|
|
71
|
-
toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional()
|
|
71
|
+
toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
|
|
72
|
+
isEnabledForToolRouter: zod_v3.z.boolean().optional()
|
|
72
73
|
});
|
|
73
74
|
const CreateComposioManagedAuthConfigParamsSchema = zod_v3.z.object({
|
|
74
75
|
type: zod_v3.z.literal("use_composio_managed_auth"),
|
|
75
76
|
name: zod_v3.z.string().optional(),
|
|
76
|
-
credentials: zod_v3.z.
|
|
77
|
-
zod_v3.z.string(),
|
|
78
|
-
zod_v3.z.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
credentials: zod_v3.z.object({
|
|
78
|
+
scopes: zod_v3.z.union([zod_v3.z.string(), zod_v3.z.array(zod_v3.z.string())]).optional(),
|
|
79
|
+
user_scopes: zod_v3.z.union([zod_v3.z.string(), zod_v3.z.array(zod_v3.z.string())]).optional()
|
|
80
|
+
}).passthrough().optional(),
|
|
81
|
+
toolAccessConfig: AuthConfigCreationToolAccessConfigSchema.optional(),
|
|
82
|
+
isEnabledForToolRouter: zod_v3.z.boolean().optional()
|
|
82
83
|
});
|
|
83
84
|
/**
|
|
84
85
|
* Discriminated union of all possible auth config types.
|
|
@@ -103,6 +104,7 @@ const AuthConfigRetrieveResponseSchema = zod_v3.z.object({
|
|
|
103
104
|
authScheme: AuthSchemeEnum.optional(),
|
|
104
105
|
credentials: zod_v3.z.record(zod_v3.z.string(), zod_v3.z.unknown()).optional(),
|
|
105
106
|
expectedInputFields: zod_v3.z.array(zod_v3.z.unknown()).optional(),
|
|
107
|
+
isEnabledForToolRouter: zod_v3.z.boolean().optional(),
|
|
106
108
|
restrictToFollowingTools: zod_v3.z.array(zod_v3.z.string()).optional(),
|
|
107
109
|
isComposioManaged: zod_v3.z.boolean().optional(),
|
|
108
110
|
createdBy: zod_v3.z.string().optional(),
|
|
@@ -122,14 +124,19 @@ const AuthConfigListResponseSchema = zod_v3.z.object({
|
|
|
122
124
|
totalPages: zod_v3.z.number()
|
|
123
125
|
});
|
|
124
126
|
const AuthCustomConfigUpdateParamsSchema = zod_v3.z.object({
|
|
125
|
-
credentials: zod_v3.z.record(zod_v3.z.string(), zod_v3.z.union([zod_v3.z.string(), zod_v3.z.unknown()])),
|
|
126
127
|
type: zod_v3.z.literal("custom"),
|
|
128
|
+
credentials: zod_v3.z.object({
|
|
129
|
+
scopes: zod_v3.z.union([zod_v3.z.string(), zod_v3.z.array(zod_v3.z.string())]).optional(),
|
|
130
|
+
user_scopes: zod_v3.z.union([zod_v3.z.string(), zod_v3.z.array(zod_v3.z.string())]).optional()
|
|
131
|
+
}).passthrough().optional(),
|
|
132
|
+
isEnabledForToolRouter: zod_v3.z.boolean().optional(),
|
|
127
133
|
restrictToFollowingTools: zod_v3.z.array(zod_v3.z.string()).optional(),
|
|
128
134
|
toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
|
|
129
135
|
});
|
|
130
136
|
const AuthDefaultConfigUpdateParamsSchema = zod_v3.z.object({
|
|
131
|
-
scopes: zod_v3.z.string().optional(),
|
|
132
137
|
type: zod_v3.z.literal("default"),
|
|
138
|
+
scopes: zod_v3.z.string().optional(),
|
|
139
|
+
isEnabledForToolRouter: zod_v3.z.boolean().optional(),
|
|
133
140
|
restrictToFollowingTools: zod_v3.z.array(zod_v3.z.string()).optional(),
|
|
134
141
|
toolAccessConfig: AuthConfigToolAccessConfigSchema.optional()
|
|
135
142
|
});
|
|
@@ -2765,6 +2772,7 @@ function transformAuthConfigRetrieveResponse(authConfig) {
|
|
|
2765
2772
|
logo: authConfig$1.toolkit.logo,
|
|
2766
2773
|
slug: authConfig$1.toolkit.slug
|
|
2767
2774
|
},
|
|
2775
|
+
isEnabledForToolRouter: authConfig$1.is_enabled_for_tool_router,
|
|
2768
2776
|
uuid: authConfig$1.uuid,
|
|
2769
2777
|
authScheme: authConfig$1.auth_scheme,
|
|
2770
2778
|
credentials: authConfig$1.credentials,
|
|
@@ -2903,6 +2911,7 @@ var AuthConfigs = class {
|
|
|
2903
2911
|
name: parsedOptions.data.name,
|
|
2904
2912
|
authScheme: parsedOptions.data.authScheme,
|
|
2905
2913
|
credentials: parsedOptions.data.credentials,
|
|
2914
|
+
is_enabled_for_tool_router: parsedOptions.data.isEnabledForToolRouter,
|
|
2906
2915
|
proxy_config: parsedOptions.data.proxyConfig ? {
|
|
2907
2916
|
proxy_url: parsedOptions.data.proxyConfig.proxyUrl,
|
|
2908
2917
|
proxy_auth_key: parsedOptions.data.proxyConfig.proxyAuthKey
|
|
@@ -2912,6 +2921,7 @@ var AuthConfigs = class {
|
|
|
2912
2921
|
type: parsedOptions.data.type,
|
|
2913
2922
|
credentials: parsedOptions.data.credentials,
|
|
2914
2923
|
name: parsedOptions.data.name,
|
|
2924
|
+
is_enabled_for_tool_router: parsedOptions.data.isEnabledForToolRouter,
|
|
2915
2925
|
tool_access_config: parsedOptions.data.toolAccessConfig ? { tools_for_connected_account_creation: parsedOptions.data.toolAccessConfig.toolsForConnectedAccountCreation } : void 0
|
|
2916
2926
|
}
|
|
2917
2927
|
}));
|
|
@@ -2974,6 +2984,7 @@ var AuthConfigs = class {
|
|
|
2974
2984
|
return this.client.authConfigs.update(nanoid, parsedData.data.type === "custom" ? {
|
|
2975
2985
|
type: "custom",
|
|
2976
2986
|
credentials: parsedData.data.credentials,
|
|
2987
|
+
is_enabled_for_tool_router: parsedData.data.isEnabledForToolRouter,
|
|
2977
2988
|
tool_access_config: {
|
|
2978
2989
|
tools_for_connected_account_creation: parsedData.data.toolAccessConfig?.toolsForConnectedAccountCreation,
|
|
2979
2990
|
tools_available_for_execution: parsedData.data.toolAccessConfig?.toolsAvailableForExecution ?? parsedData.data.restrictToFollowingTools
|
|
@@ -2981,6 +2992,7 @@ var AuthConfigs = class {
|
|
|
2981
2992
|
} : {
|
|
2982
2993
|
type: "default",
|
|
2983
2994
|
scopes: parsedData.data.scopes,
|
|
2995
|
+
is_enabled_for_tool_router: parsedData.data.isEnabledForToolRouter,
|
|
2984
2996
|
tool_access_config: {
|
|
2985
2997
|
tools_for_connected_account_creation: parsedData.data.toolAccessConfig?.toolsForConnectedAccountCreation,
|
|
2986
2998
|
tools_available_for_execution: parsedData.data.toolAccessConfig?.toolsAvailableForExecution ?? parsedData.data.restrictToFollowingTools
|
|
@@ -5626,7 +5638,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
5626
5638
|
|
|
5627
5639
|
//#endregion
|
|
5628
5640
|
//#region package.json
|
|
5629
|
-
var version = "0.5.
|
|
5641
|
+
var version = "0.5.1";
|
|
5630
5642
|
|
|
5631
5643
|
//#endregion
|
|
5632
5644
|
//#region src/utils/session.ts
|