Skip to content

JS SDK - v0.5.0

Compare
Choose a tag to compare
@himanshu-dixit himanshu-dixit released this 02 Jan 07:20
· 29 commits to master since this release
27df7e5

🌟 New Features

πŸ› οΈ Toolset Enhancements:

  • πŸ“‚ Exposed ComposioToolset in index.ts.
  • πŸ›ŽοΈ Added new method getTriggerInfo and getTriggerConfig to trigger.
  • πŸ“Œ Exposed .apps, .actions, .triggers, and .connectedAccounts in toolset classes.

🚨 Error Handling:

  • πŸ›‘ All errors are now instances of ComposioError for improved consistency.
  • πŸ› Added error.error_code for better debugging.
  • πŸ”§ Backend (BE) errors now include more helpful error messages.

⚑ Performance Improvements:

  • πŸ“‰ Decreased bundle size significantly from 10MB to 400KB.

πŸ–ΌοΈ Framework Support:

  • πŸ–₯️ Added support for frontend (FE) frameworks and resolved issues with React server components.

πŸ”’ Type Safety and Validation:

  • βœ… Improved type safety and early validation using Zod.

πŸ› οΈ Enhanced codebase types for better developer experience.

  • ✍️ Improved format for PreProcessor, PostProcessor, and SchemaProcessor.

πŸ”„ Method Improvements:

  • πŸ”§ Enhanced method consistency across the codebase.
  • πŸ“œ New API Client with types.
  • πŸ“š New JS Docs for methods.

⚠️ Breaking Changes

πŸ–₯️ Remove Workspace Support:

  • πŸ—‘οΈ Support for local and Docker workspaces was removed.
    🏷️ Type Name Changes:
  • πŸ”„ Updated type names associated with models. Types are now more robust and can be inferred directly from methods.
    πŸ“– Refer to updated methods for adjustments. Inferred should still be the same.
  • πŸ› οΈ toolset.createAction change: params -> inputParams and response. Migration code
 await toolset.createAction({
        ...
         params: z.object({
            name: z.string().optional()
        }),
        callback: async () => {
            return "Hello World from the function";
        }
    });

to

   await toolset.createAction({
       ...
        inputParams: z.object({
            name: z.string().optional()
        }),
        callback: async (params) => {
            const { name } = params;
            return {
                successful: true,
                data: {
                    name: name || "World"
                }
            }
        }
    });