@composio/client 0.1.0-alpha.1 → 0.1.0-alpha.11
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 +157 -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 +32 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +32 -29
- 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 +232 -41
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +232 -41
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +64 -0
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +64 -0
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/connected-accounts.d.mts +176 -216
- package/resources/connected-accounts.d.mts.map +1 -1
- package/resources/connected-accounts.d.ts +176 -216
- package/resources/connected-accounts.d.ts.map +1 -1
- package/resources/connected-accounts.js +70 -0
- package/resources/connected-accounts.js.map +1 -1
- package/resources/connected-accounts.mjs +70 -0
- package/resources/connected-accounts.mjs.map +1 -1
- package/resources/files.d.mts +159 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +159 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +39 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +35 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +5 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -4
- 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 +4 -0
- package/resources/mcp/command.d.mts.map +1 -0
- package/resources/mcp/command.d.ts +4 -0
- package/resources/mcp/command.d.ts.map +1 -0
- package/resources/mcp/command.js +9 -0
- package/resources/mcp/command.js.map +1 -0
- package/resources/mcp/command.mjs +5 -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 +411 -0
- package/resources/mcp/mcp.d.mts.map +1 -0
- package/resources/mcp/mcp.d.ts +411 -0
- package/resources/mcp/mcp.d.ts.map +1 -0
- package/resources/mcp/mcp.js +101 -0
- package/resources/mcp/mcp.js.map +1 -0
- package/resources/mcp/mcp.mjs +96 -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 +32 -0
- package/resources/migration.d.mts.map +1 -0
- package/resources/migration.d.ts +32 -0
- package/resources/migration.d.ts.map +1 -0
- package/resources/migration.js +17 -0
- package/resources/migration.js.map +1 -0
- package/resources/migration.mjs +13 -0
- package/resources/migration.mjs.map +1 -0
- package/resources/org/api-key.d.mts +28 -0
- package/resources/org/api-key.d.mts.map +1 -1
- package/resources/org/api-key.d.ts +28 -0
- package/resources/org/api-key.d.ts.map +1 -1
- package/resources/org/api-key.js +20 -0
- package/resources/org/api-key.js.map +1 -1
- package/resources/org/api-key.mjs +20 -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/api-keys.d.mts +97 -20
- package/resources/org/project/api-keys.d.mts.map +1 -1
- package/resources/org/project/api-keys.d.ts +97 -20
- package/resources/org/project/api-keys.d.ts.map +1 -1
- package/resources/org/project/api-keys.js +57 -0
- package/resources/org/project/api-keys.js.map +1 -1
- package/resources/org/project/api-keys.mjs +57 -0
- package/resources/org/project/api-keys.mjs.map +1 -1
- package/resources/org/project/project.d.mts +182 -7
- package/resources/org/project/project.d.mts.map +1 -1
- package/resources/org/project/project.d.ts +182 -7
- package/resources/org/project/project.d.ts.map +1 -1
- package/resources/org/project/project.js +56 -26
- package/resources/org/project/project.js.map +1 -1
- package/resources/org/project/project.mjs +52 -0
- package/resources/org/project/project.mjs.map +1 -1
- package/resources/org/project/trigger.d.mts +101 -5
- package/resources/org/project/trigger.d.mts.map +1 -1
- package/resources/org/project/trigger.d.ts +101 -5
- package/resources/org/project/trigger.d.ts.map +1 -1
- package/resources/org/project/trigger.js +21 -0
- package/resources/org/project/trigger.js.map +1 -1
- package/resources/org/project/trigger.mjs +21 -0
- package/resources/org/project/trigger.mjs.map +1 -1
- package/resources/org/project/webhook.d.mts +88 -14
- package/resources/org/project/webhook.d.mts.map +1 -1
- package/resources/org/project/webhook.d.ts +88 -14
- package/resources/org/project/webhook.d.ts.map +1 -1
- package/resources/org/project/webhook.js +51 -1
- package/resources/org/project/webhook.js.map +1 -1
- package/resources/org/project/webhook.mjs +51 -1
- 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 +215 -4
- package/resources/toolkits.d.mts.map +1 -1
- package/resources/toolkits.d.ts +215 -4
- package/resources/toolkits.d.ts.map +1 -1
- package/resources/toolkits.js +20 -2
- package/resources/toolkits.js.map +1 -1
- package/resources/toolkits.mjs +20 -2
- package/resources/toolkits.mjs.map +1 -1
- package/resources/tools.d.mts +295 -21
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +295 -21
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +67 -0
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +67 -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/index.d.mts +1 -1
- package/resources/trigger-instances/index.d.mts.map +1 -1
- package/resources/trigger-instances/index.d.ts +1 -1
- package/resources/trigger-instances/index.d.ts.map +1 -1
- package/resources/trigger-instances/index.js.map +1 -1
- package/resources/trigger-instances/index.mjs.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.mts +51 -31
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
- package/resources/trigger-instances/trigger-instances.d.ts +51 -31
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
- package/resources/trigger-instances/trigger-instances.js +3 -32
- package/resources/trigger-instances/trigger-instances.js.map +1 -1
- package/resources/trigger-instances/trigger-instances.mjs +1 -8
- 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 +105 -4
- package/resources/triggers-types.d.mts.map +1 -1
- package/resources/triggers-types.d.ts +105 -4
- package/resources/triggers-types.d.ts.map +1 -1
- package/resources/triggers-types.js +29 -0
- package/resources/triggers-types.js.map +1 -1
- package/resources/triggers-types.mjs +29 -0
- package/resources/triggers-types.mjs.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +128 -94
- 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 +258 -49
- package/src/resources/connected-accounts.ts +192 -302
- package/src/resources/files.ts +209 -0
- package/src/resources/index.ts +24 -11
- package/src/resources/mcp/command.ts +5 -0
- package/src/resources/mcp/index.ts +14 -0
- package/src/resources/mcp/mcp.ts +522 -0
- package/src/resources/mcp.ts +3 -0
- package/src/resources/migration.ts +46 -0
- package/src/resources/org/api-key.ts +28 -0
- package/src/resources/org/project/api-keys.ts +97 -20
- package/src/resources/org/project/project.ts +182 -13
- package/src/resources/org/project/trigger.ts +101 -9
- package/src/resources/org/project/webhook.ts +88 -14
- package/src/resources/team-members.ts +12 -0
- package/src/resources/toolkits.ts +230 -4
- package/src/resources/tools.ts +316 -21
- package/src/resources/trigger-instances/handle.ts +10 -2
- package/src/resources/trigger-instances/index.ts +0 -3
- package/src/resources/trigger-instances/trigger-instances.ts +55 -44
- package/src/resources/triggers-types.ts +107 -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
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as CommandAPI from './command';
|
|
5
|
+
import { Command } from './command';
|
|
6
|
+
import { APIPromise } from '../../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../../internal/headers';
|
|
8
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
9
|
+
import { path } from '../../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Mcp extends APIResource {
|
|
12
|
+
command: CommandAPI.Command = new CommandAPI.Command(this._client);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves detailed configuration information for a specific Model Control
|
|
16
|
+
* Protocol (MCP) server. The returned data includes connection details, associated
|
|
17
|
+
* applications, enabled tools, and authentication configuration.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const mcp = await client.mcp.retrieve(
|
|
22
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<McpRetrieveResponse> {
|
|
27
|
+
return this._client.get(path`/api/v3/mcp/${id}`, options);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Updates the configuration of an existing Model Control Protocol (MCP) server.
|
|
32
|
+
* You can modify the server name, associated applications, and enabled tools. Only
|
|
33
|
+
* the fields included in the request will be updated.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const mcp = await client.mcp.update(
|
|
38
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
39
|
+
* { name: 'Updated GitHub Integration Server' },
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
update(
|
|
44
|
+
id: string,
|
|
45
|
+
body: McpUpdateParams | null | undefined = {},
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<McpUpdateResponse> {
|
|
48
|
+
return this._client.patch(path`/api/v3/mcp/${id}`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Performs a soft delete on a Model Control Protocol (MCP) server, making it
|
|
53
|
+
* unavailable for future use. This operation is reversible in the database but
|
|
54
|
+
* cannot be undone through the API. Any applications or services connected to this
|
|
55
|
+
* server will lose access after deletion.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const mcp = await client.mcp.delete(
|
|
60
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
delete(id: string, options?: RequestOptions): APIPromise<McpDeleteResponse> {
|
|
65
|
+
return this._client.delete(path`/api/v3/mcp/${id}`, options);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves a paginated list of Model Control Protocol (MCP) servers that are
|
|
70
|
+
* configured for a specific application or toolkit. This endpoint allows you to
|
|
71
|
+
* find all MCP server instances that have access to a particular application, such
|
|
72
|
+
* as GitHub, Slack, or Jira.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* const response = await client.mcp.retrieveApp('github');
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
retrieveApp(
|
|
80
|
+
appKey: string,
|
|
81
|
+
query: McpRetrieveAppParams | null | undefined = {},
|
|
82
|
+
options?: RequestOptions,
|
|
83
|
+
): APIPromise<McpRetrieveAppResponse> {
|
|
84
|
+
return this._client.get(path`/api/v3/mcp/app/${appKey}`, { query, ...options });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Admin-only endpoint that validates a Model Control Protocol (MCP) server and
|
|
89
|
+
* retrieves its complete configuration details, including authentication
|
|
90
|
+
* information. This endpoint is typically used by the MCP service itself to
|
|
91
|
+
* authenticate and authorize connection requests from clients.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response = await client.mcp.validate(
|
|
96
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
97
|
+
* { 'x-composio-admin-token': 'admin_tk_12345abcdef' },
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
validate(
|
|
102
|
+
uuid: string,
|
|
103
|
+
params: McpValidateParams,
|
|
104
|
+
options?: RequestOptions,
|
|
105
|
+
): APIPromise<McpValidateResponse> {
|
|
106
|
+
const { 'x-composio-admin-token': xComposioAdminToken } = params;
|
|
107
|
+
return this._client.get(path`/api/v3/mcp/validate/${uuid}`, {
|
|
108
|
+
...options,
|
|
109
|
+
headers: buildHeaders([{ 'x-composio-admin-token': xComposioAdminToken }, options?.headers]),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* MCP server configuration and connection details
|
|
116
|
+
*/
|
|
117
|
+
export interface McpRetrieveResponse {
|
|
118
|
+
/**
|
|
119
|
+
* UUID of the MCP server instance
|
|
120
|
+
*/
|
|
121
|
+
id: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Array of tool slugs that this MCP server is allowed to use
|
|
125
|
+
*/
|
|
126
|
+
allowed_tools: Array<string>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* ID reference to the auth configuration used by this server
|
|
130
|
+
*/
|
|
131
|
+
auth_config_id: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Set of command line instructions for connecting various clients to this MCP
|
|
135
|
+
* server
|
|
136
|
+
*/
|
|
137
|
+
commands: McpRetrieveResponse.Commands;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Date and time when this server was initially created
|
|
141
|
+
*/
|
|
142
|
+
created_at: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Whether the MCP server is deleted
|
|
146
|
+
*/
|
|
147
|
+
deleted: boolean;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* URL endpoint for establishing SSE connection to this MCP server
|
|
151
|
+
*/
|
|
152
|
+
mcp_url: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* User-defined descriptive name for this MCP server
|
|
156
|
+
*/
|
|
157
|
+
name: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Date and time when this server configuration was last modified
|
|
161
|
+
*/
|
|
162
|
+
updated_at: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export namespace McpRetrieveResponse {
|
|
166
|
+
/**
|
|
167
|
+
* Set of command line instructions for connecting various clients to this MCP
|
|
168
|
+
* server
|
|
169
|
+
*/
|
|
170
|
+
export interface Commands {
|
|
171
|
+
/**
|
|
172
|
+
* Command line instruction for Claude client setup
|
|
173
|
+
*/
|
|
174
|
+
claude: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Command line instruction for Cursor client setup
|
|
178
|
+
*/
|
|
179
|
+
cursor: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Command line instruction for Windsurf client setup
|
|
183
|
+
*/
|
|
184
|
+
windsurf: string;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* MCP server configuration and connection details
|
|
190
|
+
*/
|
|
191
|
+
export interface McpUpdateResponse {
|
|
192
|
+
/**
|
|
193
|
+
* UUID of the MCP server instance
|
|
194
|
+
*/
|
|
195
|
+
id: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Array of tool slugs that this MCP server is allowed to use
|
|
199
|
+
*/
|
|
200
|
+
allowed_tools: Array<string>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* ID reference to the auth configuration used by this server
|
|
204
|
+
*/
|
|
205
|
+
auth_config_id: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Set of command line instructions for connecting various clients to this MCP
|
|
209
|
+
* server
|
|
210
|
+
*/
|
|
211
|
+
commands: McpUpdateResponse.Commands;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Date and time when this server was initially created
|
|
215
|
+
*/
|
|
216
|
+
created_at: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Whether the MCP server is deleted
|
|
220
|
+
*/
|
|
221
|
+
deleted: boolean;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* URL endpoint for establishing SSE connection to this MCP server
|
|
225
|
+
*/
|
|
226
|
+
mcp_url: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* User-defined descriptive name for this MCP server
|
|
230
|
+
*/
|
|
231
|
+
name: string;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Date and time when this server configuration was last modified
|
|
235
|
+
*/
|
|
236
|
+
updated_at: string;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export namespace McpUpdateResponse {
|
|
240
|
+
/**
|
|
241
|
+
* Set of command line instructions for connecting various clients to this MCP
|
|
242
|
+
* server
|
|
243
|
+
*/
|
|
244
|
+
export interface Commands {
|
|
245
|
+
/**
|
|
246
|
+
* Command line instruction for Claude client setup
|
|
247
|
+
*/
|
|
248
|
+
claude: string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Command line instruction for Cursor client setup
|
|
252
|
+
*/
|
|
253
|
+
cursor: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Command line instruction for Windsurf client setup
|
|
257
|
+
*/
|
|
258
|
+
windsurf: string;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Response indicating the success of the delete operation
|
|
264
|
+
*/
|
|
265
|
+
export interface McpDeleteResponse {
|
|
266
|
+
/**
|
|
267
|
+
* Indicates whether the MCP server was successfully deleted
|
|
268
|
+
*/
|
|
269
|
+
success: boolean;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Paginated response containing MCP servers
|
|
274
|
+
*/
|
|
275
|
+
export interface McpRetrieveAppResponse {
|
|
276
|
+
/**
|
|
277
|
+
* Current page number being returned
|
|
278
|
+
*/
|
|
279
|
+
current_page: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Array of MCP server configurations
|
|
283
|
+
*/
|
|
284
|
+
items: Array<McpRetrieveAppResponse.Item>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Total number of pages in the paginated response
|
|
288
|
+
*/
|
|
289
|
+
total_pages: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export namespace McpRetrieveAppResponse {
|
|
293
|
+
/**
|
|
294
|
+
* MCP server configuration and connection details
|
|
295
|
+
*/
|
|
296
|
+
export interface Item {
|
|
297
|
+
/**
|
|
298
|
+
* UUID of the MCP server instance
|
|
299
|
+
*/
|
|
300
|
+
id: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Array of tool slugs that this MCP server is allowed to use
|
|
304
|
+
*/
|
|
305
|
+
allowed_tools: Array<string>;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* ID reference to the auth configuration used by this server
|
|
309
|
+
*/
|
|
310
|
+
auth_config_id: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Set of command line instructions for connecting various clients to this MCP
|
|
314
|
+
* server
|
|
315
|
+
*/
|
|
316
|
+
commands: Item.Commands;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Date and time when this server was initially created
|
|
320
|
+
*/
|
|
321
|
+
created_at: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* URL endpoint for establishing SSE connection to this MCP server
|
|
325
|
+
*/
|
|
326
|
+
mcp_url: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* User-defined descriptive name for this MCP server
|
|
330
|
+
*/
|
|
331
|
+
name: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Date and time when this server configuration was last modified
|
|
335
|
+
*/
|
|
336
|
+
updated_at: string;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export namespace Item {
|
|
340
|
+
/**
|
|
341
|
+
* Set of command line instructions for connecting various clients to this MCP
|
|
342
|
+
* server
|
|
343
|
+
*/
|
|
344
|
+
export interface Commands {
|
|
345
|
+
/**
|
|
346
|
+
* Command line instruction for Claude client setup
|
|
347
|
+
*/
|
|
348
|
+
claude: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Command line instruction for Cursor client setup
|
|
352
|
+
*/
|
|
353
|
+
cursor: string;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Command line instruction for Windsurf client setup
|
|
357
|
+
*/
|
|
358
|
+
windsurf: string;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Complete validation and connection details for an MCP server
|
|
365
|
+
*/
|
|
366
|
+
export interface McpValidateResponse {
|
|
367
|
+
/**
|
|
368
|
+
* Unique identifier of the validated MCP server
|
|
369
|
+
*/
|
|
370
|
+
id: string;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Client information for the MCP server
|
|
374
|
+
*/
|
|
375
|
+
client: McpValidateResponse.Client;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Human-readable name of the MCP server
|
|
379
|
+
*/
|
|
380
|
+
name: string;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* URL endpoint for connecting to this MCP server
|
|
384
|
+
*/
|
|
385
|
+
url: string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* User authentication data for the MCP server
|
|
389
|
+
*/
|
|
390
|
+
userData: McpValidateResponse.UserData;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* List of action identifiers enabled for this server
|
|
394
|
+
*/
|
|
395
|
+
actions?: Array<string> | null;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* List of application identifiers this server is configured for
|
|
399
|
+
*/
|
|
400
|
+
apps?: Array<string>;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* List of connected account identifiers this server can use for authentication
|
|
404
|
+
*/
|
|
405
|
+
connectedAccountIds?: Array<string> | null;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Flag indicating if this server uses custom authentication headers
|
|
409
|
+
*/
|
|
410
|
+
customAuthHeaders?: boolean;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* List of entity identifiers this MCP server can interact with
|
|
414
|
+
*/
|
|
415
|
+
entityIds?: Array<string> | null;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export namespace McpValidateResponse {
|
|
419
|
+
/**
|
|
420
|
+
* Client information for the MCP server
|
|
421
|
+
*/
|
|
422
|
+
export interface Client {
|
|
423
|
+
/**
|
|
424
|
+
* Project identifier that owns this MCP server
|
|
425
|
+
*/
|
|
426
|
+
id: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Organization identifier that owns the project
|
|
430
|
+
*/
|
|
431
|
+
orgId: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* User authentication data for the MCP server
|
|
436
|
+
*/
|
|
437
|
+
export interface UserData {
|
|
438
|
+
/**
|
|
439
|
+
* User identifier for API access
|
|
440
|
+
*/
|
|
441
|
+
id: string;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* API key for authenticating requests to the Composio API
|
|
445
|
+
*/
|
|
446
|
+
apiKey: string;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Email address associated with the API key user
|
|
450
|
+
*/
|
|
451
|
+
email: string;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export interface McpUpdateParams {
|
|
456
|
+
/**
|
|
457
|
+
* List of action identifiers that should be enabled for this server
|
|
458
|
+
*/
|
|
459
|
+
actions?: Array<string>;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* List of application identifiers this server should be configured to work with
|
|
463
|
+
*/
|
|
464
|
+
apps?: Array<string>;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Human-readable name to identify this MCP server instance (4-25 characters,
|
|
468
|
+
* alphanumeric and hyphens only)
|
|
469
|
+
*/
|
|
470
|
+
name?: string;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export interface McpRetrieveAppParams {
|
|
474
|
+
/**
|
|
475
|
+
* Filter MCP servers by authentication configuration ID
|
|
476
|
+
*/
|
|
477
|
+
auth_config_id?: string;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Number of items per page (default: 10)
|
|
481
|
+
*/
|
|
482
|
+
limit?: number | null;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Filter MCP servers by name (case-insensitive partial match)
|
|
486
|
+
*/
|
|
487
|
+
name?: string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Page number for pagination (1-based)
|
|
491
|
+
*/
|
|
492
|
+
page_no?: number | null;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Filter MCP servers by toolkit slug
|
|
496
|
+
*/
|
|
497
|
+
toolkit?: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export interface McpValidateParams {
|
|
501
|
+
/**
|
|
502
|
+
* Administrative access token required for validating MCP servers
|
|
503
|
+
*/
|
|
504
|
+
'x-composio-admin-token': string;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
Mcp.Command = Command;
|
|
508
|
+
|
|
509
|
+
export declare namespace Mcp {
|
|
510
|
+
export {
|
|
511
|
+
type McpRetrieveResponse as McpRetrieveResponse,
|
|
512
|
+
type McpUpdateResponse as McpUpdateResponse,
|
|
513
|
+
type McpDeleteResponse as McpDeleteResponse,
|
|
514
|
+
type McpRetrieveAppResponse as McpRetrieveAppResponse,
|
|
515
|
+
type McpValidateResponse as McpValidateResponse,
|
|
516
|
+
type McpUpdateParams as McpUpdateParams,
|
|
517
|
+
type McpRetrieveAppParams as McpRetrieveAppParams,
|
|
518
|
+
type McpValidateParams as McpValidateParams,
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export { Command as Command };
|
|
522
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Migration extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Convert a legacy UUID to its corresponding NanoId for migration purposes. This
|
|
10
|
+
* endpoint facilitates the transition from UUID-based identifiers to the more
|
|
11
|
+
* compact NanoId format used in the v3 API.
|
|
12
|
+
*/
|
|
13
|
+
retrieveNanoid(
|
|
14
|
+
query: MigrationRetrieveNanoidParams,
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<MigrationRetrieveNanoidResponse> {
|
|
17
|
+
return this._client.get('/api/v3/migration/get-nanoid', { query, ...options });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface MigrationRetrieveNanoidResponse {
|
|
22
|
+
/**
|
|
23
|
+
* The NanoId corresponding to the provided UUID. This is the new identifier that
|
|
24
|
+
* should be used in place of the legacy UUID.
|
|
25
|
+
*/
|
|
26
|
+
nanoid: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface MigrationRetrieveNanoidParams {
|
|
30
|
+
/**
|
|
31
|
+
* The type of resource that the UUID belongs to
|
|
32
|
+
*/
|
|
33
|
+
type: 'CONNECTED_ACCOUNT' | 'AUTH_CONFIG' | 'TRIGGER_INSTANCE';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The legacy UUID that needs to be converted to a NanoId
|
|
37
|
+
*/
|
|
38
|
+
uuid: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare namespace Migration {
|
|
42
|
+
export {
|
|
43
|
+
type MigrationRetrieveNanoidResponse as MigrationRetrieveNanoidResponse,
|
|
44
|
+
type MigrationRetrieveNanoidParams as MigrationRetrieveNanoidParams,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -5,20 +5,48 @@ import { APIPromise } from '../../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
6
|
|
|
7
7
|
export class APIKey extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve the API key for the current organization. This endpoint is restricted
|
|
10
|
+
* to organization administrators only. The returned API key can be used for
|
|
11
|
+
* authenticating organization-level API requests.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const apiKey = await client.org.apiKey.retrieve();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
8
18
|
retrieve(options?: RequestOptions): APIPromise<APIKeyRetrieveResponse> {
|
|
9
19
|
return this._client.get('/api/v3/org/api_key', options);
|
|
10
20
|
}
|
|
11
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Generate a new API key for the organization, invalidating the previous one
|
|
24
|
+
* (admin only). This operation cannot be undone and will immediately invalidate
|
|
25
|
+
* the previous API key.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const response = await client.org.apiKey.regenerate();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
12
32
|
regenerate(options?: RequestOptions): APIPromise<APIKeyRegenerateResponse> {
|
|
13
33
|
return this._client.post('/api/v3/org/api_key/regenerate', options);
|
|
14
34
|
}
|
|
15
35
|
}
|
|
16
36
|
|
|
17
37
|
export interface APIKeyRetrieveResponse {
|
|
38
|
+
/**
|
|
39
|
+
* The API key for the organization that can be used for authentication. Format:
|
|
40
|
+
* org_xxx
|
|
41
|
+
*/
|
|
18
42
|
org_api_key: string;
|
|
19
43
|
}
|
|
20
44
|
|
|
21
45
|
export interface APIKeyRegenerateResponse {
|
|
46
|
+
/**
|
|
47
|
+
* The newly generated API key for the organization that can be used for
|
|
48
|
+
* authentication. Format: org_xxx
|
|
49
|
+
*/
|
|
22
50
|
org_api_key: string;
|
|
23
51
|
}
|
|
24
52
|
|