@composio/client 0.1.0-alpha.9 → 2.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -315
- package/dist/api-key-revocation-CMby8GRJ.mjs +25 -0
- package/dist/auth-Cogku2no.mjs +17 -0
- package/dist/auth-configs-Dgujwvul.mjs +55 -0
- package/dist/clanker-Ddf6to-5.mjs +24 -0
- package/dist/cli-Bx3dRctN.mjs +45 -0
- package/dist/config-BLBbhLe1.mjs +10 -0
- package/dist/config-DnyMhILW.d.mts +9 -0
- package/dist/connected-accounts-DNOWcz-A.mjs +83 -0
- package/dist/consumer-B_ccSE7b.mjs +34 -0
- package/dist/custom-CEy4IB_M.mjs +88 -0
- package/dist/custom-JHvAPJnl.mjs +24 -0
- package/dist/error-DLB1uKM3.mjs +109 -0
- package/dist/files-C74URe8c.mjs +31 -0
- package/dist/files-CxbSR_Qf.mjs +49 -0
- package/dist/generate-Cfcp7BDV.mjs +24 -0
- package/dist/generated-operations-DpYfIPgx.mjs +2312 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +576 -0
- package/dist/keyring-DPTbHLph.mjs +17 -0
- package/dist/link-HtoYUvao.mjs +23 -0
- package/dist/logs-B1kxIBDI.mjs +38 -0
- package/dist/manage-Cv_zl1Pa.mjs +28 -0
- package/dist/mcp-DPHzA1Gg.mjs +91 -0
- package/dist/migration-CBhnoN-Y.mjs +10 -0
- package/dist/migration-CKGKuRO3.d.mts +9 -0
- package/dist/org-DfPJHXZ4.mjs +45 -0
- package/dist/owner-BOJ0ppd_.mjs +17 -0
- package/dist/pagination.d.mts +56 -0
- package/dist/pagination.mjs +50 -0
- package/dist/project-CBh3olOE.mjs +29 -0
- package/dist/project-Cyn5wfjX.mjs +25 -0
- package/dist/project-DgHmeDvz.mjs +47 -0
- package/dist/project-z2RqqvAR.mjs +22 -0
- package/dist/realtime-AhDHHK8s.mjs +28 -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/custom.d.mts +2 -0
- package/dist/resources/custom.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/keyring.d.mts +2 -0
- package/dist/resources/keyring.mjs +3 -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/session-configs.d.mts +2 -0
- package/dist/resources/session-configs.mjs +24 -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-DN52ZBZa.mjs +22 -0
- package/dist/session-ZjgXXTor.mjs +110 -0
- package/dist/session-configs-DBYUrVm-.d.mts +27180 -0
- package/dist/tool-router-oEa6XLps.mjs +14 -0
- package/dist/toolkits-gnhAqP-a.mjs +62 -0
- package/dist/tools-B6EBv0kQ.mjs +33 -0
- package/dist/tools-CplwSMIX.mjs +69 -0
- package/dist/trigger-instances-BZyLCvgX.mjs +35 -0
- package/dist/triggers-tFRN45MV.mjs +28 -0
- package/dist/triggers-types-BOXTcipZ.mjs +34 -0
- package/dist/usage-DsWhJVDd.mjs +31 -0
- package/dist/usage-qjodPLQq.mjs +31 -0
- package/dist/webhook-endpoints-Cv2sK6HF.mjs +51 -0
- package/dist/webhook-subscriptions-BxPEYH5X.mjs +55 -0
- package/package.json +85 -126
- 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/README.md
CHANGED
|
@@ -1,373 +1,157 @@
|
|
|
1
|
-
#
|
|
1
|
+
# composio-client
|
|
2
2
|
|
|
3
|
-
[
|
|
3
|
+
Composio API client for TypeScript, generated from the [v3.1 OpenAPI spec](https://staging-backend.composio.dev/api/v3.1/openapi.json) with [hey-api](https://heyapi.dev).
|
|
4
4
|
|
|
5
|
-
This
|
|
6
|
-
|
|
7
|
-
The REST API documentation can be found on [docs.composio.com](https://docs.composio.com). The full API of this library can be found in [api.md](api.md).
|
|
8
|
-
|
|
9
|
-
It is generated with [Stainless](https://www.stainless.com/).
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npm install @composio/client
|
|
15
|
-
```
|
|
5
|
+
This repo is the successor to the Stainless-generated [`@composio/client`](https://www.npmjs.com/package/@composio/client) (Stainless is sunsetting). Current scope: the full `/api/v3.1` surface — all 104 released operations — in **both** languages: TypeScript at the package root, and Python in [`python/`](./python/README.md) (PyPI takeover pending). Migration is tracked on the wayfinder map [UXE-152](https://linear.app/composio/issue/UXE-152).
|
|
16
6
|
|
|
17
7
|
## Usage
|
|
18
8
|
|
|
19
|
-
The
|
|
9
|
+
The package root is the Stainless-compatible drop-in surface: `new Composio({ apiKey })`, the Stainless type names, and throwing `APIPromise` semantics (shipped via UXE-163/UXE-164).
|
|
20
10
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import Composio from '@composio/client';
|
|
24
|
-
|
|
25
|
-
const client = new Composio({
|
|
26
|
-
apiKey: process.env['COMPOSIO_API_KEY'], // This is the default and can be omitted
|
|
27
|
-
environment: 'staging', // or 'production' | 'local'; defaults to 'production'
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
async function main() {
|
|
31
|
-
const response = await client.tools.execute('action');
|
|
11
|
+
```ts
|
|
12
|
+
import Composio from '@composio/client'
|
|
32
13
|
|
|
33
|
-
|
|
34
|
-
}
|
|
14
|
+
const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY })
|
|
35
15
|
|
|
36
|
-
|
|
16
|
+
const session = await composio.toolRouter.session.create({ user_id: 'user_123' })
|
|
17
|
+
console.log(session.session_id, session.mcp.url)
|
|
37
18
|
```
|
|
38
19
|
|
|
39
|
-
###
|
|
20
|
+
### Pagination
|
|
40
21
|
|
|
41
|
-
|
|
22
|
+
Use the `@composio/client/pagination` subpath to traverse list operations that return the standard
|
|
23
|
+
`items` and `next_cursor` fields:
|
|
42
24
|
|
|
43
|
-
<!-- prettier-ignore -->
|
|
44
25
|
```ts
|
|
45
|
-
import
|
|
26
|
+
import { paginate } from '@composio/client/pagination'
|
|
46
27
|
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
});
|
|
28
|
+
const toolkits = paginate(({ cursor }) =>
|
|
29
|
+
composio.toolkits.list({ cursor, limit: 100 }),
|
|
30
|
+
)
|
|
51
31
|
|
|
52
|
-
|
|
53
|
-
|
|
32
|
+
for await (const toolkit of toolkits) {
|
|
33
|
+
console.log(toolkit.slug)
|
|
54
34
|
}
|
|
55
|
-
|
|
56
|
-
main();
|
|
57
35
|
```
|
|
58
36
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
37
|
+
Item iteration is lazy. Each traversal starts from the first page, and breaking early stops fetching
|
|
38
|
+
more pages. Use `iterPages()` when page metadata matters, or `toArray()` to collect every item; avoid
|
|
39
|
+
`toArray()` when the full result may not fit comfortably in memory.
|
|
62
40
|
|
|
63
|
-
When the library is unable to connect to the API,
|
|
64
|
-
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
|
|
65
|
-
a subclass of `APIError` will be thrown:
|
|
66
|
-
|
|
67
|
-
<!-- prettier-ignore -->
|
|
68
41
|
```ts
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (err instanceof Composio.APIError) {
|
|
72
|
-
console.log(err.status); // 400
|
|
73
|
-
console.log(err.name); // BadRequestError
|
|
74
|
-
console.log(err.headers); // {server: 'nginx', ...}
|
|
75
|
-
} else {
|
|
76
|
-
throw err;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
42
|
+
for await (const page of toolkits.iterPages()) {
|
|
43
|
+
console.log(page.items.length)
|
|
79
44
|
}
|
|
80
45
|
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Error codes are as followed:
|
|
85
|
-
|
|
86
|
-
| Status Code | Error Type |
|
|
87
|
-
| ----------- | -------------------------- |
|
|
88
|
-
| 400 | `BadRequestError` |
|
|
89
|
-
| 401 | `AuthenticationError` |
|
|
90
|
-
| 403 | `PermissionDeniedError` |
|
|
91
|
-
| 404 | `NotFoundError` |
|
|
92
|
-
| 422 | `UnprocessableEntityError` |
|
|
93
|
-
| 429 | `RateLimitError` |
|
|
94
|
-
| >=500 | `InternalServerError` |
|
|
95
|
-
| N/A | `APIConnectionError` |
|
|
96
|
-
|
|
97
|
-
### Retries
|
|
98
|
-
|
|
99
|
-
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
|
|
100
|
-
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
101
|
-
429 Rate Limit, and >=500 Internal errors will all be retried by default.
|
|
102
|
-
|
|
103
|
-
You can use the `maxRetries` option to configure or disable this:
|
|
104
|
-
|
|
105
|
-
<!-- prettier-ignore -->
|
|
106
|
-
```js
|
|
107
|
-
// Configure the default for all requests:
|
|
108
|
-
const client = new Composio({
|
|
109
|
-
maxRetries: 0, // default is 2
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Or, configure per-request:
|
|
113
|
-
await client.tools.execute('action', {
|
|
114
|
-
maxRetries: 5,
|
|
115
|
-
});
|
|
46
|
+
const allToolkits = await toolkits.toArray()
|
|
116
47
|
```
|
|
117
48
|
|
|
118
|
-
|
|
49
|
+
For another response shape, provide an adapter. Custom cursors must be strings or numbers so repeated
|
|
50
|
+
values can be detected reliably across independently decoded pages:
|
|
119
51
|
|
|
120
|
-
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
|
|
121
|
-
|
|
122
|
-
<!-- prettier-ignore -->
|
|
123
52
|
```ts
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
timeout: 5 * 1000,
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
On timeout, an `APIConnectionTimeoutError` is thrown.
|
|
136
|
-
|
|
137
|
-
Note that requests which time out will be [retried twice by default](#retries).
|
|
138
|
-
|
|
139
|
-
## Advanced Usage
|
|
140
|
-
|
|
141
|
-
### Accessing raw Response data (e.g., headers)
|
|
142
|
-
|
|
143
|
-
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
144
|
-
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
145
|
-
|
|
146
|
-
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
147
|
-
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
148
|
-
|
|
149
|
-
<!-- prettier-ignore -->
|
|
150
|
-
```ts
|
|
151
|
-
const client = new Composio();
|
|
152
|
-
|
|
153
|
-
const response = await client.tools.execute('action').asResponse();
|
|
154
|
-
console.log(response.headers.get('X-My-Header'));
|
|
155
|
-
console.log(response.statusText); // access the underlying Response object
|
|
156
|
-
|
|
157
|
-
const { data: response, response: raw } = await client.tools.execute('action').withResponse();
|
|
158
|
-
console.log(raw.headers.get('X-My-Header'));
|
|
159
|
-
console.log(response.log_id);
|
|
53
|
+
const results = paginate(
|
|
54
|
+
({ cursor }) => loadPage(cursor),
|
|
55
|
+
{
|
|
56
|
+
items: page => page.data,
|
|
57
|
+
nextCursor: page => page.nextCursor,
|
|
58
|
+
},
|
|
59
|
+
)
|
|
160
60
|
```
|
|
161
61
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
62
|
+
A repeated cursor cycle throws `ComposioError` instead of requesting pages indefinitely. An empty
|
|
63
|
+
cursor ends traversal. When a response omits `next_cursor` but numeric `current_page` and
|
|
64
|
+
`total_pages` metadata shows that more pages exist, the default adapter fails instead of silently
|
|
65
|
+
returning partial results; provide a custom adapter for that response shape. Requests are sequential
|
|
66
|
+
and inherit the normal client retry/backoff path, but this is not proactive/shared rate-limit pacing.
|
|
167
67
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
1. Via the `COMPOSIO_LOG` environment variable
|
|
173
|
-
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
68
|
+
Use `fromEnv` when configuration must come from a specific environment snapshot instead of the
|
|
69
|
+
host process. Explicit options replace mapped values, so this is safe for tests, workers, and
|
|
70
|
+
applications that load configuration themselves:
|
|
174
71
|
|
|
175
72
|
```ts
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const client = new Composio({
|
|
179
|
-
logLevel: 'debug', // Show all log messages
|
|
180
|
-
});
|
|
73
|
+
const composio = Composio.fromEnv(config, { environment: 'staging' })
|
|
181
74
|
```
|
|
182
75
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
- `'warn'` - Show warnings and errors (default)
|
|
188
|
-
- `'error'` - Show only errors
|
|
189
|
-
- `'off'` - Disable all logging
|
|
190
|
-
|
|
191
|
-
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
192
|
-
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
193
|
-
may still be visible.
|
|
76
|
+
`fromEnv` recognizes `COMPOSIO_API_KEY`, `COMPOSIO_USER_API_KEY`, `COMPOSIO_ORG_API_KEY`,
|
|
77
|
+
`COMPOSIO_BASE_URL`, `COMPOSIO_ALLOW_INSECURE_HTTP`, `COMPOSIO_CUSTOM_HEADERS`, and
|
|
78
|
+
`COMPOSIO_LOG_LEVEL`. Derived clients created with `withOptions()` keep using the resolved snapshot and do
|
|
79
|
+
not fall back to ambient values.
|
|
194
80
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
199
|
-
|
|
200
|
-
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
201
|
-
below the configured level will not be sent to your logger.
|
|
81
|
+
Inject a `Transport` when an application or test needs to own HTTP dispatch. The transport receives
|
|
82
|
+
a complete `Request`; retries, credential-safe redirects, timeouts, and response parsing stay in the
|
|
83
|
+
client:
|
|
202
84
|
|
|
203
85
|
```ts
|
|
204
|
-
import Composio from '@composio/client'
|
|
205
|
-
import pino from 'pino';
|
|
206
|
-
|
|
207
|
-
const logger = pino();
|
|
86
|
+
import Composio, { createFetchTransport } from '@composio/client'
|
|
208
87
|
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
212
|
-
});
|
|
88
|
+
const transport = createFetchTransport({ fetch: instrumentedFetch })
|
|
89
|
+
const composio = new Composio({ apiKey, transport })
|
|
213
90
|
```
|
|
214
91
|
|
|
215
|
-
|
|
92
|
+
Existing `fetch` and `fetchOptions` constructor options remain supported. They cannot be combined
|
|
93
|
+
with `transport` because a request can have only one HTTP dispatcher.
|
|
216
94
|
|
|
217
|
-
|
|
218
|
-
endpoints, params, or response properties, the library can still be used.
|
|
95
|
+
## Upgrade from Stainless 0.1.x to 2.0
|
|
219
96
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
Options on the client, such as retries, will be respected when making these requests.
|
|
97
|
+
By default, the 2.0 client refuses to send credentials over plain HTTP unless the hostname is
|
|
98
|
+
loopback. For a trusted development backend such as Docker's host gateway, opt in to the exact
|
|
99
|
+
configured origin:
|
|
224
100
|
|
|
225
101
|
```ts
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
102
|
+
const composio = new Composio({
|
|
103
|
+
apiKey,
|
|
104
|
+
baseURL: 'http://host.docker.internal:9900',
|
|
105
|
+
allowInsecureHTTP: true,
|
|
106
|
+
})
|
|
230
107
|
```
|
|
231
108
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
|
|
235
|
-
parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
|
|
236
|
-
send will be sent as-is.
|
|
237
|
-
|
|
238
|
-
```ts
|
|
239
|
-
client.foo.create({
|
|
240
|
-
foo: 'my_param',
|
|
241
|
-
bar: 12,
|
|
242
|
-
// @ts-expect-error baz is not yet public
|
|
243
|
-
baz: 'undocumented option',
|
|
244
|
-
});
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
For requests with the `GET` verb, any extra params will be in the query, all other requests will send the
|
|
248
|
-
extra param in the body.
|
|
249
|
-
|
|
250
|
-
If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
|
|
251
|
-
options.
|
|
252
|
-
|
|
253
|
-
#### Undocumented response properties
|
|
109
|
+
The equivalent environment configuration is:
|
|
254
110
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
### Customizing the fetch client
|
|
260
|
-
|
|
261
|
-
By default, this library expects a global `fetch` function is defined.
|
|
262
|
-
|
|
263
|
-
If you want to use a different `fetch` function, you can either polyfill the global:
|
|
264
|
-
|
|
265
|
-
```ts
|
|
266
|
-
import fetch from 'my-fetch';
|
|
267
|
-
|
|
268
|
-
globalThis.fetch = fetch;
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Or pass it to the client:
|
|
272
|
-
|
|
273
|
-
```ts
|
|
274
|
-
import Composio from '@composio/client';
|
|
275
|
-
import fetch from 'my-fetch';
|
|
276
|
-
|
|
277
|
-
const client = new Composio({ fetch });
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Fetch options
|
|
281
|
-
|
|
282
|
-
If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)
|
|
283
|
-
|
|
284
|
-
```ts
|
|
285
|
-
import Composio from '@composio/client';
|
|
286
|
-
|
|
287
|
-
const client = new Composio({
|
|
288
|
-
fetchOptions: {
|
|
289
|
-
// `RequestInit` options
|
|
290
|
-
},
|
|
291
|
-
});
|
|
111
|
+
```sh
|
|
112
|
+
COMPOSIO_BASE_URL=http://host.docker.internal:9900 \
|
|
113
|
+
COMPOSIO_ALLOW_INSECURE_HTTP=1
|
|
292
114
|
```
|
|
293
115
|
|
|
294
|
-
|
|
116
|
+
The opt-in records the resolved scheme, hostname, and port. Mutating `baseURL` cannot broaden it,
|
|
117
|
+
and `withOptions({ baseURL: ... })` requires `allowInsecureHTTP: true` again when the origin
|
|
118
|
+
changes. Redirects to another origin remain credential-free.
|
|
295
119
|
|
|
296
|
-
|
|
297
|
-
options to requests:
|
|
120
|
+
## Development
|
|
298
121
|
|
|
299
|
-
|
|
122
|
+
Toolchain is pinned via [mise](https://mise.jdx.dev) (`mise install`): Node 24, pnpm 11, Python 3.13, uv. ESM-only, TypeScript 7 (native compiler for typechecking, `typescript@6` retained for tooling until 7.1 restores the compiler API).
|
|
300
123
|
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
124
|
+
```sh
|
|
125
|
+
pnpm install
|
|
126
|
+
pnpm generate # hey-api + compat codegen: spec/openapi.json → src/generated + src/compat/resources (do not edit)
|
|
127
|
+
pnpm lint # eslint over src, test, codegen, parity, and demo
|
|
128
|
+
pnpm typecheck # tsgo (TS native), including type tests and demo
|
|
129
|
+
pnpm typecheck:tsc # same programs under tsc — both compilers must pass
|
|
130
|
+
pnpm codegen:check # verify committed src/compat/resources matches the generator
|
|
131
|
+
pnpm test # unit tests (MSW mocks) + codegen tests
|
|
132
|
+
pnpm build # tsdown → dist/ (runs publint + arethetypeswrong)
|
|
133
|
+
pnpm test:pack # pack the real tarball, typecheck + import every drop-in subpath
|
|
134
|
+
pnpm benchmark:baseline # capture the dist/ a benchmark run compares against
|
|
135
|
+
pnpm benchmark # score SDK overhead against that baseline and against Stainless
|
|
136
|
+
pnpm test:contract # live API tests; requires COMPOSIO_API_KEY (copy .env.example to .env)
|
|
137
|
+
pnpm refresh-spec # re-fetch spec/openapi.json from the live backend
|
|
311
138
|
```
|
|
312
139
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
```ts
|
|
316
|
-
import Composio from '@composio/client';
|
|
140
|
+
`src/generated/` and `src/compat/resources/` are regenerated output — never edit them by hand; CI fails if they drift from `spec/openapi.json`.
|
|
317
141
|
|
|
318
|
-
|
|
319
|
-
fetchOptions: {
|
|
320
|
-
proxy: 'http://localhost:8888',
|
|
321
|
-
},
|
|
322
|
-
});
|
|
323
|
-
```
|
|
142
|
+
### Python lane
|
|
324
143
|
|
|
325
|
-
|
|
144
|
+
The Python client lives in the [`python/`](./python/README.md) workspace (uv-managed):
|
|
326
145
|
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
});
|
|
146
|
+
```sh
|
|
147
|
+
pnpm generate:python # from the repo root: spec snapshot → python/src/composio_client/_generated
|
|
148
|
+
cd python
|
|
149
|
+
uv sync
|
|
150
|
+
uv run ruff check
|
|
151
|
+
uv run mypy src scripts
|
|
152
|
+
uv run pytest
|
|
336
153
|
```
|
|
337
154
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
343
|
-
|
|
344
|
-
1. Changes that only affect static types, without breaking runtime behavior.
|
|
345
|
-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
|
|
346
|
-
3. Changes that we do not expect to impact the vast majority of users in practice.
|
|
347
|
-
|
|
348
|
-
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
349
|
-
|
|
350
|
-
We are keen for your feedback; please open an [issue](https://www.github.com/ComposioHQ/composio-base-ts/issues) with questions, bugs, or suggestions.
|
|
351
|
-
|
|
352
|
-
## Requirements
|
|
353
|
-
|
|
354
|
-
TypeScript >= 4.9 is supported.
|
|
355
|
-
|
|
356
|
-
The following runtimes are supported:
|
|
357
|
-
|
|
358
|
-
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
359
|
-
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
360
|
-
- Deno v1.28.0 or higher.
|
|
361
|
-
- Bun 1.0 or later.
|
|
362
|
-
- Cloudflare Workers.
|
|
363
|
-
- Vercel Edge Runtime.
|
|
364
|
-
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
|
|
365
|
-
- Nitro v2.6 or greater.
|
|
366
|
-
|
|
367
|
-
Note that React Native is not supported at this time.
|
|
368
|
-
|
|
369
|
-
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
|
|
370
|
-
|
|
371
|
-
## Contributing
|
|
372
|
-
|
|
373
|
-
See [the contributing documentation](./CONTRIBUTING.md).
|
|
155
|
+
Client-overhead measurements use a deterministic in-memory transport and are documented in
|
|
156
|
+
[`docs/benchmarks/client-overhead.md`](./docs/benchmarks/client-overhead.md). They do not measure API
|
|
157
|
+
latency.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-DpYfIPgx.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/api-key-revocation.ts
|
|
4
|
+
const OP_CREATE = generatedOperation("apiKeyRevocation.create");
|
|
5
|
+
/**
|
|
6
|
+
* Spec-surface `client.apiKeyRevocation` resource: the 1-method public
|
|
7
|
+
* leaked-key revocation surface of the v3.1 spec
|
|
8
|
+
* (`POST /api_key_revocation` — POST-on-collection stays `create`), never
|
|
9
|
+
* published by Stainless — wayfinder ticket 32.
|
|
10
|
+
*/
|
|
11
|
+
var ApiKeyRevocation = class {
|
|
12
|
+
#client;
|
|
13
|
+
constructor(client) {
|
|
14
|
+
this.#client = client;
|
|
15
|
+
}
|
|
16
|
+
create(body, options) {
|
|
17
|
+
return this.#client.post("/api/v3.1/api_key_revocation", withOperation(OP_CREATE, {
|
|
18
|
+
body,
|
|
19
|
+
...options
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { ApiKeyRevocation as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as Session } from "./session-DN52ZBZa.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/auth/auth.ts
|
|
4
|
+
/**
|
|
5
|
+
* Spec-surface `client.auth` resource: a method-less container for the
|
|
6
|
+
* `session` sub-resource — wayfinder ticket 32.
|
|
7
|
+
*/
|
|
8
|
+
var Auth = class {
|
|
9
|
+
session;
|
|
10
|
+
constructor(client) {
|
|
11
|
+
this.session = new Session(client);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
Auth.Session = Session;
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Auth as t };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { a as path, c as withOperation, n as generatedOperation } from "./generated-operations-DpYfIPgx.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/auth-configs.ts
|
|
4
|
+
const OP_CREATE = generatedOperation("authConfigs.create");
|
|
5
|
+
const OP_RETRIEVE = generatedOperation("authConfigs.retrieve");
|
|
6
|
+
const OP_UPDATE = generatedOperation("authConfigs.update");
|
|
7
|
+
const OP_LIST = generatedOperation("authConfigs.list");
|
|
8
|
+
const OP_DELETE = generatedOperation("authConfigs.delete");
|
|
9
|
+
const OP_UPDATE_STATUS = generatedOperation("authConfigs.updateStatus");
|
|
10
|
+
/**
|
|
11
|
+
* Stainless-shaped `client.authConfigs` resource: the exact 6-method surface of
|
|
12
|
+
* `@composio/client` (create/retrieve/update/list/delete/updateStatus),
|
|
13
|
+
* dispatched through the handwritten kernel.
|
|
14
|
+
*/
|
|
15
|
+
var AuthConfigs = class {
|
|
16
|
+
#client;
|
|
17
|
+
constructor(client) {
|
|
18
|
+
this.#client = client;
|
|
19
|
+
}
|
|
20
|
+
create(body, options) {
|
|
21
|
+
return this.#client.post("/api/v3.1/auth_configs", withOperation(OP_CREATE, {
|
|
22
|
+
body,
|
|
23
|
+
...options
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
retrieve(nanoid, options) {
|
|
27
|
+
return this.#client.get(path`/api/v3.1/auth_configs/${nanoid}`, withOperation(OP_RETRIEVE, { ...options }));
|
|
28
|
+
}
|
|
29
|
+
update(nanoid, body, options) {
|
|
30
|
+
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}`, withOperation(OP_UPDATE, {
|
|
31
|
+
body,
|
|
32
|
+
...options
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
list(query = {}, options) {
|
|
36
|
+
return this.#client.get("/api/v3.1/auth_configs", withOperation(OP_LIST, {
|
|
37
|
+
query,
|
|
38
|
+
...options
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
delete(nanoid, query = {}, options) {
|
|
42
|
+
return this.#client.delete(path`/api/v3.1/auth_configs/${nanoid}`, withOperation(OP_DELETE, {
|
|
43
|
+
query,
|
|
44
|
+
...options
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
/** @deprecated Deprecated in the input OpenAPI schema. */
|
|
48
|
+
updateStatus(status, params, options) {
|
|
49
|
+
const { nanoid } = params;
|
|
50
|
+
return this.#client.patch(path`/api/v3.1/auth_configs/${nanoid}/${status}`, withOperation(OP_UPDATE_STATUS, { ...options }));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { AuthConfigs as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { c as withOperation, n as generatedOperation } from "./generated-operations-DpYfIPgx.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/compat/resources/org/clanker.ts
|
|
4
|
+
const OP_CREATE_CLAIM = generatedOperation("org.clanker.createClaim");
|
|
5
|
+
/**
|
|
6
|
+
* Spec-surface `client.org.clanker` resource: the 1-method claim surface of
|
|
7
|
+
* the v3.1 spec (`POST /org/clanker/create_claim`), never published by
|
|
8
|
+
* Stainless — wayfinder ticket 31.
|
|
9
|
+
*/
|
|
10
|
+
var Clanker = class {
|
|
11
|
+
#client;
|
|
12
|
+
constructor(client) {
|
|
13
|
+
this.#client = client;
|
|
14
|
+
}
|
|
15
|
+
createClaim(body, options) {
|
|
16
|
+
return this.#client.post("/api/v3.1/org/clanker/create_claim", withOperation(OP_CREATE_CLAIM, {
|
|
17
|
+
body,
|
|
18
|
+
...options
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Clanker as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { c as withOperation, m as mergeHeaders, n as generatedOperation } from "./generated-operations-DpYfIPgx.mjs";
|
|
2
|
+
import { t as Realtime } from "./realtime-AhDHHK8s.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/compat/resources/cli/cli.ts
|
|
5
|
+
const OP_CREATE_CODACT_FAILURE = generatedOperation("cli.createCodactFailure");
|
|
6
|
+
const OP_CREATE_SESSION = generatedOperation("cli.createSession");
|
|
7
|
+
const OP_GET_SESSION = generatedOperation("cli.getSession");
|
|
8
|
+
/**
|
|
9
|
+
* Stainless-shaped `client.cli` resource: the 2-method published CLI
|
|
10
|
+
* authentication surface of `@composio/client` (createSession/getSession)
|
|
11
|
+
* plus the spec-surface `createCodactFailure` (`POST /cli/codact_failures`,
|
|
12
|
+
* never published by Stainless — wayfinder ticket 29).
|
|
13
|
+
*/
|
|
14
|
+
var Cli = class {
|
|
15
|
+
realtime;
|
|
16
|
+
#client;
|
|
17
|
+
constructor(client) {
|
|
18
|
+
this.#client = client;
|
|
19
|
+
this.realtime = new Realtime(client);
|
|
20
|
+
}
|
|
21
|
+
createCodactFailure(params, options) {
|
|
22
|
+
const { "x-user-api-key": xUserApiKey, ...body } = params;
|
|
23
|
+
return this.#client.post("/api/v3.1/cli/codact_failures", withOperation(OP_CREATE_CODACT_FAILURE, {
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
headers: mergeHeaders([{ ...xUserApiKey != null ? { "x-user-api-key": xUserApiKey } : void 0 }, options?.headers])
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
createSession(body = {}, options) {
|
|
30
|
+
return this.#client.post("/api/v3.1/cli/create-session", withOperation(OP_CREATE_SESSION, {
|
|
31
|
+
body,
|
|
32
|
+
...options
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
getSession(query, options) {
|
|
36
|
+
return this.#client.get("/api/v3.1/cli/get-session", withOperation(OP_GET_SESSION, {
|
|
37
|
+
query,
|
|
38
|
+
...options
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
Cli.Realtime = Realtime;
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Cli as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/compat/resources/project/config.ts
|
|
2
|
+
/**
|
|
3
|
+
* Stainless-shaped `client.project.config` resource: an empty resource class
|
|
4
|
+
* (Stainless declares it with no methods), shipped for import/`instanceof`/
|
|
5
|
+
* namespace parity.
|
|
6
|
+
*/
|
|
7
|
+
var Config = class {};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Config as t };
|