@devries-cameron20 / composio-1 / commits / f4b2c8f9f
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Update toolkitSlugs -> toolkit

haxzie committed May 21, 2025 at 20:29 UTC f4b2c8f9f4fb7d69fb9c5267d5302ba7545f0ed6
3 files changed +30 -28
docs/api/auth-configs.md
+27 -25
@@ -14,7 +14,7 @@ const allAuthConfigs = await composio.authConfigs.list();
14
15 // List auth configs for a specific toolkit
16 const githubAuthConfigs = await composio.authConfigs.list({
17 - toolkitSlug: 'github'
17 + toolkit: 'github',
18 });
19 ```
20
@@ -44,7 +44,7 @@ console.log(authConfig.name); // Name of the auth config
44
45 **Throws:** ComposioAuthConfigNotFoundError if the auth config cannot be found
46
47 -### create(toolkitSlug, data)
47 +### create(toolkit, data)
48
49 Creates a new auth config for a toolkit.
50
@@ -58,12 +58,13 @@ const authConfig = await composio.authConfigs.create('github', {
58
59 **Parameters:**
60
61 -- `toolkitSlug` (string): The slug of the toolkit to create an auth config for
61 +- `toolkit` (string): The slug of the toolkit to create an auth config for
62 - `data` (AuthConfigCreateParams): The parameters for creating the auth config
63
64 **Returns:** Promise<AuthConfigCreateResponse> - The created auth config
65
66 **Throws:**
67 +
68 - ValidationError if the parameters fail validation
69 - ComposioToolNotFoundError if the toolkit cannot be found
70
@@ -114,10 +115,10 @@ await composio.authConfigs.delete('auth_config_123');
115
116 ```typescript
117 interface AuthConfigListParams {
117 - cursor?: string; // Pagination cursor
118 - limit?: number; // Limit the number of results
119 - orderBy?: string; // Order by field
120 - toolkitSlug?: string; // Filter by toolkit slug
118 + cursor?: string; // Pagination cursor
119 + limit?: number; // Limit the number of results
120 + orderBy?: string; // Order by field
121 + toolkit?: string; // Filter by toolkit slug
122 }
123 ```
124
@@ -126,8 +127,8 @@ interface AuthConfigListParams {
127 ```typescript
128 interface AuthConfigListResponse {
129 items: AuthConfigRetrieveResponse[]; // List of auth configs
129 - nextCursor: string | null; // Pagination cursor
130 - totalPages: number; // Total number of pages
130 + nextCursor: string | null; // Pagination cursor
131 + totalPages: number; // Total number of pages
132 }
133 ```
134
@@ -135,20 +136,21 @@ interface AuthConfigListResponse {
136
137 ```typescript
138 interface AuthConfigRetrieveResponse {
138 - id: string; // Auth config ID
139 - name: string; // Name of the auth config
140 - type: AuthConfigType; // Type of auth config
141 - toolkit: { // Associated toolkit
142 - id: string; // Toolkit ID
143 - slug: string; // Toolkit slug
144 - name: string; // Toolkit name
139 + id: string; // Auth config ID
140 + name: string; // Name of the auth config
141 + type: AuthConfigType; // Type of auth config
142 + toolkit: {
143 + // Associated toolkit
144 + id: string; // Toolkit ID
145 + slug: string; // Toolkit slug
146 + name: string; // Toolkit name
147 };
148 authScheme: AuthSchemeType; // Auth scheme (e.g., 'oauth2', 'api_key')
147 - isDisabled: boolean; // Whether the auth config is disabled
149 + isDisabled: boolean; // Whether the auth config is disabled
150 fields: Record<string, unknown>; // Configuration fields
151 meta: Record<string, unknown>; // Additional metadata
150 - createdAt: string; // Creation timestamp
151 - updatedAt: string; // Last update timestamp
152 + createdAt: string; // Creation timestamp
153 + updatedAt: string; // Last update timestamp
154 }
155 ```
156
@@ -156,9 +158,9 @@ interface AuthConfigRetrieveResponse {
158
159 ```typescript
160 interface AuthConfigCreateParams {
159 - type: AuthConfigType; // Type of auth config
160 - name: string; // Name of the auth config
161 - fields?: Record<string, unknown>; // Configuration fields
161 + type: AuthConfigType; // Type of auth config
162 + name: string; // Name of the auth config
163 + fields?: Record<string, unknown>; // Configuration fields
164 }
165 ```
166
@@ -166,8 +168,8 @@ interface AuthConfigCreateParams {
168
169 ```typescript
170 interface AuthConfigUpdateParams {
169 - name?: string; // Name of the auth config
170 - fields?: Record<string, unknown>; // Configuration fields
171 + name?: string; // Name of the auth config
172 + fields?: Record<string, unknown>; // Configuration fields
173 }
174 ```
175
@@ -197,4 +199,4 @@ enum AuthSchemeTypes {
199 CUSTOM = 'custom',
200 NO_AUTH = 'no_auth',
201 }
200 -```
\ No newline at end of file
202 +```
packages/core/src/models/AuthConfigs.ts
+2 -2
@@ -107,7 +107,7 @@ export class AuthConfigs {
107 *
108 * // List auth configs for a specific toolkit
109 * const githubConfigs = await composio.authConfigs.list({
110 - * toolkitSlug: 'github'
110 + * toolkit: 'github'
111 * });
112 *
113 * // List Composio-managed auth configs
@@ -122,7 +122,7 @@ export class AuthConfigs {
122 cursor: parsedQuery?.cursor,
123 is_composio_managed: parsedQuery?.isComposioManaged,
124 limit: parsedQuery?.limit?.toString(),
125 - toolkit_slug: parsedQuery?.toolkitSlug,
125 + toolkit_slug: parsedQuery?.toolkit,
126 });
127 const parsedResult = AuthConfigListResponseSchema.safeParse({
128 items: result.items.map(item => this.parseAuthConfigRetrieveResponse(item)),
packages/core/src/types/authConfigs.types.ts
+1 -1
@@ -93,7 +93,7 @@ export const AuthConfigListParamsSchema = z.object({
93 cursor: z.string().optional(),
94 isComposioManaged: z.boolean().optional(),
95 limit: z.number().optional(),
96 - toolkitSlug: z.string().optional(),
96 + toolkit: z.string().optional(),
97 });
98 export type AuthConfigListParams = z.infer<typeof AuthConfigListParamsSchema>;
99