@composio/client 0.1.0-alpha.1 → 0.1.0-alpha.10
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 +137 -0
- package/LICENSE +1 -1
- package/README.md +31 -31
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/client.d.mts +28 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -25
- package/client.d.ts.map +1 -1
- package/client.js +95 -113
- package/client.js.map +1 -1
- package/client.mjs +88 -83
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -3
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -3
- 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 +2 -3
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -3
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- 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/index.d.mts +3 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.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.map +1 -1
- 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 +3 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +3 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts +2 -3
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -3
- 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 +6 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +279 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +14 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +0 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.js +6 -7
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +4 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -2
- 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 +0 -1
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +0 -1
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +5 -7
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +5 -7
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +16 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +12 -3
- 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 +14 -9
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +15 -10
- 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 +3 -4
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -4
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -2
- package/internal/utils/log.js.map +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 +3 -3
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- 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.map +1 -1
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +10 -10
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.js +7 -20
- package/internal/utils.js.map +1 -1
- package/package.json +5 -9
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/auth-configs.d.mts +75 -23
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +75 -23
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +18 -0
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +18 -0
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +106 -209
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +106 -209
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +18 -0
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +18 -0
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +126 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +126 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +21 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +17 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/mcp/command.d.mts +37 -0
- package/resources/mcp/command.d.mts.map +1 -0
- package/resources/mcp/command.d.ts +37 -0
- package/resources/mcp/command.d.ts.map +1 -0
- package/resources/mcp/command.js +15 -0
- package/resources/mcp/command.js.map +1 -0
- package/resources/mcp/command.mjs +11 -0
- package/resources/mcp/command.mjs.map +1 -0
- package/resources/mcp/index.d.mts +3 -0
- package/resources/mcp/index.d.mts.map +1 -0
- package/resources/mcp/index.d.ts +3 -0
- package/resources/mcp/index.d.ts.map +1 -0
- package/resources/mcp/index.js +9 -0
- package/resources/mcp/index.js.map +1 -0
- package/resources/mcp/index.mjs +4 -0
- package/resources/mcp/index.mjs.map +1 -0
- package/resources/mcp/mcp.d.mts +414 -0
- package/resources/mcp/mcp.d.mts.map +1 -0
- package/resources/mcp/mcp.d.ts +414 -0
- package/resources/mcp/mcp.d.ts.map +1 -0
- package/resources/mcp/mcp.js +65 -0
- package/resources/mcp/mcp.js.map +1 -0
- package/resources/mcp/mcp.mjs +60 -0
- package/resources/mcp/mcp.mjs.map +1 -0
- package/resources/mcp.d.mts +2 -0
- package/resources/mcp.d.mts.map +1 -0
- package/resources/mcp.d.ts +2 -0
- package/resources/mcp.d.ts.map +1 -0
- package/resources/mcp.js +6 -0
- package/resources/mcp.js.map +1 -0
- package/resources/mcp.mjs +3 -0
- package/resources/mcp.mjs.map +1 -0
- package/resources/migration.d.mts +23 -0
- package/resources/migration.d.mts.map +1 -0
- package/resources/migration.d.ts +23 -0
- package/resources/migration.d.ts.map +1 -0
- package/resources/migration.js +15 -0
- package/resources/migration.js.map +1 -0
- package/resources/migration.mjs +11 -0
- package/resources/migration.mjs.map +1 -0
- package/resources/org/api-key.d.mts +7 -0
- package/resources/org/api-key.d.mts.map +1 -1
- package/resources/org/api-key.d.ts +7 -0
- package/resources/org/api-key.d.ts.map +1 -1
- package/resources/org/api-key.js +7 -0
- package/resources/org/api-key.js.map +1 -1
- package/resources/org/api-key.mjs +7 -0
- package/resources/org/api-key.mjs.map +1 -1
- package/resources/org/org.js +3 -25
- package/resources/org/org.js.map +1 -1
- package/resources/org/project/project.d.mts +9 -6
- package/resources/org/project/project.d.mts.map +1 -1
- package/resources/org/project/project.d.ts +9 -6
- package/resources/org/project/project.d.ts.map +1 -1
- package/resources/org/project/project.js +13 -26
- package/resources/org/project/project.js.map +1 -1
- package/resources/org/project/project.mjs +9 -0
- package/resources/org/project/project.mjs.map +1 -1
- package/resources/org/project/trigger.d.mts +0 -4
- package/resources/org/project/trigger.d.mts.map +1 -1
- package/resources/org/project/trigger.d.ts +0 -4
- package/resources/org/project/trigger.d.ts.map +1 -1
- package/resources/org/project/webhook.d.mts +3 -0
- package/resources/org/project/webhook.d.mts.map +1 -1
- package/resources/org/project/webhook.d.ts +3 -0
- package/resources/org/project/webhook.d.ts.map +1 -1
- package/resources/org/project/webhook.js +3 -0
- package/resources/org/project/webhook.js.map +1 -1
- package/resources/org/project/webhook.mjs +3 -0
- package/resources/org/project/webhook.mjs.map +1 -1
- package/resources/org/project.js +2 -15
- package/resources/org/project.js.map +1 -1
- package/resources/org.js +2 -15
- package/resources/org.js.map +1 -1
- package/resources/team-members.d.mts +12 -0
- package/resources/team-members.d.mts.map +1 -1
- package/resources/team-members.d.ts +12 -0
- package/resources/team-members.d.ts.map +1 -1
- package/resources/team-members.js +12 -0
- package/resources/team-members.js.map +1 -1
- package/resources/team-members.mjs +12 -0
- package/resources/team-members.mjs.map +1 -1
- package/resources/toolkits.d.mts +25 -2
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +25 -2
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +10 -0
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +10 -0
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +107 -0
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +107 -0
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +14 -0
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +14 -0
- package/resources/tools.mjs.map +1 -1
- package/resources/trigger-instances/handle.d.mts +2 -2
- package/resources/trigger-instances/handle.d.mts.map +1 -1
- package/resources/trigger-instances/handle.d.ts +2 -2
- package/resources/trigger-instances/handle.d.ts.map +1 -1
- package/resources/trigger-instances/handle.js.map +1 -1
- package/resources/trigger-instances/handle.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +32 -9
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +32 -9
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +2 -24
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- 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 +11 -4
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +11 -4
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +7 -0
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +7 -0
- package/resources/triggers-types.mjs.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +132 -88
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +3 -3
- package/src/internal/headers.ts +4 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/shims.ts +1 -1
- package/src/internal/to-file.ts +4 -2
- package/src/internal/uploads.ts +21 -9
- package/src/internal/utils/base64.ts +16 -13
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -4
- package/src/internal/utils/uuid.ts +1 -3
- package/src/internal/utils/values.ts +6 -6
- package/src/resources/auth-configs.ts +100 -31
- package/src/resources/connected-accounts.ts +122 -295
- package/src/resources/files.ts +176 -0
- package/src/resources/index.ts +26 -8
- package/src/resources/mcp/command.ts +50 -0
- package/src/resources/mcp/index.ts +17 -0
- package/src/resources/mcp/mcp.ts +562 -0
- package/src/resources/mcp.ts +3 -0
- package/src/resources/migration.ts +37 -0
- package/src/resources/org/api-key.ts +7 -0
- package/src/resources/org/project/project.ts +9 -12
- package/src/resources/org/project/trigger.ts +0 -8
- package/src/resources/org/project/webhook.ts +3 -0
- package/src/resources/team-members.ts +12 -0
- package/src/resources/toolkits.ts +35 -2
- package/src/resources/tools.ts +128 -0
- package/src/resources/trigger-instances/handle.ts +10 -2
- package/src/resources/trigger-instances/trigger-instances.ts +36 -9
- package/src/resources/triggers-types.ts +13 -6
- 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 -68
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -64
- 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/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/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -64
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
- package/src/resources/action-execution.ts +0 -244
- package/src/resources/trigger.ts +0 -108
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers-types.d.mts","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI1F,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAG3D;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEhC,WAAW,EAAE,MAAM,CAAC;IAEpB,YAAY,EAAE,MAAM,CAAC;IAErB,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC,MAA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CAAC;SACd;KACF;CACF;AAED,MAAM,MAAM,gCAAgC,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -2,7 +2,14 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
export declare class TriggersTypes extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve detailed information about a specific trigger type using its slug
|
|
7
|
+
* identifier
|
|
8
|
+
*/
|
|
5
9
|
retrieve(slug: string, options?: RequestOptions): APIPromise<TriggersTypeRetrieveResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a list of available trigger types with optional filtering by toolkit
|
|
12
|
+
*/
|
|
6
13
|
list(query?: TriggersTypeListParams | null | undefined, options?: RequestOptions): APIPromise<TriggersTypeListResponse>;
|
|
7
14
|
retrieveEnum(options?: RequestOptions): APIPromise<string>;
|
|
8
15
|
}
|
|
@@ -29,8 +36,10 @@ export interface TriggersTypeListResponse {
|
|
|
29
36
|
}
|
|
30
37
|
export declare namespace TriggersTypeListResponse {
|
|
31
38
|
interface Item {
|
|
39
|
+
config: Record<string, unknown>;
|
|
32
40
|
description: string;
|
|
33
41
|
name: string;
|
|
42
|
+
payload: Record<string, unknown>;
|
|
34
43
|
slug: string;
|
|
35
44
|
toolkit: Item.Toolkit;
|
|
36
45
|
type: 'webhook' | 'poll';
|
|
@@ -44,14 +53,12 @@ export declare namespace TriggersTypeListResponse {
|
|
|
44
53
|
}
|
|
45
54
|
export type TriggersTypeRetrieveEnumResponse = string;
|
|
46
55
|
export interface TriggersTypeListParams {
|
|
47
|
-
auth_config_id?: string;
|
|
48
|
-
connected_account_id?: string;
|
|
49
56
|
cursor?: string;
|
|
50
57
|
limit?: number | null;
|
|
51
58
|
/**
|
|
52
|
-
*
|
|
59
|
+
* Array of toolkit slugs
|
|
53
60
|
*/
|
|
54
|
-
toolkit_slugs?: string;
|
|
61
|
+
toolkit_slugs?: Array<string> | null;
|
|
55
62
|
}
|
|
56
63
|
export declare namespace TriggersTypes {
|
|
57
64
|
export { type TriggersTypeRetrieveResponse as TriggersTypeRetrieveResponse, type TriggersTypeListResponse as TriggersTypeListResponse, type TriggersTypeRetrieveEnumResponse as TriggersTypeRetrieveEnumResponse, type TriggersTypeListParams as TriggersTypeListParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers-types.d.ts","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI1F,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC,YAAY,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAG3D;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEhC,W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,MAAM,CAAC;KAC1B;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,OAAO;YACtB,IAAI,EAAE,MAAM,CAAC;YAEb,IAAI,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,MAAM,gCAAgC,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -5,9 +5,16 @@ exports.TriggersTypes = void 0;
|
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
7
|
class TriggersTypes extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve detailed information about a specific trigger type using its slug
|
|
10
|
+
* identifier
|
|
11
|
+
*/
|
|
8
12
|
retrieve(slug, options) {
|
|
9
13
|
return this._client.get((0, path_1.path) `/api/v3/triggers_types/${slug}`, options);
|
|
10
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve a list of available trigger types with optional filtering by toolkit
|
|
17
|
+
*/
|
|
11
18
|
list(query = {}, options) {
|
|
12
19
|
return this._client.get('/api/v3/triggers_types', { query, ...options });
|
|
13
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers-types.js","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"triggers-types.js","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;OAGG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAtBD,sCAsBC"}
|
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
4
|
export class TriggersTypes extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve detailed information about a specific trigger type using its slug
|
|
7
|
+
* identifier
|
|
8
|
+
*/
|
|
5
9
|
retrieve(slug, options) {
|
|
6
10
|
return this._client.get(path `/api/v3/triggers_types/${slug}`, options);
|
|
7
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve a list of available trigger types with optional filtering by toolkit
|
|
14
|
+
*/
|
|
8
15
|
list(query = {}, options) {
|
|
9
16
|
return this._client.get('/api/v3/triggers_types', { query, ...options });
|
|
10
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers-types.mjs","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"triggers-types.mjs","sourceRoot":"","sources":["../src/resources/triggers-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;OAGG;IACH,QAAQ,CAAC,IAAY,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,YAAY,CAAC,OAAwB;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
|
package/resources.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
+
tslib_1.__exportStar(require("./resources/index.js"), exports);
|
|
18
5
|
//# sourceMappingURL=resources.js.map
|
package/resources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":";;;AAAA,+DAAkC"}
|
package/src/client.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { APIResponseProps } from './internal/parse';
|
|
|
12
12
|
import { getPlatformHeaders } from './internal/detect-platform';
|
|
13
13
|
import * as Shims from './internal/shims';
|
|
14
14
|
import * as Opts from './internal/request-options';
|
|
15
|
+
import * as qs from './internal/qs';
|
|
15
16
|
import { VERSION } from './version';
|
|
16
17
|
import * as Errors from './core/error';
|
|
17
18
|
import * as Uploads from './core/uploads';
|
|
@@ -20,13 +21,6 @@ import { APIPromise } from './core/api-promise';
|
|
|
20
21
|
import { type Fetch } from './internal/builtin-types';
|
|
21
22
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
22
23
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
23
|
-
import {
|
|
24
|
-
ActionExecution,
|
|
25
|
-
ActionExecutionLogParams,
|
|
26
|
-
ActionExecutionLogResponse,
|
|
27
|
-
ActionExecutionRetrieveFieldsResponse,
|
|
28
|
-
ActionExecutionRetrieveLogResponse,
|
|
29
|
-
} from './resources/action-execution';
|
|
30
24
|
import {
|
|
31
25
|
AuthConfigCreateParams,
|
|
32
26
|
AuthConfigCreateResponse,
|
|
@@ -52,6 +46,18 @@ import {
|
|
|
52
46
|
ConnectedAccountUpdateStatusResponse,
|
|
53
47
|
ConnectedAccounts,
|
|
54
48
|
} from './resources/connected-accounts';
|
|
49
|
+
import {
|
|
50
|
+
FileCreatePresignedURLParams,
|
|
51
|
+
FileCreatePresignedURLResponse,
|
|
52
|
+
FileListParams,
|
|
53
|
+
FileListResponse,
|
|
54
|
+
Files,
|
|
55
|
+
} from './resources/files';
|
|
56
|
+
import {
|
|
57
|
+
Migration,
|
|
58
|
+
MigrationRetrieveNanoidParams,
|
|
59
|
+
MigrationRetrieveNanoidResponse,
|
|
60
|
+
} from './resources/migration';
|
|
55
61
|
import {
|
|
56
62
|
TeamMemberInviteParams,
|
|
57
63
|
TeamMemberInviteResponse,
|
|
@@ -81,7 +87,6 @@ import {
|
|
|
81
87
|
ToolRetrieveResponse,
|
|
82
88
|
Tools,
|
|
83
89
|
} from './resources/tools';
|
|
84
|
-
import { Trigger, TriggerLogParams, TriggerLogResponse } from './resources/trigger';
|
|
85
90
|
import {
|
|
86
91
|
TriggersTypeListParams,
|
|
87
92
|
TriggersTypeListResponse,
|
|
@@ -92,6 +97,20 @@ import {
|
|
|
92
97
|
import { readEnv } from './internal/utils/env';
|
|
93
98
|
import { formatRequestDetails, loggerFor } from './internal/utils/log';
|
|
94
99
|
import { isEmptyObj } from './internal/utils/values';
|
|
100
|
+
import {
|
|
101
|
+
Mcp,
|
|
102
|
+
McpCreateParams,
|
|
103
|
+
McpCreateResponse,
|
|
104
|
+
McpDeleteResponse,
|
|
105
|
+
McpListParams,
|
|
106
|
+
McpListResponse,
|
|
107
|
+
McpRetrieveAppResponse,
|
|
108
|
+
McpRetrieveResponse,
|
|
109
|
+
McpUpdateParams,
|
|
110
|
+
McpUpdateResponse,
|
|
111
|
+
McpValidateParams,
|
|
112
|
+
McpValidateResponse,
|
|
113
|
+
} from './resources/mcp/mcp';
|
|
95
114
|
import { Org } from './resources/org/org';
|
|
96
115
|
import {
|
|
97
116
|
TriggerInstanceListActiveParams,
|
|
@@ -107,15 +126,15 @@ import {
|
|
|
107
126
|
const environments = {
|
|
108
127
|
production: 'https://backend.composio.dev',
|
|
109
128
|
staging: 'https://staging-backend.composio.dev',
|
|
110
|
-
local: 'http://localhost:
|
|
129
|
+
local: 'http://localhost:9900',
|
|
111
130
|
};
|
|
112
131
|
type Environment = keyof typeof environments;
|
|
113
132
|
|
|
114
133
|
export interface ClientOptions {
|
|
115
134
|
/**
|
|
116
|
-
*
|
|
135
|
+
* API key authentication
|
|
117
136
|
*/
|
|
118
|
-
apiKey?: string | undefined;
|
|
137
|
+
apiKey?: string | null | undefined;
|
|
119
138
|
|
|
120
139
|
/**
|
|
121
140
|
* Specifies the environment to use for the API.
|
|
@@ -123,14 +142,14 @@ export interface ClientOptions {
|
|
|
123
142
|
* Each environment maps to a different base URL:
|
|
124
143
|
* - `production` corresponds to `https://backend.composio.dev`
|
|
125
144
|
* - `staging` corresponds to `https://staging-backend.composio.dev`
|
|
126
|
-
* - `local` corresponds to `http://localhost:
|
|
145
|
+
* - `local` corresponds to `http://localhost:9900`
|
|
127
146
|
*/
|
|
128
147
|
environment?: Environment | undefined;
|
|
129
148
|
|
|
130
149
|
/**
|
|
131
150
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
132
151
|
*
|
|
133
|
-
* Defaults to process.env['
|
|
152
|
+
* Defaults to process.env['COMPOSIO_BASE_URL'].
|
|
134
153
|
*/
|
|
135
154
|
baseURL?: string | null | undefined;
|
|
136
155
|
|
|
@@ -182,7 +201,7 @@ export interface ClientOptions {
|
|
|
182
201
|
/**
|
|
183
202
|
* Set the log level.
|
|
184
203
|
*
|
|
185
|
-
* Defaults to process.env['
|
|
204
|
+
* Defaults to process.env['COMPOSIO_LOG'] or 'warn' if it isn't set.
|
|
186
205
|
*/
|
|
187
206
|
logLevel?: LogLevel | undefined;
|
|
188
207
|
|
|
@@ -195,10 +214,10 @@ export interface ClientOptions {
|
|
|
195
214
|
}
|
|
196
215
|
|
|
197
216
|
/**
|
|
198
|
-
* API Client for interfacing with the Composio
|
|
217
|
+
* API Client for interfacing with the Composio API.
|
|
199
218
|
*/
|
|
200
|
-
export class
|
|
201
|
-
apiKey: string;
|
|
219
|
+
export class Composio {
|
|
220
|
+
apiKey: string | null;
|
|
202
221
|
|
|
203
222
|
baseURL: string;
|
|
204
223
|
maxRetries: number;
|
|
@@ -213,11 +232,11 @@ export class ComposioSDK {
|
|
|
213
232
|
private _options: ClientOptions;
|
|
214
233
|
|
|
215
234
|
/**
|
|
216
|
-
* API Client for interfacing with the Composio
|
|
235
|
+
* API Client for interfacing with the Composio API.
|
|
217
236
|
*
|
|
218
|
-
* @param {string | undefined} [opts.apiKey=process.env['COMPOSIO_API_KEY'] ??
|
|
237
|
+
* @param {string | null | undefined} [opts.apiKey=process.env['COMPOSIO_API_KEY'] ?? null]
|
|
219
238
|
* @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
|
|
220
|
-
* @param {string} [opts.baseURL=process.env['
|
|
239
|
+
* @param {string} [opts.baseURL=process.env['COMPOSIO_BASE_URL'] ?? https://backend.composio.dev] - Override the default base URL for the API.
|
|
221
240
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
222
241
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
223
242
|
* @param {Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -226,16 +245,10 @@ export class ComposioSDK {
|
|
|
226
245
|
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
227
246
|
*/
|
|
228
247
|
constructor({
|
|
229
|
-
baseURL = readEnv('
|
|
230
|
-
apiKey = readEnv('COMPOSIO_API_KEY'),
|
|
248
|
+
baseURL = readEnv('COMPOSIO_BASE_URL'),
|
|
249
|
+
apiKey = readEnv('COMPOSIO_API_KEY') ?? null,
|
|
231
250
|
...opts
|
|
232
251
|
}: ClientOptions = {}) {
|
|
233
|
-
if (apiKey === undefined) {
|
|
234
|
-
throw new Errors.ComposioSDKError(
|
|
235
|
-
"The COMPOSIO_API_KEY environment variable is missing or empty; either provide it, or instantiate the ComposioSDK client with an apiKey option, like new ComposioSDK({ apiKey: 'My API Key' }).",
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
252
|
const options: ClientOptions = {
|
|
240
253
|
apiKey,
|
|
241
254
|
...opts,
|
|
@@ -244,20 +257,20 @@ export class ComposioSDK {
|
|
|
244
257
|
};
|
|
245
258
|
|
|
246
259
|
if (baseURL && opts.environment) {
|
|
247
|
-
throw new Errors.
|
|
248
|
-
'Ambiguous URL; The `baseURL` option (or
|
|
260
|
+
throw new Errors.ComposioError(
|
|
261
|
+
'Ambiguous URL; The `baseURL` option (or COMPOSIO_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null',
|
|
249
262
|
);
|
|
250
263
|
}
|
|
251
264
|
|
|
252
265
|
this.baseURL = options.baseURL || environments[options.environment || 'production'];
|
|
253
|
-
this.timeout = options.timeout ??
|
|
266
|
+
this.timeout = options.timeout ?? Composio.DEFAULT_TIMEOUT /* 1 minute */;
|
|
254
267
|
this.logger = options.logger ?? console;
|
|
255
268
|
const defaultLogLevel = 'warn';
|
|
256
269
|
// Set default logLevel early so that we can log a warning in parseLogLevel.
|
|
257
270
|
this.logLevel = defaultLogLevel;
|
|
258
271
|
this.logLevel =
|
|
259
272
|
parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ??
|
|
260
|
-
parseLogLevel(readEnv('
|
|
273
|
+
parseLogLevel(readEnv('COMPOSIO_LOG'), "process.env['COMPOSIO_LOG']", this) ??
|
|
261
274
|
defaultLogLevel;
|
|
262
275
|
this.fetchOptions = options.fetchOptions;
|
|
263
276
|
this.maxRetries = options.maxRetries ?? 2;
|
|
@@ -269,36 +282,50 @@ export class ComposioSDK {
|
|
|
269
282
|
this.apiKey = apiKey;
|
|
270
283
|
}
|
|
271
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
287
|
+
*/
|
|
288
|
+
withOptions(options: Partial<ClientOptions>): this {
|
|
289
|
+
return new (this.constructor as any as new (props: ClientOptions) => typeof this)({
|
|
290
|
+
...this._options,
|
|
291
|
+
environment: options.environment ? options.environment : undefined,
|
|
292
|
+
baseURL: options.environment ? undefined : this.baseURL,
|
|
293
|
+
maxRetries: this.maxRetries,
|
|
294
|
+
timeout: this.timeout,
|
|
295
|
+
logger: this.logger,
|
|
296
|
+
logLevel: this.logLevel,
|
|
297
|
+
fetchOptions: this.fetchOptions,
|
|
298
|
+
apiKey: this.apiKey,
|
|
299
|
+
...options,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
272
303
|
protected defaultQuery(): Record<string, string | undefined> | undefined {
|
|
273
304
|
return this._options.defaultQuery;
|
|
274
305
|
}
|
|
275
306
|
|
|
276
307
|
protected validateHeaders({ values, nulls }: NullableHeaders) {
|
|
277
|
-
|
|
308
|
+
if (this.apiKey && values.get('x-api-key')) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (nulls.has('x-api-key')) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
throw new Error(
|
|
316
|
+
'Could not resolve authentication method. Expected the apiKey to be set. Or for the "x-api-key" headers to be explicitly omitted',
|
|
317
|
+
);
|
|
278
318
|
}
|
|
279
319
|
|
|
280
320
|
protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined {
|
|
281
|
-
|
|
321
|
+
if (this.apiKey == null) {
|
|
322
|
+
return undefined;
|
|
323
|
+
}
|
|
324
|
+
return buildHeaders([{ 'x-api-key': this.apiKey }]);
|
|
282
325
|
}
|
|
283
326
|
|
|
284
|
-
/**
|
|
285
|
-
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
286
|
-
*/
|
|
287
327
|
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
288
|
-
return
|
|
289
|
-
.filter(([_, value]) => typeof value !== 'undefined')
|
|
290
|
-
.map(([key, value]) => {
|
|
291
|
-
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
292
|
-
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
293
|
-
}
|
|
294
|
-
if (value === null) {
|
|
295
|
-
return `${encodeURIComponent(key)}=`;
|
|
296
|
-
}
|
|
297
|
-
throw new Errors.ComposioSDKError(
|
|
298
|
-
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
|
|
299
|
-
);
|
|
300
|
-
})
|
|
301
|
-
.join('&');
|
|
328
|
+
return qs.stringify(query, { arrayFormat: 'comma' });
|
|
302
329
|
}
|
|
303
330
|
|
|
304
331
|
private getUserAgent(): string {
|
|
@@ -573,12 +600,12 @@ export class ComposioSDK {
|
|
|
573
600
|
fetchOptions.method = method.toUpperCase();
|
|
574
601
|
}
|
|
575
602
|
|
|
576
|
-
|
|
603
|
+
try {
|
|
577
604
|
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
|
|
578
|
-
this.fetch.call(undefined, url, fetchOptions)
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
605
|
+
return await this.fetch.call(undefined, url, fetchOptions);
|
|
606
|
+
} finally {
|
|
607
|
+
clearTimeout(timeout);
|
|
608
|
+
}
|
|
582
609
|
}
|
|
583
610
|
|
|
584
611
|
private shouldRetry(response: Response): boolean {
|
|
@@ -659,17 +686,17 @@ export class ComposioSDK {
|
|
|
659
686
|
}
|
|
660
687
|
|
|
661
688
|
buildRequest(
|
|
662
|
-
|
|
689
|
+
inputOptions: FinalRequestOptions,
|
|
663
690
|
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
664
691
|
): { req: FinalizedRequestInit; url: string; timeout: number } {
|
|
665
|
-
options = { ...
|
|
692
|
+
const options = { ...inputOptions };
|
|
666
693
|
const { method, path, query } = options;
|
|
667
694
|
|
|
668
695
|
const url = this.buildURL(path!, query as Record<string, unknown>);
|
|
669
696
|
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
670
697
|
options.timeout = options.timeout ?? this.timeout;
|
|
671
698
|
const { bodyHeaders, body } = this.buildBody({ options });
|
|
672
|
-
const reqHeaders = this.buildHeaders({ options, method, bodyHeaders, retryCount });
|
|
699
|
+
const reqHeaders = this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
673
700
|
|
|
674
701
|
const req: FinalizedRequestInit = {
|
|
675
702
|
method,
|
|
@@ -759,10 +786,10 @@ export class ComposioSDK {
|
|
|
759
786
|
}
|
|
760
787
|
}
|
|
761
788
|
|
|
762
|
-
static
|
|
789
|
+
static Composio = this;
|
|
763
790
|
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
764
791
|
|
|
765
|
-
static
|
|
792
|
+
static ComposioError = Errors.ComposioError;
|
|
766
793
|
static APIError = Errors.APIError;
|
|
767
794
|
static APIConnectionError = Errors.APIConnectionError;
|
|
768
795
|
static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
@@ -780,26 +807,28 @@ export class ComposioSDK {
|
|
|
780
807
|
|
|
781
808
|
authConfigs: API.AuthConfigs = new API.AuthConfigs(this);
|
|
782
809
|
connectedAccounts: API.ConnectedAccounts = new API.ConnectedAccounts(this);
|
|
783
|
-
trigger: API.Trigger = new API.Trigger(this);
|
|
784
|
-
actionExecution: API.ActionExecution = new API.ActionExecution(this);
|
|
785
810
|
org: API.Org = new API.Org(this);
|
|
786
811
|
teamMembers: API.TeamMembers = new API.TeamMembers(this);
|
|
787
812
|
toolkits: API.Toolkits = new API.Toolkits(this);
|
|
788
813
|
tools: API.Tools = new API.Tools(this);
|
|
789
814
|
triggerInstances: API.TriggerInstances = new API.TriggerInstances(this);
|
|
790
815
|
triggersTypes: API.TriggersTypes = new API.TriggersTypes(this);
|
|
816
|
+
mcp: API.Mcp = new API.Mcp(this);
|
|
817
|
+
files: API.Files = new API.Files(this);
|
|
818
|
+
migration: API.Migration = new API.Migration(this);
|
|
791
819
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
820
|
+
Composio.AuthConfigs = AuthConfigs;
|
|
821
|
+
Composio.ConnectedAccounts = ConnectedAccounts;
|
|
822
|
+
Composio.Org = Org;
|
|
823
|
+
Composio.TeamMembers = TeamMembers;
|
|
824
|
+
Composio.Toolkits = Toolkits;
|
|
825
|
+
Composio.Tools = Tools;
|
|
826
|
+
Composio.TriggerInstances = TriggerInstances;
|
|
827
|
+
Composio.TriggersTypes = TriggersTypes;
|
|
828
|
+
Composio.Mcp = Mcp;
|
|
829
|
+
Composio.Files = Files;
|
|
830
|
+
Composio.Migration = Migration;
|
|
831
|
+
export declare namespace Composio {
|
|
803
832
|
export type RequestOptions = Opts.RequestOptions;
|
|
804
833
|
|
|
805
834
|
export {
|
|
@@ -829,20 +858,6 @@ export declare namespace ComposioSDK {
|
|
|
829
858
|
type ConnectedAccountUpdateStatusParams as ConnectedAccountUpdateStatusParams,
|
|
830
859
|
};
|
|
831
860
|
|
|
832
|
-
export {
|
|
833
|
-
Trigger as Trigger,
|
|
834
|
-
type TriggerLogResponse as TriggerLogResponse,
|
|
835
|
-
type TriggerLogParams as TriggerLogParams,
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
export {
|
|
839
|
-
ActionExecution as ActionExecution,
|
|
840
|
-
type ActionExecutionLogResponse as ActionExecutionLogResponse,
|
|
841
|
-
type ActionExecutionRetrieveFieldsResponse as ActionExecutionRetrieveFieldsResponse,
|
|
842
|
-
type ActionExecutionRetrieveLogResponse as ActionExecutionRetrieveLogResponse,
|
|
843
|
-
type ActionExecutionLogParams as ActionExecutionLogParams,
|
|
844
|
-
};
|
|
845
|
-
|
|
846
861
|
export { Org as Org };
|
|
847
862
|
|
|
848
863
|
export {
|
|
@@ -895,4 +910,33 @@ export declare namespace ComposioSDK {
|
|
|
895
910
|
type TriggersTypeRetrieveEnumResponse as TriggersTypeRetrieveEnumResponse,
|
|
896
911
|
type TriggersTypeListParams as TriggersTypeListParams,
|
|
897
912
|
};
|
|
913
|
+
|
|
914
|
+
export {
|
|
915
|
+
Mcp as Mcp,
|
|
916
|
+
type McpCreateResponse as McpCreateResponse,
|
|
917
|
+
type McpRetrieveResponse as McpRetrieveResponse,
|
|
918
|
+
type McpUpdateResponse as McpUpdateResponse,
|
|
919
|
+
type McpListResponse as McpListResponse,
|
|
920
|
+
type McpDeleteResponse as McpDeleteResponse,
|
|
921
|
+
type McpRetrieveAppResponse as McpRetrieveAppResponse,
|
|
922
|
+
type McpValidateResponse as McpValidateResponse,
|
|
923
|
+
type McpCreateParams as McpCreateParams,
|
|
924
|
+
type McpUpdateParams as McpUpdateParams,
|
|
925
|
+
type McpListParams as McpListParams,
|
|
926
|
+
type McpValidateParams as McpValidateParams,
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
export {
|
|
930
|
+
Files as Files,
|
|
931
|
+
type FileListResponse as FileListResponse,
|
|
932
|
+
type FileCreatePresignedURLResponse as FileCreatePresignedURLResponse,
|
|
933
|
+
type FileListParams as FileListParams,
|
|
934
|
+
type FileCreatePresignedURLParams as FileCreatePresignedURLParams,
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
export {
|
|
938
|
+
Migration as Migration,
|
|
939
|
+
type MigrationRetrieveNanoidResponse as MigrationRetrieveNanoidResponse,
|
|
940
|
+
type MigrationRetrieveNanoidParams as MigrationRetrieveNanoidParams,
|
|
941
|
+
};
|
|
898
942
|
}
|
package/src/core/api-promise.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { type
|
|
3
|
+
import { type Composio } from '../client';
|
|
4
4
|
|
|
5
5
|
import { type PromiseOrValue } from '../internal/types';
|
|
6
6
|
import { APIResponseProps, defaultParseResponse } from '../internal/parse';
|
|
@@ -11,13 +11,13 @@ import { APIResponseProps, defaultParseResponse } from '../internal/parse';
|
|
|
11
11
|
*/
|
|
12
12
|
export class APIPromise<T> extends Promise<T> {
|
|
13
13
|
private parsedPromise: Promise<T> | undefined;
|
|
14
|
-
#client:
|
|
14
|
+
#client: Composio;
|
|
15
15
|
|
|
16
16
|
constructor(
|
|
17
|
-
client:
|
|
17
|
+
client: Composio,
|
|
18
18
|
private responsePromise: Promise<APIResponseProps>,
|
|
19
19
|
private parseResponse: (
|
|
20
|
-
client:
|
|
20
|
+
client: Composio,
|
|
21
21
|
props: APIResponseProps,
|
|
22
22
|
) => PromiseOrValue<T> = defaultParseResponse,
|
|
23
23
|
) {
|
package/src/core/error.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { castToError } from '../internal/errors';
|
|
4
4
|
|
|
5
|
-
export class
|
|
5
|
+
export class ComposioError extends Error {}
|
|
6
6
|
|
|
7
7
|
export class APIError<
|
|
8
8
|
TStatus extends number | undefined = number | undefined,
|
|
9
9
|
THeaders extends Headers | undefined = Headers | undefined,
|
|
10
10
|
TError extends Object | undefined = Object | undefined,
|
|
11
|
-
> extends
|
|
11
|
+
> extends ComposioError {
|
|
12
12
|
/** HTTP status for the response that caused the error */
|
|
13
13
|
readonly status: TStatus;
|
|
14
14
|
/** HTTP headers for the response that caused the error */
|
package/src/core/resource.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { Composio } from '../client';
|
|
4
4
|
|
|
5
5
|
export class APIResource {
|
|
6
|
-
protected _client:
|
|
6
|
+
protected _client: Composio;
|
|
7
7
|
|
|
8
|
-
constructor(client:
|
|
8
|
+
constructor(client: Composio) {
|
|
9
9
|
this._client = client;
|
|
10
10
|
}
|
|
11
11
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Composio as default } from './client';
|
|
4
4
|
|
|
5
5
|
export { type Uploadable, toFile } from './core/uploads';
|
|
6
6
|
export { APIPromise } from './core/api-promise';
|
|
7
|
-
export {
|
|
7
|
+
export { Composio, type ClientOptions } from './client';
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
ComposioError,
|
|
10
10
|
APIError,
|
|
11
11
|
APIConnectionError,
|
|
12
12
|
APIConnectionTimeoutError,
|
package/src/internal/headers.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
type HeaderValue = string | undefined | null;
|
|
4
4
|
export type HeadersLike =
|
|
5
5
|
| Headers
|
|
6
|
-
| readonly [
|
|
6
|
+
| readonly HeaderValue[][]
|
|
7
7
|
| Record<string, HeaderValue | readonly HeaderValue[]>
|
|
8
8
|
| undefined
|
|
9
9
|
| null
|
|
@@ -40,7 +40,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
let shouldClear = false;
|
|
43
|
-
let iter: Iterable<readonly
|
|
43
|
+
let iter: Iterable<readonly (HeaderValue | readonly HeaderValue[])[]>;
|
|
44
44
|
if (headers instanceof Headers) {
|
|
45
45
|
iter = headers.entries();
|
|
46
46
|
} else if (isArray(headers)) {
|
|
@@ -51,6 +51,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
|
51
51
|
}
|
|
52
52
|
for (let row of iter) {
|
|
53
53
|
const name = row[0];
|
|
54
|
+
if (typeof name !== 'string') throw new TypeError('expected header name to be a string');
|
|
54
55
|
const values = isArray(row[1]) ? row[1] : [row[1]];
|
|
55
56
|
let didClear = false;
|
|
56
57
|
for (const value of values) {
|
|
@@ -70,8 +71,8 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator<readonly [strin
|
|
|
70
71
|
export const buildHeaders = (newHeaders: HeadersLike[]): NullableHeaders => {
|
|
71
72
|
const targetHeaders = new Headers();
|
|
72
73
|
const nullHeaders = new Set<string>();
|
|
73
|
-
const seenHeaders = new Set<string>();
|
|
74
74
|
for (const headers of newHeaders) {
|
|
75
|
+
const seenHeaders = new Set<string>();
|
|
75
76
|
for (const [name, value] of iterateHeaders(headers)) {
|
|
76
77
|
const lowerName = name.toLowerCase();
|
|
77
78
|
if (!seenHeaders.has(lowerName)) {
|