@composio/client 0.1.0-alpha.5 → 0.1.0-alpha.50
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/CHANGELOG.md +685 -0
- package/README.md +22 -35
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/client.d.mts +44 -39
- package/client.d.mts.map +1 -1
- package/client.d.ts +44 -39
- package/client.d.ts.map +1 -1
- package/client.js +89 -96
- package/client.js.map +1 -1
- package/client.mjs +71 -55
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +0 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +0 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +4 -14
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +1 -11
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +0 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +0 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/error.js +2 -15
- package/error.js.map +1 -1
- package/internal/builtin-types.d.mts +0 -2
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +0 -2
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/detect-platform.js +3 -3
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +3 -3
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +2 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts +1 -2
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +1 -2
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +7 -5
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +7 -5
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts +0 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +0 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +1 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts +1 -0
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +16 -19
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts +1 -0
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +22 -21
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts +43 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +43 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shim-types.d.mts +11 -22
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +11 -22
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/{src/resources/org.ts → internal/shim-types.mjs} +2 -2
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +2 -2
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +2 -2
- package/internal/shims.d.ts.map +1 -1
- package/internal/shims.js +5 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -2
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +1 -2
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +5 -5
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +4 -3
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +8 -7
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +8 -7
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +1 -3
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +1 -3
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +17 -7
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +13 -4
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +12 -7
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +12 -7
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts.map +1 -1
- package/internal/utils/env.d.ts.map +1 -1
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts +0 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +0 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +3 -3
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +28 -7
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +27 -6
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/sleep.d.mts.map +1 -1
- package/internal/utils/sleep.d.ts.map +1 -1
- package/internal/utils/uuid.d.mts +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +1 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +1 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/internal/utils/values.d.mts +2 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +2 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +11 -8
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +5 -3
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.js +7 -20
- package/internal/utils.js.map +1 -1
- package/package.json +6 -14
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/auth-configs.d.mts +453 -54
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +453 -54
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +64 -0
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +64 -0
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/cli.d.mts +37 -65
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +37 -65
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +13 -4
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +13 -4
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +8726 -233
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +8726 -233
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +77 -2
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +77 -2
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +218 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +218 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +39 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +35 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +11 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -9
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -4
- package/resources/index.mjs.map +1 -1
- package/resources/link.d.mts +2017 -0
- package/resources/link.d.mts.map +1 -0
- package/resources/link.d.ts +2017 -0
- package/resources/link.d.ts.map +1 -0
- package/resources/link.js +16 -0
- package/resources/link.js.map +1 -0
- package/resources/link.mjs +12 -0
- package/resources/link.mjs.map +1 -0
- package/resources/mcp/custom.d.mts +102 -0
- package/resources/mcp/custom.d.mts.map +1 -0
- package/resources/mcp/custom.d.ts +102 -0
- package/resources/mcp/custom.d.ts.map +1 -0
- package/resources/mcp/custom.js +26 -0
- package/resources/mcp/custom.js.map +1 -0
- package/resources/mcp/custom.mjs +22 -0
- package/resources/mcp/custom.mjs.map +1 -0
- package/resources/mcp/generate.d.mts +59 -0
- package/resources/mcp/generate.d.mts.map +1 -0
- package/resources/mcp/generate.d.ts +59 -0
- package/resources/mcp/generate.d.ts.map +1 -0
- package/resources/mcp/generate.js +26 -0
- package/resources/mcp/generate.js.map +1 -0
- package/resources/mcp/generate.mjs +22 -0
- package/resources/mcp/generate.mjs.map +1 -0
- package/resources/mcp/index.d.mts +3 -2
- package/resources/mcp/index.d.mts.map +1 -1
- package/resources/mcp/index.d.ts +3 -2
- package/resources/mcp/index.d.ts.map +1 -1
- package/resources/mcp/index.js +5 -3
- package/resources/mcp/index.js.map +1 -1
- package/resources/mcp/index.mjs +2 -1
- package/resources/mcp/index.mjs.map +1 -1
- package/resources/mcp/mcp.d.mts +447 -175
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +447 -175
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +89 -39
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +88 -16
- package/resources/mcp/mcp.mjs.map +1 -1
- package/resources/mcp.js +2 -15
- package/resources/mcp.js.map +1 -1
- package/resources/migration.d.mts +32 -0
- package/resources/migration.d.mts.map +1 -0
- package/resources/migration.d.ts +32 -0
- package/resources/migration.d.ts.map +1 -0
- package/resources/migration.js +17 -0
- package/resources/migration.js.map +1 -0
- package/resources/migration.mjs +13 -0
- package/resources/migration.mjs.map +1 -0
- package/resources/tool-router/index.d.mts +3 -0
- package/resources/tool-router/index.d.mts.map +1 -0
- package/resources/tool-router/index.d.ts +3 -0
- package/resources/tool-router/index.d.ts.map +1 -0
- package/resources/tool-router/index.js +9 -0
- package/resources/tool-router/index.js.map +1 -0
- package/resources/tool-router/index.mjs +4 -0
- package/resources/tool-router/index.mjs.map +1 -0
- package/resources/tool-router/session.d.mts +646 -0
- package/resources/tool-router/session.d.mts.map +1 -0
- package/resources/tool-router/session.d.ts +646 -0
- package/resources/tool-router/session.d.ts.map +1 -0
- package/resources/tool-router/session.js +107 -0
- package/resources/tool-router/session.js.map +1 -0
- package/resources/tool-router/session.mjs +103 -0
- package/resources/tool-router/session.mjs.map +1 -0
- package/resources/tool-router/tool-router.d.mts +91 -0
- package/resources/tool-router/tool-router.d.mts.map +1 -0
- package/resources/tool-router/tool-router.d.ts +91 -0
- package/resources/tool-router/tool-router.d.ts.map +1 -0
- package/resources/tool-router/tool-router.js +46 -0
- package/resources/tool-router/tool-router.js.map +1 -0
- package/resources/tool-router/tool-router.mjs +41 -0
- package/resources/tool-router/tool-router.mjs.map +1 -0
- package/resources/tool-router.d.mts +2 -0
- package/resources/tool-router.d.mts.map +1 -0
- package/resources/tool-router.d.ts +2 -0
- package/resources/tool-router.d.ts.map +1 -0
- package/resources/tool-router.js +6 -0
- package/resources/tool-router.js.map +1 -0
- package/resources/{org.mjs → tool-router.mjs} +2 -2
- package/resources/tool-router.mjs.map +1 -0
- package/resources/toolkits.d.mts +288 -6
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +288 -6
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +20 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +20 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +1209 -41
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +1209 -41
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +73 -6
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +73 -6
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/index.d.mts +2 -2
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +2 -2
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js +3 -3
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs +1 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/manage.d.mts +43 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -0
- package/resources/trigger-instances/manage.d.ts +43 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -0
- package/resources/trigger-instances/manage.js +33 -0
- package/resources/trigger-instances/manage.js.map +1 -0
- package/resources/trigger-instances/manage.mjs +29 -0
- package/resources/trigger-instances/manage.mjs.map +1 -0
- package/resources/trigger-instances/trigger-instances.d.mts +163 -40
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +163 -40
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +20 -35
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +19 -12
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
- package/resources/trigger-instances.js +2 -15
- package/resources/trigger-instances.js.map +1 -1
- package/resources/triggers-types.d.mts +145 -12
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +145 -12
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +14 -2
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +14 -2
- package/resources/triggers-types.mjs.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +145 -114
- package/src/core/resource.ts +1 -1
- package/src/internal/detect-platform.ts +3 -3
- package/src/internal/headers.ts +9 -8
- package/src/internal/qs/formats.ts +2 -1
- package/src/internal/qs/stringify.ts +17 -20
- package/src/internal/qs/utils.ts +14 -14
- package/src/internal/request-options.ts +54 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +2 -2
- package/src/internal/to-file.ts +5 -3
- package/src/internal/types.ts +9 -6
- package/src/internal/uploads.ts +17 -5
- package/src/internal/utils/base64.ts +13 -10
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/log.ts +1 -1
- package/src/internal/utils/path.ts +33 -8
- package/src/internal/utils/uuid.ts +1 -3
- package/src/internal/utils/values.ts +6 -3
- package/src/resources/auth-configs.ts +507 -67
- package/src/resources/cli.ts +39 -83
- package/src/resources/connected-accounts.ts +16471 -459
- package/src/resources/files.ts +281 -0
- package/src/resources/index.ts +24 -26
- package/src/resources/link.ts +3817 -0
- package/src/resources/mcp/custom.ts +122 -0
- package/src/resources/mcp/generate.ts +71 -0
- package/src/resources/mcp/index.ts +3 -3
- package/src/resources/mcp/mcp.ts +484 -200
- package/src/resources/migration.ts +46 -0
- package/src/resources/tool-router/index.ts +21 -0
- package/src/resources/tool-router/session.ts +792 -0
- package/src/resources/tool-router/tool-router.ts +141 -0
- package/src/resources/{org/project.ts → tool-router.ts} +1 -1
- package/src/resources/toolkits.ts +328 -8
- package/src/resources/tools.ts +1880 -60
- package/src/resources/trigger-instances/index.ts +5 -9
- package/src/resources/trigger-instances/manage.ts +63 -0
- package/src/resources/trigger-instances/trigger-instances.ts +176 -64
- package/src/resources/triggers-types.ts +149 -14
- package/src/version.ts +1 -1
- package/uploads.js +2 -15
- package/uploads.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- 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/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/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/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.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/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.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/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/resources/action-execution.ts +0 -244
- package/src/resources/mcp/command.ts +0 -47
- 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/team-members.ts +0 -111
- package/src/resources/trigger-instances/handle.ts +0 -45
- package/src/resources/trigger.ts +0 -108
|
@@ -0,0 +1,792 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Session extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new session for the tool router feature. This endpoint initializes a
|
|
11
|
+
* new session with specified toolkits and their authentication configurations. The
|
|
12
|
+
* session provides an isolated environment for testing and managing tool routing
|
|
13
|
+
* logic with scoped MCP server access.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const session = await client.toolRouter.session.create({
|
|
18
|
+
* user_id: 'user_123456789',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: SessionCreateParams, options?: RequestOptions): APIPromise<SessionCreateResponse> {
|
|
23
|
+
return this._client.post('/api/v3/tool_router/session', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves an existing tool router session by its ID. Returns the session
|
|
28
|
+
* configuration, MCP server URL, and available tools.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const session = await client.toolRouter.session.retrieve(
|
|
33
|
+
* 'trs_123456789',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse> {
|
|
38
|
+
return this._client.get(path`/api/v3/tool_router/session/${sessionID}`, options);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Executes a specific tool within a tool router session. The toolkit is
|
|
43
|
+
* automatically inferred from the tool slug. The tool must belong to an allowed
|
|
44
|
+
* toolkit and must not be disabled in the session configuration. This endpoint
|
|
45
|
+
* validates permissions, resolves connected accounts, and executes the tool with
|
|
46
|
+
* the session context.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const response = await client.toolRouter.session.execute(
|
|
51
|
+
* 'trs_LX9uJKBinWWr',
|
|
52
|
+
* { tool_slug: 'GITHUB_CREATE_ISSUE' },
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
execute(
|
|
57
|
+
sessionID: string,
|
|
58
|
+
body: SessionExecuteParams,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): APIPromise<SessionExecuteResponse> {
|
|
61
|
+
return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute`, { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response =
|
|
70
|
+
* await client.toolRouter.session.executeMeta(
|
|
71
|
+
* 'trs_LX9uJKBinWWr',
|
|
72
|
+
* { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
executeMeta(
|
|
77
|
+
sessionID: string,
|
|
78
|
+
body: SessionExecuteMetaParams,
|
|
79
|
+
options?: RequestOptions,
|
|
80
|
+
): APIPromise<SessionExecuteMetaResponse> {
|
|
81
|
+
return this._client.post(path`/api/v3/tool_router/session/${sessionID}/execute_meta`, {
|
|
82
|
+
body,
|
|
83
|
+
...options,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Initiates an authentication link session for a specific toolkit within a tool
|
|
89
|
+
* router session. Returns a link token and redirect URL that users can use to
|
|
90
|
+
* complete the OAuth flow.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const response = await client.toolRouter.session.link(
|
|
95
|
+
* 'trs_LX9uJKBinWWr',
|
|
96
|
+
* { toolkit: 'github' },
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
link(
|
|
101
|
+
sessionID: string,
|
|
102
|
+
body: SessionLinkParams,
|
|
103
|
+
options?: RequestOptions,
|
|
104
|
+
): APIPromise<SessionLinkResponse> {
|
|
105
|
+
return this._client.post(path`/api/v3/tool_router/session/${sessionID}/link`, { body, ...options });
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Retrieves a cursor-paginated list of toolkits available in the tool router
|
|
110
|
+
* session. Includes toolkit metadata, composio-managed auth schemes, and connected
|
|
111
|
+
* accounts if available. Optionally filter by specific toolkit slugs.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* const response = await client.toolRouter.session.toolkits(
|
|
116
|
+
* 'trs_123456789',
|
|
117
|
+
* );
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
toolkits(
|
|
121
|
+
sessionID: string,
|
|
122
|
+
query: SessionToolkitsParams | null | undefined = {},
|
|
123
|
+
options?: RequestOptions,
|
|
124
|
+
): APIPromise<SessionToolkitsResponse> {
|
|
125
|
+
return this._client.get(path`/api/v3/tool_router/session/${sessionID}/toolkits`, { query, ...options });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface SessionCreateResponse {
|
|
130
|
+
/**
|
|
131
|
+
* The session configuration including user, toolkits, and overrides
|
|
132
|
+
*/
|
|
133
|
+
config: SessionCreateResponse.Config;
|
|
134
|
+
|
|
135
|
+
mcp: SessionCreateResponse.Mcp;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The identifier of the session
|
|
139
|
+
*/
|
|
140
|
+
session_id: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* List of available tools in this session
|
|
144
|
+
*/
|
|
145
|
+
tool_router_tools: Array<
|
|
146
|
+
| 'COMPOSIO_SEARCH_TOOLS'
|
|
147
|
+
| 'COMPOSIO_MULTI_EXECUTE_TOOL'
|
|
148
|
+
| 'COMPOSIO_MANAGE_CONNECTIONS'
|
|
149
|
+
| 'COMPOSIO_REMOTE_WORKBENCH'
|
|
150
|
+
| 'COMPOSIO_REMOTE_BASH_TOOL'
|
|
151
|
+
| 'COMPOSIO_GET_TOOL_SCHEMAS'
|
|
152
|
+
>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export namespace SessionCreateResponse {
|
|
156
|
+
/**
|
|
157
|
+
* The session configuration including user, toolkits, and overrides
|
|
158
|
+
*/
|
|
159
|
+
export interface Config {
|
|
160
|
+
/**
|
|
161
|
+
* User identifier for this session
|
|
162
|
+
*/
|
|
163
|
+
user_id: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Auth config overrides per toolkit
|
|
167
|
+
*/
|
|
168
|
+
auth_configs?: { [key: string]: string };
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Connected account overrides per toolkit
|
|
172
|
+
*/
|
|
173
|
+
connected_accounts?: { [key: string]: string };
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Manage connections configuration
|
|
177
|
+
*/
|
|
178
|
+
manage_connections?: Config.ManageConnections;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* MCP tool annotation hints for filtering tools. readOnlyHint: tool does not
|
|
182
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
183
|
+
* idempotentHint: tool may interact with external entities.
|
|
184
|
+
*/
|
|
185
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Toolkit configuration - either enabled list or disabled list
|
|
189
|
+
*/
|
|
190
|
+
toolkits?: Config.Enabled | Config.Disabled;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Tool-level configuration per toolkit
|
|
194
|
+
*/
|
|
195
|
+
tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Workbench configuration
|
|
199
|
+
*/
|
|
200
|
+
workbench?: Config.Workbench;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export namespace Config {
|
|
204
|
+
/**
|
|
205
|
+
* Manage connections configuration
|
|
206
|
+
*/
|
|
207
|
+
export interface ManageConnections {
|
|
208
|
+
/**
|
|
209
|
+
* Custom callback URL for connected account auth flows
|
|
210
|
+
*/
|
|
211
|
+
callback_url?: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
215
|
+
*/
|
|
216
|
+
enabled?: boolean;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface Enabled {
|
|
220
|
+
enabled: Array<string>;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface Disabled {
|
|
224
|
+
disabled: Array<string>;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface Enabled {
|
|
228
|
+
enabled: Array<string>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface Disabled {
|
|
232
|
+
disabled: Array<string>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface Tags {
|
|
236
|
+
tags: Array<string>;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Workbench configuration
|
|
241
|
+
*/
|
|
242
|
+
export interface Workbench {
|
|
243
|
+
/**
|
|
244
|
+
* Character threshold after which tool execution response are saved to a file in
|
|
245
|
+
* workbench. Default is 20k.
|
|
246
|
+
*/
|
|
247
|
+
auto_offload_threshold?: number;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Whether proxy execution is enabled in the workbench
|
|
251
|
+
*/
|
|
252
|
+
proxy_execution_enabled?: boolean;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface Mcp {
|
|
257
|
+
/**
|
|
258
|
+
* The type of the MCP server. Can be http
|
|
259
|
+
*/
|
|
260
|
+
type: 'http';
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The URL of the MCP server
|
|
264
|
+
*/
|
|
265
|
+
url: string;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface SessionRetrieveResponse {
|
|
270
|
+
/**
|
|
271
|
+
* The session configuration including user, toolkits, and overrides
|
|
272
|
+
*/
|
|
273
|
+
config: SessionRetrieveResponse.Config;
|
|
274
|
+
|
|
275
|
+
mcp: SessionRetrieveResponse.Mcp;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The identifier of the session
|
|
279
|
+
*/
|
|
280
|
+
session_id: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* List of available tools in this session
|
|
284
|
+
*/
|
|
285
|
+
tool_router_tools: Array<
|
|
286
|
+
| 'COMPOSIO_SEARCH_TOOLS'
|
|
287
|
+
| 'COMPOSIO_MULTI_EXECUTE_TOOL'
|
|
288
|
+
| 'COMPOSIO_MANAGE_CONNECTIONS'
|
|
289
|
+
| 'COMPOSIO_REMOTE_WORKBENCH'
|
|
290
|
+
| 'COMPOSIO_REMOTE_BASH_TOOL'
|
|
291
|
+
| 'COMPOSIO_GET_TOOL_SCHEMAS'
|
|
292
|
+
>;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export namespace SessionRetrieveResponse {
|
|
296
|
+
/**
|
|
297
|
+
* The session configuration including user, toolkits, and overrides
|
|
298
|
+
*/
|
|
299
|
+
export interface Config {
|
|
300
|
+
/**
|
|
301
|
+
* User identifier for this session
|
|
302
|
+
*/
|
|
303
|
+
user_id: string;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Auth config overrides per toolkit
|
|
307
|
+
*/
|
|
308
|
+
auth_configs?: { [key: string]: string };
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Connected account overrides per toolkit
|
|
312
|
+
*/
|
|
313
|
+
connected_accounts?: { [key: string]: string };
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Manage connections configuration
|
|
317
|
+
*/
|
|
318
|
+
manage_connections?: Config.ManageConnections;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* MCP tool annotation hints for filtering tools. readOnlyHint: tool does not
|
|
322
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
323
|
+
* idempotentHint: tool may interact with external entities.
|
|
324
|
+
*/
|
|
325
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Toolkit configuration - either enabled list or disabled list
|
|
329
|
+
*/
|
|
330
|
+
toolkits?: Config.Enabled | Config.Disabled;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Tool-level configuration per toolkit
|
|
334
|
+
*/
|
|
335
|
+
tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Workbench configuration
|
|
339
|
+
*/
|
|
340
|
+
workbench?: Config.Workbench;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export namespace Config {
|
|
344
|
+
/**
|
|
345
|
+
* Manage connections configuration
|
|
346
|
+
*/
|
|
347
|
+
export interface ManageConnections {
|
|
348
|
+
/**
|
|
349
|
+
* Custom callback URL for connected account auth flows
|
|
350
|
+
*/
|
|
351
|
+
callback_url?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Whether to enable the connection manager for automatic connection handling
|
|
355
|
+
*/
|
|
356
|
+
enabled?: boolean;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export interface Enabled {
|
|
360
|
+
enabled: Array<string>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface Disabled {
|
|
364
|
+
disabled: Array<string>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface Enabled {
|
|
368
|
+
enabled: Array<string>;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface Disabled {
|
|
372
|
+
disabled: Array<string>;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface Tags {
|
|
376
|
+
tags: Array<string>;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Workbench configuration
|
|
381
|
+
*/
|
|
382
|
+
export interface Workbench {
|
|
383
|
+
/**
|
|
384
|
+
* Character threshold after which tool execution response are saved to a file in
|
|
385
|
+
* workbench. Default is 20k.
|
|
386
|
+
*/
|
|
387
|
+
auto_offload_threshold?: number;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Whether proxy execution is enabled in the workbench
|
|
391
|
+
*/
|
|
392
|
+
proxy_execution_enabled?: boolean;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface Mcp {
|
|
397
|
+
/**
|
|
398
|
+
* The type of the MCP server. Can be http
|
|
399
|
+
*/
|
|
400
|
+
type: 'http';
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* The URL of the MCP server
|
|
404
|
+
*/
|
|
405
|
+
url: string;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface SessionExecuteResponse {
|
|
410
|
+
/**
|
|
411
|
+
* The data returned by the tool execution
|
|
412
|
+
*/
|
|
413
|
+
data: { [key: string]: unknown };
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Error message if the execution failed, null otherwise
|
|
417
|
+
*/
|
|
418
|
+
error: string | null;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Unique identifier for the execution log
|
|
422
|
+
*/
|
|
423
|
+
log_id: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface SessionExecuteMetaResponse {
|
|
427
|
+
/**
|
|
428
|
+
* The data returned by the tool execution
|
|
429
|
+
*/
|
|
430
|
+
data: { [key: string]: unknown };
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Error message if the execution failed, null otherwise
|
|
434
|
+
*/
|
|
435
|
+
error: string | null;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Unique identifier for the execution log
|
|
439
|
+
*/
|
|
440
|
+
log_id: string;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface SessionLinkResponse {
|
|
444
|
+
/**
|
|
445
|
+
* The unique identifier for the connected account
|
|
446
|
+
*/
|
|
447
|
+
connected_account_id: string;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Token used to complete the authentication flow
|
|
451
|
+
*/
|
|
452
|
+
link_token: string;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* The URL where users should be redirected to complete OAuth
|
|
456
|
+
*/
|
|
457
|
+
redirect_url: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface SessionToolkitsResponse {
|
|
461
|
+
current_page: number;
|
|
462
|
+
|
|
463
|
+
items: Array<SessionToolkitsResponse.Item>;
|
|
464
|
+
|
|
465
|
+
total_items: number;
|
|
466
|
+
|
|
467
|
+
total_pages: number;
|
|
468
|
+
|
|
469
|
+
next_cursor?: string | null;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export namespace SessionToolkitsResponse {
|
|
473
|
+
export interface Item {
|
|
474
|
+
/**
|
|
475
|
+
* Available Composio-managed auth schemes
|
|
476
|
+
*/
|
|
477
|
+
composio_managed_auth_schemes: Array<string>;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Connected account if available
|
|
481
|
+
*/
|
|
482
|
+
connected_account: Item.ConnectedAccount | null;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Whether the toolkit is enabled
|
|
486
|
+
*/
|
|
487
|
+
enabled: boolean;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Whether the toolkit is no-auth
|
|
491
|
+
*/
|
|
492
|
+
is_no_auth: boolean;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Toolkit metadata
|
|
496
|
+
*/
|
|
497
|
+
meta: Item.Meta;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Display name of the toolkit
|
|
501
|
+
*/
|
|
502
|
+
name: string;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Unique slug identifier
|
|
506
|
+
*/
|
|
507
|
+
slug: string;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export namespace Item {
|
|
511
|
+
/**
|
|
512
|
+
* Connected account if available
|
|
513
|
+
*/
|
|
514
|
+
export interface ConnectedAccount {
|
|
515
|
+
/**
|
|
516
|
+
* Connected account identifier
|
|
517
|
+
*/
|
|
518
|
+
id: string;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Auth config details
|
|
522
|
+
*/
|
|
523
|
+
auth_config: ConnectedAccount.AuthConfig;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Creation timestamp
|
|
527
|
+
*/
|
|
528
|
+
created_at: string;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Connection status
|
|
532
|
+
*/
|
|
533
|
+
status: string;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* User identifier
|
|
537
|
+
*/
|
|
538
|
+
user_id: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export namespace ConnectedAccount {
|
|
542
|
+
/**
|
|
543
|
+
* Auth config details
|
|
544
|
+
*/
|
|
545
|
+
export interface AuthConfig {
|
|
546
|
+
/**
|
|
547
|
+
* Auth config identifier
|
|
548
|
+
*/
|
|
549
|
+
id: string;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Authentication scheme type
|
|
553
|
+
*/
|
|
554
|
+
auth_scheme: string;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Whether this is a Composio-managed auth config
|
|
558
|
+
*/
|
|
559
|
+
is_composio_managed: boolean;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Toolkit metadata
|
|
565
|
+
*/
|
|
566
|
+
export interface Meta {
|
|
567
|
+
/**
|
|
568
|
+
* Description of the toolkit
|
|
569
|
+
*/
|
|
570
|
+
description: string;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* URL to the toolkit logo
|
|
574
|
+
*/
|
|
575
|
+
logo: string;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export interface SessionCreateParams {
|
|
581
|
+
/**
|
|
582
|
+
* The identifier of the user who is initiating the session, ideally a unique
|
|
583
|
+
* identifier from your database like a user ID or email address
|
|
584
|
+
*/
|
|
585
|
+
user_id: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The auth configs to use for the session. This will override the default behavior
|
|
589
|
+
* and use the given auth config when specific toolkits are being executed
|
|
590
|
+
*/
|
|
591
|
+
auth_configs?: { [key: string]: string };
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* The connected accounts to use for the session. This will override the default
|
|
595
|
+
* behaviour and use the given connected account when specific toolkits are being
|
|
596
|
+
* executed
|
|
597
|
+
*/
|
|
598
|
+
connected_accounts?: { [key: string]: string };
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Configuration for connection management settings
|
|
602
|
+
*/
|
|
603
|
+
manage_connections?: SessionCreateParams.ManageConnections;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Global MCP tool annotation hints for filtering. readOnlyHint: tool does not
|
|
607
|
+
* modify environment. destructiveHint: tool may perform destructive updates.
|
|
608
|
+
* idempotentHint: repeated calls with same args have no additional effect.
|
|
609
|
+
* Toolkit-level tags override this. Toolkit enabled/disabled lists take precedence
|
|
610
|
+
* over tag filtering.
|
|
611
|
+
*/
|
|
612
|
+
tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Toolkit configuration - specify either enable toolkits (allowlist) or disable
|
|
616
|
+
* toolkits (denylist). Mutually exclusive.
|
|
617
|
+
*/
|
|
618
|
+
toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Tool-level configuration per toolkit - either specify enable tools (whitelist),
|
|
622
|
+
* disable tools (blacklist), or filter by MCP tags for each toolkit
|
|
623
|
+
*/
|
|
624
|
+
tools?: {
|
|
625
|
+
[key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Configuration for workbench behavior
|
|
630
|
+
*/
|
|
631
|
+
workbench?: SessionCreateParams.Workbench;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export namespace SessionCreateParams {
|
|
635
|
+
/**
|
|
636
|
+
* Configuration for connection management settings
|
|
637
|
+
*/
|
|
638
|
+
export interface ManageConnections {
|
|
639
|
+
/**
|
|
640
|
+
* The URL to redirect to after a user completes authentication for a connected
|
|
641
|
+
* account. This allows you to handle the auth callback in your own application.
|
|
642
|
+
*/
|
|
643
|
+
callback_url?: string;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Whether to enable the connection manager for automatic connection handling. If
|
|
647
|
+
* true, we will provide a tool your agent can use to initiate connections to
|
|
648
|
+
* toolkits if it doesnt exist. If set to false, then you have to manage
|
|
649
|
+
* connections manually.
|
|
650
|
+
*/
|
|
651
|
+
enable?: boolean | null;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Enable only specific toolkits (allowlist)
|
|
656
|
+
*/
|
|
657
|
+
export interface Enable {
|
|
658
|
+
/**
|
|
659
|
+
* Only these specific toolkits will be enabled
|
|
660
|
+
*/
|
|
661
|
+
enable: Array<string>;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Disable specific toolkits (denylist)
|
|
666
|
+
*/
|
|
667
|
+
export interface Disable {
|
|
668
|
+
/**
|
|
669
|
+
* These specific toolkits will be disabled
|
|
670
|
+
*/
|
|
671
|
+
disable: Array<string>;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export interface Enable {
|
|
675
|
+
/**
|
|
676
|
+
* Only these specific tools will be available for this toolkit
|
|
677
|
+
*/
|
|
678
|
+
enable: Array<string>;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export interface Disable {
|
|
682
|
+
/**
|
|
683
|
+
* These specific tools will be disabled for this toolkit
|
|
684
|
+
*/
|
|
685
|
+
disable: Array<string>;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface Tags {
|
|
689
|
+
/**
|
|
690
|
+
* MCP tags to filter tools for this toolkit. Only tools with these tags will be
|
|
691
|
+
* available.
|
|
692
|
+
*/
|
|
693
|
+
tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint'>;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Configuration for workbench behavior
|
|
698
|
+
*/
|
|
699
|
+
export interface Workbench {
|
|
700
|
+
/**
|
|
701
|
+
* Character threshold for automatic offloading. When workbench response exceeds
|
|
702
|
+
* this threshold, it will be automatically offloaded. Default is picked
|
|
703
|
+
* automatically based on the response size.
|
|
704
|
+
*/
|
|
705
|
+
auto_offload_threshold?: number;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Whether proxy execution is enabled. When enabled, workbench can call URLs and
|
|
709
|
+
* APIs directly.
|
|
710
|
+
*/
|
|
711
|
+
enable_proxy_execution?: boolean;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export interface SessionExecuteParams {
|
|
716
|
+
/**
|
|
717
|
+
* The unique slug identifier of the tool to execute
|
|
718
|
+
*/
|
|
719
|
+
tool_slug: string;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* The arguments required by the tool
|
|
723
|
+
*/
|
|
724
|
+
arguments?: { [key: string]: unknown };
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export interface SessionExecuteMetaParams {
|
|
728
|
+
/**
|
|
729
|
+
* The unique slug identifier of the meta tool to execute
|
|
730
|
+
*/
|
|
731
|
+
slug: string;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* The arguments required by the meta tool
|
|
735
|
+
*/
|
|
736
|
+
arguments?: { [key: string]: unknown };
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export interface SessionLinkParams {
|
|
740
|
+
/**
|
|
741
|
+
* The unique slug identifier of the toolkit to connect
|
|
742
|
+
*/
|
|
743
|
+
toolkit: string;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* URL where users will be redirected after completing auth
|
|
747
|
+
*/
|
|
748
|
+
callback_url?: string;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
export interface SessionToolkitsParams {
|
|
752
|
+
/**
|
|
753
|
+
* Cursor for pagination. The cursor is a base64 encoded string of the page and
|
|
754
|
+
* limit. The page is the page number and the limit is the number of items per
|
|
755
|
+
* page. The cursor is used to paginate through the items. The cursor is not
|
|
756
|
+
* required for the first page.
|
|
757
|
+
*/
|
|
758
|
+
cursor?: string;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Whether to filter by connected toolkits. If provided, only connected toolkits
|
|
762
|
+
* will be returned.
|
|
763
|
+
*/
|
|
764
|
+
is_connected?: boolean | null;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Number of items per page, max allowed is 1000
|
|
768
|
+
*/
|
|
769
|
+
limit?: number | null;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Optional comma-separated list of toolkit slugs to filter by. If provided, only
|
|
773
|
+
* these toolkits will be returned, overriding the session configuration.
|
|
774
|
+
*/
|
|
775
|
+
toolkits?: Array<string> | null;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export declare namespace Session {
|
|
779
|
+
export {
|
|
780
|
+
type SessionCreateResponse as SessionCreateResponse,
|
|
781
|
+
type SessionRetrieveResponse as SessionRetrieveResponse,
|
|
782
|
+
type SessionExecuteResponse as SessionExecuteResponse,
|
|
783
|
+
type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
|
|
784
|
+
type SessionLinkResponse as SessionLinkResponse,
|
|
785
|
+
type SessionToolkitsResponse as SessionToolkitsResponse,
|
|
786
|
+
type SessionCreateParams as SessionCreateParams,
|
|
787
|
+
type SessionExecuteParams as SessionExecuteParams,
|
|
788
|
+
type SessionExecuteMetaParams as SessionExecuteMetaParams,
|
|
789
|
+
type SessionLinkParams as SessionLinkParams,
|
|
790
|
+
type SessionToolkitsParams as SessionToolkitsParams,
|
|
791
|
+
};
|
|
792
|
+
}
|