@composio/client 0.1.0-alpha.9 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -354
- package/dist/api-key-revocation-BqiqlJh6.mjs +24 -0
- package/dist/auth-ClFXmN5T.mjs +17 -0
- package/dist/auth-configs-COkEdwlP.mjs +48 -0
- package/dist/clanker-1ptspWLR.mjs +23 -0
- package/dist/cli-BWTXVRT4.mjs +42 -0
- package/dist/client-D5v0_f-k.d.mts +22790 -0
- package/dist/config-BLBbhLe1.mjs +10 -0
- package/dist/config-DnyMhILW.d.mts +9 -0
- package/dist/connected-accounts-DK24qYIM.mjs +67 -0
- package/dist/consumer-Do3lg_vI.mjs +33 -0
- package/dist/custom-CH7n4Dyd.mjs +22 -0
- package/dist/files-DoNtYu2Q.mjs +29 -0
- package/dist/files-lfGzAnJ_.mjs +45 -0
- package/dist/generate-B7ClqhN0.mjs +22 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +1219 -0
- package/dist/link-NsFv9L3R.mjs +22 -0
- package/dist/logs-BhCTVSZE.mjs +36 -0
- package/dist/manage-7vQYn-gu.mjs +26 -0
- package/dist/mcp-r-SWyCDh.mjs +73 -0
- package/dist/migration-CBhnoN-Y.mjs +10 -0
- package/dist/migration-CKGKuRO3.d.mts +9 -0
- package/dist/org-C12wx9QM.mjs +44 -0
- package/dist/owner-D4ghEkrK.mjs +17 -0
- package/dist/project-By-OBe-4.mjs +28 -0
- package/dist/project-Cnr9eceg.mjs +24 -0
- package/dist/project-DgdqyoZJ.mjs +22 -0
- package/dist/project-DzrdSIis.mjs +42 -0
- package/dist/realtime-DHJnO2Ye.mjs +26 -0
- package/dist/request-zLX87M09.mjs +1423 -0
- package/dist/resources/api-key-revocation.d.mts +2 -0
- package/dist/resources/api-key-revocation.mjs +3 -0
- package/dist/resources/auth/auth.d.mts +2 -0
- package/dist/resources/auth/auth.mjs +3 -0
- package/dist/resources/auth/index.d.mts +2 -0
- package/dist/resources/auth/index.mjs +4 -0
- package/dist/resources/auth/session.d.mts +2 -0
- package/dist/resources/auth/session.mjs +3 -0
- package/dist/resources/auth-configs.d.mts +2 -0
- package/dist/resources/auth-configs.mjs +3 -0
- package/dist/resources/auth.d.mts +2 -0
- package/dist/resources/auth.mjs +5 -0
- package/dist/resources/cli/cli.d.mts +2 -0
- package/dist/resources/cli/cli.mjs +3 -0
- package/dist/resources/cli/index.d.mts +2 -0
- package/dist/resources/cli/index.mjs +4 -0
- package/dist/resources/cli/realtime.d.mts +2 -0
- package/dist/resources/cli/realtime.mjs +3 -0
- package/dist/resources/cli.d.mts +2 -0
- package/dist/resources/cli.mjs +5 -0
- package/dist/resources/connected-accounts.d.mts +2 -0
- package/dist/resources/connected-accounts.mjs +3 -0
- package/dist/resources/files.d.mts +2 -0
- package/dist/resources/files.mjs +3 -0
- package/dist/resources/index.d.mts +3 -0
- package/dist/resources/index.mjs +16 -0
- package/dist/resources/link.d.mts +2 -0
- package/dist/resources/link.mjs +3 -0
- package/dist/resources/logs/index.d.mts +2 -0
- package/dist/resources/logs/index.mjs +5 -0
- package/dist/resources/logs/logs.d.mts +2 -0
- package/dist/resources/logs/logs.mjs +3 -0
- package/dist/resources/logs/tools.d.mts +2 -0
- package/dist/resources/logs/tools.mjs +3 -0
- package/dist/resources/logs/triggers.d.mts +2 -0
- package/dist/resources/logs/triggers.mjs +3 -0
- package/dist/resources/logs.d.mts +2 -0
- package/dist/resources/logs.mjs +6 -0
- package/dist/resources/mcp/custom.d.mts +2 -0
- package/dist/resources/mcp/custom.mjs +3 -0
- package/dist/resources/mcp/generate.d.mts +2 -0
- package/dist/resources/mcp/generate.mjs +3 -0
- package/dist/resources/mcp/index.d.mts +2 -0
- package/dist/resources/mcp/index.mjs +5 -0
- package/dist/resources/mcp/mcp.d.mts +2 -0
- package/dist/resources/mcp/mcp.mjs +3 -0
- package/dist/resources/mcp.d.mts +2 -0
- package/dist/resources/mcp.mjs +6 -0
- package/dist/resources/migration.d.mts +2 -0
- package/dist/resources/migration.mjs +3 -0
- package/dist/resources/org/clanker.d.mts +2 -0
- package/dist/resources/org/clanker.mjs +3 -0
- package/dist/resources/org/consumer/consumer.d.mts +2 -0
- package/dist/resources/org/consumer/consumer.mjs +3 -0
- package/dist/resources/org/consumer/index.d.mts +2 -0
- package/dist/resources/org/consumer/index.mjs +4 -0
- package/dist/resources/org/consumer/project.d.mts +2 -0
- package/dist/resources/org/consumer/project.mjs +3 -0
- package/dist/resources/org/consumer.d.mts +2 -0
- package/dist/resources/org/consumer.mjs +5 -0
- package/dist/resources/org/index.d.mts +2 -0
- package/dist/resources/org/index.mjs +8 -0
- package/dist/resources/org/org.d.mts +2 -0
- package/dist/resources/org/org.mjs +3 -0
- package/dist/resources/org/owner/index.d.mts +2 -0
- package/dist/resources/org/owner/index.mjs +4 -0
- package/dist/resources/org/owner/owner.d.mts +2 -0
- package/dist/resources/org/owner/owner.mjs +3 -0
- package/dist/resources/org/owner/project.d.mts +2 -0
- package/dist/resources/org/owner/project.mjs +3 -0
- package/dist/resources/org/owner.d.mts +2 -0
- package/dist/resources/org/owner.mjs +5 -0
- package/dist/resources/org/project.d.mts +2 -0
- package/dist/resources/org/project.mjs +3 -0
- package/dist/resources/org/usage.d.mts +2 -0
- package/dist/resources/org/usage.mjs +3 -0
- package/dist/resources/org.d.mts +2 -0
- package/dist/resources/org.mjs +9 -0
- package/dist/resources/project/config.d.mts +2 -0
- package/dist/resources/project/config.mjs +3 -0
- package/dist/resources/project/index.d.mts +3 -0
- package/dist/resources/project/index.mjs +4 -0
- package/dist/resources/project/project.d.mts +2 -0
- package/dist/resources/project/project.mjs +3 -0
- package/dist/resources/project/usage.d.mts +2 -0
- package/dist/resources/project/usage.mjs +3 -0
- package/dist/resources/project.d.mts +3 -0
- package/dist/resources/project.mjs +5 -0
- package/dist/resources/tool-router/index.d.mts +2 -0
- package/dist/resources/tool-router/index.mjs +4 -0
- package/dist/resources/tool-router/session/files.d.mts +2 -0
- package/dist/resources/tool-router/session/files.mjs +3 -0
- package/dist/resources/tool-router/session/index.d.mts +2 -0
- package/dist/resources/tool-router/session/index.mjs +4 -0
- package/dist/resources/tool-router/session/session.d.mts +2 -0
- package/dist/resources/tool-router/session/session.mjs +3 -0
- package/dist/resources/tool-router/session.d.mts +2 -0
- package/dist/resources/tool-router/session.mjs +5 -0
- package/dist/resources/tool-router/tool-router.d.mts +2 -0
- package/dist/resources/tool-router/tool-router.mjs +3 -0
- package/dist/resources/tool-router.d.mts +2 -0
- package/dist/resources/tool-router.mjs +5 -0
- package/dist/resources/toolkits.d.mts +2 -0
- package/dist/resources/toolkits.mjs +3 -0
- package/dist/resources/tools.d.mts +2 -0
- package/dist/resources/tools.mjs +3 -0
- package/dist/resources/trigger-instances/index.d.mts +2 -0
- package/dist/resources/trigger-instances/index.mjs +4 -0
- package/dist/resources/trigger-instances/manage.d.mts +2 -0
- package/dist/resources/trigger-instances/manage.mjs +3 -0
- package/dist/resources/trigger-instances/trigger-instances.d.mts +2 -0
- package/dist/resources/trigger-instances/trigger-instances.mjs +3 -0
- package/dist/resources/trigger-instances.d.mts +2 -0
- package/dist/resources/trigger-instances.mjs +5 -0
- package/dist/resources/triggers-types.d.mts +2 -0
- package/dist/resources/triggers-types.mjs +3 -0
- package/dist/resources/webhook-endpoints.d.mts +2 -0
- package/dist/resources/webhook-endpoints.mjs +3 -0
- package/dist/resources/webhook-subscriptions.d.mts +2 -0
- package/dist/resources/webhook-subscriptions.mjs +3 -0
- package/dist/session-Ci0MoTTn.mjs +21 -0
- package/dist/session-CmqSfXtq.mjs +97 -0
- package/dist/tool-router-DbmIxiU5.mjs +14 -0
- package/dist/toolkits-BUWB3p_C.mjs +43 -0
- package/dist/tools-B4kHPHbe.mjs +30 -0
- package/dist/tools-BO1wTIiE.mjs +60 -0
- package/dist/trigger-instances-CoEohjcv.mjs +33 -0
- package/dist/triggers-BwsETpsM.mjs +26 -0
- package/dist/triggers-types-DmOurxxx.mjs +31 -0
- package/dist/usage-BJsJ4nsd.mjs +29 -0
- package/dist/usage-D6ahTV_Y.mjs +29 -0
- package/dist/webhook-endpoints-CyWYVPMe.mjs +46 -0
- package/dist/webhook-subscriptions-BgnCTUGn.mjs +48 -0
- package/package.json +74 -129
- package/CHANGELOG.md +0 -96
- package/LICENSE +0 -201
- package/api-promise.d.mts +0 -2
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -2
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -19
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -2
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -224
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -224
- package/client.d.ts.map +0 -1
- package/client.js +0 -502
- package/client.js.map +0 -1
- package/client.mjs +0 -475
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -47
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -47
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -84
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -80
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -47
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -47
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -113
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -97
- package/core/error.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -11
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -7
- package/core/resource.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -2
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -2
- package/error.d.ts.map +0 -1
- package/error.js +0 -19
- package/error.js.map +0 -1
- package/error.mjs +0 -2
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -6
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -6
- package/index.d.ts.map +0 -1
- package/index.js +0 -30
- package/index.js.map +0 -1
- package/index.mjs +0 -7
- package/index.mjs.map +0 -1
- package/internal/builtin-types.d.mts +0 -75
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -75
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -4
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -3
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -162
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -157
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -41
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -36
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -21
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -21
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -77
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -72
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -13
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -13
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -36
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -32
- package/internal/parse.mjs.map +0 -1
- package/internal/qs/formats.d.mts +0 -6
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/formats.d.ts +0 -6
- package/internal/qs/formats.d.ts.map +0 -1
- package/internal/qs/formats.js +0 -11
- package/internal/qs/formats.js.map +0 -1
- package/internal/qs/formats.mjs +0 -8
- package/internal/qs/formats.mjs.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/index.d.ts +0 -10
- package/internal/qs/index.d.ts.map +0 -1
- package/internal/qs/index.js +0 -14
- package/internal/qs/index.js.map +0 -1
- package/internal/qs/index.mjs +0 -10
- package/internal/qs/index.mjs.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/stringify.d.ts +0 -3
- package/internal/qs/stringify.d.ts.map +0 -1
- package/internal/qs/stringify.js +0 -280
- package/internal/qs/stringify.js.map +0 -1
- package/internal/qs/stringify.mjs +0 -276
- package/internal/qs/stringify.mjs.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/types.d.ts +0 -57
- package/internal/qs/types.d.ts.map +0 -1
- package/internal/qs/types.js +0 -3
- package/internal/qs/types.js.map +0 -1
- package/internal/qs/types.mjs +0 -2
- package/internal/qs/types.mjs.map +0 -1
- package/internal/qs/utils.d.mts +0 -14
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/qs/utils.d.ts +0 -14
- package/internal/qs/utils.d.ts.map +0 -1
- package/internal/qs/utils.js +0 -229
- package/internal/qs/utils.js.map +0 -1
- package/internal/qs/utils.mjs +0 -217
- package/internal/qs/utils.mjs.map +0 -1
- package/internal/request-options.d.mts +0 -33
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -33
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -14
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -10
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -28
- package/internal/shim-types.d.ts +0 -28
- package/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -23
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -23
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -71
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -67
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/internal/shims.d.mts +0 -20
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -20
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -93
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -85
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -46
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -46
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -87
- package/internal/to-file.mjs.map +0 -1
- package/internal/types.d.mts +0 -68
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -68
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -4
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -3
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -44
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -44
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -131
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -122
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -37
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -32
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -22
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -18
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -38
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -38
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -58
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -53
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -7
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -3
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -20
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -16
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -16
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -16
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -109
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -92
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -7
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -7
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -24
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -8
- package/internal/utils.mjs.map +0 -1
- package/resource.d.mts +0 -2
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -2
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -19
- package/resource.js.map +0 -1
- package/resource.mjs +0 -2
- package/resource.mjs.map +0 -1
- package/resources/action-execution.d.mts +0 -155
- package/resources/action-execution.d.mts.map +0 -1
- package/resources/action-execution.d.ts +0 -155
- package/resources/action-execution.d.ts.map +0 -1
- package/resources/action-execution.js +0 -19
- package/resources/action-execution.js.map +0 -1
- package/resources/action-execution.mjs +0 -15
- package/resources/action-execution.mjs.map +0 -1
- package/resources/auth/auth.d.mts +0 -10
- package/resources/auth/auth.d.mts.map +0 -1
- package/resources/auth/auth.d.ts +0 -10
- package/resources/auth/auth.d.ts.map +0 -1
- package/resources/auth/auth.js +0 -39
- package/resources/auth/auth.js.map +0 -1
- package/resources/auth/auth.mjs +0 -12
- package/resources/auth/auth.mjs.map +0 -1
- package/resources/auth/index.d.mts +0 -3
- package/resources/auth/index.d.mts.map +0 -1
- package/resources/auth/index.d.ts +0 -3
- package/resources/auth/index.d.ts.map +0 -1
- package/resources/auth/index.js +0 -9
- package/resources/auth/index.js.map +0 -1
- package/resources/auth/index.mjs +0 -4
- package/resources/auth/index.mjs.map +0 -1
- package/resources/auth/session.d.mts +0 -75
- package/resources/auth/session.d.mts.map +0 -1
- package/resources/auth/session.d.ts +0 -75
- package/resources/auth/session.d.ts.map +0 -1
- package/resources/auth/session.js +0 -12
- package/resources/auth/session.js.map +0 -1
- package/resources/auth/session.mjs +0 -8
- package/resources/auth/session.mjs.map +0 -1
- package/resources/auth-configs.d.mts +0 -217
- package/resources/auth-configs.d.mts.map +0 -1
- package/resources/auth-configs.d.ts +0 -217
- package/resources/auth-configs.d.ts.map +0 -1
- package/resources/auth-configs.js +0 -29
- package/resources/auth-configs.js.map +0 -1
- package/resources/auth-configs.mjs +0 -25
- package/resources/auth-configs.mjs.map +0 -1
- package/resources/auth.d.mts +0 -2
- package/resources/auth.d.mts.map +0 -1
- package/resources/auth.d.ts +0 -2
- package/resources/auth.d.ts.map +0 -1
- package/resources/auth.js +0 -19
- package/resources/auth.js.map +0 -1
- package/resources/auth.mjs +0 -3
- package/resources/auth.mjs.map +0 -1
- package/resources/cli.d.mts +0 -124
- package/resources/cli.d.mts.map +0 -1
- package/resources/cli.d.ts +0 -124
- package/resources/cli.d.ts.map +0 -1
- package/resources/cli.js +0 -18
- package/resources/cli.js.map +0 -1
- package/resources/cli.mjs +0 -14
- package/resources/cli.mjs.map +0 -1
- package/resources/connected-accounts.d.mts +0 -449
- package/resources/connected-accounts.d.mts.map +0 -1
- package/resources/connected-accounts.d.ts +0 -449
- package/resources/connected-accounts.d.ts.map +0 -1
- package/resources/connected-accounts.js +0 -28
- package/resources/connected-accounts.js.map +0 -1
- package/resources/connected-accounts.mjs +0 -24
- package/resources/connected-accounts.mjs.map +0 -1
- package/resources/index.d.mts +0 -14
- package/resources/index.d.mts.map +0 -1
- package/resources/index.d.ts +0 -14
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -31
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -15
- package/resources/index.mjs.map +0 -1
- package/resources/mcp/command.d.mts +0 -34
- package/resources/mcp/command.d.mts.map +0 -1
- package/resources/mcp/command.d.ts +0 -34
- package/resources/mcp/command.d.ts.map +0 -1
- package/resources/mcp/command.js +0 -12
- package/resources/mcp/command.js.map +0 -1
- package/resources/mcp/command.mjs +0 -8
- package/resources/mcp/command.mjs.map +0 -1
- package/resources/mcp/index.d.mts +0 -3
- package/resources/mcp/index.d.mts.map +0 -1
- package/resources/mcp/index.d.ts +0 -3
- package/resources/mcp/index.d.ts.map +0 -1
- package/resources/mcp/index.js +0 -9
- package/resources/mcp/index.js.map +0 -1
- package/resources/mcp/index.mjs +0 -4
- package/resources/mcp/index.mjs.map +0 -1
- package/resources/mcp/mcp.d.mts +0 -378
- package/resources/mcp/mcp.d.mts.map +0 -1
- package/resources/mcp/mcp.d.ts +0 -378
- package/resources/mcp/mcp.d.ts.map +0 -1
- package/resources/mcp/mcp.js +0 -66
- package/resources/mcp/mcp.js.map +0 -1
- package/resources/mcp/mcp.mjs +0 -39
- package/resources/mcp/mcp.mjs.map +0 -1
- package/resources/mcp.d.mts +0 -2
- package/resources/mcp.d.mts.map +0 -1
- package/resources/mcp.d.ts +0 -2
- package/resources/mcp.d.ts.map +0 -1
- package/resources/mcp.js +0 -19
- package/resources/mcp.js.map +0 -1
- package/resources/mcp.mjs +0 -3
- package/resources/mcp.mjs.map +0 -1
- package/resources/org/api-key.d.mts +0 -17
- package/resources/org/api-key.d.mts.map +0 -1
- package/resources/org/api-key.d.ts +0 -17
- package/resources/org/api-key.d.ts.map +0 -1
- package/resources/org/api-key.js +0 -15
- package/resources/org/api-key.js.map +0 -1
- package/resources/org/api-key.mjs +0 -11
- package/resources/org/api-key.mjs.map +0 -1
- package/resources/org/index.d.mts +0 -4
- package/resources/org/index.d.mts.map +0 -1
- package/resources/org/index.d.ts +0 -4
- package/resources/org/index.d.ts.map +0 -1
- package/resources/org/index.js +0 -11
- package/resources/org/index.js.map +0 -1
- package/resources/org/index.mjs +0 -5
- package/resources/org/index.mjs.map +0 -1
- package/resources/org/org.d.mts +0 -14
- package/resources/org/org.d.mts.map +0 -1
- package/resources/org/org.d.ts +0 -14
- package/resources/org/org.d.ts.map +0 -1
- package/resources/org/org.js +0 -43
- package/resources/org/org.js.map +0 -1
- package/resources/org/org.mjs +0 -16
- package/resources/org/org.mjs.map +0 -1
- package/resources/org/project/api-keys.d.mts +0 -109
- package/resources/org/project/api-keys.d.mts.map +0 -1
- package/resources/org/project/api-keys.d.ts +0 -109
- package/resources/org/project/api-keys.d.ts.map +0 -1
- package/resources/org/project/api-keys.js +0 -23
- package/resources/org/project/api-keys.js.map +0 -1
- package/resources/org/project/api-keys.mjs +0 -19
- package/resources/org/project/api-keys.mjs.map +0 -1
- package/resources/org/project/index.d.mts +0 -5
- package/resources/org/project/index.d.mts.map +0 -1
- package/resources/org/project/index.d.ts +0 -5
- package/resources/org/project/index.d.ts.map +0 -1
- package/resources/org/project/index.js +0 -13
- package/resources/org/project/index.js.map +0 -1
- package/resources/org/project/index.mjs +0 -6
- package/resources/org/project/index.mjs.map +0 -1
- package/resources/org/project/project.d.mts +0 -90
- package/resources/org/project/project.d.mts.map +0 -1
- package/resources/org/project/project.d.ts +0 -90
- package/resources/org/project/project.d.ts.map +0 -1
- package/resources/org/project/project.js +0 -60
- package/resources/org/project/project.js.map +0 -1
- package/resources/org/project/project.mjs +0 -33
- package/resources/org/project/project.mjs.map +0 -1
- package/resources/org/project/trigger.d.mts +0 -51
- package/resources/org/project/trigger.d.mts.map +0 -1
- package/resources/org/project/trigger.d.ts +0 -51
- package/resources/org/project/trigger.d.ts.map +0 -1
- package/resources/org/project/trigger.js +0 -16
- package/resources/org/project/trigger.js.map +0 -1
- package/resources/org/project/trigger.mjs +0 -12
- package/resources/org/project/trigger.mjs.map +0 -1
- package/resources/org/project/webhook.d.mts +0 -92
- package/resources/org/project/webhook.d.mts.map +0 -1
- package/resources/org/project/webhook.d.ts +0 -92
- package/resources/org/project/webhook.d.ts.map +0 -1
- package/resources/org/project/webhook.js +0 -24
- package/resources/org/project/webhook.js.map +0 -1
- package/resources/org/project/webhook.mjs +0 -20
- package/resources/org/project/webhook.mjs.map +0 -1
- package/resources/org/project.d.mts +0 -2
- package/resources/org/project.d.mts.map +0 -1
- package/resources/org/project.d.ts +0 -2
- package/resources/org/project.d.ts.map +0 -1
- package/resources/org/project.js +0 -19
- package/resources/org/project.js.map +0 -1
- package/resources/org/project.mjs +0 -3
- package/resources/org/project.mjs.map +0 -1
- package/resources/org.d.mts +0 -2
- package/resources/org.d.mts.map +0 -1
- package/resources/org.d.ts +0 -2
- package/resources/org.d.ts.map +0 -1
- package/resources/org.js +0 -19
- package/resources/org.js.map +0 -1
- package/resources/org.mjs +0 -3
- package/resources/org.mjs.map +0 -1
- package/resources/team-members.d.mts +0 -57
- package/resources/team-members.d.mts.map +0 -1
- package/resources/team-members.d.ts +0 -57
- package/resources/team-members.d.ts.map +0 -1
- package/resources/team-members.js +0 -22
- package/resources/team-members.js.map +0 -1
- package/resources/team-members.mjs +0 -18
- package/resources/team-members.mjs.map +0 -1
- package/resources/toolkits.d.mts +0 -141
- package/resources/toolkits.d.mts.map +0 -1
- package/resources/toolkits.d.ts +0 -141
- package/resources/toolkits.d.ts.map +0 -1
- package/resources/toolkits.js +0 -19
- package/resources/toolkits.js.map +0 -1
- package/resources/toolkits.mjs +0 -15
- package/resources/toolkits.mjs.map +0 -1
- package/resources/tools.d.mts +0 -210
- package/resources/tools.d.mts.map +0 -1
- package/resources/tools.d.ts +0 -210
- package/resources/tools.d.ts.map +0 -1
- package/resources/tools.js +0 -28
- package/resources/tools.js.map +0 -1
- package/resources/tools.mjs +0 -24
- package/resources/tools.mjs.map +0 -1
- package/resources/trigger-instances/handle.d.mts +0 -25
- package/resources/trigger-instances/handle.d.mts.map +0 -1
- package/resources/trigger-instances/handle.d.ts +0 -25
- package/resources/trigger-instances/handle.d.ts.map +0 -1
- package/resources/trigger-instances/handle.js +0 -18
- package/resources/trigger-instances/handle.js.map +0 -1
- package/resources/trigger-instances/handle.mjs +0 -14
- package/resources/trigger-instances/handle.mjs.map +0 -1
- package/resources/trigger-instances/index.d.mts +0 -3
- package/resources/trigger-instances/index.d.mts.map +0 -1
- package/resources/trigger-instances/index.d.ts +0 -3
- package/resources/trigger-instances/index.d.ts.map +0 -1
- package/resources/trigger-instances/index.js +0 -9
- package/resources/trigger-instances/index.js.map +0 -1
- package/resources/trigger-instances/index.mjs +0 -4
- package/resources/trigger-instances/index.mjs.map +0 -1
- package/resources/trigger-instances/trigger-instances.d.mts +0 -126
- package/resources/trigger-instances/trigger-instances.d.mts.map +0 -1
- package/resources/trigger-instances/trigger-instances.d.ts +0 -126
- package/resources/trigger-instances/trigger-instances.d.ts.map +0 -1
- package/resources/trigger-instances/trigger-instances.js +0 -53
- package/resources/trigger-instances/trigger-instances.js.map +0 -1
- package/resources/trigger-instances/trigger-instances.mjs +0 -26
- package/resources/trigger-instances/trigger-instances.mjs.map +0 -1
- package/resources/trigger-instances.d.mts +0 -2
- package/resources/trigger-instances.d.mts.map +0 -1
- package/resources/trigger-instances.d.ts +0 -2
- package/resources/trigger-instances.d.ts.map +0 -1
- package/resources/trigger-instances.js +0 -19
- package/resources/trigger-instances.js.map +0 -1
- package/resources/trigger-instances.mjs +0 -3
- package/resources/trigger-instances.mjs.map +0 -1
- package/resources/trigger.d.mts +0 -73
- package/resources/trigger.d.mts.map +0 -1
- package/resources/trigger.d.ts +0 -73
- package/resources/trigger.d.ts.map +0 -1
- package/resources/trigger.js +0 -12
- package/resources/trigger.js.map +0 -1
- package/resources/trigger.mjs +0 -8
- package/resources/trigger.mjs.map +0 -1
- package/resources/triggers-types.d.mts +0 -59
- package/resources/triggers-types.d.mts.map +0 -1
- package/resources/triggers-types.d.ts +0 -59
- package/resources/triggers-types.d.ts.map +0 -1
- package/resources/triggers-types.js +0 -19
- package/resources/triggers-types.js.map +0 -1
- package/resources/triggers-types.mjs +0 -15
- package/resources/triggers-types.mjs.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/resources.d.ts +0 -2
- package/resources.d.ts.map +0 -1
- package/resources.js +0 -18
- package/resources.js.map +0 -1
- package/resources.mjs +0 -2
- package/resources.mjs.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/client.ts +0 -938
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -92
- package/src/core/error.ts +0 -130
- package/src/core/resource.ts +0 -11
- package/src/core/uploads.ts +0 -2
- package/src/error.ts +0 -2
- package/src/index.ts +0 -22
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -93
- package/src/internal/detect-platform.ts +0 -196
- package/src/internal/errors.ts +0 -33
- package/src/internal/headers.ts +0 -96
- package/src/internal/parse.ts +0 -50
- package/src/internal/qs/LICENSE.md +0 -13
- package/src/internal/qs/README.md +0 -3
- package/src/internal/qs/formats.ts +0 -9
- package/src/internal/qs/index.ts +0 -13
- package/src/internal/qs/stringify.ts +0 -388
- package/src/internal/qs/types.ts +0 -71
- package/src/internal/qs/utils.ts +0 -265
- package/src/internal/request-options.ts +0 -37
- package/src/internal/shim-types.d.ts +0 -28
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -66
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
- package/src/internal/shims.ts +0 -107
- package/src/internal/to-file.ts +0 -152
- package/src/internal/types.ts +0 -92
- package/src/internal/uploads.ts +0 -175
- package/src/internal/utils/base64.ts +0 -39
- package/src/internal/utils/env.ts +0 -18
- package/src/internal/utils/log.ts +0 -127
- package/src/internal/utils/path.ts +0 -63
- package/src/internal/utils/sleep.ts +0 -3
- package/src/internal/utils/uuid.ts +0 -19
- package/src/internal/utils/values.ts +0 -102
- package/src/internal/utils.ts +0 -8
- package/src/lib/.keep +0 -4
- package/src/resource.ts +0 -2
- package/src/resources/action-execution.ts +0 -244
- package/src/resources/auth/auth.ts +0 -15
- package/src/resources/auth/index.ts +0 -4
- package/src/resources/auth/session.ts +0 -127
- package/src/resources/auth-configs.ts +0 -362
- package/src/resources/auth.ts +0 -3
- package/src/resources/cli.ts +0 -166
- package/src/resources/connected-accounts.ts +0 -661
- package/src/resources/index.ts +0 -105
- package/src/resources/mcp/command.ts +0 -47
- package/src/resources/mcp/index.ts +0 -17
- package/src/resources/mcp/mcp.ts +0 -519
- package/src/resources/mcp.ts +0 -3
- package/src/resources/org/api-key.ts +0 -30
- package/src/resources/org/index.ts +0 -12
- package/src/resources/org/org.ts +0 -39
- package/src/resources/org/project/api-keys.ts +0 -156
- package/src/resources/org/project/index.ts +0 -35
- package/src/resources/org/project/project.ts +0 -206
- package/src/resources/org/project/trigger.ts +0 -95
- package/src/resources/org/project/webhook.ts +0 -131
- package/src/resources/org/project.ts +0 -3
- package/src/resources/org.ts +0 -3
- package/src/resources/team-members.ts +0 -111
- package/src/resources/toolkits.ts +0 -232
- package/src/resources/tools.ts +0 -319
- package/src/resources/trigger-instances/handle.ts +0 -45
- package/src/resources/trigger-instances/index.ts +0 -19
- package/src/resources/trigger-instances/trigger-instances.ts +0 -202
- package/src/resources/trigger-instances.ts +0 -3
- package/src/resources/trigger.ts +0 -108
- package/src/resources/triggers-types.ts +0 -105
- package/src/resources.ts +0 -1
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -2
- package/src/version.ts +0 -1
- package/uploads.d.mts +0 -2
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -2
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -19
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -2
- package/uploads.mjs.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1219 @@
|
|
|
1
|
+
import { _ as InternalServerError, a as inspectDeprecatedInputs, b as RateLimitError, c as mergeHeaders, d as APIError, f as APIUserAbortError, g as ConflictError, h as ComposioError, i as safeJSON, l as APIConnectionError, m as BadRequestError, n as makeRequest, o as inspectDeprecation, p as AuthenticationError, s as assertCredentialTransport, t as castToError, u as APIConnectionTimeoutError, v as NotFoundError, x as UnprocessableEntityError, y as PermissionDeniedError } from "./request-zLX87M09.mjs";
|
|
2
|
+
import { t as ApiKeyRevocation } from "./api-key-revocation-BqiqlJh6.mjs";
|
|
3
|
+
import { t as AuthConfigs } from "./auth-configs-COkEdwlP.mjs";
|
|
4
|
+
import { t as Auth } from "./auth-ClFXmN5T.mjs";
|
|
5
|
+
import { t as Cli } from "./cli-BWTXVRT4.mjs";
|
|
6
|
+
import { t as ConnectedAccounts } from "./connected-accounts-DK24qYIM.mjs";
|
|
7
|
+
import { t as Files$1 } from "./files-DoNtYu2Q.mjs";
|
|
8
|
+
import { t as Link } from "./link-NsFv9L3R.mjs";
|
|
9
|
+
import { t as Logs } from "./logs-BhCTVSZE.mjs";
|
|
10
|
+
import { t as Mcp } from "./mcp-r-SWyCDh.mjs";
|
|
11
|
+
import { t as Migration } from "./migration-CBhnoN-Y.mjs";
|
|
12
|
+
import { t as Org } from "./org-C12wx9QM.mjs";
|
|
13
|
+
import { t as Project } from "./project-DgdqyoZJ.mjs";
|
|
14
|
+
import { t as Files } from "./files-lfGzAnJ_.mjs";
|
|
15
|
+
import { t as Session } from "./session-CmqSfXtq.mjs";
|
|
16
|
+
import { t as ToolRouter } from "./tool-router-DbmIxiU5.mjs";
|
|
17
|
+
import { t as Toolkits } from "./toolkits-BUWB3p_C.mjs";
|
|
18
|
+
import { t as Tools } from "./tools-BO1wTIiE.mjs";
|
|
19
|
+
import { t as TriggerInstances } from "./trigger-instances-CoEohjcv.mjs";
|
|
20
|
+
import { t as TriggersTypes } from "./triggers-types-DmOurxxx.mjs";
|
|
21
|
+
import { t as WebhookEndpoints } from "./webhook-endpoints-CyWYVPMe.mjs";
|
|
22
|
+
import { t as WebhookSubscriptions } from "./webhook-subscriptions-BgnCTUGn.mjs";
|
|
23
|
+
|
|
24
|
+
//#region src/compat/api-promise.ts
|
|
25
|
+
/**
|
|
26
|
+
* Body parsing, strictly deferred: nothing here runs until the promise is
|
|
27
|
+
* awaited (or `withResponse()` is called). Reads a clone so the `Response`
|
|
28
|
+
* handed out by `asResponse()`/`withResponse()` stays readable. Maps HTTP
|
|
29
|
+
* error statuses to the Stainless error hierarchy; mirrors Stainless
|
|
30
|
+
* `defaultParseResponse` for success bodies (204 → null, JSON by
|
|
31
|
+
* content-type, empty content-length → undefined, otherwise text).
|
|
32
|
+
*/
|
|
33
|
+
const defaultParseResponse = async (response) => {
|
|
34
|
+
if (!response.ok) {
|
|
35
|
+
const errText = await response.clone().text().catch((err) => castToError(err).message);
|
|
36
|
+
const errJSON = safeJSON(errText);
|
|
37
|
+
throw APIError.generate(response.status, errJSON, errJSON ? void 0 : errText, response.headers);
|
|
38
|
+
}
|
|
39
|
+
if (response.status === 204) return null;
|
|
40
|
+
const mediaType = response.headers.get("content-type")?.split(";")[0]?.trim();
|
|
41
|
+
if (mediaType?.includes("application/json") || mediaType?.endsWith("+json")) {
|
|
42
|
+
if (response.headers.get("content-length") === "0") return void 0;
|
|
43
|
+
return await response.clone().json();
|
|
44
|
+
}
|
|
45
|
+
return await response.clone().text();
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Stainless-compatible `APIPromise`.
|
|
49
|
+
*
|
|
50
|
+
* Mirrors composio-base-ts `src/core/api-promise.ts`: a `Promise` subclass
|
|
51
|
+
* with a no-op executor whose `then`/`catch`/`finally` are overridden to
|
|
52
|
+
* parse lazily. The laziness matters — `.asResponse()` must resolve with the
|
|
53
|
+
* raw `Response` on HTTP error statuses without ever materializing (and thus
|
|
54
|
+
* leaving unhandled) the rejected parsed promise.
|
|
55
|
+
*/
|
|
56
|
+
var APIPromise = class APIPromise extends Promise {
|
|
57
|
+
exchangePromise;
|
|
58
|
+
parseResponse;
|
|
59
|
+
parsedPromise;
|
|
60
|
+
constructor(exchangePromise, parseResponse = defaultParseResponse) {
|
|
61
|
+
super((resolve) => {
|
|
62
|
+
resolve(null);
|
|
63
|
+
});
|
|
64
|
+
this.exchangePromise = exchangePromise;
|
|
65
|
+
this.parseResponse = parseResponse;
|
|
66
|
+
}
|
|
67
|
+
_thenUnwrap(transform) {
|
|
68
|
+
return new APIPromise(this.exchangePromise, async (response) => transform(await this.parseResponse(response), response));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Gets the raw `Response` instead of parsing the body. Resolves (never
|
|
72
|
+
* throws an `APIError`) on HTTP error statuses; rejects only on
|
|
73
|
+
* connection/abort failures.
|
|
74
|
+
*/
|
|
75
|
+
asResponse() {
|
|
76
|
+
return this.exchangePromise.then((response) => response);
|
|
77
|
+
}
|
|
78
|
+
/** Gets the parsed data plus the raw `Response`. */
|
|
79
|
+
async withResponse() {
|
|
80
|
+
const [data, response] = await Promise.all([this.parse(), this.asResponse()]);
|
|
81
|
+
return {
|
|
82
|
+
data,
|
|
83
|
+
response
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
parse() {
|
|
87
|
+
this.parsedPromise ??= this.exchangePromise.then((response) => this.parseResponse(response));
|
|
88
|
+
return this.parsedPromise;
|
|
89
|
+
}
|
|
90
|
+
then(onfulfilled, onrejected) {
|
|
91
|
+
return this.parse().then(onfulfilled, onrejected);
|
|
92
|
+
}
|
|
93
|
+
catch(onrejected) {
|
|
94
|
+
return this.parse().catch(onrejected);
|
|
95
|
+
}
|
|
96
|
+
finally(onfinally) {
|
|
97
|
+
return this.parse().finally(onfinally);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/compat/generated-deprecated-inputs.ts
|
|
103
|
+
const GENERATED_DEPRECATED_INPUTS = /* @__PURE__ */ new Map([
|
|
104
|
+
["authConfigs.list", [{
|
|
105
|
+
wire: "deprecated_app_id",
|
|
106
|
+
in: "query",
|
|
107
|
+
replacementWire: "toolkit_slug"
|
|
108
|
+
}, {
|
|
109
|
+
wire: "deprecated_status",
|
|
110
|
+
in: "query",
|
|
111
|
+
replacementWire: null
|
|
112
|
+
}]],
|
|
113
|
+
["authConfigs.update", [{
|
|
114
|
+
wire: "restrict_to_following_tools",
|
|
115
|
+
in: "body",
|
|
116
|
+
replacementWire: "tool_access_config"
|
|
117
|
+
}]],
|
|
118
|
+
["tools.execute", [{
|
|
119
|
+
wire: "entity_id",
|
|
120
|
+
in: "body",
|
|
121
|
+
replacementWire: "user_id"
|
|
122
|
+
}, {
|
|
123
|
+
wire: "allow_tracing",
|
|
124
|
+
in: "body",
|
|
125
|
+
replacementWire: null
|
|
126
|
+
}]],
|
|
127
|
+
["tools.list", [{
|
|
128
|
+
wire: "search",
|
|
129
|
+
in: "query",
|
|
130
|
+
replacementWire: "query"
|
|
131
|
+
}]],
|
|
132
|
+
["tools.proxy", [{
|
|
133
|
+
wire: "custom_connection_data",
|
|
134
|
+
in: "body",
|
|
135
|
+
replacementWire: null
|
|
136
|
+
}]],
|
|
137
|
+
["triggerInstances.listActive", [
|
|
138
|
+
{
|
|
139
|
+
wire: "connectedAccountIds",
|
|
140
|
+
in: "query",
|
|
141
|
+
replacementWire: "connected_account_ids"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
wire: "authConfigIds",
|
|
145
|
+
in: "query",
|
|
146
|
+
replacementWire: "auth_config_ids"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
wire: "triggerIds",
|
|
150
|
+
in: "query",
|
|
151
|
+
replacementWire: "trigger_ids"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
wire: "triggerNames",
|
|
155
|
+
in: "query",
|
|
156
|
+
replacementWire: "trigger_names"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
wire: "showDisabled",
|
|
160
|
+
in: "query",
|
|
161
|
+
replacementWire: "show_disabled"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
wire: "deprecatedConnectedAccountUuids",
|
|
165
|
+
in: "query",
|
|
166
|
+
replacementWire: "connected_account_ids"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
wire: "deprecatedAuthConfigUuids",
|
|
170
|
+
in: "query",
|
|
171
|
+
replacementWire: "auth_config_ids"
|
|
172
|
+
}
|
|
173
|
+
]],
|
|
174
|
+
["triggerInstances.upsert", [
|
|
175
|
+
{
|
|
176
|
+
wire: "connectedAuthId",
|
|
177
|
+
in: "body",
|
|
178
|
+
replacementWire: "connected_account_id"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
wire: "triggerConfig",
|
|
182
|
+
in: "body",
|
|
183
|
+
replacementWire: "trigger_config"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
wire: "version",
|
|
187
|
+
in: "body",
|
|
188
|
+
replacementWire: "toolkit_versions"
|
|
189
|
+
}
|
|
190
|
+
]]
|
|
191
|
+
]);
|
|
192
|
+
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/compat/generated-operations.ts
|
|
195
|
+
const GENERATED_OPERATIONS = [
|
|
196
|
+
{
|
|
197
|
+
method: "delete",
|
|
198
|
+
path: "/api/v3.1/auth_configs/{nanoid}",
|
|
199
|
+
chain: ["authConfigs", "delete"],
|
|
200
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
method: "delete",
|
|
204
|
+
path: "/api/v3.1/connected_accounts/{nanoid}",
|
|
205
|
+
chain: ["connectedAccounts", "delete"],
|
|
206
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
method: "delete",
|
|
210
|
+
path: "/api/v3.1/mcp/servers/{serverId}/instances/{instanceId}",
|
|
211
|
+
chain: ["mcp", "deleteInstance"]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
method: "delete",
|
|
215
|
+
path: "/api/v3.1/mcp/{id}",
|
|
216
|
+
chain: ["mcp", "delete"]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
method: "delete",
|
|
220
|
+
path: "/api/v3.1/org/owner/project/{nano_id}",
|
|
221
|
+
chain: [
|
|
222
|
+
"org",
|
|
223
|
+
"owner",
|
|
224
|
+
"project",
|
|
225
|
+
"delete"
|
|
226
|
+
],
|
|
227
|
+
schemes: ["OrgApiKeyAuth"]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
method: "delete",
|
|
231
|
+
path: "/api/v3.1/tool_router/session/{session_id}",
|
|
232
|
+
chain: [
|
|
233
|
+
"toolRouter",
|
|
234
|
+
"session",
|
|
235
|
+
"delete"
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
method: "delete",
|
|
240
|
+
path: "/api/v3.1/trigger_instances/manage/{triggerId}",
|
|
241
|
+
chain: [
|
|
242
|
+
"triggerInstances",
|
|
243
|
+
"manage",
|
|
244
|
+
"delete"
|
|
245
|
+
],
|
|
246
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
method: "delete",
|
|
250
|
+
path: "/api/v3.1/webhook_subscriptions/{id}",
|
|
251
|
+
chain: ["webhookSubscriptions", "delete"]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
method: "get",
|
|
255
|
+
path: "/api/v3.1/auth/session/info",
|
|
256
|
+
chain: [
|
|
257
|
+
"auth",
|
|
258
|
+
"session",
|
|
259
|
+
"retrieveInfo"
|
|
260
|
+
],
|
|
261
|
+
schemes: ["UserApiKeyAuth"]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
method: "get",
|
|
265
|
+
path: "/api/v3.1/auth_configs",
|
|
266
|
+
chain: ["authConfigs", "list"],
|
|
267
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
method: "get",
|
|
271
|
+
path: "/api/v3.1/auth_configs/{nanoid}",
|
|
272
|
+
chain: ["authConfigs", "retrieve"],
|
|
273
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
method: "get",
|
|
277
|
+
path: "/api/v3.1/cli/get-session",
|
|
278
|
+
chain: ["cli", "getSession"],
|
|
279
|
+
schemes: ["no_auth"]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
method: "get",
|
|
283
|
+
path: "/api/v3.1/cli/realtime/credentials",
|
|
284
|
+
chain: [
|
|
285
|
+
"cli",
|
|
286
|
+
"realtime",
|
|
287
|
+
"credentials"
|
|
288
|
+
],
|
|
289
|
+
schemes: ["UserApiKeyAuth"]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
method: "get",
|
|
293
|
+
path: "/api/v3.1/connected_accounts",
|
|
294
|
+
chain: ["connectedAccounts", "list"],
|
|
295
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
method: "get",
|
|
299
|
+
path: "/api/v3.1/connected_accounts/{nanoid}",
|
|
300
|
+
chain: ["connectedAccounts", "retrieve"],
|
|
301
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
method: "get",
|
|
305
|
+
path: "/api/v3.1/files/list",
|
|
306
|
+
chain: ["files", "list"]
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
method: "get",
|
|
310
|
+
path: "/api/v3.1/internal/action_execution/fields",
|
|
311
|
+
chain: [
|
|
312
|
+
"logs",
|
|
313
|
+
"tools",
|
|
314
|
+
"listFields"
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
method: "get",
|
|
319
|
+
path: "/api/v3.1/internal/action_execution/log/{id}",
|
|
320
|
+
chain: [
|
|
321
|
+
"logs",
|
|
322
|
+
"tools",
|
|
323
|
+
"retrieve"
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
method: "get",
|
|
328
|
+
path: "/api/v3.1/internal/trigger/log/{id}",
|
|
329
|
+
chain: [
|
|
330
|
+
"logs",
|
|
331
|
+
"triggers",
|
|
332
|
+
"retrieve"
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
method: "get",
|
|
337
|
+
path: "/api/v3.1/logs/tool_execution/{id}",
|
|
338
|
+
chain: ["logs", "retrieveToolExecution"]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
method: "get",
|
|
342
|
+
path: "/api/v3.1/mcp/app/{appKey}",
|
|
343
|
+
chain: ["mcp", "retrieveApp"]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
method: "get",
|
|
347
|
+
path: "/api/v3.1/mcp/servers",
|
|
348
|
+
chain: ["mcp", "list"]
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
method: "get",
|
|
352
|
+
path: "/api/v3.1/mcp/servers/{serverId}/instances",
|
|
353
|
+
chain: ["mcp", "listInstances"]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
method: "get",
|
|
357
|
+
path: "/api/v3.1/mcp/{id}",
|
|
358
|
+
chain: ["mcp", "retrieve"]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
method: "get",
|
|
362
|
+
path: "/api/v3.1/org/consumer/connected_toolkits",
|
|
363
|
+
chain: [
|
|
364
|
+
"org",
|
|
365
|
+
"consumer",
|
|
366
|
+
"listConnectedToolkits"
|
|
367
|
+
],
|
|
368
|
+
schemes: ["UserApiKeyAuth"]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
method: "get",
|
|
372
|
+
path: "/api/v3.1/org/list",
|
|
373
|
+
chain: ["org", "list"],
|
|
374
|
+
schemes: ["UserApiKeyAuth"]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
method: "get",
|
|
378
|
+
path: "/api/v3.1/org/owner/project/list",
|
|
379
|
+
chain: [
|
|
380
|
+
"org",
|
|
381
|
+
"owner",
|
|
382
|
+
"project",
|
|
383
|
+
"list"
|
|
384
|
+
],
|
|
385
|
+
schemes: ["OrgApiKeyAuth"]
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
method: "get",
|
|
389
|
+
path: "/api/v3.1/org/owner/project/{nano_id}",
|
|
390
|
+
chain: [
|
|
391
|
+
"org",
|
|
392
|
+
"owner",
|
|
393
|
+
"project",
|
|
394
|
+
"retrieve"
|
|
395
|
+
],
|
|
396
|
+
schemes: ["OrgApiKeyAuth"]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
method: "get",
|
|
400
|
+
path: "/api/v3.1/org/project/list",
|
|
401
|
+
chain: [
|
|
402
|
+
"org",
|
|
403
|
+
"project",
|
|
404
|
+
"list"
|
|
405
|
+
],
|
|
406
|
+
schemes: ["UserApiKeyAuth"]
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
method: "get",
|
|
410
|
+
path: "/api/v3.1/tool_router/session/{session_id}",
|
|
411
|
+
chain: [
|
|
412
|
+
"toolRouter",
|
|
413
|
+
"session",
|
|
414
|
+
"retrieve"
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
method: "get",
|
|
419
|
+
path: "/api/v3.1/tool_router/session/{session_id}/config_history",
|
|
420
|
+
chain: [
|
|
421
|
+
"toolRouter",
|
|
422
|
+
"session",
|
|
423
|
+
"configHistory"
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
method: "get",
|
|
428
|
+
path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/items",
|
|
429
|
+
chain: [
|
|
430
|
+
"toolRouter",
|
|
431
|
+
"session",
|
|
432
|
+
"files",
|
|
433
|
+
"list"
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
method: "get",
|
|
438
|
+
path: "/api/v3.1/tool_router/session/{session_id}/toolkits",
|
|
439
|
+
chain: [
|
|
440
|
+
"toolRouter",
|
|
441
|
+
"session",
|
|
442
|
+
"toolkits"
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
method: "get",
|
|
447
|
+
path: "/api/v3.1/tool_router/session/{session_id}/tools",
|
|
448
|
+
chain: [
|
|
449
|
+
"toolRouter",
|
|
450
|
+
"session",
|
|
451
|
+
"tools"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
method: "get",
|
|
456
|
+
path: "/api/v3.1/toolkits",
|
|
457
|
+
chain: ["toolkits", "list"],
|
|
458
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
method: "get",
|
|
462
|
+
path: "/api/v3.1/toolkits/categories",
|
|
463
|
+
chain: ["toolkits", "retrieveCategories"]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
method: "get",
|
|
467
|
+
path: "/api/v3.1/toolkits/changelog",
|
|
468
|
+
chain: ["toolkits", "retrieveChangelog"]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
method: "get",
|
|
472
|
+
path: "/api/v3.1/toolkits/{slug}",
|
|
473
|
+
chain: ["toolkits", "retrieve"],
|
|
474
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
method: "get",
|
|
478
|
+
path: "/api/v3.1/tools",
|
|
479
|
+
chain: ["tools", "list"],
|
|
480
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
method: "get",
|
|
484
|
+
path: "/api/v3.1/tools/enum",
|
|
485
|
+
chain: ["tools", "retrieveEnum"],
|
|
486
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
method: "get",
|
|
490
|
+
path: "/api/v3.1/tools/{tool_slug}",
|
|
491
|
+
chain: ["tools", "retrieve"],
|
|
492
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
method: "get",
|
|
496
|
+
path: "/api/v3.1/trigger_instances/active",
|
|
497
|
+
chain: ["triggerInstances", "listActive"],
|
|
498
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
method: "get",
|
|
502
|
+
path: "/api/v3.1/triggers_types",
|
|
503
|
+
chain: ["triggersTypes", "list"],
|
|
504
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
method: "get",
|
|
508
|
+
path: "/api/v3.1/triggers_types/list/enum",
|
|
509
|
+
chain: ["triggersTypes", "retrieveEnum"],
|
|
510
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
method: "get",
|
|
514
|
+
path: "/api/v3.1/triggers_types/{slug}",
|
|
515
|
+
chain: ["triggersTypes", "retrieve"],
|
|
516
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
method: "get",
|
|
520
|
+
path: "/api/v3.1/webhook_endpoints",
|
|
521
|
+
chain: ["webhookEndpoints", "list"]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
method: "get",
|
|
525
|
+
path: "/api/v3.1/webhook_endpoints/{nano_id}",
|
|
526
|
+
chain: ["webhookEndpoints", "retrieve"]
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
method: "get",
|
|
530
|
+
path: "/api/v3.1/webhook_subscriptions",
|
|
531
|
+
chain: ["webhookSubscriptions", "list"]
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
method: "get",
|
|
535
|
+
path: "/api/v3.1/webhook_subscriptions/event_types",
|
|
536
|
+
chain: ["webhookSubscriptions", "listEventTypes"]
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
method: "get",
|
|
540
|
+
path: "/api/v3.1/webhook_subscriptions/{id}",
|
|
541
|
+
chain: ["webhookSubscriptions", "retrieve"]
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
method: "patch",
|
|
545
|
+
path: "/api/v3.1/auth_configs/{nanoid}",
|
|
546
|
+
chain: ["authConfigs", "update"],
|
|
547
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
method: "patch",
|
|
551
|
+
path: "/api/v3.1/auth_configs/{nanoid}/{status}",
|
|
552
|
+
chain: ["authConfigs", "updateStatus"]
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
method: "patch",
|
|
556
|
+
path: "/api/v3.1/connected_accounts/{nanoId}/status",
|
|
557
|
+
chain: ["connectedAccounts", "updateStatus"]
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
method: "patch",
|
|
561
|
+
path: "/api/v3.1/connected_accounts/{nanoid}",
|
|
562
|
+
chain: ["connectedAccounts", "patch"]
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
method: "patch",
|
|
566
|
+
path: "/api/v3.1/mcp/{id}",
|
|
567
|
+
chain: ["mcp", "update"]
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
method: "patch",
|
|
571
|
+
path: "/api/v3.1/tool_router/session/{session_id}",
|
|
572
|
+
chain: [
|
|
573
|
+
"toolRouter",
|
|
574
|
+
"session",
|
|
575
|
+
"patch"
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
method: "patch",
|
|
580
|
+
path: "/api/v3.1/trigger_instances/manage/{triggerId}",
|
|
581
|
+
chain: [
|
|
582
|
+
"triggerInstances",
|
|
583
|
+
"manage",
|
|
584
|
+
"update"
|
|
585
|
+
],
|
|
586
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
method: "patch",
|
|
590
|
+
path: "/api/v3.1/webhook_endpoints/{nano_id}",
|
|
591
|
+
chain: ["webhookEndpoints", "update"]
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
method: "patch",
|
|
595
|
+
path: "/api/v3.1/webhook_subscriptions/{id}",
|
|
596
|
+
chain: ["webhookSubscriptions", "update"]
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
method: "post",
|
|
600
|
+
path: "/api/v3.1/api_key_revocation",
|
|
601
|
+
chain: ["apiKeyRevocation", "create"],
|
|
602
|
+
schemes: ["no_auth"]
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
method: "post",
|
|
606
|
+
path: "/api/v3.1/auth_configs",
|
|
607
|
+
chain: ["authConfigs", "create"],
|
|
608
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
method: "post",
|
|
612
|
+
path: "/api/v3.1/cli/codact_failures",
|
|
613
|
+
chain: ["cli", "createCodactFailure"],
|
|
614
|
+
schemes: ["UserApiKeyAuth"]
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
method: "post",
|
|
618
|
+
path: "/api/v3.1/cli/create-session",
|
|
619
|
+
chain: ["cli", "createSession"],
|
|
620
|
+
schemes: ["no_auth"]
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
method: "post",
|
|
624
|
+
path: "/api/v3.1/cli/realtime/auth",
|
|
625
|
+
chain: [
|
|
626
|
+
"cli",
|
|
627
|
+
"realtime",
|
|
628
|
+
"auth"
|
|
629
|
+
],
|
|
630
|
+
schemes: ["UserApiKeyAuth"]
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
method: "post",
|
|
634
|
+
path: "/api/v3.1/connected_accounts",
|
|
635
|
+
chain: ["connectedAccounts", "create"]
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
method: "post",
|
|
639
|
+
path: "/api/v3.1/connected_accounts/link",
|
|
640
|
+
chain: ["link", "create"],
|
|
641
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
method: "post",
|
|
645
|
+
path: "/api/v3.1/connected_accounts/{nanoid}/refresh",
|
|
646
|
+
chain: ["connectedAccounts", "refresh"]
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
method: "post",
|
|
650
|
+
path: "/api/v3.1/connected_accounts/{nanoid}/revoke",
|
|
651
|
+
chain: ["connectedAccounts", "revoke"]
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
method: "post",
|
|
655
|
+
path: "/api/v3.1/files/upload/request",
|
|
656
|
+
chain: ["files", "createPresignedURL"]
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
method: "post",
|
|
660
|
+
path: "/api/v3.1/internal/action_execution/logs",
|
|
661
|
+
chain: [
|
|
662
|
+
"logs",
|
|
663
|
+
"tools",
|
|
664
|
+
"list"
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
method: "post",
|
|
669
|
+
path: "/api/v3.1/internal/trigger/logs",
|
|
670
|
+
chain: [
|
|
671
|
+
"logs",
|
|
672
|
+
"triggers",
|
|
673
|
+
"list"
|
|
674
|
+
]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
method: "post",
|
|
678
|
+
path: "/api/v3.1/logs/tool_execution",
|
|
679
|
+
chain: ["logs", "createToolExecution"]
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
method: "post",
|
|
683
|
+
path: "/api/v3.1/mcp/servers",
|
|
684
|
+
chain: ["mcp", "create"]
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
method: "post",
|
|
688
|
+
path: "/api/v3.1/mcp/servers/custom",
|
|
689
|
+
chain: [
|
|
690
|
+
"mcp",
|
|
691
|
+
"custom",
|
|
692
|
+
"create"
|
|
693
|
+
]
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
method: "post",
|
|
697
|
+
path: "/api/v3.1/mcp/servers/generate",
|
|
698
|
+
chain: [
|
|
699
|
+
"mcp",
|
|
700
|
+
"generate",
|
|
701
|
+
"url"
|
|
702
|
+
]
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
method: "post",
|
|
706
|
+
path: "/api/v3.1/mcp/servers/{serverId}/instances",
|
|
707
|
+
chain: ["mcp", "createInstance"]
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
method: "post",
|
|
711
|
+
path: "/api/v3.1/org/clanker/create_claim",
|
|
712
|
+
chain: [
|
|
713
|
+
"org",
|
|
714
|
+
"clanker",
|
|
715
|
+
"createClaim"
|
|
716
|
+
],
|
|
717
|
+
schemes: ["OrgApiKeyAuth"]
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
method: "post",
|
|
721
|
+
path: "/api/v3.1/org/consumer/project/resolve",
|
|
722
|
+
chain: [
|
|
723
|
+
"org",
|
|
724
|
+
"consumer",
|
|
725
|
+
"project",
|
|
726
|
+
"resolve"
|
|
727
|
+
],
|
|
728
|
+
schemes: ["UserApiKeyAuth"]
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
method: "post",
|
|
732
|
+
path: "/api/v3.1/org/owner/project/new",
|
|
733
|
+
chain: [
|
|
734
|
+
"org",
|
|
735
|
+
"owner",
|
|
736
|
+
"project",
|
|
737
|
+
"create"
|
|
738
|
+
],
|
|
739
|
+
schemes: ["OrgApiKeyAuth"]
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
method: "post",
|
|
743
|
+
path: "/api/v3.1/org/owner/project/{nano_id}/regenerate_api_key",
|
|
744
|
+
chain: [
|
|
745
|
+
"org",
|
|
746
|
+
"owner",
|
|
747
|
+
"project",
|
|
748
|
+
"regenerateAPIKey"
|
|
749
|
+
],
|
|
750
|
+
schemes: ["OrgApiKeyAuth"]
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
method: "post",
|
|
754
|
+
path: "/api/v3.1/org/usage/summary",
|
|
755
|
+
chain: [
|
|
756
|
+
"org",
|
|
757
|
+
"usage",
|
|
758
|
+
"retrieveSummary"
|
|
759
|
+
],
|
|
760
|
+
schemes: ["OrgApiKeyAuth"]
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
method: "post",
|
|
764
|
+
path: "/api/v3.1/org/usage/{entity_type}",
|
|
765
|
+
chain: [
|
|
766
|
+
"org",
|
|
767
|
+
"usage",
|
|
768
|
+
"retrieve"
|
|
769
|
+
],
|
|
770
|
+
schemes: ["OrgApiKeyAuth"]
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
method: "post",
|
|
774
|
+
path: "/api/v3.1/project/usage/summary",
|
|
775
|
+
chain: [
|
|
776
|
+
"project",
|
|
777
|
+
"usage",
|
|
778
|
+
"retrieveSummary"
|
|
779
|
+
]
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
method: "post",
|
|
783
|
+
path: "/api/v3.1/project/usage/{entity_type}",
|
|
784
|
+
chain: [
|
|
785
|
+
"project",
|
|
786
|
+
"usage",
|
|
787
|
+
"retrieve"
|
|
788
|
+
]
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
method: "post",
|
|
792
|
+
path: "/api/v3.1/tool_router/session",
|
|
793
|
+
chain: [
|
|
794
|
+
"toolRouter",
|
|
795
|
+
"session",
|
|
796
|
+
"create"
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
method: "post",
|
|
801
|
+
path: "/api/v3.1/tool_router/session/{session_id}/attach",
|
|
802
|
+
chain: [
|
|
803
|
+
"toolRouter",
|
|
804
|
+
"session",
|
|
805
|
+
"attach"
|
|
806
|
+
]
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
method: "post",
|
|
810
|
+
path: "/api/v3.1/tool_router/session/{session_id}/execute",
|
|
811
|
+
chain: [
|
|
812
|
+
"toolRouter",
|
|
813
|
+
"session",
|
|
814
|
+
"execute"
|
|
815
|
+
],
|
|
816
|
+
schemes: ["ApiKeyAuth", "workbench_access_key"]
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
method: "post",
|
|
820
|
+
path: "/api/v3.1/tool_router/session/{session_id}/execute_meta",
|
|
821
|
+
chain: [
|
|
822
|
+
"toolRouter",
|
|
823
|
+
"session",
|
|
824
|
+
"executeMeta"
|
|
825
|
+
]
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
method: "post",
|
|
829
|
+
path: "/api/v3.1/tool_router/session/{session_id}/link",
|
|
830
|
+
chain: [
|
|
831
|
+
"toolRouter",
|
|
832
|
+
"session",
|
|
833
|
+
"link"
|
|
834
|
+
]
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
method: "post",
|
|
838
|
+
path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/delete",
|
|
839
|
+
chain: [
|
|
840
|
+
"toolRouter",
|
|
841
|
+
"session",
|
|
842
|
+
"files",
|
|
843
|
+
"delete"
|
|
844
|
+
]
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
method: "post",
|
|
848
|
+
path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/download_url",
|
|
849
|
+
chain: [
|
|
850
|
+
"toolRouter",
|
|
851
|
+
"session",
|
|
852
|
+
"files",
|
|
853
|
+
"createDownloadURL"
|
|
854
|
+
]
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
method: "post",
|
|
858
|
+
path: "/api/v3.1/tool_router/session/{session_id}/mounts/{mount_id}/upload_url",
|
|
859
|
+
chain: [
|
|
860
|
+
"toolRouter",
|
|
861
|
+
"session",
|
|
862
|
+
"files",
|
|
863
|
+
"createUploadURL"
|
|
864
|
+
]
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
method: "post",
|
|
868
|
+
path: "/api/v3.1/tool_router/session/{session_id}/proxy_execute",
|
|
869
|
+
chain: [
|
|
870
|
+
"toolRouter",
|
|
871
|
+
"session",
|
|
872
|
+
"proxyExecute"
|
|
873
|
+
],
|
|
874
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
method: "post",
|
|
878
|
+
path: "/api/v3.1/tool_router/session/{session_id}/search",
|
|
879
|
+
chain: [
|
|
880
|
+
"toolRouter",
|
|
881
|
+
"session",
|
|
882
|
+
"search"
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
method: "post",
|
|
887
|
+
path: "/api/v3.1/toolkits/multi",
|
|
888
|
+
chain: ["toolkits", "retrieveMulti"]
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
method: "post",
|
|
892
|
+
path: "/api/v3.1/tools/execute/proxy",
|
|
893
|
+
chain: ["tools", "proxy"]
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
method: "post",
|
|
897
|
+
path: "/api/v3.1/tools/execute/{tool_slug}",
|
|
898
|
+
chain: ["tools", "execute"],
|
|
899
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
method: "post",
|
|
903
|
+
path: "/api/v3.1/tools/execute/{tool_slug}/input",
|
|
904
|
+
chain: ["tools", "getInput"]
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
method: "post",
|
|
908
|
+
path: "/api/v3.1/tools/scopes/required",
|
|
909
|
+
chain: ["tools", "retrieveRequiredScopes"]
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
method: "post",
|
|
913
|
+
path: "/api/v3.1/trigger_instances/{slug}/upsert",
|
|
914
|
+
chain: ["triggerInstances", "upsert"],
|
|
915
|
+
schemes: ["ApiKeyAuth", "UserApiKeyAuth"]
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
method: "post",
|
|
919
|
+
path: "/api/v3.1/webhook_endpoints",
|
|
920
|
+
chain: ["webhookEndpoints", "create"]
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
method: "post",
|
|
924
|
+
path: "/api/v3.1/webhook_endpoints/{nano_id}",
|
|
925
|
+
chain: ["webhookEndpoints", "replace"]
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
method: "post",
|
|
929
|
+
path: "/api/v3.1/webhook_subscriptions",
|
|
930
|
+
chain: ["webhookSubscriptions", "create"]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
method: "post",
|
|
934
|
+
path: "/api/v3.1/webhook_subscriptions/{id}/rotate_secret",
|
|
935
|
+
chain: ["webhookSubscriptions", "rotateSecret"]
|
|
936
|
+
}
|
|
937
|
+
];
|
|
938
|
+
|
|
939
|
+
//#endregion
|
|
940
|
+
//#region src/compat/generated-resource-wiring.ts
|
|
941
|
+
const createClientResources = (client) => ({
|
|
942
|
+
toolRouter: new ToolRouter(client),
|
|
943
|
+
tools: new Tools(client),
|
|
944
|
+
files: new Files$1(client),
|
|
945
|
+
connectedAccounts: new ConnectedAccounts(client),
|
|
946
|
+
link: new Link(client),
|
|
947
|
+
toolkits: new Toolkits(client),
|
|
948
|
+
authConfigs: new AuthConfigs(client),
|
|
949
|
+
triggersTypes: new TriggersTypes(client),
|
|
950
|
+
triggerInstances: new TriggerInstances(client),
|
|
951
|
+
mcp: new Mcp(client),
|
|
952
|
+
cli: new Cli(client),
|
|
953
|
+
logs: new Logs(client),
|
|
954
|
+
project: new Project(client),
|
|
955
|
+
migration: new Migration(),
|
|
956
|
+
webhookSubscriptions: new WebhookSubscriptions(client),
|
|
957
|
+
webhookEndpoints: new WebhookEndpoints(client),
|
|
958
|
+
org: new Org(client),
|
|
959
|
+
auth: new Auth(client),
|
|
960
|
+
apiKeyRevocation: new ApiKeyRevocation(client)
|
|
961
|
+
});
|
|
962
|
+
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region src/version.ts
|
|
965
|
+
const VERSION = "2.0.0-rc.2";
|
|
966
|
+
|
|
967
|
+
//#endregion
|
|
968
|
+
//#region src/compat/client.ts
|
|
969
|
+
const environments = {
|
|
970
|
+
production: "https://backend.composio.dev",
|
|
971
|
+
staging: "https://staging-backend.composio.dev",
|
|
972
|
+
local: "http://localhost:9900"
|
|
973
|
+
};
|
|
974
|
+
/** Read a trimmed environment value in Node or Deno without assuming either runtime exists. */
|
|
975
|
+
const readEnv = (name) => {
|
|
976
|
+
const globals = globalThis;
|
|
977
|
+
try {
|
|
978
|
+
const fromProcess = globals.process?.env?.[name]?.trim();
|
|
979
|
+
if (fromProcess) return fromProcess;
|
|
980
|
+
} catch {}
|
|
981
|
+
try {
|
|
982
|
+
return globals.Deno?.env?.get?.(name)?.trim() || void 0;
|
|
983
|
+
} catch {}
|
|
984
|
+
};
|
|
985
|
+
/** Severity order: a record at or below the configured level is emitted. */
|
|
986
|
+
const LOG_LEVELS = {
|
|
987
|
+
off: 0,
|
|
988
|
+
error: 1,
|
|
989
|
+
warn: 2,
|
|
990
|
+
info: 3,
|
|
991
|
+
debug: 4
|
|
992
|
+
};
|
|
993
|
+
/**
|
|
994
|
+
* `logLevel` is a plain string on the public surface and may arrive from
|
|
995
|
+
* `COMPOSIO_LOG`, so it can hold anything. An unrecognized value falls back to
|
|
996
|
+
* the default rather than silencing the client or making it shout.
|
|
997
|
+
*/
|
|
998
|
+
const isLogLevel = (value) => value !== void 0 && Object.hasOwn(LOG_LEVELS, value);
|
|
999
|
+
var Composio = class Composio {
|
|
1000
|
+
apiKey;
|
|
1001
|
+
userApiKey;
|
|
1002
|
+
orgApiKey;
|
|
1003
|
+
baseURL;
|
|
1004
|
+
maxRetries;
|
|
1005
|
+
timeout;
|
|
1006
|
+
logger;
|
|
1007
|
+
logLevel;
|
|
1008
|
+
fetchOptions;
|
|
1009
|
+
#fetch;
|
|
1010
|
+
#options;
|
|
1011
|
+
/**
|
|
1012
|
+
* The (operation, notice) pairs, and separately the (operation, deprecated
|
|
1013
|
+
* input set) pairs, this instance has already warned about — one Set shared
|
|
1014
|
+
* by both triggers under distinct key prefixes (`inspectDeprecation` vs
|
|
1015
|
+
* `inspectDeprecatedInputs`), so a deprecated endpoint or a deprecated
|
|
1016
|
+
* parameter called in a loop announces itself once — while a *revised*
|
|
1017
|
+
* notice from that same endpoint, say once a `Sunset` date is committed,
|
|
1018
|
+
* still gets through.
|
|
1019
|
+
*
|
|
1020
|
+
* Per client *lineage*, not per process: a client built with `new Composio()`
|
|
1021
|
+
* starts empty, and `withOptions()` shares this exact Set with the client it
|
|
1022
|
+
* returns (see below). Not reassigned anywhere else — the mutability exists
|
|
1023
|
+
* only so a derived client can join its parent's record.
|
|
1024
|
+
*/
|
|
1025
|
+
#deprecationSeen = /* @__PURE__ */ new Set();
|
|
1026
|
+
constructor({ baseURL = readEnv("COMPOSIO_BASE_URL"), apiKey = readEnv("COMPOSIO_API_KEY") ?? null, userApiKey = readEnv("COMPOSIO_USER_API_KEY") ?? null, orgApiKey = readEnv("COMPOSIO_ORG_API_KEY") ?? null, ...opts } = {}) {
|
|
1027
|
+
const options = {
|
|
1028
|
+
apiKey,
|
|
1029
|
+
userApiKey,
|
|
1030
|
+
orgApiKey,
|
|
1031
|
+
...opts,
|
|
1032
|
+
baseURL,
|
|
1033
|
+
environment: opts.environment ?? "production"
|
|
1034
|
+
};
|
|
1035
|
+
if (baseURL && opts.environment) throw new ComposioError("Ambiguous URL; The `baseURL` option (or COMPOSIO_BASE_URL env var) and the `environment` option are given. If you want to use the environment you must pass baseURL: null");
|
|
1036
|
+
this.baseURL = options.baseURL || environments[options.environment || "production"];
|
|
1037
|
+
this.timeout = options.timeout ?? Composio.DEFAULT_TIMEOUT;
|
|
1038
|
+
this.logger = options.logger ?? console;
|
|
1039
|
+
this.logLevel = options.logLevel ?? readEnv("COMPOSIO_LOG") ?? "warn";
|
|
1040
|
+
this.fetchOptions = options.fetchOptions;
|
|
1041
|
+
this.maxRetries = options.maxRetries ?? 2;
|
|
1042
|
+
this.#fetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
|
|
1043
|
+
const customHeadersEnv = readEnv("COMPOSIO_CUSTOM_HEADERS");
|
|
1044
|
+
if (customHeadersEnv) {
|
|
1045
|
+
const parsed = {};
|
|
1046
|
+
for (const line of customHeadersEnv.split("\n")) {
|
|
1047
|
+
const colon = line.indexOf(":");
|
|
1048
|
+
if (colon >= 0) parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
1049
|
+
}
|
|
1050
|
+
try {
|
|
1051
|
+
options.defaultHeaders = mergeHeaders([parsed, options.defaultHeaders]);
|
|
1052
|
+
} catch (cause) {
|
|
1053
|
+
throw new ComposioError(`COMPOSIO_CUSTOM_HEADERS contains an invalid header: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
this.#options = options;
|
|
1057
|
+
this.apiKey = apiKey;
|
|
1058
|
+
this.userApiKey = userApiKey;
|
|
1059
|
+
this.orgApiKey = orgApiKey;
|
|
1060
|
+
assertCredentialTransport(this.baseURL, this.#credentials());
|
|
1061
|
+
Object.assign(this, createClientResources(this));
|
|
1062
|
+
}
|
|
1063
|
+
/** Returns a new client reusing the current options with `options` merged over them. */
|
|
1064
|
+
withOptions(options) {
|
|
1065
|
+
const client = new this.constructor({
|
|
1066
|
+
...this.#options,
|
|
1067
|
+
environment: options.environment ? options.environment : void 0,
|
|
1068
|
+
baseURL: options.environment ? void 0 : this.baseURL,
|
|
1069
|
+
maxRetries: this.maxRetries,
|
|
1070
|
+
timeout: this.timeout,
|
|
1071
|
+
logger: this.logger,
|
|
1072
|
+
logLevel: this.logLevel,
|
|
1073
|
+
fetch: this.#fetch,
|
|
1074
|
+
fetchOptions: this.fetchOptions,
|
|
1075
|
+
apiKey: this.apiKey,
|
|
1076
|
+
userApiKey: this.userApiKey,
|
|
1077
|
+
orgApiKey: this.orgApiKey,
|
|
1078
|
+
...options
|
|
1079
|
+
});
|
|
1080
|
+
client.#deprecationSeen = this.#deprecationSeen;
|
|
1081
|
+
return client;
|
|
1082
|
+
}
|
|
1083
|
+
get(path, opts) {
|
|
1084
|
+
return this.#methodRequest("get", path, opts);
|
|
1085
|
+
}
|
|
1086
|
+
post(path, opts) {
|
|
1087
|
+
return this.#methodRequest("post", path, opts);
|
|
1088
|
+
}
|
|
1089
|
+
patch(path, opts) {
|
|
1090
|
+
return this.#methodRequest("patch", path, opts);
|
|
1091
|
+
}
|
|
1092
|
+
put(path, opts) {
|
|
1093
|
+
return this.#methodRequest("put", path, opts);
|
|
1094
|
+
}
|
|
1095
|
+
delete(path, opts) {
|
|
1096
|
+
return this.#methodRequest("delete", path, opts);
|
|
1097
|
+
}
|
|
1098
|
+
#methodRequest(method, path, opts) {
|
|
1099
|
+
return this.request({
|
|
1100
|
+
method,
|
|
1101
|
+
path,
|
|
1102
|
+
...opts
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
request(options) {
|
|
1106
|
+
return new APIPromise(makeRequest(this.#kernelConfig(), options));
|
|
1107
|
+
}
|
|
1108
|
+
/** Read at dispatch, never cached: all three fields are public and mutable. */
|
|
1109
|
+
#credentials() {
|
|
1110
|
+
return {
|
|
1111
|
+
apiKey: this.apiKey,
|
|
1112
|
+
userApiKey: this.userApiKey,
|
|
1113
|
+
orgApiKey: this.orgApiKey
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1116
|
+
#onKernelLog = (level, message, metadata) => {
|
|
1117
|
+
this.#emitLog(level, message, metadata);
|
|
1118
|
+
};
|
|
1119
|
+
#onKernelResponse = (response, options) => {
|
|
1120
|
+
inspectDeprecation({
|
|
1121
|
+
response,
|
|
1122
|
+
method: options.method,
|
|
1123
|
+
path: options.path,
|
|
1124
|
+
baseURL: this.baseURL,
|
|
1125
|
+
operations: GENERATED_OPERATIONS,
|
|
1126
|
+
seen: this.#deprecationSeen,
|
|
1127
|
+
warn: (message) => {
|
|
1128
|
+
this.#emitLog("warn", message);
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
};
|
|
1132
|
+
#onKernelRequest = (operation, query, body, headers) => {
|
|
1133
|
+
inspectDeprecatedInputs({
|
|
1134
|
+
operation,
|
|
1135
|
+
query,
|
|
1136
|
+
body,
|
|
1137
|
+
headers,
|
|
1138
|
+
table: GENERATED_DEPRECATED_INPUTS,
|
|
1139
|
+
seen: this.#deprecationSeen,
|
|
1140
|
+
warn: (message) => {
|
|
1141
|
+
this.#emitLog("warn", message);
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
#kernelConfig() {
|
|
1146
|
+
const configuredLogLevel = isLogLevel(this.logLevel) ? this.logLevel : "warn";
|
|
1147
|
+
const lifecycleLoggingEnabled = LOG_LEVELS[configuredLogLevel] >= LOG_LEVELS.info;
|
|
1148
|
+
return {
|
|
1149
|
+
baseURL: this.baseURL,
|
|
1150
|
+
credentials: this.#credentials(),
|
|
1151
|
+
operations: GENERATED_OPERATIONS,
|
|
1152
|
+
maxRetries: this.maxRetries,
|
|
1153
|
+
timeout: this.timeout,
|
|
1154
|
+
userAgent: `${this.constructor.name}/JS ${VERSION}`,
|
|
1155
|
+
fetch: this.#fetch,
|
|
1156
|
+
defaultHeaders: this.#options.defaultHeaders,
|
|
1157
|
+
defaultQuery: this.#options.defaultQuery,
|
|
1158
|
+
fetchOptions: this.fetchOptions,
|
|
1159
|
+
...lifecycleLoggingEnabled ? { onLog: this.#onKernelLog } : {},
|
|
1160
|
+
onResponse: this.#onKernelResponse,
|
|
1161
|
+
onRequest: this.#onKernelRequest
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Writes one record through the configured `logger`, gated on `logLevel`.
|
|
1166
|
+
*
|
|
1167
|
+
* A private method by construction: emitting is the client's own business
|
|
1168
|
+
* and the public surface is pinned against the Stainless client, which
|
|
1169
|
+
* exposes no such method. The logger is caller-supplied, so a missing method
|
|
1170
|
+
* or a throwing one is treated as no logger at all — the same rule the
|
|
1171
|
+
* kernel applies to its advisory observer callbacks.
|
|
1172
|
+
*/
|
|
1173
|
+
#emitLog(level, message, ...details) {
|
|
1174
|
+
const configured = isLogLevel(this.logLevel) ? this.logLevel : "warn";
|
|
1175
|
+
if (LOG_LEVELS[configured] < LOG_LEVELS[level]) return;
|
|
1176
|
+
try {
|
|
1177
|
+
const sink = this.logger[level];
|
|
1178
|
+
if (typeof sink !== "function") return;
|
|
1179
|
+
sink.call(this.logger, message, ...details);
|
|
1180
|
+
} catch {}
|
|
1181
|
+
}
|
|
1182
|
+
static Composio = this;
|
|
1183
|
+
static DEFAULT_TIMEOUT = 6e4;
|
|
1184
|
+
static ComposioError = ComposioError;
|
|
1185
|
+
static APIError = APIError;
|
|
1186
|
+
static APIConnectionError = APIConnectionError;
|
|
1187
|
+
static APIConnectionTimeoutError = APIConnectionTimeoutError;
|
|
1188
|
+
static APIUserAbortError = APIUserAbortError;
|
|
1189
|
+
static NotFoundError = NotFoundError;
|
|
1190
|
+
static ConflictError = ConflictError;
|
|
1191
|
+
static RateLimitError = RateLimitError;
|
|
1192
|
+
static BadRequestError = BadRequestError;
|
|
1193
|
+
static AuthenticationError = AuthenticationError;
|
|
1194
|
+
static InternalServerError = InternalServerError;
|
|
1195
|
+
static PermissionDeniedError = PermissionDeniedError;
|
|
1196
|
+
static UnprocessableEntityError = UnprocessableEntityError;
|
|
1197
|
+
};
|
|
1198
|
+
Composio.ToolRouter = ToolRouter;
|
|
1199
|
+
Composio.Tools = Tools;
|
|
1200
|
+
Composio.Files = Files$1;
|
|
1201
|
+
Composio.ConnectedAccounts = ConnectedAccounts;
|
|
1202
|
+
Composio.Link = Link;
|
|
1203
|
+
Composio.Toolkits = Toolkits;
|
|
1204
|
+
Composio.AuthConfigs = AuthConfigs;
|
|
1205
|
+
Composio.TriggersTypes = TriggersTypes;
|
|
1206
|
+
Composio.TriggerInstances = TriggerInstances;
|
|
1207
|
+
Composio.Mcp = Mcp;
|
|
1208
|
+
Composio.Cli = Cli;
|
|
1209
|
+
Composio.Logs = Logs;
|
|
1210
|
+
Composio.Project = Project;
|
|
1211
|
+
Composio.Migration = Migration;
|
|
1212
|
+
Composio.WebhookSubscriptions = WebhookSubscriptions;
|
|
1213
|
+
Composio.WebhookEndpoints = WebhookEndpoints;
|
|
1214
|
+
Composio.Org = Org;
|
|
1215
|
+
Composio.Auth = Auth;
|
|
1216
|
+
Composio.ApiKeyRevocation = ApiKeyRevocation;
|
|
1217
|
+
|
|
1218
|
+
//#endregion
|
|
1219
|
+
export { APIConnectionError, APIConnectionTimeoutError, APIError, APIPromise, APIUserAbortError, AuthenticationError, BadRequestError, Composio, Composio as default, ComposioError, ConflictError, Files, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, Session, ToolRouter, UnprocessableEntityError, VERSION };
|