@composio/client 0.1.0-alpha.7 → 0.1.0-alpha.71
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 +977 -0
- package/LICENSE +1 -1
- package/README.md +22 -35
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/client.d.mts +85 -43
- package/client.d.mts.map +1 -1
- package/client.d.ts +85 -43
- package/client.d.ts.map +1 -1
- package/client.js +162 -108
- package/client.js.map +1 -1
- package/client.mjs +144 -67
- 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 +6 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- 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/{resources/org.mjs → 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 +12 -11
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +12 -11
- 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 +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- 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 +6 -5
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +4 -3
- 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/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- 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.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +8 -20
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +14 -11
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/auth-configs.d.mts +511 -54
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +511 -54
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +79 -6
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +79 -6
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/cli/cli.d.mts +120 -0
- package/resources/cli/cli.d.mts.map +1 -0
- package/resources/cli/cli.d.ts +120 -0
- package/resources/cli/cli.d.ts.map +1 -0
- package/resources/cli/cli.js +36 -0
- package/resources/cli/cli.js.map +1 -0
- package/resources/cli/cli.mjs +31 -0
- package/resources/cli/cli.mjs.map +1 -0
- package/resources/cli/index.d.mts +3 -0
- package/resources/cli/index.d.mts.map +1 -0
- package/resources/cli/index.d.ts +3 -0
- package/resources/cli/index.d.ts.map +1 -0
- package/resources/cli/index.js +9 -0
- package/resources/cli/index.js.map +1 -0
- package/resources/cli/index.mjs +4 -0
- package/resources/cli/index.mjs.map +1 -0
- package/resources/cli/realtime.d.mts +56 -0
- package/resources/cli/realtime.d.mts.map +1 -0
- package/resources/cli/realtime.d.ts +56 -0
- package/resources/cli/realtime.d.ts.map +1 -0
- package/resources/cli/realtime.js +25 -0
- package/resources/cli/realtime.js.map +1 -0
- package/resources/cli/realtime.mjs +21 -0
- package/resources/cli/realtime.mjs.map +1 -0
- package/resources/cli.d.mts +1 -123
- package/resources/cli.d.mts.map +1 -1
- package/resources/cli.d.ts +1 -123
- package/resources/cli.d.ts.map +1 -1
- package/resources/cli.js +2 -14
- package/resources/cli.js.map +1 -1
- package/resources/cli.mjs +1 -12
- package/resources/cli.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +9882 -231
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +9882 -231
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +124 -7
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +124 -7
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +152 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +152 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +42 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +38 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +13 -12
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +13 -12
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +14 -12
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -6
- package/resources/index.mjs.map +1 -1
- package/resources/link.d.mts +2273 -0
- package/resources/link.d.mts.map +1 -0
- package/resources/link.d.ts +2273 -0
- package/resources/link.d.ts.map +1 -0
- package/resources/link.js +19 -0
- package/resources/link.js.map +1 -0
- package/resources/link.mjs +15 -0
- package/resources/link.mjs.map +1 -0
- package/resources/logs/index.d.mts +4 -0
- package/resources/logs/index.d.mts.map +1 -0
- package/resources/logs/index.d.ts +4 -0
- package/resources/logs/index.d.ts.map +1 -0
- package/resources/logs/index.js +11 -0
- package/resources/logs/index.js.map +1 -0
- package/resources/logs/index.mjs +5 -0
- package/resources/logs/index.mjs.map +1 -0
- package/resources/logs/logs.d.mts +14 -0
- package/resources/logs/logs.d.mts.map +1 -0
- package/resources/logs/logs.d.ts +14 -0
- package/resources/logs/logs.d.ts.map +1 -0
- package/resources/logs/logs.js +21 -0
- package/resources/logs/logs.js.map +1 -0
- package/resources/logs/logs.mjs +16 -0
- package/resources/logs/logs.mjs.map +1 -0
- package/resources/logs/tools.d.mts +173 -0
- package/resources/logs/tools.d.mts.map +1 -0
- package/resources/logs/tools.d.ts +173 -0
- package/resources/logs/tools.d.ts.map +1 -0
- package/resources/logs/tools.js +35 -0
- package/resources/logs/tools.js.map +1 -0
- package/resources/logs/tools.mjs +31 -0
- package/resources/logs/tools.mjs.map +1 -0
- package/resources/logs/triggers.d.mts +161 -0
- package/resources/logs/triggers.d.mts.map +1 -0
- package/resources/logs/triggers.d.ts +161 -0
- package/resources/logs/triggers.d.ts.map +1 -0
- package/resources/logs/triggers.js +36 -0
- package/resources/logs/triggers.js.map +1 -0
- package/resources/logs/triggers.mjs +32 -0
- package/resources/logs/triggers.mjs.map +1 -0
- package/resources/logs.d.mts +2 -0
- package/resources/logs.d.mts.map +1 -0
- package/resources/logs.d.ts +2 -0
- package/resources/logs.d.ts.map +1 -0
- package/resources/logs.js +6 -0
- package/resources/logs.js.map +1 -0
- package/resources/{auth.mjs → logs.mjs} +2 -2
- package/resources/logs.mjs.map +1 -0
- package/resources/mcp/custom.d.mts +105 -0
- package/resources/mcp/custom.d.mts.map +1 -0
- package/resources/mcp/custom.d.ts +105 -0
- package/resources/mcp/custom.d.ts.map +1 -0
- package/resources/mcp/custom.js +29 -0
- package/resources/mcp/custom.js.map +1 -0
- package/resources/mcp/custom.mjs +25 -0
- package/resources/mcp/custom.mjs.map +1 -0
- package/resources/mcp/generate.d.mts +65 -0
- package/resources/mcp/generate.d.mts.map +1 -0
- package/resources/mcp/generate.d.ts +65 -0
- package/resources/mcp/generate.d.ts.map +1 -0
- package/resources/mcp/generate.js +32 -0
- package/resources/mcp/generate.js.map +1 -0
- package/resources/mcp/generate.mjs +28 -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 +450 -175
- package/resources/mcp/mcp.d.mts.map +1 -1
- package/resources/mcp/mcp.d.ts +450 -175
- package/resources/mcp/mcp.d.ts.map +1 -1
- package/resources/mcp/mcp.js +95 -42
- package/resources/mcp/mcp.js.map +1 -1
- package/resources/mcp/mcp.mjs +94 -19
- 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 +35 -0
- package/resources/migration.d.mts.map +1 -0
- package/resources/migration.d.ts +35 -0
- package/resources/migration.d.ts.map +1 -0
- package/resources/migration.js +20 -0
- package/resources/migration.js.map +1 -0
- package/resources/migration.mjs +16 -0
- package/resources/migration.mjs.map +1 -0
- package/resources/project/config.d.mts +71 -0
- package/resources/project/config.d.mts.map +1 -0
- package/resources/project/config.d.ts +71 -0
- package/resources/project/config.d.ts.map +1 -0
- package/resources/project/config.js +33 -0
- package/resources/project/config.js.map +1 -0
- package/resources/project/config.mjs +29 -0
- package/resources/project/config.mjs.map +1 -0
- package/resources/project/index.d.mts +3 -0
- package/resources/project/index.d.mts.map +1 -0
- package/resources/project/index.d.ts +3 -0
- package/resources/project/index.d.ts.map +1 -0
- package/resources/project/index.js +9 -0
- package/resources/project/index.js.map +1 -0
- package/resources/project/index.mjs +4 -0
- package/resources/project/index.mjs.map +1 -0
- package/resources/project/project.d.mts +10 -0
- package/resources/project/project.d.mts.map +1 -0
- package/resources/project/project.d.ts +10 -0
- package/resources/project/project.d.ts.map +1 -0
- package/resources/project/project.js +17 -0
- package/resources/project/project.js.map +1 -0
- package/resources/project/project.mjs +12 -0
- package/resources/project/project.mjs.map +1 -0
- package/resources/{org/project.d.mts.map → project.d.mts.map} +1 -1
- package/resources/{org/project.d.ts.map → project.d.ts.map} +1 -1
- package/resources/project.js +6 -0
- package/resources/project.js.map +1 -0
- package/resources/project.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/files.d.mts +205 -0
- package/resources/tool-router/session/files.d.mts.map +1 -0
- package/resources/tool-router/session/files.d.ts +205 -0
- package/resources/tool-router/session/files.d.ts.map +1 -0
- package/resources/tool-router/session/files.js +98 -0
- package/resources/tool-router/session/files.js.map +1 -0
- package/resources/tool-router/session/files.mjs +94 -0
- package/resources/tool-router/session/files.mjs.map +1 -0
- package/resources/tool-router/session/index.d.mts +3 -0
- package/resources/tool-router/session/index.d.mts.map +1 -0
- package/resources/tool-router/session/index.d.ts +3 -0
- package/resources/tool-router/session/index.d.ts.map +1 -0
- package/resources/{auth → tool-router/session}/index.js +3 -3
- package/resources/tool-router/session/index.js.map +1 -0
- package/resources/tool-router/session/index.mjs +4 -0
- package/resources/tool-router/session/index.mjs.map +1 -0
- package/resources/tool-router/session/session.d.mts +4024 -0
- package/resources/tool-router/session/session.d.mts.map +1 -0
- package/resources/tool-router/session/session.d.ts +4024 -0
- package/resources/tool-router/session/session.d.ts.map +1 -0
- package/resources/tool-router/session/session.js +224 -0
- package/resources/tool-router/session/session.js.map +1 -0
- package/resources/tool-router/session/session.mjs +219 -0
- package/resources/tool-router/session/session.mjs.map +1 -0
- package/resources/tool-router/session.d.mts +2 -0
- package/resources/tool-router/session.d.mts.map +1 -0
- package/resources/tool-router/session.d.ts +2 -0
- package/resources/tool-router/session.d.ts.map +1 -0
- package/resources/tool-router/session.js +6 -0
- package/resources/tool-router/session.js.map +1 -0
- package/resources/tool-router/session.mjs +3 -0
- package/resources/tool-router/session.mjs.map +1 -0
- package/resources/tool-router/tool-router.d.mts +94 -0
- package/resources/tool-router/tool-router.d.mts.map +1 -0
- package/resources/tool-router/tool-router.d.ts +94 -0
- package/resources/tool-router/tool-router.d.ts.map +1 -0
- package/resources/tool-router/tool-router.js +49 -0
- package/resources/tool-router/tool-router.js.map +1 -0
- package/resources/tool-router/tool-router.mjs +44 -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/tool-router.mjs +3 -0
- package/resources/tool-router.mjs.map +1 -0
- package/resources/toolkits.d.mts +322 -6
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +322 -6
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +25 -4
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +25 -4
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +1407 -41
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +1407 -41
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +88 -9
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +88 -9
- 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 +55 -0
- package/resources/trigger-instances/manage.d.mts.map +1 -0
- package/resources/trigger-instances/manage.d.ts +55 -0
- package/resources/trigger-instances/manage.d.ts.map +1 -0
- package/resources/trigger-instances/manage.js +45 -0
- package/resources/trigger-instances/manage.js.map +1 -0
- package/resources/trigger-instances/manage.mjs +41 -0
- package/resources/trigger-instances/manage.mjs.map +1 -0
- package/resources/trigger-instances/trigger-instances.d.mts +190 -43
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +190 -43
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +36 -37
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +35 -14
- 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 +160 -12
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +160 -12
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +19 -4
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +19 -4
- package/resources/triggers-types.mjs.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +239 -131
- 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/parse.ts +6 -0
- 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 +13 -12
- 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/env.ts +2 -2
- package/src/internal/utils/log.ts +3 -2
- package/src/internal/utils/path.ts +33 -8
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/uuid.ts +1 -3
- package/src/internal/utils/values.ts +6 -3
- package/src/internal/utils.ts +1 -0
- package/src/resources/auth-configs.ts +587 -73
- package/src/resources/cli/cli.ts +163 -0
- package/src/resources/cli/index.ts +15 -0
- package/src/resources/cli/realtime.ts +75 -0
- package/src/resources/cli.ts +1 -164
- package/src/resources/connected-accounts.ts +18489 -448
- package/src/resources/files.ts +197 -0
- package/src/resources/index.ts +30 -28
- package/src/resources/link.ts +4266 -0
- package/src/resources/logs/index.ts +10 -0
- package/src/resources/logs/logs.ts +31 -0
- package/src/resources/logs/tools.ts +239 -0
- package/src/resources/logs/triggers.ts +241 -0
- package/src/resources/{auth.ts → logs.ts} +1 -1
- package/src/resources/mcp/custom.ts +125 -0
- package/src/resources/mcp/generate.ts +77 -0
- package/src/resources/mcp/index.ts +3 -3
- package/src/resources/mcp/mcp.ts +490 -203
- package/src/resources/migration.ts +49 -0
- package/src/resources/project/config.ts +110 -0
- package/src/resources/project/index.ts +9 -0
- package/src/resources/project/project.ts +20 -0
- package/src/resources/tool-router/index.ts +33 -0
- package/src/resources/tool-router/session/files.ts +284 -0
- package/src/resources/tool-router/session/index.ts +39 -0
- package/src/resources/tool-router/session/session.ts +5034 -0
- package/src/resources/{org.ts → tool-router/session.ts} +1 -1
- package/src/resources/tool-router/tool-router.ts +168 -0
- package/src/resources/tool-router.ts +3 -0
- package/src/resources/toolkits.ts +377 -10
- package/src/resources/tools.ts +2176 -63
- package/src/resources/trigger-instances/index.ts +5 -9
- package/src/resources/trigger-instances/manage.ts +75 -0
- package/src/resources/trigger-instances/trigger-instances.ts +206 -69
- package/src/resources/triggers-types.ts +168 -16
- 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/auth/auth.d.mts +0 -10
- package/resources/auth/auth.d.mts.map +0 -1
- package/resources/auth/auth.d.ts +0 -10
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js +0 -39
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs +0 -12
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/index.d.mts +0 -3
- package/resources/auth/index.d.mts.map +0 -1
- package/resources/auth/index.d.ts +0 -3
- package/resources/auth/index.d.ts.map +0 -1
- package/resources/auth/index.js.map +0 -1
- package/resources/auth/index.mjs +0 -4
- package/resources/auth/index.mjs.map +0 -1
- package/resources/auth/session.d.mts +0 -75
- package/resources/auth/session.d.mts.map +0 -1
- package/resources/auth/session.d.ts +0 -75
- package/resources/auth/session.d.ts.map +0 -1
- package/resources/auth/session.js +0 -12
- package/resources/auth/session.js.map +0 -1
- package/resources/auth/session.mjs +0 -8
- package/resources/auth/session.mjs.map +0 -1
- package/resources/auth.d.mts +0 -2
- package/resources/auth.d.mts.map +0 -1
- package/resources/auth.d.ts +0 -2
- package/resources/auth.d.ts.map +0 -1
- package/resources/auth.js +0 -19
- package/resources/auth.js.map +0 -1
- package/resources/auth.mjs.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.js +0 -19
- package/resources/org/project.js.map +0 -1
- 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/auth/auth.ts +0 -15
- package/src/resources/auth/index.ts +0 -4
- package/src/resources/auth/session.ts +0 -127
- 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
- /package/resources/{org/project.d.mts → project.d.mts} +0 -0
- /package/resources/{org/project.d.ts → project.d.ts} +0 -0
- /package/resources/{org/project.mjs → project.mjs} +0 -0
- /package/src/resources/{org/project.ts → project.ts} +0 -0
|
@@ -4,24 +4,141 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.ConnectedAccounts = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Connected account management
|
|
9
|
+
*/
|
|
7
10
|
class ConnectedAccounts extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Initiates a new connection to an external service for a user. For OAuth-based
|
|
13
|
+
* toolkits, this returns a redirect URL to complete authentication. For API
|
|
14
|
+
* key-based toolkits, provide the credentials directly in the request body. Use
|
|
15
|
+
* the `user_id` field to associate the connection with a specific user in your
|
|
16
|
+
* system.
|
|
17
|
+
*
|
|
18
|
+
* **Deprecated for Composio-managed OAuth:** For Composio-managed auth configs on
|
|
19
|
+
* OAuth1, OAuth2, or DCR_OAUTH schemes, this endpoint is being retired and will
|
|
20
|
+
* start returning `400 BadRequest` on **2026-05-08** for new organizations and
|
|
21
|
+
* **2026-07-03** for all remaining organizations. Migrate those calls to
|
|
22
|
+
* `POST /api/v3/connected_accounts/link`. Custom auth configs and non-OAuth
|
|
23
|
+
* schemes (API key, bearer, basic) continue to be supported here. Responses on the
|
|
24
|
+
* retiring path carry a `Deprecation` header (RFC 9745) and a `Sunset` header
|
|
25
|
+
* (RFC 8594) for client-side detection.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const connectedAccount =
|
|
30
|
+
* await client.connectedAccounts.create({
|
|
31
|
+
* auth_config: { id: 'id' },
|
|
32
|
+
* connection: {},
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
8
36
|
create(body, options) {
|
|
9
|
-
return this._client.post('/api/v3/connected_accounts', { body, ...options });
|
|
37
|
+
return this._client.post('/api/v3.1/connected_accounts', { body, ...options });
|
|
10
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves comprehensive details of a connected account, including authentication
|
|
41
|
+
* configuration, connection status, and all parameters needed for API requests.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const connectedAccount =
|
|
46
|
+
* await client.connectedAccounts.retrieve(
|
|
47
|
+
* 'ca_1a2b3c4d5e6f',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
11
51
|
retrieve(nanoid, options) {
|
|
12
|
-
return this._client.get((0, path_1.path) `/api/v3/connected_accounts/${nanoid}`, options);
|
|
52
|
+
return this._client.get((0, path_1.path) `/api/v3.1/connected_accounts/${nanoid}`, options);
|
|
13
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves all connected accounts for your project. Connected accounts represent
|
|
56
|
+
* authenticated user connections to external services (e.g., a user's Gmail
|
|
57
|
+
* account, Slack workspace). Filter by toolkit, status, user ID, or auth config to
|
|
58
|
+
* find specific connections.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const connectedAccounts =
|
|
63
|
+
* await client.connectedAccounts.list();
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
14
66
|
list(query = {}, options) {
|
|
15
|
-
return this._client.get('/api/v3/connected_accounts', { query, ...options });
|
|
67
|
+
return this._client.get('/api/v3.1/connected_accounts', { query, ...options });
|
|
16
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Soft-deletes a connected account by marking it as deleted in the database. This
|
|
71
|
+
* prevents the account from being used for API calls but preserves the record for
|
|
72
|
+
* audit purposes.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const connectedAccount =
|
|
77
|
+
* await client.connectedAccounts.delete('ca_1a2b3c4d5e6f');
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
17
80
|
delete(nanoid, options) {
|
|
18
|
-
return this._client.delete((0, path_1.path) `/api/v3/connected_accounts/${nanoid}`, options);
|
|
81
|
+
return this._client.delete((0, path_1.path) `/api/v3.1/connected_accounts/${nanoid}`, options);
|
|
19
82
|
}
|
|
20
|
-
|
|
21
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Update a connected account. Supports updating the alias and/or credentials. Only
|
|
85
|
+
* specified fields will be updated. Set a credential field to null to remove it.
|
|
86
|
+
* Alias must be unique within the same project, entity, and toolkit scope.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const response = await client.connectedAccounts.patch(
|
|
91
|
+
* 'ca_1a2b3c4d5e6f',
|
|
92
|
+
* {
|
|
93
|
+
* connection: {
|
|
94
|
+
* state: {
|
|
95
|
+
* authScheme: 'BEARER_TOKEN',
|
|
96
|
+
* val: { token: 'new_access_token' },
|
|
97
|
+
* },
|
|
98
|
+
* },
|
|
99
|
+
* },
|
|
100
|
+
* );
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
patch(nanoid, body = {}, options) {
|
|
104
|
+
return this._client.patch((0, path_1.path) `/api/v3.1/connected_accounts/${nanoid}`, { body, ...options });
|
|
22
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Initiates a new authentication flow for a connected account when credentials
|
|
108
|
+
* have expired or become invalid. This may generate a new authentication URL for
|
|
109
|
+
* OAuth flows or refresh tokens for other auth schemes.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.connectedAccounts.refresh(
|
|
114
|
+
* 'ca_1a2b3c4d5e6f',
|
|
115
|
+
* );
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
refresh(nanoid, params = {}, options) {
|
|
119
|
+
const { query_redirect_url, ...body } = params ?? {};
|
|
120
|
+
return this._client.post((0, path_1.path) `/api/v3.1/connected_accounts/${nanoid}/refresh`, {
|
|
121
|
+
query: { redirect_url: query_redirect_url },
|
|
122
|
+
body,
|
|
123
|
+
...options,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Updates the status of a connected account to either enabled (active) or disabled
|
|
128
|
+
* (inactive). Disabled accounts cannot be used for API calls but remain in the
|
|
129
|
+
* database.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const response =
|
|
134
|
+
* await client.connectedAccounts.updateStatus(
|
|
135
|
+
* 'ca_1a2b3c4d5e6f',
|
|
136
|
+
* { enabled: true },
|
|
137
|
+
* );
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
23
140
|
updateStatus(nanoID, body, options) {
|
|
24
|
-
return this._client.patch((0, path_1.path) `/api/v3/connected_accounts/${nanoID}/status`, { body, ...options });
|
|
141
|
+
return this._client.patch((0, path_1.path) `/api/v3.1/connected_accounts/${nanoID}/status`, { body, ...options });
|
|
25
142
|
}
|
|
26
143
|
}
|
|
27
144
|
exports.ConnectedAccounts = ConnectedAccounts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected-accounts.js","sourceRoot":"","sources":["../src/resources/connected-accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,iBAAkB,SAAQ,sBAAW;IAChD,MAAM,CACJ,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"connected-accounts.js","sourceRoot":"","sources":["../src/resources/connected-accounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C;;GAEG;AACH,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CACJ,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8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;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,MAAc,EACd,IAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,gCAAgC,MAAM,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF;AA7JD,8CA6JC"}
|
|
@@ -1,24 +1,141 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Connected account management
|
|
6
|
+
*/
|
|
4
7
|
export class ConnectedAccounts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Initiates a new connection to an external service for a user. For OAuth-based
|
|
10
|
+
* toolkits, this returns a redirect URL to complete authentication. For API
|
|
11
|
+
* key-based toolkits, provide the credentials directly in the request body. Use
|
|
12
|
+
* the `user_id` field to associate the connection with a specific user in your
|
|
13
|
+
* system.
|
|
14
|
+
*
|
|
15
|
+
* **Deprecated for Composio-managed OAuth:** For Composio-managed auth configs on
|
|
16
|
+
* OAuth1, OAuth2, or DCR_OAUTH schemes, this endpoint is being retired and will
|
|
17
|
+
* start returning `400 BadRequest` on **2026-05-08** for new organizations and
|
|
18
|
+
* **2026-07-03** for all remaining organizations. Migrate those calls to
|
|
19
|
+
* `POST /api/v3/connected_accounts/link`. Custom auth configs and non-OAuth
|
|
20
|
+
* schemes (API key, bearer, basic) continue to be supported here. Responses on the
|
|
21
|
+
* retiring path carry a `Deprecation` header (RFC 9745) and a `Sunset` header
|
|
22
|
+
* (RFC 8594) for client-side detection.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const connectedAccount =
|
|
27
|
+
* await client.connectedAccounts.create({
|
|
28
|
+
* auth_config: { id: 'id' },
|
|
29
|
+
* connection: {},
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
5
33
|
create(body, options) {
|
|
6
|
-
return this._client.post('/api/v3/connected_accounts', { body, ...options });
|
|
34
|
+
return this._client.post('/api/v3.1/connected_accounts', { body, ...options });
|
|
7
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves comprehensive details of a connected account, including authentication
|
|
38
|
+
* configuration, connection status, and all parameters needed for API requests.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const connectedAccount =
|
|
43
|
+
* await client.connectedAccounts.retrieve(
|
|
44
|
+
* 'ca_1a2b3c4d5e6f',
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
8
48
|
retrieve(nanoid, options) {
|
|
9
|
-
return this._client.get(path `/api/v3/connected_accounts/${nanoid}`, options);
|
|
49
|
+
return this._client.get(path `/api/v3.1/connected_accounts/${nanoid}`, options);
|
|
10
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves all connected accounts for your project. Connected accounts represent
|
|
53
|
+
* authenticated user connections to external services (e.g., a user's Gmail
|
|
54
|
+
* account, Slack workspace). Filter by toolkit, status, user ID, or auth config to
|
|
55
|
+
* find specific connections.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const connectedAccounts =
|
|
60
|
+
* await client.connectedAccounts.list();
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
11
63
|
list(query = {}, options) {
|
|
12
|
-
return this._client.get('/api/v3/connected_accounts', { query, ...options });
|
|
64
|
+
return this._client.get('/api/v3.1/connected_accounts', { query, ...options });
|
|
13
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Soft-deletes a connected account by marking it as deleted in the database. This
|
|
68
|
+
* prevents the account from being used for API calls but preserves the record for
|
|
69
|
+
* audit purposes.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const connectedAccount =
|
|
74
|
+
* await client.connectedAccounts.delete('ca_1a2b3c4d5e6f');
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
14
77
|
delete(nanoid, options) {
|
|
15
|
-
return this._client.delete(path `/api/v3/connected_accounts/${nanoid}`, options);
|
|
78
|
+
return this._client.delete(path `/api/v3.1/connected_accounts/${nanoid}`, options);
|
|
16
79
|
}
|
|
17
|
-
|
|
18
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Update a connected account. Supports updating the alias and/or credentials. Only
|
|
82
|
+
* specified fields will be updated. Set a credential field to null to remove it.
|
|
83
|
+
* Alias must be unique within the same project, entity, and toolkit scope.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const response = await client.connectedAccounts.patch(
|
|
88
|
+
* 'ca_1a2b3c4d5e6f',
|
|
89
|
+
* {
|
|
90
|
+
* connection: {
|
|
91
|
+
* state: {
|
|
92
|
+
* authScheme: 'BEARER_TOKEN',
|
|
93
|
+
* val: { token: 'new_access_token' },
|
|
94
|
+
* },
|
|
95
|
+
* },
|
|
96
|
+
* },
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
patch(nanoid, body = {}, options) {
|
|
101
|
+
return this._client.patch(path `/api/v3.1/connected_accounts/${nanoid}`, { body, ...options });
|
|
19
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Initiates a new authentication flow for a connected account when credentials
|
|
105
|
+
* have expired or become invalid. This may generate a new authentication URL for
|
|
106
|
+
* OAuth flows or refresh tokens for other auth schemes.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const response = await client.connectedAccounts.refresh(
|
|
111
|
+
* 'ca_1a2b3c4d5e6f',
|
|
112
|
+
* );
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
refresh(nanoid, params = {}, options) {
|
|
116
|
+
const { query_redirect_url, ...body } = params ?? {};
|
|
117
|
+
return this._client.post(path `/api/v3.1/connected_accounts/${nanoid}/refresh`, {
|
|
118
|
+
query: { redirect_url: query_redirect_url },
|
|
119
|
+
body,
|
|
120
|
+
...options,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Updates the status of a connected account to either enabled (active) or disabled
|
|
125
|
+
* (inactive). Disabled accounts cannot be used for API calls but remain in the
|
|
126
|
+
* database.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const response =
|
|
131
|
+
* await client.connectedAccounts.updateStatus(
|
|
132
|
+
* 'ca_1a2b3c4d5e6f',
|
|
133
|
+
* { enabled: true },
|
|
134
|
+
* );
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
20
137
|
updateStatus(nanoID, body, options) {
|
|
21
|
-
return this._client.patch(path `/api/v3/connected_accounts/${nanoID}/status`, { body, ...options });
|
|
138
|
+
return this._client.patch(path `/api/v3.1/connected_accounts/${nanoID}/status`, { body, ...options });
|
|
22
139
|
}
|
|
23
140
|
}
|
|
24
141
|
//# sourceMappingURL=connected-accounts.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected-accounts.mjs","sourceRoot":"","sources":["../src/resources/connected-accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD,MAAM,CACJ,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"connected-accounts.mjs","sourceRoot":"","sources":["../src/resources/connected-accounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;;;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AE,YAAY,EAAE,kBAAkB,EAAE;YAC3C,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,MAAc,EACd,IAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,gCAAgC,MAAM,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvG,CAAC;CACF"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* File management
|
|
6
|
+
*/
|
|
7
|
+
export declare class Files extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves a list of files associated with the authenticated project. Results can
|
|
10
|
+
* be filtered by toolkit and tool slugs.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const files = await client.files.list();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
list(query?: FileListParams | null | undefined, options?: RequestOptions): APIPromise<FileListResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Generates a presigned URL for uploading a file to S3. This endpoint handles
|
|
20
|
+
* deduplication by checking if a file with the same MD5 hash already exists.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.files.createPresignedURL({
|
|
25
|
+
* filename: 'quarterly_report.pdf',
|
|
26
|
+
* md5: 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6',
|
|
27
|
+
* mimetype: 'application/pdf',
|
|
28
|
+
* tool_slug: 'GMAIL_SEND_EMAIL',
|
|
29
|
+
* toolkit_slug: 'gmail',
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
createPresignedURL(body: FileCreatePresignedURLParams, options?: RequestOptions): APIPromise<FileCreatePresignedURLResponse>;
|
|
34
|
+
}
|
|
35
|
+
export interface FileListResponse {
|
|
36
|
+
current_page: number;
|
|
37
|
+
items: Array<FileListResponse.Item>;
|
|
38
|
+
total_items: number;
|
|
39
|
+
total_pages: number;
|
|
40
|
+
next_cursor?: string | null;
|
|
41
|
+
}
|
|
42
|
+
export declare namespace FileListResponse {
|
|
43
|
+
interface Item {
|
|
44
|
+
/**
|
|
45
|
+
* Name of the original file. Example: "document.docx"
|
|
46
|
+
*/
|
|
47
|
+
filename: string;
|
|
48
|
+
/**
|
|
49
|
+
* MD5 hash of the file for integrity verification. Example:
|
|
50
|
+
* "d41d8cd98f00b204e9800998ecf8427e"
|
|
51
|
+
*/
|
|
52
|
+
md5: string;
|
|
53
|
+
/**
|
|
54
|
+
* Mime type of the original file. Example:
|
|
55
|
+
* "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
56
|
+
*/
|
|
57
|
+
mimetype: string;
|
|
58
|
+
/**
|
|
59
|
+
* Slug of the action where this file belongs to. Example: "convert-to-pdf"
|
|
60
|
+
*/
|
|
61
|
+
tool_slug: string;
|
|
62
|
+
/**
|
|
63
|
+
* Slug of the app where this file belongs to. Example: "file-converter"
|
|
64
|
+
*/
|
|
65
|
+
toolkit_slug: string;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export interface FileCreatePresignedURLResponse {
|
|
69
|
+
/**
|
|
70
|
+
* ID of the request file. Example: "req_file_9mZn4qR8sXwT"
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* Object storage upload location. Example:
|
|
75
|
+
* "projects/pr_1a2b3c4d5e6f/requests/slack/SLACK_UPLOAD_FILE/document_9mZn4q.docx"
|
|
76
|
+
*/
|
|
77
|
+
key: string;
|
|
78
|
+
metadata: FileCreatePresignedURLResponse.Metadata;
|
|
79
|
+
/**
|
|
80
|
+
* Presigned URL for upload. Example:
|
|
81
|
+
* "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
82
|
+
*/
|
|
83
|
+
new_presigned_url: string;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated [DEPRECATED] Use new_presigned_url instead. Presigned URL for
|
|
86
|
+
* upload. Example:
|
|
87
|
+
* "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
88
|
+
*/
|
|
89
|
+
newPresignedUrl: string;
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated [DEPRECATED] Indicates this is a new file that needs to be uploaded
|
|
92
|
+
*/
|
|
93
|
+
type: 'new';
|
|
94
|
+
}
|
|
95
|
+
export declare namespace FileCreatePresignedURLResponse {
|
|
96
|
+
interface Metadata {
|
|
97
|
+
/**
|
|
98
|
+
* Storage backend used for the file. If this is azure, use `x-ms-blob-type` header
|
|
99
|
+
* to set the blob type to `BlockBlob` while uploading the file
|
|
100
|
+
*/
|
|
101
|
+
storage_backend: 's3' | 'azure_blob_storage';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export interface FileListParams {
|
|
105
|
+
/**
|
|
106
|
+
* Cursor for pagination. The cursor is a base64 encoded string of the page and
|
|
107
|
+
* limit. The page is the page number and the limit is the number of items per
|
|
108
|
+
* page. The cursor is used to paginate through the items. The cursor is not
|
|
109
|
+
* required for the first page.
|
|
110
|
+
*/
|
|
111
|
+
cursor?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Number of items per page, max allowed is 1000
|
|
114
|
+
*/
|
|
115
|
+
limit?: number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Filter files by action slug. Example: "convert-to-pdf"
|
|
118
|
+
*/
|
|
119
|
+
tool_slug?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Filter files by app slug. Example: "file-converter"
|
|
122
|
+
*/
|
|
123
|
+
toolkit_slug?: string;
|
|
124
|
+
}
|
|
125
|
+
export interface FileCreatePresignedURLParams {
|
|
126
|
+
/**
|
|
127
|
+
* Name of the original file. Example: "quarterly_report.pdf"
|
|
128
|
+
*/
|
|
129
|
+
filename: string;
|
|
130
|
+
/**
|
|
131
|
+
* MD5 hash of the file for deduplication and integrity verification. Example:
|
|
132
|
+
* "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
|
|
133
|
+
*/
|
|
134
|
+
md5: string;
|
|
135
|
+
/**
|
|
136
|
+
* Mime type of the original file. Example: "application/pdf", "image/png"
|
|
137
|
+
*/
|
|
138
|
+
mimetype: string;
|
|
139
|
+
/**
|
|
140
|
+
* Slug of the action where this file belongs to. Example: "GMAIL_SEND_EMAIL",
|
|
141
|
+
* "SLACK_UPLOAD_FILE"
|
|
142
|
+
*/
|
|
143
|
+
tool_slug: string;
|
|
144
|
+
/**
|
|
145
|
+
* Slug of the app where this file belongs to. Example: "gmail", "slack", "github"
|
|
146
|
+
*/
|
|
147
|
+
toolkit_slug: string;
|
|
148
|
+
}
|
|
149
|
+
export declare namespace Files {
|
|
150
|
+
export { type FileListResponse as FileListResponse, type FileCreatePresignedURLResponse as FileCreatePresignedURLResponse, type FileListParams as FileListParams, type FileCreatePresignedURLParams as FileCreatePresignedURLParams, };
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=files.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../src/resources/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,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E,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* File management
|
|
6
|
+
*/
|
|
7
|
+
export declare class Files extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves a list of files associated with the authenticated project. Results can
|
|
10
|
+
* be filtered by toolkit and tool slugs.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const files = await client.files.list();
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
list(query?: FileListParams | null | undefined, options?: RequestOptions): APIPromise<FileListResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Generates a presigned URL for uploading a file to S3. This endpoint handles
|
|
20
|
+
* deduplication by checking if a file with the same MD5 hash already exists.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response = await client.files.createPresignedURL({
|
|
25
|
+
* filename: 'quarterly_report.pdf',
|
|
26
|
+
* md5: 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6',
|
|
27
|
+
* mimetype: 'application/pdf',
|
|
28
|
+
* tool_slug: 'GMAIL_SEND_EMAIL',
|
|
29
|
+
* toolkit_slug: 'gmail',
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
createPresignedURL(body: FileCreatePresignedURLParams, options?: RequestOptions): APIPromise<FileCreatePresignedURLResponse>;
|
|
34
|
+
}
|
|
35
|
+
export interface FileListResponse {
|
|
36
|
+
current_page: number;
|
|
37
|
+
items: Array<FileListResponse.Item>;
|
|
38
|
+
total_items: number;
|
|
39
|
+
total_pages: number;
|
|
40
|
+
next_cursor?: string | null;
|
|
41
|
+
}
|
|
42
|
+
export declare namespace FileListResponse {
|
|
43
|
+
interface Item {
|
|
44
|
+
/**
|
|
45
|
+
* Name of the original file. Example: "document.docx"
|
|
46
|
+
*/
|
|
47
|
+
filename: string;
|
|
48
|
+
/**
|
|
49
|
+
* MD5 hash of the file for integrity verification. Example:
|
|
50
|
+
* "d41d8cd98f00b204e9800998ecf8427e"
|
|
51
|
+
*/
|
|
52
|
+
md5: string;
|
|
53
|
+
/**
|
|
54
|
+
* Mime type of the original file. Example:
|
|
55
|
+
* "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
56
|
+
*/
|
|
57
|
+
mimetype: string;
|
|
58
|
+
/**
|
|
59
|
+
* Slug of the action where this file belongs to. Example: "convert-to-pdf"
|
|
60
|
+
*/
|
|
61
|
+
tool_slug: string;
|
|
62
|
+
/**
|
|
63
|
+
* Slug of the app where this file belongs to. Example: "file-converter"
|
|
64
|
+
*/
|
|
65
|
+
toolkit_slug: string;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export interface FileCreatePresignedURLResponse {
|
|
69
|
+
/**
|
|
70
|
+
* ID of the request file. Example: "req_file_9mZn4qR8sXwT"
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* Object storage upload location. Example:
|
|
75
|
+
* "projects/pr_1a2b3c4d5e6f/requests/slack/SLACK_UPLOAD_FILE/document_9mZn4q.docx"
|
|
76
|
+
*/
|
|
77
|
+
key: string;
|
|
78
|
+
metadata: FileCreatePresignedURLResponse.Metadata;
|
|
79
|
+
/**
|
|
80
|
+
* Presigned URL for upload. Example:
|
|
81
|
+
* "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
82
|
+
*/
|
|
83
|
+
new_presigned_url: string;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated [DEPRECATED] Use new_presigned_url instead. Presigned URL for
|
|
86
|
+
* upload. Example:
|
|
87
|
+
* "https://storage.composio.dev/projects/pr_1a2b3c4d5e6f/requests/slack/document_9mZn4q.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600..."
|
|
88
|
+
*/
|
|
89
|
+
newPresignedUrl: string;
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated [DEPRECATED] Indicates this is a new file that needs to be uploaded
|
|
92
|
+
*/
|
|
93
|
+
type: 'new';
|
|
94
|
+
}
|
|
95
|
+
export declare namespace FileCreatePresignedURLResponse {
|
|
96
|
+
interface Metadata {
|
|
97
|
+
/**
|
|
98
|
+
* Storage backend used for the file. If this is azure, use `x-ms-blob-type` header
|
|
99
|
+
* to set the blob type to `BlockBlob` while uploading the file
|
|
100
|
+
*/
|
|
101
|
+
storage_backend: 's3' | 'azure_blob_storage';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export interface FileListParams {
|
|
105
|
+
/**
|
|
106
|
+
* Cursor for pagination. The cursor is a base64 encoded string of the page and
|
|
107
|
+
* limit. The page is the page number and the limit is the number of items per
|
|
108
|
+
* page. The cursor is used to paginate through the items. The cursor is not
|
|
109
|
+
* required for the first page.
|
|
110
|
+
*/
|
|
111
|
+
cursor?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Number of items per page, max allowed is 1000
|
|
114
|
+
*/
|
|
115
|
+
limit?: number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Filter files by action slug. Example: "convert-to-pdf"
|
|
118
|
+
*/
|
|
119
|
+
tool_slug?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Filter files by app slug. Example: "file-converter"
|
|
122
|
+
*/
|
|
123
|
+
toolkit_slug?: string;
|
|
124
|
+
}
|
|
125
|
+
export interface FileCreatePresignedURLParams {
|
|
126
|
+
/**
|
|
127
|
+
* Name of the original file. Example: "quarterly_report.pdf"
|
|
128
|
+
*/
|
|
129
|
+
filename: string;
|
|
130
|
+
/**
|
|
131
|
+
* MD5 hash of the file for deduplication and integrity verification. Example:
|
|
132
|
+
* "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
|
|
133
|
+
*/
|
|
134
|
+
md5: string;
|
|
135
|
+
/**
|
|
136
|
+
* Mime type of the original file. Example: "application/pdf", "image/png"
|
|
137
|
+
*/
|
|
138
|
+
mimetype: string;
|
|
139
|
+
/**
|
|
140
|
+
* Slug of the action where this file belongs to. Example: "GMAIL_SEND_EMAIL",
|
|
141
|
+
* "SLACK_UPLOAD_FILE"
|
|
142
|
+
*/
|
|
143
|
+
tool_slug: string;
|
|
144
|
+
/**
|
|
145
|
+
* Slug of the app where this file belongs to. Example: "gmail", "slack", "github"
|
|
146
|
+
*/
|
|
147
|
+
toolkit_slug: string;
|
|
148
|
+
}
|
|
149
|
+
export declare namespace Files {
|
|
150
|
+
export { type FileListResponse as FileListResponse, type FileCreatePresignedURLResponse as FileCreatePresignedURLResponse, type FileListParams as FileListParams, type FileCreatePresignedURLParams as FileCreatePresignedURLParams, };
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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EG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED,yBAAiB,8BAA8B,CAAC;IAC9C,UAAiB,QAAQ;QACvB;;;WAGG;QACH,eAAe,EAAE,IAAI,GAAG,oBAAoB,CAAC;KAC9C;CACF;AAED,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Files = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* File management
|
|
8
|
+
*/
|
|
9
|
+
class Files extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves a list of files associated with the authenticated project. Results can
|
|
12
|
+
* be filtered by toolkit and tool slugs.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const files = await client.files.list();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
list(query = {}, options) {
|
|
20
|
+
return this._client.get('/api/v3.1/files/list', { query, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generates a presigned URL for uploading a file to S3. This endpoint handles
|
|
24
|
+
* deduplication by checking if a file with the same MD5 hash already exists.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const response = await client.files.createPresignedURL({
|
|
29
|
+
* filename: 'quarterly_report.pdf',
|
|
30
|
+
* md5: 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6',
|
|
31
|
+
* mimetype: 'application/pdf',
|
|
32
|
+
* tool_slug: 'GMAIL_SEND_EMAIL',
|
|
33
|
+
* toolkit_slug: 'gmail',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
createPresignedURL(body, options) {
|
|
38
|
+
return this._client.post('/api/v3.1/files/upload/request', { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Files = Files;
|
|
42
|
+
//# sourceMappingURL=files.js.map
|