@composio/client 0.1.0-alpha.8 → 2.0.0-rc.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 +32 -354
- package/dist/api-key-revocation-BZL5FAx7.mjs +24 -0
- package/dist/auth-CEq4JqWm.mjs +17 -0
- package/dist/auth-configs-CyksMqNB.mjs +48 -0
- package/dist/clanker-4wByThQJ.mjs +23 -0
- package/dist/cli-Bi4_ORQO.mjs +45 -0
- package/dist/client-CK6bm7nf.d.mts +22777 -0
- package/dist/config-BLBbhLe1.mjs +10 -0
- package/dist/config-DnyMhILW.d.mts +9 -0
- package/dist/connected-accounts-B-qN_yLT.mjs +67 -0
- package/dist/consumer-DWlaGBmh.mjs +34 -0
- package/dist/custom-BQWoONFY.mjs +22 -0
- package/dist/files-B-UnEejx.mjs +29 -0
- package/dist/files-CNZ-ttVS.mjs +45 -0
- package/dist/generate-DSqfJENZ.mjs +22 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +1091 -0
- package/dist/link-CukKZMxs.mjs +22 -0
- package/dist/logs-B87z4hq7.mjs +36 -0
- package/dist/manage-By-b66OH.mjs +26 -0
- package/dist/mcp-B0wla_93.mjs +73 -0
- package/dist/migration-CBhnoN-Y.mjs +10 -0
- package/dist/migration-CKGKuRO3.d.mts +9 -0
- package/dist/org-BSq_z6fP.mjs +44 -0
- package/dist/owner-BDkEFEVF.mjs +17 -0
- package/dist/project-C0h91WGF.mjs +42 -0
- package/dist/project-Cj-NKnWZ.mjs +24 -0
- package/dist/project-D-c0Zrrl.mjs +22 -0
- package/dist/project-_s0fWHut.mjs +29 -0
- package/dist/realtime-BcHoYszT.mjs +26 -0
- package/dist/request-DwPfYYNF.mjs +1203 -0
- package/dist/resources/api-key-revocation.d.mts +2 -0
- package/dist/resources/api-key-revocation.mjs +3 -0
- package/dist/resources/auth/auth.d.mts +2 -0
- package/dist/resources/auth/auth.mjs +3 -0
- package/dist/resources/auth/index.d.mts +2 -0
- package/dist/resources/auth/index.mjs +4 -0
- package/dist/resources/auth/session.d.mts +2 -0
- package/dist/resources/auth/session.mjs +3 -0
- package/dist/resources/auth-configs.d.mts +2 -0
- package/dist/resources/auth-configs.mjs +3 -0
- package/dist/resources/auth.d.mts +2 -0
- package/dist/resources/auth.mjs +5 -0
- package/dist/resources/cli/cli.d.mts +2 -0
- package/dist/resources/cli/cli.mjs +3 -0
- package/dist/resources/cli/index.d.mts +2 -0
- package/dist/resources/cli/index.mjs +4 -0
- package/dist/resources/cli/realtime.d.mts +2 -0
- package/dist/resources/cli/realtime.mjs +3 -0
- package/dist/resources/cli.d.mts +2 -0
- package/dist/resources/cli.mjs +5 -0
- package/dist/resources/connected-accounts.d.mts +2 -0
- package/dist/resources/connected-accounts.mjs +3 -0
- package/dist/resources/files.d.mts +2 -0
- package/dist/resources/files.mjs +3 -0
- package/dist/resources/index.d.mts +3 -0
- package/dist/resources/index.mjs +16 -0
- package/dist/resources/link.d.mts +2 -0
- package/dist/resources/link.mjs +3 -0
- package/dist/resources/logs/index.d.mts +2 -0
- package/dist/resources/logs/index.mjs +5 -0
- package/dist/resources/logs/logs.d.mts +2 -0
- package/dist/resources/logs/logs.mjs +3 -0
- package/dist/resources/logs/tools.d.mts +2 -0
- package/dist/resources/logs/tools.mjs +3 -0
- package/dist/resources/logs/triggers.d.mts +2 -0
- package/dist/resources/logs/triggers.mjs +3 -0
- package/dist/resources/logs.d.mts +2 -0
- package/dist/resources/logs.mjs +6 -0
- package/dist/resources/mcp/custom.d.mts +2 -0
- package/dist/resources/mcp/custom.mjs +3 -0
- package/dist/resources/mcp/generate.d.mts +2 -0
- package/dist/resources/mcp/generate.mjs +3 -0
- package/dist/resources/mcp/index.d.mts +2 -0
- package/dist/resources/mcp/index.mjs +5 -0
- package/dist/resources/mcp/mcp.d.mts +2 -0
- package/dist/resources/mcp/mcp.mjs +3 -0
- package/dist/resources/mcp.d.mts +2 -0
- package/dist/resources/mcp.mjs +6 -0
- package/dist/resources/migration.d.mts +2 -0
- package/dist/resources/migration.mjs +3 -0
- package/dist/resources/org/clanker.d.mts +2 -0
- package/dist/resources/org/clanker.mjs +3 -0
- package/dist/resources/org/consumer/consumer.d.mts +2 -0
- package/dist/resources/org/consumer/consumer.mjs +3 -0
- package/dist/resources/org/consumer/index.d.mts +2 -0
- package/dist/resources/org/consumer/index.mjs +4 -0
- package/dist/resources/org/consumer/project.d.mts +2 -0
- package/dist/resources/org/consumer/project.mjs +3 -0
- package/dist/resources/org/consumer.d.mts +2 -0
- package/dist/resources/org/consumer.mjs +5 -0
- package/dist/resources/org/index.d.mts +2 -0
- package/dist/resources/org/index.mjs +8 -0
- package/dist/resources/org/org.d.mts +2 -0
- package/dist/resources/org/org.mjs +3 -0
- package/dist/resources/org/owner/index.d.mts +2 -0
- package/dist/resources/org/owner/index.mjs +4 -0
- package/dist/resources/org/owner/owner.d.mts +2 -0
- package/dist/resources/org/owner/owner.mjs +3 -0
- package/dist/resources/org/owner/project.d.mts +2 -0
- package/dist/resources/org/owner/project.mjs +3 -0
- package/dist/resources/org/owner.d.mts +2 -0
- package/dist/resources/org/owner.mjs +5 -0
- package/dist/resources/org/project.d.mts +2 -0
- package/dist/resources/org/project.mjs +3 -0
- package/dist/resources/org/usage.d.mts +2 -0
- package/dist/resources/org/usage.mjs +3 -0
- package/dist/resources/org.d.mts +2 -0
- package/dist/resources/org.mjs +9 -0
- package/dist/resources/project/config.d.mts +2 -0
- package/dist/resources/project/config.mjs +3 -0
- package/dist/resources/project/index.d.mts +3 -0
- package/dist/resources/project/index.mjs +4 -0
- package/dist/resources/project/project.d.mts +2 -0
- package/dist/resources/project/project.mjs +3 -0
- package/dist/resources/project/usage.d.mts +2 -0
- package/dist/resources/project/usage.mjs +3 -0
- package/dist/resources/project.d.mts +3 -0
- package/dist/resources/project.mjs +5 -0
- package/dist/resources/tool-router/index.d.mts +2 -0
- package/dist/resources/tool-router/index.mjs +4 -0
- package/dist/resources/tool-router/session/files.d.mts +2 -0
- package/dist/resources/tool-router/session/files.mjs +3 -0
- package/dist/resources/tool-router/session/index.d.mts +2 -0
- package/dist/resources/tool-router/session/index.mjs +4 -0
- package/dist/resources/tool-router/session/session.d.mts +2 -0
- package/dist/resources/tool-router/session/session.mjs +3 -0
- package/dist/resources/tool-router/session.d.mts +2 -0
- package/dist/resources/tool-router/session.mjs +5 -0
- package/dist/resources/tool-router/tool-router.d.mts +2 -0
- package/dist/resources/tool-router/tool-router.mjs +3 -0
- package/dist/resources/tool-router.d.mts +2 -0
- package/dist/resources/tool-router.mjs +5 -0
- package/dist/resources/toolkits.d.mts +2 -0
- package/dist/resources/toolkits.mjs +3 -0
- package/dist/resources/tools.d.mts +2 -0
- package/dist/resources/tools.mjs +3 -0
- package/dist/resources/trigger-instances/index.d.mts +2 -0
- package/dist/resources/trigger-instances/index.mjs +4 -0
- package/dist/resources/trigger-instances/manage.d.mts +2 -0
- package/dist/resources/trigger-instances/manage.mjs +3 -0
- package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -0
- package/dist/resources/trigger-instances/trigger-instances.mjs +3 -0
- package/dist/resources/trigger-instances.d.mts +2 -0
- package/dist/resources/trigger-instances.mjs +5 -0
- package/dist/resources/triggers-types.d.mts +2 -0
- package/dist/resources/triggers-types.mjs +3 -0
- package/dist/resources/webhook-endpoints.d.mts +2 -0
- package/dist/resources/webhook-endpoints.mjs +3 -0
- package/dist/resources/webhook-subscriptions.d.mts +2 -0
- package/dist/resources/webhook-subscriptions.mjs +3 -0
- package/dist/session-DNm4GFO-.mjs +21 -0
- package/dist/session-Do3wHYNe.mjs +97 -0
- package/dist/tool-router-5OfsPkJ_.mjs +14 -0
- package/dist/toolkits-CcE90C2S.mjs +43 -0
- package/dist/tools-B5uEInC8.mjs +30 -0
- package/dist/tools-CdVgfSpk.mjs +63 -0
- package/dist/trigger-instances-lkKWqHgd.mjs +33 -0
- package/dist/triggers-DNx9yjbS.mjs +26 -0
- package/dist/triggers-types-MjEcrPbH.mjs +31 -0
- package/dist/usage-CKyu9RzD.mjs +29 -0
- package/dist/usage-Cv9VNy5H.mjs +29 -0
- package/dist/webhook-endpoints-DIyg3YlR.mjs +46 -0
- package/dist/webhook-subscriptions-B7AgTACq.mjs +48 -0
- package/package.json +73 -129
- package/CHANGELOG.md +0 -82
- package/LICENSE +0 -201
- package/api-promise.d.mts +0 -2
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -2
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -19
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -2
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -224
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -224
- package/client.d.ts.map +0 -1
- package/client.js +0 -502
- package/client.js.map +0 -1
- package/client.mjs +0 -475
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -47
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -47
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -84
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -80
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -47
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -47
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -113
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -97
- package/core/error.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -11
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -7
- package/core/resource.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -2
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -2
- package/error.d.ts.map +0 -1
- package/error.js +0 -19
- package/error.js.map +0 -1
- package/error.mjs +0 -2
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -6
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -6
- package/index.d.ts.map +0 -1
- package/index.js +0 -30
- package/index.js.map +0 -1
- package/index.mjs +0 -7
- package/index.mjs.map +0 -1
- package/internal/builtin-types.d.mts +0 -75
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -75
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -4
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -3
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -162
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -157
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -41
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -36
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -21
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -21
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -77
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -72
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -13
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -13
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -36
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -32
- package/internal/parse.mjs.map +0 -1
- package/internal/qs/formats.d.mts +0 -6
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/formats.d.ts +0 -6
- package/internal/qs/formats.d.ts.map +0 -1
- package/internal/qs/formats.js +0 -11
- package/internal/qs/formats.js.map +0 -1
- package/internal/qs/formats.mjs +0 -8
- package/internal/qs/formats.mjs.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/index.d.ts +0 -10
- package/internal/qs/index.d.ts.map +0 -1
- package/internal/qs/index.js +0 -14
- package/internal/qs/index.js.map +0 -1
- package/internal/qs/index.mjs +0 -10
- package/internal/qs/index.mjs.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/stringify.d.ts +0 -3
- package/internal/qs/stringify.d.ts.map +0 -1
- package/internal/qs/stringify.js +0 -280
- package/internal/qs/stringify.js.map +0 -1
- package/internal/qs/stringify.mjs +0 -276
- package/internal/qs/stringify.mjs.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/types.d.ts +0 -57
- package/internal/qs/types.d.ts.map +0 -1
- package/internal/qs/types.js +0 -3
- package/internal/qs/types.js.map +0 -1
- package/internal/qs/types.mjs +0 -2
- package/internal/qs/types.mjs.map +0 -1
- package/internal/qs/utils.d.mts +0 -14
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/qs/utils.d.ts +0 -14
- package/internal/qs/utils.d.ts.map +0 -1
- package/internal/qs/utils.js +0 -229
- package/internal/qs/utils.js.map +0 -1
- package/internal/qs/utils.mjs +0 -217
- package/internal/qs/utils.mjs.map +0 -1
- package/internal/request-options.d.mts +0 -33
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -33
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -14
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -10
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -28
- package/internal/shim-types.d.ts +0 -28
- package/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -23
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -23
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -71
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -67
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/internal/shims.d.mts +0 -20
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -20
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -93
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -85
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -46
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -46
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -87
- package/internal/to-file.mjs.map +0 -1
- package/internal/types.d.mts +0 -68
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -68
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -4
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -3
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -44
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -44
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -131
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -122
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -33
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -28
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -22
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -18
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -38
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -38
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -58
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -53
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -7
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -3
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -20
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -16
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -16
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -16
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -109
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -92
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -7
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -7
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -24
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -8
- package/internal/utils.mjs.map +0 -1
- package/resource.d.mts +0 -2
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -2
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -19
- package/resource.js.map +0 -1
- package/resource.mjs +0 -2
- package/resource.mjs.map +0 -1
- package/resources/action-execution.d.mts +0 -155
- package/resources/action-execution.d.mts.map +0 -1
- package/resources/action-execution.d.ts +0 -155
- package/resources/action-execution.d.ts.map +0 -1
- package/resources/action-execution.js +0 -19
- package/resources/action-execution.js.map +0 -1
- package/resources/action-execution.mjs +0 -15
- package/resources/action-execution.mjs.map +0 -1
- package/resources/auth/auth.d.mts +0 -10
- package/resources/auth/auth.d.mts.map +0 -1
- package/resources/auth/auth.d.ts +0 -10
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js +0 -39
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs +0 -12
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/index.d.mts +0 -3
- package/resources/auth/index.d.mts.map +0 -1
- package/resources/auth/index.d.ts +0 -3
- package/resources/auth/index.d.ts.map +0 -1
- package/resources/auth/index.js +0 -9
- package/resources/auth/index.js.map +0 -1
- package/resources/auth/index.mjs +0 -4
- package/resources/auth/index.mjs.map +0 -1
- package/resources/auth/session.d.mts +0 -75
- package/resources/auth/session.d.mts.map +0 -1
- package/resources/auth/session.d.ts +0 -75
- package/resources/auth/session.d.ts.map +0 -1
- package/resources/auth/session.js +0 -12
- package/resources/auth/session.js.map +0 -1
- package/resources/auth/session.mjs +0 -8
- package/resources/auth/session.mjs.map +0 -1
- package/resources/auth-configs.d.mts +0 -217
- package/resources/auth-configs.d.mts.map +0 -1
- package/resources/auth-configs.d.ts +0 -217
- package/resources/auth-configs.d.ts.map +0 -1
- package/resources/auth-configs.js +0 -29
- package/resources/auth-configs.js.map +0 -1
- package/resources/auth-configs.mjs +0 -25
- package/resources/auth-configs.mjs.map +0 -1
- package/resources/auth.d.mts +0 -2
- package/resources/auth.d.mts.map +0 -1
- package/resources/auth.d.ts +0 -2
- package/resources/auth.d.ts.map +0 -1
- package/resources/auth.js +0 -19
- package/resources/auth.js.map +0 -1
- package/resources/auth.mjs +0 -3
- package/resources/auth.mjs.map +0 -1
- package/resources/cli.d.mts +0 -124
- package/resources/cli.d.mts.map +0 -1
- package/resources/cli.d.ts +0 -124
- package/resources/cli.d.ts.map +0 -1
- package/resources/cli.js +0 -18
- package/resources/cli.js.map +0 -1
- package/resources/cli.mjs +0 -14
- package/resources/cli.mjs.map +0 -1
- package/resources/connected-accounts.d.mts +0 -449
- package/resources/connected-accounts.d.mts.map +0 -1
- package/resources/connected-accounts.d.ts +0 -449
- package/resources/connected-accounts.d.ts.map +0 -1
- package/resources/connected-accounts.js +0 -28
- package/resources/connected-accounts.js.map +0 -1
- package/resources/connected-accounts.mjs +0 -24
- package/resources/connected-accounts.mjs.map +0 -1
- package/resources/index.d.mts +0 -14
- package/resources/index.d.mts.map +0 -1
- package/resources/index.d.ts +0 -14
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -31
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -15
- package/resources/index.mjs.map +0 -1
- package/resources/mcp/command.d.mts +0 -34
- package/resources/mcp/command.d.mts.map +0 -1
- package/resources/mcp/command.d.ts +0 -34
- package/resources/mcp/command.d.ts.map +0 -1
- package/resources/mcp/command.js +0 -12
- package/resources/mcp/command.js.map +0 -1
- package/resources/mcp/command.mjs +0 -8
- package/resources/mcp/command.mjs.map +0 -1
- package/resources/mcp/index.d.mts +0 -3
- package/resources/mcp/index.d.mts.map +0 -1
- package/resources/mcp/index.d.ts +0 -3
- package/resources/mcp/index.d.ts.map +0 -1
- package/resources/mcp/index.js +0 -9
- package/resources/mcp/index.js.map +0 -1
- package/resources/mcp/index.mjs +0 -4
- package/resources/mcp/index.mjs.map +0 -1
- package/resources/mcp/mcp.d.mts +0 -378
- package/resources/mcp/mcp.d.mts.map +0 -1
- package/resources/mcp/mcp.d.ts +0 -378
- package/resources/mcp/mcp.d.ts.map +0 -1
- package/resources/mcp/mcp.js +0 -66
- package/resources/mcp/mcp.js.map +0 -1
- package/resources/mcp/mcp.mjs +0 -39
- package/resources/mcp/mcp.mjs.map +0 -1
- package/resources/mcp.d.mts +0 -2
- package/resources/mcp.d.mts.map +0 -1
- package/resources/mcp.d.ts +0 -2
- package/resources/mcp.d.ts.map +0 -1
- package/resources/mcp.js +0 -19
- package/resources/mcp.js.map +0 -1
- package/resources/mcp.mjs +0 -3
- package/resources/mcp.mjs.map +0 -1
- package/resources/org/api-key.d.mts +0 -17
- package/resources/org/api-key.d.mts.map +0 -1
- package/resources/org/api-key.d.ts +0 -17
- package/resources/org/api-key.d.ts.map +0 -1
- package/resources/org/api-key.js +0 -15
- package/resources/org/api-key.js.map +0 -1
- package/resources/org/api-key.mjs +0 -11
- package/resources/org/api-key.mjs.map +0 -1
- package/resources/org/index.d.mts +0 -4
- package/resources/org/index.d.mts.map +0 -1
- package/resources/org/index.d.ts +0 -4
- package/resources/org/index.d.ts.map +0 -1
- package/resources/org/index.js +0 -11
- package/resources/org/index.js.map +0 -1
- package/resources/org/index.mjs +0 -5
- package/resources/org/index.mjs.map +0 -1
- package/resources/org/org.d.mts +0 -14
- package/resources/org/org.d.mts.map +0 -1
- package/resources/org/org.d.ts +0 -14
- package/resources/org/org.d.ts.map +0 -1
- package/resources/org/org.js +0 -43
- package/resources/org/org.js.map +0 -1
- package/resources/org/org.mjs +0 -16
- package/resources/org/org.mjs.map +0 -1
- package/resources/org/project/api-keys.d.mts +0 -109
- package/resources/org/project/api-keys.d.mts.map +0 -1
- package/resources/org/project/api-keys.d.ts +0 -109
- package/resources/org/project/api-keys.d.ts.map +0 -1
- package/resources/org/project/api-keys.js +0 -23
- package/resources/org/project/api-keys.js.map +0 -1
- package/resources/org/project/api-keys.mjs +0 -19
- package/resources/org/project/api-keys.mjs.map +0 -1
- package/resources/org/project/index.d.mts +0 -5
- package/resources/org/project/index.d.mts.map +0 -1
- package/resources/org/project/index.d.ts +0 -5
- package/resources/org/project/index.d.ts.map +0 -1
- package/resources/org/project/index.js +0 -13
- package/resources/org/project/index.js.map +0 -1
- package/resources/org/project/index.mjs +0 -6
- package/resources/org/project/index.mjs.map +0 -1
- package/resources/org/project/project.d.mts +0 -90
- package/resources/org/project/project.d.mts.map +0 -1
- package/resources/org/project/project.d.ts +0 -90
- package/resources/org/project/project.d.ts.map +0 -1
- package/resources/org/project/project.js +0 -60
- package/resources/org/project/project.js.map +0 -1
- package/resources/org/project/project.mjs +0 -33
- package/resources/org/project/project.mjs.map +0 -1
- package/resources/org/project/trigger.d.mts +0 -51
- package/resources/org/project/trigger.d.mts.map +0 -1
- package/resources/org/project/trigger.d.ts +0 -51
- package/resources/org/project/trigger.d.ts.map +0 -1
- package/resources/org/project/trigger.js +0 -16
- package/resources/org/project/trigger.js.map +0 -1
- package/resources/org/project/trigger.mjs +0 -12
- package/resources/org/project/trigger.mjs.map +0 -1
- package/resources/org/project/webhook.d.mts +0 -92
- package/resources/org/project/webhook.d.mts.map +0 -1
- package/resources/org/project/webhook.d.ts +0 -92
- package/resources/org/project/webhook.d.ts.map +0 -1
- package/resources/org/project/webhook.js +0 -24
- package/resources/org/project/webhook.js.map +0 -1
- package/resources/org/project/webhook.mjs +0 -20
- package/resources/org/project/webhook.mjs.map +0 -1
- package/resources/org/project.d.mts +0 -2
- package/resources/org/project.d.mts.map +0 -1
- package/resources/org/project.d.ts +0 -2
- package/resources/org/project.d.ts.map +0 -1
- package/resources/org/project.js +0 -19
- package/resources/org/project.js.map +0 -1
- package/resources/org/project.mjs +0 -3
- package/resources/org/project.mjs.map +0 -1
- package/resources/org.d.mts +0 -2
- package/resources/org.d.mts.map +0 -1
- package/resources/org.d.ts +0 -2
- package/resources/org.d.ts.map +0 -1
- package/resources/org.js +0 -19
- package/resources/org.js.map +0 -1
- package/resources/org.mjs +0 -3
- package/resources/org.mjs.map +0 -1
- package/resources/team-members.d.mts +0 -57
- package/resources/team-members.d.mts.map +0 -1
- package/resources/team-members.d.ts +0 -57
- package/resources/team-members.d.ts.map +0 -1
- package/resources/team-members.js +0 -22
- package/resources/team-members.js.map +0 -1
- package/resources/team-members.mjs +0 -18
- package/resources/team-members.mjs.map +0 -1
- package/resources/toolkits.d.mts +0 -141
- package/resources/toolkits.d.mts.map +0 -1
- package/resources/toolkits.d.ts +0 -141
- package/resources/toolkits.d.ts.map +0 -1
- package/resources/toolkits.js +0 -19
- package/resources/toolkits.js.map +0 -1
- package/resources/toolkits.mjs +0 -15
- package/resources/toolkits.mjs.map +0 -1
- package/resources/tools.d.mts +0 -168
- package/resources/tools.d.mts.map +0 -1
- package/resources/tools.d.ts +0 -168
- package/resources/tools.d.ts.map +0 -1
- package/resources/tools.js +0 -28
- package/resources/tools.js.map +0 -1
- package/resources/tools.mjs +0 -24
- package/resources/tools.mjs.map +0 -1
- package/resources/trigger-instances/handle.d.mts +0 -25
- package/resources/trigger-instances/handle.d.mts.map +0 -1
- package/resources/trigger-instances/handle.d.ts +0 -25
- package/resources/trigger-instances/handle.d.ts.map +0 -1
- package/resources/trigger-instances/handle.js +0 -18
- package/resources/trigger-instances/handle.js.map +0 -1
- package/resources/trigger-instances/handle.mjs +0 -14
- package/resources/trigger-instances/handle.mjs.map +0 -1
- package/resources/trigger-instances/index.d.mts +0 -3
- package/resources/trigger-instances/index.d.mts.map +0 -1
- package/resources/trigger-instances/index.d.ts +0 -3
- package/resources/trigger-instances/index.d.ts.map +0 -1
- package/resources/trigger-instances/index.js +0 -9
- package/resources/trigger-instances/index.js.map +0 -1
- package/resources/trigger-instances/index.mjs +0 -4
- package/resources/trigger-instances/index.mjs.map +0 -1
- package/resources/trigger-instances/trigger-instances.d.mts +0 -126
- package/resources/trigger-instances/trigger-instances.d.mts.map +0 -1
- package/resources/trigger-instances/trigger-instances.d.ts +0 -126
- package/resources/trigger-instances/trigger-instances.d.ts.map +0 -1
- package/resources/trigger-instances/trigger-instances.js +0 -53
- package/resources/trigger-instances/trigger-instances.js.map +0 -1
- package/resources/trigger-instances/trigger-instances.mjs +0 -26
- package/resources/trigger-instances/trigger-instances.mjs.map +0 -1
- package/resources/trigger-instances.d.mts +0 -2
- package/resources/trigger-instances.d.mts.map +0 -1
- package/resources/trigger-instances.d.ts +0 -2
- package/resources/trigger-instances.d.ts.map +0 -1
- package/resources/trigger-instances.js +0 -19
- package/resources/trigger-instances.js.map +0 -1
- package/resources/trigger-instances.mjs +0 -3
- package/resources/trigger-instances.mjs.map +0 -1
- package/resources/trigger.d.mts +0 -73
- package/resources/trigger.d.mts.map +0 -1
- package/resources/trigger.d.ts +0 -73
- package/resources/trigger.d.ts.map +0 -1
- package/resources/trigger.js +0 -12
- package/resources/trigger.js.map +0 -1
- package/resources/trigger.mjs +0 -8
- package/resources/trigger.mjs.map +0 -1
- package/resources/triggers-types.d.mts +0 -59
- package/resources/triggers-types.d.mts.map +0 -1
- package/resources/triggers-types.d.ts +0 -59
- package/resources/triggers-types.d.ts.map +0 -1
- package/resources/triggers-types.js +0 -19
- package/resources/triggers-types.js.map +0 -1
- package/resources/triggers-types.mjs +0 -15
- package/resources/triggers-types.mjs.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/resources.d.ts +0 -2
- package/resources.d.ts.map +0 -1
- package/resources.js +0 -18
- package/resources.js.map +0 -1
- package/resources.mjs +0 -2
- package/resources.mjs.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/client.ts +0 -938
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -92
- package/src/core/error.ts +0 -130
- package/src/core/resource.ts +0 -11
- package/src/core/uploads.ts +0 -2
- package/src/error.ts +0 -2
- package/src/index.ts +0 -22
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -93
- package/src/internal/detect-platform.ts +0 -196
- package/src/internal/errors.ts +0 -33
- package/src/internal/headers.ts +0 -96
- package/src/internal/parse.ts +0 -50
- package/src/internal/qs/LICENSE.md +0 -13
- package/src/internal/qs/README.md +0 -3
- package/src/internal/qs/formats.ts +0 -9
- package/src/internal/qs/index.ts +0 -13
- package/src/internal/qs/stringify.ts +0 -388
- package/src/internal/qs/types.ts +0 -71
- package/src/internal/qs/utils.ts +0 -265
- package/src/internal/request-options.ts +0 -37
- package/src/internal/shim-types.d.ts +0 -28
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -66
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
- package/src/internal/shims.ts +0 -107
- package/src/internal/to-file.ts +0 -152
- package/src/internal/types.ts +0 -92
- package/src/internal/uploads.ts +0 -175
- package/src/internal/utils/base64.ts +0 -37
- package/src/internal/utils/env.ts +0 -18
- package/src/internal/utils/log.ts +0 -127
- package/src/internal/utils/path.ts +0 -63
- package/src/internal/utils/sleep.ts +0 -3
- package/src/internal/utils/uuid.ts +0 -19
- package/src/internal/utils/values.ts +0 -102
- package/src/internal/utils.ts +0 -8
- package/src/lib/.keep +0 -4
- package/src/resource.ts +0 -2
- package/src/resources/action-execution.ts +0 -244
- package/src/resources/auth/auth.ts +0 -15
- package/src/resources/auth/index.ts +0 -4
- package/src/resources/auth/session.ts +0 -127
- package/src/resources/auth-configs.ts +0 -362
- package/src/resources/auth.ts +0 -3
- package/src/resources/cli.ts +0 -166
- package/src/resources/connected-accounts.ts +0 -661
- package/src/resources/index.ts +0 -105
- package/src/resources/mcp/command.ts +0 -47
- package/src/resources/mcp/index.ts +0 -17
- package/src/resources/mcp/mcp.ts +0 -519
- package/src/resources/mcp.ts +0 -3
- package/src/resources/org/api-key.ts +0 -30
- package/src/resources/org/index.ts +0 -12
- package/src/resources/org/org.ts +0 -39
- package/src/resources/org/project/api-keys.ts +0 -156
- package/src/resources/org/project/index.ts +0 -35
- package/src/resources/org/project/project.ts +0 -206
- package/src/resources/org/project/trigger.ts +0 -95
- package/src/resources/org/project/webhook.ts +0 -131
- package/src/resources/org/project.ts +0 -3
- package/src/resources/org.ts +0 -3
- package/src/resources/team-members.ts +0 -111
- package/src/resources/toolkits.ts +0 -232
- package/src/resources/tools.ts +0 -270
- package/src/resources/trigger-instances/handle.ts +0 -45
- package/src/resources/trigger-instances/index.ts +0 -19
- package/src/resources/trigger-instances/trigger-instances.ts +0 -202
- package/src/resources/trigger-instances.ts +0 -3
- package/src/resources/trigger.ts +0 -108
- package/src/resources/triggers-types.ts +0 -105
- package/src/resources.ts +0 -1
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -2
- package/src/version.ts +0 -1
- package/uploads.d.mts +0 -2
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -2
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -19
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -2
- package/uploads.mjs.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,373 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# composio-client
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
Composio API client for TypeScript, generated from the [v3.1 OpenAPI spec](https://staging-backend.composio.dev/api/v3.1/openapi.json) with [hey-api](https://heyapi.dev).
|
|
4
4
|
|
|
5
|
-
This
|
|
6
|
-
|
|
7
|
-
The REST API documentation can be found on [docs.composio.com](https://docs.composio.com). The full API of this library can be found in [api.md](api.md).
|
|
8
|
-
|
|
9
|
-
It is generated with [Stainless](https://www.stainless.com/).
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npm install @composio/client
|
|
15
|
-
```
|
|
5
|
+
This repo is the successor to the Stainless-generated [`@composio/client`](https://www.npmjs.com/package/@composio/client) (Stainless is sunsetting). Current scope: the full `/api/v3.1` surface — all 104 released operations — in **both** languages: TypeScript at the package root, and Python in [`python/`](./python/README.md) (PyPI takeover pending). Migration is tracked on the wayfinder map [UXE-152](https://linear.app/composio/issue/UXE-152).
|
|
16
6
|
|
|
17
7
|
## Usage
|
|
18
8
|
|
|
19
|
-
The
|
|
20
|
-
|
|
21
|
-
<!-- prettier-ignore -->
|
|
22
|
-
```js
|
|
23
|
-
import Composio from '@composio/client';
|
|
24
|
-
|
|
25
|
-
const client = new Composio({
|
|
26
|
-
apiKey: process.env['COMPOSIO_API_KEY'], // This is the default and can be omitted
|
|
27
|
-
environment: 'staging', // or 'production' | 'local'; defaults to 'production'
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function main() {
|
|
31
|
-
const response = await client.tools.execute('action');
|
|
32
|
-
|
|
33
|
-
console.log(response.log_id);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
main();
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Request & Response types
|
|
40
|
-
|
|
41
|
-
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
|
42
|
-
|
|
43
|
-
<!-- prettier-ignore -->
|
|
44
|
-
```ts
|
|
45
|
-
import Composio from '@composio/client';
|
|
46
|
-
|
|
47
|
-
const client = new Composio({
|
|
48
|
-
apiKey: process.env['COMPOSIO_API_KEY'], // This is the default and can be omitted
|
|
49
|
-
environment: 'staging', // or 'production' | 'local'; defaults to 'production'
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
async function main() {
|
|
53
|
-
const response: Composio.ToolExecuteResponse = await client.tools.execute('action');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
main();
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
60
|
-
|
|
61
|
-
## Handling errors
|
|
9
|
+
The package root is the Stainless-compatible drop-in surface: `new Composio({ apiKey })`, the Stainless type names, and throwing `APIPromise` semantics (shipped via UXE-163/UXE-164).
|
|
62
10
|
|
|
63
|
-
When the library is unable to connect to the API,
|
|
64
|
-
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
|
|
65
|
-
a subclass of `APIError` will be thrown:
|
|
66
|
-
|
|
67
|
-
<!-- prettier-ignore -->
|
|
68
11
|
```ts
|
|
69
|
-
|
|
70
|
-
const response = await client.tools.execute('action').catch(async (err) => {
|
|
71
|
-
if (err instanceof Composio.APIError) {
|
|
72
|
-
console.log(err.status); // 400
|
|
73
|
-
console.log(err.name); // BadRequestError
|
|
74
|
-
console.log(err.headers); // {server: 'nginx', ...}
|
|
75
|
-
} else {
|
|
76
|
-
throw err;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
main();
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Error codes are as followed:
|
|
85
|
-
|
|
86
|
-
| Status Code | Error Type |
|
|
87
|
-
| ----------- | -------------------------- |
|
|
88
|
-
| 400 | `BadRequestError` |
|
|
89
|
-
| 401 | `AuthenticationError` |
|
|
90
|
-
| 403 | `PermissionDeniedError` |
|
|
91
|
-
| 404 | `NotFoundError` |
|
|
92
|
-
| 422 | `UnprocessableEntityError` |
|
|
93
|
-
| 429 | `RateLimitError` |
|
|
94
|
-
| >=500 | `InternalServerError` |
|
|
95
|
-
| N/A | `APIConnectionError` |
|
|
96
|
-
|
|
97
|
-
### Retries
|
|
12
|
+
import Composio from '@composio/client'
|
|
98
13
|
|
|
99
|
-
|
|
100
|
-
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
101
|
-
429 Rate Limit, and >=500 Internal errors will all be retried by default.
|
|
14
|
+
const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY })
|
|
102
15
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<!-- prettier-ignore -->
|
|
106
|
-
```js
|
|
107
|
-
// Configure the default for all requests:
|
|
108
|
-
const client = new Composio({
|
|
109
|
-
maxRetries: 0, // default is 2
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Or, configure per-request:
|
|
113
|
-
await client.tools.execute('action', {
|
|
114
|
-
maxRetries: 5,
|
|
115
|
-
});
|
|
16
|
+
const session = await composio.toolRouter.session.create({ user_id: 'user_123' })
|
|
17
|
+
console.log(session.session_id, session.mcp.url)
|
|
116
18
|
```
|
|
117
19
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
|
|
121
|
-
|
|
122
|
-
<!-- prettier-ignore -->
|
|
123
|
-
```ts
|
|
124
|
-
// Configure the default for all requests:
|
|
125
|
-
const client = new Composio({
|
|
126
|
-
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
// Override per-request:
|
|
130
|
-
await client.tools.execute('action', {
|
|
131
|
-
timeout: 5 * 1000,
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
On timeout, an `APIConnectionTimeoutError` is thrown.
|
|
136
|
-
|
|
137
|
-
Note that requests which time out will be [retried twice by default](#retries).
|
|
138
|
-
|
|
139
|
-
## Advanced Usage
|
|
140
|
-
|
|
141
|
-
### Accessing raw Response data (e.g., headers)
|
|
142
|
-
|
|
143
|
-
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
144
|
-
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
145
|
-
|
|
146
|
-
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
147
|
-
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
148
|
-
|
|
149
|
-
<!-- prettier-ignore -->
|
|
150
|
-
```ts
|
|
151
|
-
const client = new Composio();
|
|
152
|
-
|
|
153
|
-
const response = await client.tools.execute('action').asResponse();
|
|
154
|
-
console.log(response.headers.get('X-My-Header'));
|
|
155
|
-
console.log(response.statusText); // access the underlying Response object
|
|
156
|
-
|
|
157
|
-
const { data: response, response: raw } = await client.tools.execute('action').withResponse();
|
|
158
|
-
console.log(raw.headers.get('X-My-Header'));
|
|
159
|
-
console.log(response.log_id);
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Logging
|
|
163
|
-
|
|
164
|
-
> [!IMPORTANT]
|
|
165
|
-
> All log messages are intended for debugging only. The format and content of log messages
|
|
166
|
-
> may change between releases.
|
|
167
|
-
|
|
168
|
-
#### Log levels
|
|
169
|
-
|
|
170
|
-
The log level can be configured in two ways:
|
|
171
|
-
|
|
172
|
-
1. Via the `COMPOSIO_LOG` environment variable
|
|
173
|
-
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
174
|
-
|
|
175
|
-
```ts
|
|
176
|
-
import Composio from '@composio/client';
|
|
177
|
-
|
|
178
|
-
const client = new Composio({
|
|
179
|
-
logLevel: 'debug', // Show all log messages
|
|
180
|
-
});
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Available log levels, from most to least verbose:
|
|
184
|
-
|
|
185
|
-
- `'debug'` - Show debug messages, info, warnings, and errors
|
|
186
|
-
- `'info'` - Show info messages, warnings, and errors
|
|
187
|
-
- `'warn'` - Show warnings and errors (default)
|
|
188
|
-
- `'error'` - Show only errors
|
|
189
|
-
- `'off'` - Disable all logging
|
|
190
|
-
|
|
191
|
-
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
192
|
-
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
193
|
-
may still be visible.
|
|
194
|
-
|
|
195
|
-
#### Custom logger
|
|
196
|
-
|
|
197
|
-
By default, this library logs to `globalThis.console`. You can also provide a custom logger.
|
|
198
|
-
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
199
|
-
|
|
200
|
-
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
201
|
-
below the configured level will not be sent to your logger.
|
|
202
|
-
|
|
203
|
-
```ts
|
|
204
|
-
import Composio from '@composio/client';
|
|
205
|
-
import pino from 'pino';
|
|
20
|
+
## Development
|
|
206
21
|
|
|
207
|
-
|
|
22
|
+
Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node 24, pnpm 11, Python 3.13, uv. ESM-only, TypeScript 7 (native compiler for typechecking, `typescript@6` retained for tooling until 7.1 restores the compiler API).
|
|
208
23
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
|
|
223
|
-
Options on the client, such as retries, will be respected when making these requests.
|
|
224
|
-
|
|
225
|
-
```ts
|
|
226
|
-
await client.post('/some/path', {
|
|
227
|
-
body: { some_prop: 'foo' },
|
|
228
|
-
query: { some_query_arg: 'bar' },
|
|
229
|
-
});
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
#### Undocumented request params
|
|
233
|
-
|
|
234
|
-
To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
|
|
235
|
-
parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
|
|
236
|
-
send will be sent as-is.
|
|
237
|
-
|
|
238
|
-
```ts
|
|
239
|
-
client.foo.create({
|
|
240
|
-
foo: 'my_param',
|
|
241
|
-
bar: 12,
|
|
242
|
-
// @ts-expect-error baz is not yet public
|
|
243
|
-
baz: 'undocumented option',
|
|
244
|
-
});
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
|
|
248
|
-
extra param in the body.
|
|
249
|
-
|
|
250
|
-
If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
|
|
251
|
-
options.
|
|
252
|
-
|
|
253
|
-
#### Undocumented response properties
|
|
254
|
-
|
|
255
|
-
To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
|
|
256
|
-
the response object, or cast the response object to the requisite type. Like the request params, we do not
|
|
257
|
-
validate or strip extra properties from the response from the API.
|
|
258
|
-
|
|
259
|
-
### Customizing the fetch client
|
|
260
|
-
|
|
261
|
-
By default, this library expects a global `fetch` function is defined.
|
|
262
|
-
|
|
263
|
-
If you want to use a different `fetch` function, you can either polyfill the global:
|
|
264
|
-
|
|
265
|
-
```ts
|
|
266
|
-
import fetch from 'my-fetch';
|
|
267
|
-
|
|
268
|
-
globalThis.fetch = fetch;
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Or pass it to the client:
|
|
272
|
-
|
|
273
|
-
```ts
|
|
274
|
-
import Composio from '@composio/client';
|
|
275
|
-
import fetch from 'my-fetch';
|
|
276
|
-
|
|
277
|
-
const client = new Composio({ fetch });
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Fetch options
|
|
281
|
-
|
|
282
|
-
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
283
|
-
|
|
284
|
-
```ts
|
|
285
|
-
import Composio from '@composio/client';
|
|
286
|
-
|
|
287
|
-
const client = new Composio({
|
|
288
|
-
fetchOptions: {
|
|
289
|
-
// `RequestInit` options
|
|
290
|
-
},
|
|
291
|
-
});
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
#### Configuring proxies
|
|
295
|
-
|
|
296
|
-
To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy
|
|
297
|
-
options to requests:
|
|
298
|
-
|
|
299
|
-
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg" align="top" width="18" height="21"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>
|
|
300
|
-
|
|
301
|
-
```ts
|
|
302
|
-
import Composio from '@composio/client';
|
|
303
|
-
import * as undici from 'undici';
|
|
304
|
-
|
|
305
|
-
const proxyAgent = new undici.ProxyAgent('http://localhost:8888');
|
|
306
|
-
const client = new Composio({
|
|
307
|
-
fetchOptions: {
|
|
308
|
-
dispatcher: proxyAgent,
|
|
309
|
-
},
|
|
310
|
-
});
|
|
24
|
+
```sh
|
|
25
|
+
pnpm install
|
|
26
|
+
pnpm generate # hey-api + compat codegen: spec/openapi.json → src/generated + src/compat/resources (do not edit)
|
|
27
|
+
pnpm lint # eslint over src, test, packages/codegen
|
|
28
|
+
pnpm typecheck # tsgo (TS native) over src+test, incl. type tests
|
|
29
|
+
pnpm typecheck:tsc # same programs under tsc — both compilers must pass
|
|
30
|
+
pnpm codegen:check # verify committed src/compat/resources matches the generator
|
|
31
|
+
pnpm test # unit tests (MSW mocks) + codegen tests
|
|
32
|
+
pnpm build # tsdown → dist/ (runs publint + arethetypeswrong)
|
|
33
|
+
pnpm test:pack # pack the real tarball, typecheck + import every drop-in subpath
|
|
34
|
+
pnpm test:contract # live API tests; requires COMPOSIO_API_KEY (copy .env.example to .env)
|
|
35
|
+
pnpm refresh-spec # re-fetch spec/openapi.json from the live backend
|
|
311
36
|
```
|
|
312
37
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
```ts
|
|
316
|
-
import Composio from '@composio/client';
|
|
317
|
-
|
|
318
|
-
const client = new Composio({
|
|
319
|
-
fetchOptions: {
|
|
320
|
-
proxy: 'http://localhost:8888',
|
|
321
|
-
},
|
|
322
|
-
});
|
|
323
|
-
```
|
|
38
|
+
`src/generated/` and `src/compat/resources/` are regenerated output — never edit them by hand; CI fails if they drift from `spec/openapi.json`.
|
|
324
39
|
|
|
325
|
-
|
|
40
|
+
### Python lane
|
|
326
41
|
|
|
327
|
-
|
|
328
|
-
import Composio from 'npm:@composio/client';
|
|
42
|
+
The Python client lives in the [`python/`](./python/README.md) workspace (uv-managed):
|
|
329
43
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
44
|
+
```sh
|
|
45
|
+
pnpm generate:python # from the repo root: spec snapshot → python/src/composio_client/_generated
|
|
46
|
+
cd python
|
|
47
|
+
uv sync
|
|
48
|
+
uv run ruff check
|
|
49
|
+
uv run mypy src scripts
|
|
50
|
+
uv run pytest
|
|
336
51
|
```
|
|
337
|
-
|
|
338
|
-
## Frequently Asked Questions
|
|
339
|
-
|
|
340
|
-
## Semantic versioning
|
|
341
|
-
|
|
342
|
-
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
343
|
-
|
|
344
|
-
1. Changes that only affect static types, without breaking runtime behavior.
|
|
345
|
-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
|
|
346
|
-
3. Changes that we do not expect to impact the vast majority of users in practice.
|
|
347
|
-
|
|
348
|
-
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
349
|
-
|
|
350
|
-
We are keen for your feedback; please open an [issue](https://www.github.com/ComposioHQ/composio-base-ts/issues) with questions, bugs, or suggestions.
|
|
351
|
-
|
|
352
|
-
## Requirements
|
|
353
|
-
|
|
354
|
-
TypeScript >= 4.9 is supported.
|
|
355
|
-
|
|
356
|
-
The following runtimes are supported:
|
|
357
|
-
|
|
358
|
-
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
359
|
-
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
360
|
-
- Deno v1.28.0 or higher.
|
|
361
|
-
- Bun 1.0 or later.
|
|
362
|
-
- Cloudflare Workers.
|
|
363
|
-
- Vercel Edge Runtime.
|
|
364
|
-
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
|
|
365
|
-
- Nitro v2.6 or greater.
|
|
366
|
-
|
|
367
|
-
Note that React Native is not supported at this time.
|
|
368
|
-
|
|
369
|
-
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
|
|
370
|
-
|
|
371
|
-
## Contributing
|
|
372
|
-
|
|
373
|
-
See [the contributing documentation](./CONTRIBUTING.md).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as path } from "./request-DwPfYYNF.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/api-key-revocation.ts
|
|
4
|
+
/**
|
|
5
|
+
* Spec-surface `client.apiKeyRevocation` resource: the 1-method public
|
|
6
|
+
* leaked-key revocation surface of the v3.1 spec
|
|
7
|
+
* (`POST /api_key_revocation` — POST-on-collection stays `create`), never
|
|
8
|
+
* published by Stainless — wayfinder ticket 32.
|
|
9
|
+
*/
|
|
10
|
+
var ApiKeyRevocation = class {
|
|
11
|
+
#client;
|
|
12
|
+
constructor(client) {
|
|
13
|
+
this.#client = client;
|
|
14
|
+
}
|
|
15
|
+
create(body, options) {
|
|
16
|
+
return this.#client.post(path`/api/v3.1/api_key_revocation`, {
|
|
17
|
+
body,
|
|
18
|
+
...options
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ApiKeyRevocation as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as Session } from "./session-DNm4GFO-.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/auth/auth.ts
|
|
4
|
+
/**
|
|
5
|
+
* Spec-surface `client.auth` resource: a method-less container for the
|
|
6
|
+
* `session` sub-resource — wayfinder ticket 32.
|
|
7
|
+
*/
|
|
8
|
+
var Auth = class {
|
|
9
|
+
session;
|
|
10
|
+
constructor(client) {
|
|
11
|
+
this.session = new Session(client);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
Auth.Session = Session;
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Auth as t };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { r as path } from "./request-DwPfYYNF.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/auth-configs.ts
|
|
4
|
+
/**
|
|
5
|
+
* Stainless-shaped `client.authConfigs` resource: the exact 6-method surface of
|
|
6
|
+
* `@composio/client` (create/retrieve/update/list/delete/updateStatus),
|
|
7
|
+
* dispatched through the handwritten kernel.
|
|
8
|
+
*/
|
|
9
|
+
var AuthConfigs = class {
|
|
10
|
+
#client;
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.#client = client;
|
|
13
|
+
}
|
|
14
|
+
create(body, options) {
|
|
15
|
+
return this.#client.post(path`/api/v3.1/auth_configs`, {
|
|
16
|
+
body,
|
|
17
|
+
...options
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
retrieve(nanoid, options) {
|
|
21
|
+
return this.#client.get(path`/api/v3.1/auth_configs/${nanoid}`, { ...options });
|
|
22
|
+
}
|
|
23
|
+
update(nanoid, body, options) {
|
|
24
|
+
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}`, {
|
|
25
|
+
body,
|
|
26
|
+
...options
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
list(query = {}, options) {
|
|
30
|
+
return this.#client.get(path`/api/v3.1/auth_configs`, {
|
|
31
|
+
query,
|
|
32
|
+
...options
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
delete(nanoid, query = {}, options) {
|
|
36
|
+
return this.#client.delete(path`/api/v3.1/auth_configs/${nanoid}`, {
|
|
37
|
+
query,
|
|
38
|
+
...options
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
updateStatus(status, params, options) {
|
|
42
|
+
const { nanoid } = params;
|
|
43
|
+
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}/${status}`, { ...options });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { AuthConfigs as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { r as path } from "./request-DwPfYYNF.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/org/clanker.ts
|
|
4
|
+
/**
|
|
5
|
+
* Spec-surface `client.org.clanker` resource: the 1-method claim surface of
|
|
6
|
+
* the v3.1 spec (`POST /org/clanker/create_claim`), never published by
|
|
7
|
+
* Stainless — wayfinder ticket 31.
|
|
8
|
+
*/
|
|
9
|
+
var Clanker = class {
|
|
10
|
+
#client;
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.#client = client;
|
|
13
|
+
}
|
|
14
|
+
createClaim(body, options) {
|
|
15
|
+
return this.#client.post(path`/api/v3.1/org/clanker/create_claim`, {
|
|
16
|
+
body,
|
|
17
|
+
...options
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Clanker as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { r as path } from "./request-DwPfYYNF.mjs";
|
|
2
|
+
import { t as Realtime } from "./realtime-BcHoYszT.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/compat/resources/cli/cli.ts
|
|
5
|
+
/**
|
|
6
|
+
* Stainless-shaped `client.cli` resource: the 2-method published CLI
|
|
7
|
+
* authentication surface of `@composio/client` (createSession/getSession)
|
|
8
|
+
* plus the spec-surface `createCodactFailure` (`POST /cli/codact_failures`,
|
|
9
|
+
* never published by Stainless — wayfinder ticket 29).
|
|
10
|
+
*/
|
|
11
|
+
var Cli = class {
|
|
12
|
+
realtime;
|
|
13
|
+
#client;
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.#client = client;
|
|
16
|
+
this.realtime = new Realtime(client);
|
|
17
|
+
}
|
|
18
|
+
createCodactFailure(params, options) {
|
|
19
|
+
const { "x-user-api-key": xUserApiKey, ...body } = params;
|
|
20
|
+
return this.#client.post(path`/api/v3.1/cli/codact_failures`, {
|
|
21
|
+
body,
|
|
22
|
+
...options,
|
|
23
|
+
headers: {
|
|
24
|
+
...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0,
|
|
25
|
+
...options?.headers
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
createSession(body = {}, options) {
|
|
30
|
+
return this.#client.post(path`/api/v3.1/cli/create-session`, {
|
|
31
|
+
body,
|
|
32
|
+
...options
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
getSession(query, options) {
|
|
36
|
+
return this.#client.get(path`/api/v3.1/cli/get-session`, {
|
|
37
|
+
query,
|
|
38
|
+
...options
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
Cli.Realtime = Realtime;
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Cli as t };
|